Closed stephanschulz closed 3 years ago
@stephanschulz thanks so much for diagnosing this. @tatyanade designed and executed this pattern on our lab's Viking, and we didn't have this offset issue. I wonder if it might be something with the Janome .JEF format in particular. @LingDong-, we might need to do some byte-level scrutiny :( to find the problem ...
Great news @golanlevin @stephanschulz , I can reproduce the issue! Wow really messed up offsets! will fix.
Happy to hear that. What tool are you using here to view the .jef file?
Haha! fixed in one line: eef1f06cb380e7e45bb87af0ad20cb26eb57e5e7
The issue is that JEF cannot encode stitches longer than [-128,127] units (yup they store it in an int8), the original solution I had was to break long stitches to smaller ones of the length 128. Which is 1 unit over 127, so it still fails! Now modified the cap to 100 to play it safe.
EDIT: I'm using Premier+2 http://www.husqvarnaviking.com/en-US/Software/Premier-2 @stephanschulz
@LingDong- do you think you can create a new zip to download the library? I believe your fixes are only in the source code but not yet in the available pre-build .zip
thx a bunch
Hi @stephanschulz , I believe it is already in the distribution:
The distribution is updated automatically every time I make a change to the source and compile it. Did it not work for you?
Yes I still get miss alignments. Attached a screenshot of the online .jef viewer, the png output of P5 and the output .jef file
Strange enough, the pictures look alright in my viewers:
Also the latest .zip does not have your PEmbroider_trace_skeleton example in it. So something must be not working with the automatic distribution updating.
Strange enough, the pictures look alright in my viewers:
did you try https://htmtopdf.herokuapp.com/embroidery/ to view my and your jef files? I do not have Premier+ to check
Tried in Embird too, it works too.
Premier+ is free for mac and PC http://www.husqvarnaviking.com/en-US/Support/Complimentary-Software
PEmbroider_trace_skeleton is not in it because it's not part of the source code: The distribution is rebuilt every time there's a modification to the source, the JEF fix is a modification to the source so that one should be in it I think...
I will try Premier+ and also just run the .jef on my machine. I assumed because the online viewer shows a misalignment it will also do it on the machine. Will report back in 10 minutes.
I can confirm that herokuapp viewer shows the wrong offsets, though I'm not sure which software(s) is correct (Currently the score is 2:1). I think in the end the hardware has the final say :P Have you tried it on the real machine?
I guess the online viewer has a hard time handling either all multi color .jef files, or just ours. Anyway the final stitch looks fine. Here I am just using one color to save time.
I have run the PEmbroider_png_image_multicolor example and my resulting .jef file has all layers offset without any specific logic to it. I tried to counter the offset but was not able to find the correct values.
so I use a very simple sketch and noticed that when setting
fill()
to an RGB value things screw up but withfill(0,0,0)
for all layer everything is ok.I use this web app to look at my .jef files https://htmtopdf.herokuapp.com/embroidery/
Here my test code: https://gist.github.com/stephanschulz/134cca94208a48b43032d49e08228642