[PcbDraw] Added solder paste removal

This commit is contained in:
Salvador E. Tropea 2022-10-18 11:38:29 -03:00
parent 268e1ef2f7
commit f78f8b3064
5 changed files with 9 additions and 2 deletions

View File

@ -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:

View File

@ -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.

View File

@ -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)

View File

@ -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))

View File

@ -48,6 +48,7 @@ outputs:
dpi: 600
# margin: 2
# outline_width: 3
# show_solderpaste: false
- name: PcbDraw2
comment: "PcbDraw test bottom"