diff --git a/CHANGELOG.md b/CHANGELOG.md index 360fe158..58bc5354 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 effect the names of the git points are chnaged. This is because main/master only applies to the main worktree. So the names now refer to the closest tag. +- JLCPCB_stencil: Is now just like JLCPCB. The only difference is the added + layers. ### Fixed - KiCad v6/7 schematic: diff --git a/README.md b/README.md index 17ac4d25..af4fc5b9 100644 --- a/README.md +++ b/README.md @@ -5433,13 +5433,13 @@ They include support for: - _Elecrow_drill: Drill files - _Elecrow_compress: Gerbers and drill files compressed in a ZIP - _Elecrow: _Elecrow_gerbers+_Elecrow_drill -- Elecrow_stencil: same as Elecrow, but also generates gerbers for F.Paste and B.Paste layers. +- [Elecrow_stencil](https://www.elecrow.com/): same as **Elecrow**, but also generates gerbers for F.Paste and B.Paste layers. - [FusionPCB](https://www.seeedstudio.io/fusion.html): contain fabrication outputs compatible with FusionPCB - _FusionPCB_gerbers: Gerbers - _FusionPCB_drill: Drill files - _FusionPCB_compress: Gerbers and drill files compressed in a ZIP - _FusionPCB: _FusionPCB_gerbers+_FusionPCB_drill -- FusionPCB_stencil: same as FusionPCB, but also generates gerbers for F.Paste and B.Paste layers. +- [FusionPCB_stencil](https://www.seeedstudio.io/fusion.html): same as **FusionPCB**, but also generates gerbers for F.Paste and B.Paste layers. - [JLCPCB](https://jlcpcb.com/): contain fabrication outputs compatible with JLC PCB. Only SMD components. Use the `field_lcsc_part` global option to specify the LCSC part number field if KiBot fails to detect it. - _JLCPCB_gerbers: Gerbers. @@ -5450,16 +5450,7 @@ They include support for: - _JLCPCB_fab: _JLCPCB_gerbers+_JLCPCB_drill - _JLCPCB_assembly: _JLCPCB_position+_JLCPCB_bom - _JLCPCB: _JLCPCB_fab+_JLCPCB_assembly -- [JLCPCB_stencil](https://jlcpcb.com/): Derived from JLCPCB, adds solder paste gerbers for stencils. Only SMD components. - - _JLCPCB_gerbers: Gerbers. - - _JLCPCB_gerbers_stencil: Gerbers for the solder paste stencils. Disabled by default. - - _JLCPCB_drill: Drill files - - _JLCPCB_position: Pick and place, applies the `_rot_footprint` filter. You can change this filter. - - _JLCPCB_bom: List of LCSC parts, assumes a field named `LCSC#` contains the LCSC codes. You can change this filter. - - _JLCPCB_compress: Gerbers, drill, position and BoM files compressed in a ZIP - - _JLCPCB_fab: _JLCPCB_gerbers+_JLCPCB_gerbers_stencil+_JLCPCB_drill - - _JLCPCB_assembly: _JLCPCB_position+_JLCPCB_bom - - _JLCPCB: _JLCPCB_fab+_JLCPCB_assembly +- [JLCPCB_stencil](https://jlcpcb.com/): same as **JLCPCB**, but also generates gerbers for F.Paste and B.Paste layers. - [JLCPCB_with_THT](https://jlcpcb.com/): same as **JLCPCB**, but also including THT components. - [JLCPCB_stencil_with_THT](https://jlcpcb.com/): same as **JLCPCB_stencil**, but also including THT components. - [MacroFab_XYRS](https://help.macrofab.com/knowledge/macrofab-required-design-files): XYRS position file in MacroFab format @@ -5468,7 +5459,7 @@ They include support for: - _P-Ban_gerbers: Gerbers. You need to define the layers for more than 8. - _P-Ban_drill: Drill files - _P-Ban: _P-Ban_gerbers+_P-Ban_drill -- P-Ban_stencil: same as P-Ban, but also generates gerbers for F.Paste and B.Paste layers. +- [P-Ban_stencil](https://www.p-ban.com/): same as **P-Ban**, but also generates gerbers for F.Paste and B.Paste layers. - [PCB2Blender_2_1](https://github.com/30350n/pcb2blender) - _PCB2Blender_layers_2_1: The layers in SVG format. Disabled by default. - _PCB2Blender_vrml_2_1: The VRML for the board. Disabled by default. @@ -5485,7 +5476,7 @@ They include support for: - _PCBWay_drill: Drill files - _PCBWay_compress: Gerbers and drill files compressed in a ZIP - _PCBWay: _PCBWay_gerbers+_PCBWay_drill -- PCBWay_stencil: same as PCBWay, but also generates gerbers for F.Paste and B.Paste layers. +- [PCBWay_stencil](https://www.pcbway.com): same as **PCBWay**, but also generates gerbers for F.Paste and B.Paste layers. #### Using other output as base for a new one diff --git a/docs/README.in b/docs/README.in index 6b589c5a..24297d75 100644 --- a/docs/README.in +++ b/docs/README.in @@ -1314,13 +1314,13 @@ They include support for: - _Elecrow_drill: Drill files - _Elecrow_compress: Gerbers and drill files compressed in a ZIP - _Elecrow: _Elecrow_gerbers+_Elecrow_drill -- Elecrow_stencil: same as Elecrow, but also generates gerbers for F.Paste and B.Paste layers. +- [Elecrow_stencil](https://www.elecrow.com/): same as **Elecrow**, but also generates gerbers for F.Paste and B.Paste layers. - [FusionPCB](https://www.seeedstudio.io/fusion.html): contain fabrication outputs compatible with FusionPCB - _FusionPCB_gerbers: Gerbers - _FusionPCB_drill: Drill files - _FusionPCB_compress: Gerbers and drill files compressed in a ZIP - _FusionPCB: _FusionPCB_gerbers+_FusionPCB_drill -- FusionPCB_stencil: same as FusionPCB, but also generates gerbers for F.Paste and B.Paste layers. +- [FusionPCB_stencil](https://www.seeedstudio.io/fusion.html): same as **FusionPCB**, but also generates gerbers for F.Paste and B.Paste layers. - [JLCPCB](https://jlcpcb.com/): contain fabrication outputs compatible with JLC PCB. Only SMD components. Use the `field_lcsc_part` global option to specify the LCSC part number field if KiBot fails to detect it. - _JLCPCB_gerbers: Gerbers. @@ -1331,16 +1331,7 @@ They include support for: - _JLCPCB_fab: _JLCPCB_gerbers+_JLCPCB_drill - _JLCPCB_assembly: _JLCPCB_position+_JLCPCB_bom - _JLCPCB: _JLCPCB_fab+_JLCPCB_assembly -- [JLCPCB_stencil](https://jlcpcb.com/): Derived from JLCPCB, adds solder paste gerbers for stencils. Only SMD components. - - _JLCPCB_gerbers: Gerbers. - - _JLCPCB_gerbers_stencil: Gerbers for the solder paste stencils. Disabled by default. - - _JLCPCB_drill: Drill files - - _JLCPCB_position: Pick and place, applies the `_rot_footprint` filter. You can change this filter. - - _JLCPCB_bom: List of LCSC parts, assumes a field named `LCSC#` contains the LCSC codes. You can change this filter. - - _JLCPCB_compress: Gerbers, drill, position and BoM files compressed in a ZIP - - _JLCPCB_fab: _JLCPCB_gerbers+_JLCPCB_gerbers_stencil+_JLCPCB_drill - - _JLCPCB_assembly: _JLCPCB_position+_JLCPCB_bom - - _JLCPCB: _JLCPCB_fab+_JLCPCB_assembly +- [JLCPCB_stencil](https://jlcpcb.com/): same as **JLCPCB**, but also generates gerbers for F.Paste and B.Paste layers. - [JLCPCB_with_THT](https://jlcpcb.com/): same as **JLCPCB**, but also including THT components. - [JLCPCB_stencil_with_THT](https://jlcpcb.com/): same as **JLCPCB_stencil**, but also including THT components. - [MacroFab_XYRS](https://help.macrofab.com/knowledge/macrofab-required-design-files): XYRS position file in MacroFab format @@ -1349,7 +1340,7 @@ They include support for: - _P-Ban_gerbers: Gerbers. You need to define the layers for more than 8. - _P-Ban_drill: Drill files - _P-Ban: _P-Ban_gerbers+_P-Ban_drill -- P-Ban_stencil: same as P-Ban, but also generates gerbers for F.Paste and B.Paste layers. +- [P-Ban_stencil](https://www.p-ban.com/): same as **P-Ban**, but also generates gerbers for F.Paste and B.Paste layers. - [PCB2Blender_2_1](https://github.com/30350n/pcb2blender) - _PCB2Blender_layers_2_1: The layers in SVG format. Disabled by default. - _PCB2Blender_vrml_2_1: The VRML for the board. Disabled by default. @@ -1366,7 +1357,7 @@ They include support for: - _PCBWay_drill: Drill files - _PCBWay_compress: Gerbers and drill files compressed in a ZIP - _PCBWay: _PCBWay_gerbers+_PCBWay_drill -- PCBWay_stencil: same as PCBWay, but also generates gerbers for F.Paste and B.Paste layers. +- [PCBWay_stencil](https://www.pcbway.com): same as **PCBWay**, but also generates gerbers for F.Paste and B.Paste layers. #### Using other output as base for a new one diff --git a/kibot/config_reader.py b/kibot/config_reader.py index c4b668db..6d4cd915 100644 --- a/kibot/config_reader.py +++ b/kibot/config_reader.py @@ -641,6 +641,8 @@ class CfgYamlReader(object): content, replaced = do_replace(k, v, content, replaced) if depth >= 20: logger.error('Maximum depth of definition replacements reached, loop?') + if GS.debug_level > 3: + logger.debug('YAML after expanding definitions:\n'+content) # Create an stream from the string fstream = io.StringIO(content) try: diff --git a/kibot/resources/config_templates/Elecrow.kibot.yaml b/kibot/resources/config_templates/Elecrow.kibot.yaml index 4929bc54..04a761c0 100644 --- a/kibot/resources/config_templates/Elecrow.kibot.yaml +++ b/kibot/resources/config_templates/Elecrow.kibot.yaml @@ -36,12 +36,7 @@ outputs: inner_extension_pattern: '.g%n' edge_cut_extension: '.gml' layers: - - copper - - F.SilkS - - B.SilkS - - F.Mask - - B.Mask - - Edge.Cuts + @_KIBOT_GERBER_LAYERS@ @_KIBOT_F_PASTE@ @_KIBOT_B_PASTE@ @@ -70,3 +65,10 @@ outputs: definitions: _KIBOT_F_PASTE: '' _KIBOT_B_PASTE: '' + _KIBOT_GERBER_LAYERS: | + - copper + - F.SilkS + - B.SilkS + - F.Mask + - B.Mask + - Edge.Cuts diff --git a/kibot/resources/config_templates/FusionPCB.kibot.yaml b/kibot/resources/config_templates/FusionPCB.kibot.yaml index ea94d400..ef5d5fba 100644 --- a/kibot/resources/config_templates/FusionPCB.kibot.yaml +++ b/kibot/resources/config_templates/FusionPCB.kibot.yaml @@ -37,12 +37,7 @@ outputs: inner_extension_pattern: '.gl%N' edge_cut_extension: '.gml' layers: - - copper - - F.SilkS - - B.SilkS - - F.Mask - - B.Mask - - Edge.Cuts + @_KIBOT_GERBER_LAYERS@ @_KIBOT_F_PASTE@ @_KIBOT_B_PASTE@ @@ -70,3 +65,10 @@ outputs: definitions: _KIBOT_F_PASTE: '' _KIBOT_B_PASTE: '' + _KIBOT_GERBER_LAYERS: | + - copper + - F.SilkS + - B.SilkS + - F.Mask + - B.Mask + - Edge.Cuts diff --git a/kibot/resources/config_templates/JLCPCB.kibot.yaml b/kibot/resources/config_templates/JLCPCB.kibot.yaml index 14a7f182..615f818e 100644 --- a/kibot/resources/config_templates/JLCPCB.kibot.yaml +++ b/kibot/resources/config_templates/JLCPCB.kibot.yaml @@ -49,12 +49,9 @@ outputs: subtract_mask_from_silk: true inner_extension_pattern: '.g%n' layers: - - copper - - F.SilkS - - B.SilkS - - F.Mask - - B.Mask - - Edge.Cuts + @_KIBOT_GERBER_LAYERS@ + @_KIBOT_F_PASTE@ + @_KIBOT_B_PASTE@ - name: _JLCPCB_drill comment: Drill files compatible with JLCPCB @@ -133,3 +130,12 @@ outputs: ... definitions: _KIBOT_POS_ONLY_SMD: true + _KIBOT_F_PASTE: '' + _KIBOT_B_PASTE: '' + _KIBOT_GERBER_LAYERS: | + - copper + - F.SilkS + - B.SilkS + - F.Mask + - B.Mask + - Edge.Cuts diff --git a/kibot/resources/config_templates/JLCPCB_stencil.kibot.yaml b/kibot/resources/config_templates/JLCPCB_stencil.kibot.yaml index f6549763..b135ca01 100644 --- a/kibot/resources/config_templates/JLCPCB_stencil.kibot.yaml +++ b/kibot/resources/config_templates/JLCPCB_stencil.kibot.yaml @@ -6,47 +6,6 @@ kibot: import: - file: JLCPCB - outputs: - # We exclude the _JLCPCB_compress - - _JLCPCB_gerbers - - _JLCPCB_drill - - _JLCPCB_position - - _JLCPCB_bom - groups: - # We exlclude the _JLCPCB_fab - - _JLCPCB_assembly - - _JLCPCB - -groups: - - name: _JLCPCB_fab - outputs: - - _JLCPCB_gerbers - - _JLCPCB_gerbers_stencil - - _JLCPCB_drill - -outputs: - - name: _JLCPCB_gerbers_stencil - comment: Gerbers for the stencils compatible with JLCPCB - type: gerber - dir: JLCPCB - extends: _JLCPCB_gerbers - layers: - - F.Paste - - B.Paste - - - name: _JLCPCB_compress - comment: ZIP file for JLCPCB - type: compress - dir: JLCPCB - options: - files: - - from_output: _JLCPCB_gerbers - dest: / - - from_output: _JLCPCB_gerbers_stencil - dest: / - - from_output: _JLCPCB_drill - dest: / - - from_output: _JLCPCB_position - dest: / - - from_output: _JLCPCB_bom - dest: / + definitions: + _KIBOT_F_PASTE: '- F.Paste' + _KIBOT_B_PASTE: '- B.Paste' diff --git a/kibot/resources/config_templates/P-Ban.kibot.yaml b/kibot/resources/config_templates/P-Ban.kibot.yaml index 76bb6415..ca14a653 100644 --- a/kibot/resources/config_templates/P-Ban.kibot.yaml +++ b/kibot/resources/config_templates/P-Ban.kibot.yaml @@ -37,19 +37,7 @@ outputs: layers: # Note: a more generic approach is to use 'copper' but then the filenames # are slightly different. - - F.Cu - - B.Cu - - In1.Cu - - In2.Cu - - In3.Cu - - In4.Cu - - In5.Cu - - In6.Cu - - F.SilkS - - B.SilkS - - F.Mask - - B.Mask - - Edge.Cuts + @_KIBOT_GERBER_LAYERS@ @_KIBOT_F_PASTE@ @_KIBOT_B_PASTE@ @@ -83,3 +71,17 @@ outputs: definitions: _KIBOT_F_PASTE: '' _KIBOT_B_PASTE: '' + _KIBOT_GERBER_LAYERS: | + - F.Cu + - B.Cu + - In1.Cu + - In2.Cu + - In3.Cu + - In4.Cu + - In5.Cu + - In6.Cu + - F.SilkS + - B.SilkS + - F.Mask + - B.Mask + - Edge.Cuts diff --git a/kibot/resources/config_templates/PCBWay.kibot.yaml b/kibot/resources/config_templates/PCBWay.kibot.yaml index 75bc22be..c75c28fa 100644 --- a/kibot/resources/config_templates/PCBWay.kibot.yaml +++ b/kibot/resources/config_templates/PCBWay.kibot.yaml @@ -34,14 +34,7 @@ outputs: subtract_mask_from_silk: false inner_extension_pattern: '.gl%N' layers: - - copper - - F.SilkS - - B.SilkS - - F.Mask - - B.Mask - - F.Paste - - B.Paste - - Edge.Cuts + @_KIBOT_GERBER_LAYERS@ @_KIBOT_F_PASTE@ @_KIBOT_B_PASTE@ @@ -80,3 +73,10 @@ outputs: definitions: _KIBOT_F_PASTE: '' _KIBOT_B_PASTE: '' + _KIBOT_GERBER_LAYERS: | + - copper + - F.SilkS + - B.SilkS + - F.Mask + - B.Mask + - Edge.Cuts