diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-08-21 20:32:50 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-08-21 20:32:50 -0400 |
| commit | 038875f876d79d0f1e971886fe42f5bee4f9f31e (patch) | |
| tree | 296c60d3b490f988802f9bec884eed32dcbf9c0c /lib/output.py | |
| parent | f26042f477f1520443b1d9dad0bb88ef3ad7ca47 (diff) | |
autopep8
Diffstat (limited to 'lib/output.py')
| -rw-r--r-- | lib/output.py | 24 |
1 files changed, 12 insertions, 12 deletions
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) |
