summaryrefslogtreecommitdiff
path: root/lib/output.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-10-20 17:50:39 -0600
committerGitHub <noreply@github.com>2018-10-20 17:50:39 -0600
commit1d55716f26ea08a61ebdb8488ae60fb010b91702 (patch)
tree9d92856cd137d319efd12ef377e4f216816dd3fb /lib/output.py
parent6735077a0a83c42be47de0f2ebfa4f59384a17af (diff)
add g-code output format (#336)
Diffstat (limited to 'lib/output.py')
-rw-r--r--lib/output.py6
1 files changed, 3 insertions, 3 deletions
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-