EmbroidePy/pyembroidery

First stitch is not written to output

Opened this issue · 0 comments

It appears that the first stitch in a pattern and the first stitch after a move is not written to the output. I am new to machine embroidery-- is this expected?

For example,

import pyembroidery as pyemb

def stitch_square (pattern):
    #pattern.stitch(0, 0)
    pattern.stitch(0, 10)
    pattern.stitch(10, 0)
    pattern.stitch(0, -10)
    pattern.stitch(-10, 0)

pattern = pyemb.EmbPattern()

stitch_square(pattern)
pattern.move(20, 0)
stitch_square(pattern)
pattern.end()

pyemb.write(pattern, "example.png")

Produces this:
image

However, when pattern.stitch(0,0) is un-commented at the beginning of stitch_square, the output is as I expect it:
image

I see the same behavior when writing to different outputs (I have tried .exp and .dst) and using a 3rd-party renderer.

Thank you!