aboutsummaryrefslogtreecommitdiff
path: root/gerbolyze/__init__.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-06-20 11:21:42 +0200
committerjaseg <git@jaseg.de>2022-06-20 11:21:42 +0200
commitc1cda48a4ccd8b272b2af9ed1f51d0fb2aa63c51 (patch)
tree55c9c67c97b99c0a53a994e7c9983a502a08584f /gerbolyze/__init__.py
parentd09cf6ef3b6ea82f7ff67719527cd563569e0893 (diff)
downloadgerbolyze-c1cda48a4ccd8b272b2af9ed1f51d0fb2aa63c51.tar.gz
gerbolyze-c1cda48a4ccd8b272b2af9ed1f51d0fb2aa63c51.tar.bz2
gerbolyze-c1cda48a4ccd8b272b2af9ed1f51d0fb2aa63c51.zip
protoboard: Add SMD patterns
Diffstat (limited to 'gerbolyze/__init__.py')
-rwxr-xr-xgerbolyze/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gerbolyze/__init__.py b/gerbolyze/__init__.py
index 3011833..0ba7b02 100755
--- a/gerbolyze/__init__.py
+++ b/gerbolyze/__init__.py
@@ -212,8 +212,9 @@ def empty_template(output_svg, size, force, copper_layers, no_default_layers, la
@click.option('--vectorizer', help='passed through to svg-flatten')
@click.option('--vectorizer-map', help='passed through to svg-flatten')
@click.option('--exclude-groups', help='passed through to svg-flatten')
+@click.option('--pattern-complete-tiles-only', is_flag=True, help='passed through to svg-flatten')
def convert(input_svg, output_gerbers, is_zip, dilate, curve_tolerance, no_subtract, subtract, trace_space, vectorizer,
- vectorizer_map, exclude_groups, separate_drill, naming_scheme):
+ vectorizer_map, exclude_groups, separate_drill, naming_scheme, pattern_complete_tiles_only):
''' Convert SVG file directly to gerbers.
Unlike `gerbolyze paste`, this does not add the SVG's contents to existing gerbers. It allows you to directly create
@@ -242,6 +243,7 @@ def convert(input_svg, output_gerbers, is_zip, dilate, curve_tolerance, no_subtr
grb = svg_to_gerber(input_svg,
trace_space=trace_space, vectorizer=vectorizer, vectorizer_map=vectorizer_map,
exclude_groups=exclude_groups, curve_tolerance=curve_tolerance, only_groups=group_id,
+ pattern_complete_tiles_only=pattern_complete_tiles_only,
outline_mode=(use == 'outline' or use == 'drill'))
grb.original_path = Path()
@@ -505,7 +507,7 @@ def svg_to_gerber(infile, outline_mode=False, **kwargs):
]
for k, v in kwargs.items():
- if v is not None:
+ if v:
args.append('--' + k.replace('_', '-'))
if not isinstance(v, bool):
args.append(str(v))