Skip to content

Allow a user to remap layers in Eagle import

Jan Mrázek requested to merge yaqwsx/kicad:eagleMapLayers into master

This merge requests builds on top of !443 (merged) and adds an option to remap the Eagle layers (discussed in #5316 (closed)). This MR was consulted with @jeffyoung

Note that the current state of the MR is WIP: all the basic functionality is implemented, however, the code needs minor tweaks and there are several design decisions I would like to consult. I open this MR to track the progress and have a place for discussion.

What is currently missing:

  • limiting the set of possible mapping
  • possibly improvement of the mapping dialog (see #5942 (closed))

I have the following questions before implementing the rest:

  1. the Eagle plugin combines camelCase with underscore_naming. Which convention should I follow in my code?
  2. there is an if in files.cpp to detect whether the selection callback should be registered or not for a given plugin. Currently, there is a comment from the CADSTAR importer that this should be rewritten. What's the expected solution (which fits into KiCAD's codebase)?
  3. I introduced a folder common in the plugins for common parts of the code between the importers. Is this the right place?
  4. In the context of Eagle, it makes sense to just ignore some layers and not import them at all. This not possible right now, since the remapping dialog forces the users to map all layers. Is there a reason for that?

PS: I appreciate any feedback on the WIP

Edited by Jan Mrázek

Merge request reports