From 004df12e88d1531740238ab9831577123e539196 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sun, 30 Dec 2018 19:59:07 -0500 Subject: don't crash on a design with no stitches --- lib/output.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/output.py') diff --git a/lib/output.py b/lib/output.py index 2745de1d..21622765 100644 --- a/lib/output.py +++ b/lib/output.py @@ -5,6 +5,7 @@ import simpletransform from .commands import global_command from .i18n import _ +from .stitch_plan import Stitch from .svg import PIXELS_PER_MM, get_doc_size, get_viewbox_transform from .utils import Point @@ -58,6 +59,7 @@ def write_embroidery_file(file_path, stitch_plan, svg, settings={}): origin = get_origin(svg) pattern = pyembroidery.EmbPattern() + stitch = Stitch(0, 0) for color_block in stitch_plan: pattern.add_thread(color_block.color.pyembroidery_thread) -- cgit v1.2.3