From 669e5343fe9619c76b7a56c8a1ea87283e76712a Mon Sep 17 00:00:00 2001 From: Serg Stetsuk Date: Wed, 7 Dec 2016 04:54:22 +0200 Subject: [PATCH] svg2emb --order eliminated, PyEmb jump/trim stitch fix in CSV export --- PyEmb.py | 4 +++- embroider.py | 2 +- svg2emb.inx | 5 ----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/PyEmb.py b/PyEmb.py index 3dc402a3a..c59f9a09e 100644 --- a/PyEmb.py +++ b/PyEmb.py @@ -208,8 +208,10 @@ class Embroidery: int(stitch.color[1:3], 16), int(stitch.color[3:5], 16), int(stitch.color[5:7], 16)) - if stitch.jump_stitch: + if stitch.jump_stitch=='j': self.str += '"*","JUMP","%f","%f"\n' % (stitch.x, stitch.y) + if stitch.jump_stitch=='t': + self.str += '"*","TRIM","%f","%f"\n' % (stitch.x, stitch.y) self.str += '"*","STITCH","%f","%f"\n' % (stitch.x, stitch.y) lastStitch = stitch self.str += '"*","END","%f","%f"\n' % (lastStitch.x, lastStitch.y) diff --git a/embroider.py b/embroider.py index adcc341b5..def2147dd 100644 --- a/embroider.py +++ b/embroider.py @@ -1819,7 +1819,7 @@ class Embroider(inkex.Effect): if jump_stitch == 'j': # consider collapsing jump stitch, if it is pretty short - if l < collapse_len_px: + if l < collapse_len_px or collapse_len_px == 0: #dbg.write("... collapsed\n") jump_stitch = 's' if l >= trim_len_px and trim_len_px > 0: diff --git a/svg2emb.inx b/svg2emb.inx index b753124c9..5c4d76ac7 100644 --- a/svg2emb.inx +++ b/svg2emb.inx @@ -10,11 +10,6 @@ 20.0 true false - - <_option value="automatic">Automatic - <_option value="layer">Preserve layer order only - <_option value="object">Preserve object stacking order - <_option value="melco">Melco <_option value="csv">Embroidermodder 2 CSV