aboutsummaryrefslogtreecommitdiff
path: root/gerbolyze
diff options
context:
space:
mode:
Diffstat (limited to 'gerbolyze')
-rwxr-xr-xgerbolyze/__init__.py3
-rw-r--r--gerbolyze/tests/resources/layers.svg10
-rw-r--r--gerbolyze/tests/resources/svg_feature_test.svg8
-rw-r--r--gerbolyze/tests/test_integration.py3
4 files changed, 13 insertions, 11 deletions
diff --git a/gerbolyze/__init__.py b/gerbolyze/__init__.py
index 9cce66d..76cedd6 100755
--- a/gerbolyze/__init__.py
+++ b/gerbolyze/__init__.py
@@ -266,7 +266,7 @@ def convert(input_svg, output_gerbers, is_zip, dilate, curve_tolerance, no_subtr
subtract_map = parse_subtract_script('' if no_subtract else subtract, dilate, default_script=DEFAULT_CONVERT_SUB_SCRIPT)
output_is_zip = output_gerbers.name.lower().endswith('.zip') if is_zip is None else is_zip
- stack = gn.LayerStack({}, [], board_name=input_svg.stem, original_path=input_svg)
+ stack = gn.LayerStack({}, None, None, [], board_name=input_svg.stem, original_path=input_svg)
for group_id, label in get_layers_from_svg(input_svg.read_text()):
if not group_id or not label or 'no export' in label:
@@ -326,7 +326,6 @@ def convert(input_svg, output_gerbers, is_zip, dilate, curve_tolerance, no_subtr
stack.save_to_directory(output_gerbers, naming_scheme=naming_scheme)
-
# Subtraction script handling
#============================
diff --git a/gerbolyze/tests/resources/layers.svg b/gerbolyze/tests/resources/layers.svg
index 33ff4ab..76760ce 100644
--- a/gerbolyze/tests/resources/layers.svg
+++ b/gerbolyze/tests/resources/layers.svg
@@ -82,7 +82,7 @@
id="rect1146-5" />
</defs>
<sodipodi:namedview
- inkscape:current-layer="g-plated-drill"
+ inkscape:current-layer="g-drill-plated"
id="namedview4"
pagecolor="#ffffff"
bordercolor="#000000"
@@ -555,8 +555,8 @@
ry="3.894336" />
</g>
<g
- id="g-plated-drill"
- inkscape:label="plated drill"
+ id="g-drill-plated"
+ inkscape:label="drill plated"
inkscape:groupmode="layer">
<g
id="g3914"
@@ -1637,8 +1637,8 @@
</g>
</g>
<g
- id="g-nonplated-drill"
- inkscape:label="nonplated drill"
+ id="g-drill-nonplated"
+ inkscape:label="drill nonplated"
inkscape:groupmode="layer">
<g
id="g3736"
diff --git a/gerbolyze/tests/resources/svg_feature_test.svg b/gerbolyze/tests/resources/svg_feature_test.svg
index 475dbc2..2b2c5b5 100644
--- a/gerbolyze/tests/resources/svg_feature_test.svg
+++ b/gerbolyze/tests/resources/svg_feature_test.svg
@@ -904,12 +904,12 @@
</g>
</g>
<g
- id="g-plated-drill"
- inkscape:label="plated drill"
+ id="g-drill-plated"
+ inkscape:label="drill plated"
inkscape:groupmode="layer" />
<g
- id="g-nonplated-drill"
- inkscape:label="nonplated drill"
+ id="g-drill-nonplated"
+ inkscape:label="drill nonplated"
inkscape:groupmode="layer" />
<g
id="g-comments"
diff --git a/gerbolyze/tests/test_integration.py b/gerbolyze/tests/test_integration.py
index f324096..cf59eed 100644
--- a/gerbolyze/tests/test_integration.py
+++ b/gerbolyze/tests/test_integration.py
@@ -33,6 +33,8 @@ reference_path = lambda reference: Path(__file__).parent / 'resources' / str(ref
def run_command(*args):
try:
proc = subprocess.run(args, check=True, capture_output=True)
+ print(proc.stdout.decode())
+ print(proc.stderr.decode(), file=sys.stderr)
except subprocess.CalledProcessError as e:
print(e.stdout.decode())
print(e.stderr.decode(), file=sys.stderr)
@@ -69,6 +71,7 @@ def test_convert_layers():
with tempfile.TemporaryDirectory() as out_dir:
run_command('python3', '-m', 'gerbolyze', 'convert', infile, out_dir)
stack = gerbonara.layers.LayerStack.open(out_dir)
+
for layer, dia in {
'top paste': 0.100,
'top silk': 0.110,