diff --git a/CHANGELOG.md b/CHANGELOG.md index d96998ac..6e855de2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - BMP output format - Image margin - Outline width + - Solder paste removal ### Changed - Diff: diff --git a/README.md b/README.md index 30222bab..36892d02 100644 --- a/README.md +++ b/README.md @@ -2589,6 +2589,7 @@ Notes: - `pre_transform`: [string|list(string)='_none'] Name of the filter to transform fields before applying other filters. A short-cut to use for simple cases where a variant is an overkill. - `remap`: [dict|None] Replacements for PCB references using components (lib:component). + - `show_solderpaste`: [boolean=true] Show the solder paste layers. - `variant`: [string=''] Board variant to apply. - `vcuts`: [boolean=false] Render V-CUTS on the Cmts.User layer. - `warnings`: [string='visible'] [visible,all,none] Using visible only the warnings about components in the visible side are generated. diff --git a/docs/samples/generic_plot.kibot.yaml b/docs/samples/generic_plot.kibot.yaml index 8c4341f5..97835a2f 100644 --- a/docs/samples/generic_plot.kibot.yaml +++ b/docs/samples/generic_plot.kibot.yaml @@ -1383,6 +1383,8 @@ outputs: # [list(string)|string=none] [none,all] List of components to draw, can be also a string for none or all. # The default is none. IMPORTANT! This option is relevant only when no filters or variants are applied show_components: none + # [boolean=true] Show the solder paste layers + show_solderpaste: true # [string|dict] PCB style (colors). An internal name, the name of a JSON file or the style options style: # [string='#208b47'] Color for the board without copper (covered by solder mask) diff --git a/kibot/out_pcbdraw.py b/kibot/out_pcbdraw.py index 808ce9d0..5fb1b062 100644 --- a/kibot/out_pcbdraw.py +++ b/kibot/out_pcbdraw.py @@ -166,6 +166,8 @@ class PcbDrawOptions(VariantOptions): self.outline_width = 0.15 """ [0,10] Width of the trace to draw the PCB border [mm]. Note this also affects the drill holes """ + self.show_solderpaste = True + """ Show the solder paste layers """ super().__init__() def config(self, parent): @@ -322,8 +324,8 @@ class PcbDrawOptions(VariantOptions): tmp_style = self._create_style() plotter.resolve_style(tmp_style) plotter.plot_plan = [PlotSubstrate(drill_holes=not self.no_drillholes, outline_width=mm2ki(self.outline_width))] - # TODO: Make paste optional - plotter.plot_plan.append(PlotPaste()) + if self.show_solderpaste: + plotter.plot_plan.append(PlotPaste()) if self.vcuts: # TODO: Make layer configurable plotter.plot_plan.append(PlotVCuts(layer=41)) diff --git a/tests/yaml_samples/pcbdraw.kibot.yaml b/tests/yaml_samples/pcbdraw.kibot.yaml index e500a451..e0f16b49 100644 --- a/tests/yaml_samples/pcbdraw.kibot.yaml +++ b/tests/yaml_samples/pcbdraw.kibot.yaml @@ -48,6 +48,7 @@ outputs: dpi: 600 # margin: 2 # outline_width: 3 + # show_solderpaste: false - name: PcbDraw2 comment: "PcbDraw test bottom"