Now layers can be selected using the default KiCad names.

This commit is contained in:
Salvador E. Tropea 2021-01-13 12:35:53 -03:00
parent bb4de91672
commit 6efd735a74
2 changed files with 9 additions and 1 deletions

View File

@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- The multipart id to references of multipart components others than part 1.
- Internal BoM: `no_conflict` option to exclude fields from conflict detection.
- Support for KICAD_CONFIG_HOME defined from inside KiCad
- Support for KICAD_CONFIG_HOME defined from inside KiCad.
- Now layers can be selected using the default KiCad names.
### Changed
- Now the default output name applies to the DRC and ERC report names.

View File

@ -153,6 +153,8 @@ class Layer(Optionable):
# Give compatibility for the KiCad 5 default names (automagically renamed by KiCad 6)
elif GS.kicad_version_n >= KICAD_VERSION_5_99 and layer in Layer.KICAD6_RENAME:
ext = [Layer.create_layer(Layer.KICAD6_RENAME[layer])]
elif layer in Layer.DEFAULT_LAYER_NAMES:
ext = [Layer.create_layer(layer)]
if ext is None:
raise KiPlotConfigurationError("Unknown layer spec: `{}`".format(layer))
new_vals.extend(ext)
@ -225,3 +227,8 @@ class Layer(Optionable):
def __str__(self):
return "{} ({} '{}' {})".format(self.layer, self._id, self.description, self.suffix)
for i in range(1, 30):
name = 'In'+str(i)+'.Cu'
Layer.DEFAULT_LAYER_NAMES[name] = pcbnew.In1_Cu+i-1
Layer.DEFAULT_LAYER_DESC[name] = 'Inner layer '+str(i)