svg2emb --order eliminated, PyEmb jump/trim stitch fix in CSV export

pull/2/head
Serg Stetsuk 2016-12-07 04:54:22 +02:00
rodzic 2fe1f6f8a4
commit 669e5343fe
3 zmienionych plików z 4 dodań i 7 usunięć

Wyświetl plik

@ -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)

Wyświetl plik

@ -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:

Wyświetl plik

@ -10,11 +10,6 @@
<param name="trim_len_mm" type="float" min="0.0" max="300.0" _gui-text="Minimum trim length (mm)">20.0</param>
<param name="hide_layers" type="boolean" _gui-text="Hide other layers" description="Hide all other top-level layers when the embroidery layer is generated, in order to make stitching discernable.">true</param>
<param name="split_path_on_jumps" type="boolean" _gui-text="Split SVG path on jumpStitch" description="If false SVG path generated as one continuous path. Splitting on trimStitches only. If true every jump or trim stitch breaks the path.">false</param>
<param name="order" type="optiongroup" _gui-text="Stitch Order" appearance="minimal">
<_option value="automatic">Automatic</_option>
<_option value="layer">Preserve layer order only</_option>
<_option value="object">Preserve object stacking order</_option>
</param>
<param name="output_format" type="optiongroup" _gui-text="Output file format" appearance="minimal">
<_option value="melco">Melco</_option>
<_option value="csv">Embroidermodder 2 CSV</_option>