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

pyembroidery cannto read vp3 files with true trim commands in them #74

Open
MatsIBengtsson opened this issue Aug 8, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@MatsIBengtsson
Copy link
Collaborator

When reading a vp3 file which contains true trims (trims which are not only a colour change), pyembroidery reads it wrong. This is also mentioned in Ink/Stitch (inkstitch/inkstitch#516 and EmbroidePy/pyembroidery#69)

As can be seen in below picture, a lot is missing. Both stitches and colours. To the left is Premier, to the right is the interpretation by Ink/Stitch (pyembroidery):
Artboard 1

Enclosed are the files behind above views, containing the example, of a vp3 file which is fully readable in both Wilcom TrueSizer and Premier. But not in Ink/Stitch. It is collected as a zip (vp3 with trim.zip):

  • vp3 file with trims that work in vp3 (outline cat face p0.0-006 wilcom from dst.VP3)
  • screendump of how it looks in Premier, Husqvarna vp3 reading software (outline cat face with trims in vp3 read by Premier.PNG)
  • screendump of how it looks in Ink/Stitch, reading using pyembroidery (outline cat face with trims in vp3 read by InkStitch.PNG)

The example above is linked to the issue previously mentioned, #68 so the main stitch file is the same. One reason for this seem to be pyembroidery Vp3Reader. It assumes that all end points in a vp3-file is the end of the color_block, even if it is stated that there are more stitches in that colour block. A simple remedy is to remove that assumption (in vp3_read_colorblock remove the return following after the out command in "elif y == 0x03:". Doing that reads all the trimmed stitches into pyembroidery. Unfortunately, now the trims are missing (ignore the colour difference, my mistake):

output from inkstitch after removing return in vp3reader

@MatsIBengtsson MatsIBengtsson self-assigned this Aug 8, 2019
@MatsIBengtsson MatsIBengtsson added the bug Something isn't working label Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant