Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PES Initial Stitch Codes #132

Open
tatarize opened this issue Oct 1, 2021 · 3 comments
Open

PES Initial Stitch Codes #132

tatarize opened this issue Oct 1, 2021 · 3 comments

Comments

@tatarize
Copy link
Contributor

tatarize commented Oct 1, 2021

The PES stitches actually start at PEC_START + 128. The first one appeared to be 0x9000 for width and height but these are long jump stitches. But, with how they are currently implemented this value can, in error be 0xFFFE which is actually END causing the pes file to file as it ended before it started.

It is also possible that older read codes would have one short form and 1 long form stitch which would cause a desync of the x,y values reading the file incorrectly.

@tatarize
Copy link
Contributor Author

Corrected in 1.4.32

@tatarize tatarize reopened this Dec 26, 2021
@tatarize
Copy link
Contributor Author

@kaalleen @AndyLV, this should be fixed for the inkstitch/pyembroidery version as well. It will in a number of cases write a faulty PES file based on a faulty original understanding of the file format. If have an extent of -2 for either the x or y value, which is easy to do, you end up encoding 0xFFFE as the value there which actually coincides with the END command. Wilcom V4 will not parse this file. In rare cases it can also flag a value to appear as short/long for the two bytes which can then desync the x and y which will create a scribble-file with fairly random coordinates.


2bcbfff
7a53628
e81d925

Also see:
Embroidermodder/libembroidery#116

@tatarize
Copy link
Contributor Author

@fabricocouto, @lexelby inkstitch/pyembroidery#91

Fabricocouto's understanding of embroidery file formats is top notch. He actually codes these things and his comments should be accepted as based on valid understandings. In this case it's a bug corrected in 1.4.32. The libembroidery code in this regard was wrong and fabrico pointed out some PES files in the wild that had a non-jump first stitch which very much did cause a number of problems. Also, the writer is flawed. This error is, as far as I know, one of the worst and most needing correcting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant