[Layers][Added] Mechanism to specify inner/outer copper layers
This commit is contained in:
parent
ea0518f47c
commit
b78c659141
|
|
@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- General:
|
- General:
|
||||||
- Operations that copies the project now also copies the PRL and the DRU
|
- Operations that copies the project now also copies the PRL and the DRU
|
||||||
- Files named *.kibot.yml are also detected as configuration files
|
- Files named *.kibot.yml are also detected as configuration files
|
||||||
|
- Mechanism to specify
|
||||||
|
- All inner layers (inners)
|
||||||
|
- All external copper layers (outers)
|
||||||
- Command line:
|
- Command line:
|
||||||
- `--help-list-offsets` to list footprint offsets (JLCPCB)
|
- `--help-list-offsets` to list footprint offsets (JLCPCB)
|
||||||
- `--help-list-rotations` to list footprint rotations (JLCPCB)
|
- `--help-list-rotations` to list footprint rotations (JLCPCB)
|
||||||
|
|
|
||||||
|
|
@ -250,6 +250,8 @@ You can also use any of the following grup of layers:
|
||||||
paste, adhesive, etc.)
|
paste, adhesive, etc.)
|
||||||
- **user** all the user layers (draw, comments, eco, margin, edge cuts,
|
- **user** all the user layers (draw, comments, eco, margin, edge cuts,
|
||||||
etc.)
|
etc.)
|
||||||
|
- **inners** all the inner copper layers
|
||||||
|
- **outers** all the outer copper layers
|
||||||
|
|
||||||
You can also mix the above definitions using a list:
|
You can also mix the above definitions using a list:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ Parameters:
|
||||||
- **comment** :index:`: <pair: output - diff; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
- **comment** :index:`: <pair: output - diff; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
||||||
- **dir** :index:`: <pair: output - diff; dir>` [string='./'] Output directory for the generated files.
|
- **dir** :index:`: <pair: output - diff; dir>` [string='./'] Output directory for the generated files.
|
||||||
If it starts with `+` the rest is concatenated to the default dir.
|
If it starts with `+` the rest is concatenated to the default dir.
|
||||||
- **layers** :index:`: <pair: output - diff; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
- **layers** :index:`: <pair: output - diff; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to use. When empty all available layers are used.
|
List of PCB layers to use. When empty all available layers are used.
|
||||||
Note that if you want to support adding/removing layers you should specify a list here.
|
Note that if you want to support adding/removing layers you should specify a list here.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ Parameters:
|
||||||
- **comment** :index:`: <pair: output - dxf; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
- **comment** :index:`: <pair: output - dxf; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
||||||
- **dir** :index:`: <pair: output - dxf; dir>` [string='./'] Output directory for the generated files.
|
- **dir** :index:`: <pair: output - dxf; dir>` [string='./'] Output directory for the generated files.
|
||||||
If it starts with `+` the rest is concatenated to the default dir.
|
If it starts with `+` the rest is concatenated to the default dir.
|
||||||
- **layers** :index:`: <pair: output - dxf; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
- **layers** :index:`: <pair: output - dxf; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to plot.
|
List of PCB layers to plot.
|
||||||
|
|
||||||
- Valid keys:
|
- Valid keys:
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ Parameters:
|
||||||
- **comment** :index:`: <pair: output - gerber; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
- **comment** :index:`: <pair: output - gerber; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
||||||
- **dir** :index:`: <pair: output - gerber; dir>` [string='./'] Output directory for the generated files.
|
- **dir** :index:`: <pair: output - gerber; dir>` [string='./'] Output directory for the generated files.
|
||||||
If it starts with `+` the rest is concatenated to the default dir.
|
If it starts with `+` the rest is concatenated to the default dir.
|
||||||
- **layers** :index:`: <pair: output - gerber; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
- **layers** :index:`: <pair: output - gerber; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to plot.
|
List of PCB layers to plot.
|
||||||
|
|
||||||
- Valid keys:
|
- Valid keys:
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ Parameters:
|
||||||
- **comment** :index:`: <pair: output - hpgl; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
- **comment** :index:`: <pair: output - hpgl; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
||||||
- **dir** :index:`: <pair: output - hpgl; dir>` [string='./'] Output directory for the generated files.
|
- **dir** :index:`: <pair: output - hpgl; dir>` [string='./'] Output directory for the generated files.
|
||||||
If it starts with `+` the rest is concatenated to the default dir.
|
If it starts with `+` the rest is concatenated to the default dir.
|
||||||
- **layers** :index:`: <pair: output - hpgl; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
- **layers** :index:`: <pair: output - hpgl; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to plot.
|
List of PCB layers to plot.
|
||||||
|
|
||||||
- Valid keys:
|
- Valid keys:
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ Parameters:
|
||||||
- **comment** :index:`: <pair: output - kiri; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
- **comment** :index:`: <pair: output - kiri; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
||||||
- **dir** :index:`: <pair: output - kiri; dir>` [string='./'] Output directory for the generated files.
|
- **dir** :index:`: <pair: output - kiri; dir>` [string='./'] Output directory for the generated files.
|
||||||
If it starts with `+` the rest is concatenated to the default dir.
|
If it starts with `+` the rest is concatenated to the default dir.
|
||||||
- **layers** :index:`: <pair: output - kiri; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
- **layers** :index:`: <pair: output - kiri; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to use. When empty all available layers are used.
|
List of PCB layers to use. When empty all available layers are used.
|
||||||
Note that if you want to support adding/removing layers you should specify a list here.
|
Note that if you want to support adding/removing layers you should specify a list here.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ Parameters:
|
||||||
- **comment** :index:`: <pair: output - pdf; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
- **comment** :index:`: <pair: output - pdf; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
||||||
- **dir** :index:`: <pair: output - pdf; dir>` [string='./'] Output directory for the generated files.
|
- **dir** :index:`: <pair: output - pdf; dir>` [string='./'] Output directory for the generated files.
|
||||||
If it starts with `+` the rest is concatenated to the default dir.
|
If it starts with `+` the rest is concatenated to the default dir.
|
||||||
- **layers** :index:`: <pair: output - pdf; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
- **layers** :index:`: <pair: output - pdf; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to plot.
|
List of PCB layers to plot.
|
||||||
|
|
||||||
- Valid keys:
|
- Valid keys:
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ Parameters:
|
||||||
- **comment** :index:`: <pair: output - pdf_pcb_print; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
- **comment** :index:`: <pair: output - pdf_pcb_print; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
||||||
- **dir** :index:`: <pair: output - pdf_pcb_print; dir>` [string='./'] Output directory for the generated files.
|
- **dir** :index:`: <pair: output - pdf_pcb_print; dir>` [string='./'] Output directory for the generated files.
|
||||||
If it starts with `+` the rest is concatenated to the default dir.
|
If it starts with `+` the rest is concatenated to the default dir.
|
||||||
- **layers** :index:`: <pair: output - pdf_pcb_print; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
- **layers** :index:`: <pair: output - pdf_pcb_print; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to include in the PDF.
|
List of PCB layers to include in the PDF.
|
||||||
|
|
||||||
- Valid keys:
|
- Valid keys:
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ Parameters:
|
||||||
- **comment** :index:`: <pair: output - ps; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
- **comment** :index:`: <pair: output - ps; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
||||||
- **dir** :index:`: <pair: output - ps; dir>` [string='./'] Output directory for the generated files.
|
- **dir** :index:`: <pair: output - ps; dir>` [string='./'] Output directory for the generated files.
|
||||||
If it starts with `+` the rest is concatenated to the default dir.
|
If it starts with `+` the rest is concatenated to the default dir.
|
||||||
- **layers** :index:`: <pair: output - ps; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
- **layers** :index:`: <pair: output - ps; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to plot.
|
List of PCB layers to plot.
|
||||||
|
|
||||||
- Valid keys:
|
- Valid keys:
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ Parameters:
|
||||||
- **comment** :index:`: <pair: output - svg; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
- **comment** :index:`: <pair: output - svg; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
||||||
- **dir** :index:`: <pair: output - svg; dir>` [string='./'] Output directory for the generated files.
|
- **dir** :index:`: <pair: output - svg; dir>` [string='./'] Output directory for the generated files.
|
||||||
If it starts with `+` the rest is concatenated to the default dir.
|
If it starts with `+` the rest is concatenated to the default dir.
|
||||||
- **layers** :index:`: <pair: output - svg; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
- **layers** :index:`: <pair: output - svg; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to plot.
|
List of PCB layers to plot.
|
||||||
|
|
||||||
- Valid keys:
|
- Valid keys:
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ Parameters:
|
||||||
- **comment** :index:`: <pair: output - svg_pcb_print; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
- **comment** :index:`: <pair: output - svg_pcb_print; comment>` [string=''] A comment for documentation purposes. It helps to identify the output.
|
||||||
- **dir** :index:`: <pair: output - svg_pcb_print; dir>` [string='./'] Output directory for the generated files.
|
- **dir** :index:`: <pair: output - svg_pcb_print; dir>` [string='./'] Output directory for the generated files.
|
||||||
If it starts with `+` the rest is concatenated to the default dir.
|
If it starts with `+` the rest is concatenated to the default dir.
|
||||||
- **layers** :index:`: <pair: output - svg_pcb_print; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
- **layers** :index:`: <pair: output - svg_pcb_print; layers>` [list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to include in the PDF.
|
List of PCB layers to include in the PDF.
|
||||||
|
|
||||||
- Valid keys:
|
- Valid keys:
|
||||||
|
|
|
||||||
|
|
@ -234,6 +234,10 @@ class Layer(Optionable):
|
||||||
ext = cls._get_layers(Layer._plot_layers)
|
ext = cls._get_layers(Layer._plot_layers)
|
||||||
elif layer == 'copper':
|
elif layer == 'copper':
|
||||||
ext = cls._get_layers(Layer._get_copper())
|
ext = cls._get_layers(Layer._get_copper())
|
||||||
|
elif layer == 'inners':
|
||||||
|
ext = cls._get_layers(Layer._get_inners())
|
||||||
|
elif layer == 'outers':
|
||||||
|
ext = cls._get_layers(Layer._get_outers())
|
||||||
elif layer == 'technical':
|
elif layer == 'technical':
|
||||||
ext = cls._get_layers(Layer._get_technical())
|
ext = cls._get_layers(Layer._get_technical())
|
||||||
elif layer == 'user':
|
elif layer == 'user':
|
||||||
|
|
@ -255,6 +259,16 @@ class Layer(Optionable):
|
||||||
def _get_copper():
|
def _get_copper():
|
||||||
return {GS.board.GetLayerName(id): id for id in GS.board.GetEnabledLayers().CuStack()}
|
return {GS.board.GetLayerName(id): id for id in GS.board.GetEnabledLayers().CuStack()}
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _get_inners():
|
||||||
|
return {GS.board.GetLayerName(id): id for id in GS.board.GetEnabledLayers().CuStack()
|
||||||
|
if id != pcbnew.B_Cu and id != pcbnew.F_Cu}
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _get_outers():
|
||||||
|
return {GS.board.GetLayerName(id): id for id in GS.board.GetEnabledLayers().CuStack()
|
||||||
|
if id == pcbnew.B_Cu or id == pcbnew.F_Cu}
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_technical():
|
def _get_technical():
|
||||||
return {GS.board.GetLayerName(id): id for id in GS.board.GetEnabledLayers().Technicals()}
|
return {GS.board.GetLayerName(id): id for id in GS.board.GetEnabledLayers().Technicals()}
|
||||||
|
|
|
||||||
|
|
@ -298,7 +298,7 @@ class AnyLayer(BaseOutput):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
with document:
|
with document:
|
||||||
self.layers = Layer
|
self.layers = Layer
|
||||||
""" *[list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
""" *[list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to plot """
|
List of PCB layers to plot """
|
||||||
|
|
||||||
def config(self, parent):
|
def config(self, parent):
|
||||||
|
|
|
||||||
|
|
@ -561,7 +561,7 @@ class Diff(BaseOutput): # noqa: F821
|
||||||
self.options = DiffOptions
|
self.options = DiffOptions
|
||||||
""" *[dict] Options for the `diff` output """
|
""" *[dict] Options for the `diff` output """
|
||||||
self.layers = Layer
|
self.layers = Layer
|
||||||
""" *[list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
""" *[list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to use. When empty all available layers are used.
|
List of PCB layers to use. When empty all available layers are used.
|
||||||
Note that if you want to support adding/removing layers you should specify a list here """
|
Note that if you want to support adding/removing layers you should specify a list here """
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,7 @@ class KiRi(BaseOutput): # noqa: F821
|
||||||
self.options = KiRiOptions
|
self.options = KiRiOptions
|
||||||
""" *[dict] Options for the `diff` output """
|
""" *[dict] Options for the `diff` output """
|
||||||
self.layers = Layer
|
self.layers = Layer
|
||||||
""" *[list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
""" *[list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to use. When empty all available layers are used.
|
List of PCB layers to use. When empty all available layers are used.
|
||||||
Note that if you want to support adding/removing layers you should specify a list here """
|
Note that if you want to support adding/removing layers you should specify a list here """
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ class PDF_PCB_Print(BaseOutput): # noqa: F821
|
||||||
self.options = PDF_PCB_PrintOptions
|
self.options = PDF_PCB_PrintOptions
|
||||||
""" *[dict] Options for the `pdf_pcb_print` output """
|
""" *[dict] Options for the `pdf_pcb_print` output """
|
||||||
self.layers = Layer
|
self.layers = Layer
|
||||||
""" *[list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
""" *[list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to include in the PDF """
|
List of PCB layers to include in the PDF """
|
||||||
self._category = 'PCB/docs'
|
self._category = 'PCB/docs'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class SVG_PCB_Print(BaseOutput): # noqa: F821
|
||||||
self.options = SVG_PCB_PrintOptions
|
self.options = SVG_PCB_PrintOptions
|
||||||
""" *[dict] Options for the `pdf_pcb_print` output """
|
""" *[dict] Options for the `pdf_pcb_print` output """
|
||||||
self.layers = Layer
|
self.layers = Layer
|
||||||
""" *[list(dict)|list(string)|string] [all,selected,copper,technical,user]
|
""" *[list(dict)|list(string)|string] [all,selected,copper,technical,user,inners,outers]
|
||||||
List of PCB layers to include in the PDF """
|
List of PCB layers to include in the PDF """
|
||||||
self._category = 'PCB/docs'
|
self._category = 'PCB/docs'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,8 @@ outputs:
|
||||||
pages:
|
pages:
|
||||||
- scaling: 2.0
|
- scaling: 2.0
|
||||||
sheet: '%ln'
|
sheet: '%ln'
|
||||||
sketch_pads_on_fab_layers: true
|
|
||||||
sketch_pad_line_width: 1
|
|
||||||
repeat_for_layer: 'F.Cu'
|
repeat_for_layer: 'F.Cu'
|
||||||
repeat_layers: copper
|
repeat_layers: outers
|
||||||
layers:
|
layers:
|
||||||
- layer: Edge.Cuts
|
- layer: Edge.Cuts
|
||||||
- layer: F.Cu
|
- layer: F.Cu
|
||||||
|
|
@ -28,3 +26,12 @@ outputs:
|
||||||
plot_footprint_refs: false
|
plot_footprint_refs: false
|
||||||
plot_footprint_values: false
|
plot_footprint_values: false
|
||||||
- layer: Dwgs.User
|
- layer: Dwgs.User
|
||||||
|
- scaling: 2.0
|
||||||
|
sheet: '%ln'
|
||||||
|
repeat_for_layer: 'F.Cu'
|
||||||
|
repeat_layers: inners
|
||||||
|
layers:
|
||||||
|
- layer: Edge.Cuts
|
||||||
|
- layer: F.Cu
|
||||||
|
- layer: F.SilkS
|
||||||
|
- layer: Dwgs.User
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue