From 1d55716f26ea08a61ebdb8488ae60fb010b91702 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 20 Oct 2018 17:50:39 -0600 Subject: add g-code output format (#336) --- lib/output.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/output.py') diff --git a/lib/output.py b/lib/output.py index ed97ef04..5fa7791f 100644 --- a/lib/output.py +++ b/lib/output.py @@ -53,7 +53,7 @@ def jump_to_stop_point(pattern, svg): pattern.add_stitch_absolute(pyembroidery.JUMP, stop_position.point.x, stop_position.point.y) -def write_embroidery_file(file_path, stitch_plan, svg): +def write_embroidery_file(file_path, stitch_plan, svg, settings={}): origin = get_origin(svg) pattern = pyembroidery.EmbPattern() @@ -73,7 +73,7 @@ def write_embroidery_file(file_path, stitch_plan, svg): # also multiply by 10 to get tenths of a millimeter as required by pyembroidery scale = 10 / PIXELS_PER_MM - settings = { + settings.update({ # correct for the origin "translate": -origin, @@ -84,7 +84,7 @@ def write_embroidery_file(file_path, stitch_plan, svg): # This forces a jump at the start of the design and after each trim, # even if we're close enough not to need one. "full_jump": True, - } + }) if file_path.endswith('.csv'): # Special treatment for CSV: instruct pyembroidery not to do any post- -- cgit v1.2.3