From 038875f876d79d0f1e971886fe42f5bee4f9f31e Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 21 Aug 2018 20:32:50 -0400 Subject: autopep8 --- lib/output.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lib/output.py') diff --git a/lib/output.py b/lib/output.py index 0d7f9918..eed665ed 100644 --- a/lib/output.py +++ b/lib/output.py @@ -19,6 +19,7 @@ def get_command(stitch): else: return pyembroidery.NEEDLE_AT + def _string_to_floats(string): floats = string.split(',') return [float(num) for num in floats] @@ -32,7 +33,7 @@ def get_origin(svg): all_guides = namedview.findall(inkex.addNS('guide', 'sodipodi')) label_attribute = inkex.addNS('label', 'inkscape') guides = [guide for guide in all_guides - if guide.get(label_attribute, "").startswith("embroidery origin")] + if guide.get(label_attribute, "").startswith("embroidery origin")] # document size used below doc_size = list(get_doc_size(svg)) @@ -57,7 +58,6 @@ def get_origin(svg): position = Point(*_string_to_floats(guide.get('position'))) position.y = doc_size[1] - position.y - # This one baffles me. I think inkscape might have gotten the order of # their vector wrong? parts = _string_to_floats(guide.get('orientation')) @@ -98,17 +98,17 @@ 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 = { - # correct for the origin - "translate": -origin, + settings = { + # correct for the origin + "translate": -origin, - # convert from pixels to millimeters - # also multiply by 10 to get tenths of a millimeter as required by pyembroidery - "scale": (scale, scale), + # convert from pixels to millimeters + # also multiply by 10 to get tenths of a millimeter as required by pyembroidery + "scale": (scale, scale), - # 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, - } + # 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, + } pyembroidery.write(pattern, file_path, settings) -- cgit v1.2.3