From 13b92b09474139676753862ec6d87df72c05f5dd Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 19 Jun 2022 00:52:57 +0200 Subject: svg: Fix template layer IDs --- gerbolyze/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gerbolyze/__init__.py b/gerbolyze/__init__.py index 8f41361..3011833 100755 --- a/gerbolyze/__init__.py +++ b/gerbolyze/__init__.py @@ -271,7 +271,7 @@ def convert(input_svg, output_gerbers, is_zip, dilate, curve_tolerance, no_subtr layer.merge(dilated, mode='above', keep_settings=True) if not separate_drill: - print('merging drill layers') + print('Merging drill layers...') stack.merge_drill_layers() naming_scheme = getattr(gn.layers.NamingScheme, naming_scheme) @@ -423,7 +423,7 @@ def calculate_apertureless_bounding_box(cam): #=========== def template_layer(name): - return f'' + return f'' def template_svg_for_png(bounds, png_data, extra_layers, current_layer): (x1, y1), (x2, y2) = bounds @@ -440,7 +440,7 @@ def template_svg_for_png(bounds, png_data, extra_layers, current_layer): xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" width="{w_mm}mm" height="{h_mm}mm" viewBox="0 0 {w_mm} {h_mm}" > - + @@ -454,7 +454,7 @@ def empty_pcb_template(size, extra_layers, current_layer): w, h, unit = size extra_layers = "\n ".join(template_layer(name) for name in extra_layers) - current_layer = f'' if current_layer else '' + current_layer = f'' if current_layer else '' # we set up the viewport such that document dimensions = document units = [unit] template = f''' @@ -476,7 +476,7 @@ MM_PER_INCH = 25.4 def create_template_from_svg(svg, extra_layers, current_layer): view, *layers = svg.children - view.attrs['inkscape__current_layer'] = f'g-{current_layer.lower()}' + view.attrs['inkscape__current_layer'] = f'g-{current_layer.lower().replace(" ", "-")}' extra_layers = [ template_layer(name) for name in extra_layers ] svg.children = [ view, *extra_layers, gn.utils.Tag('g', layers, inkscape__label='Preview', sodipodi__insensitive='true', -- cgit