CreativeInquiry / PEmbroider

Embroidery Library for Processing
Other
442 stars 28 forks source link

Bug with SPIRAL hatching. (??!) #58

Open golanlevin opened 4 years ago

golanlevin commented 4 years ago

Hi @LingDong- , I made a demo to show off the animated stitch playback, examples/PEmbroider_animated_playback. It works great for SATIN, PARALLEL, and CONCENTRIC. However, it is doing something really weird and wrong with SPIRAL. Check it out, I'm using Theodore Gray's polygon:

Screen Shot 2020-06-26 at 1 41 59 AM Screen Shot 2020-06-26 at 1 41 43 AM Screen Shot 2020-06-26 at 1 41 25 AM Screen Shot 2020-06-26 at 1 40 03 AM

Could you please have a look?

LingDong- commented 4 years ago

Wow that looks really crazy :P

I was aware that the SPIRAL mode is a bit glitchy, it works fine for simple shapes but often has a skewed ring or two with more complex shapes. (the algorithm works by interpolating concentric rings, and at sharp turns the angle could be set in the wrong direction).

But that one looks really terrible, I'll look into it to see if I can at least make it less crazy!

golanlevin commented 4 years ago

OK, let me know how it goes.

If SPIRAL mode is 'experimental', that's OK -- we can label it as such in the documentation, or even (if the problem is serious) rename it something like SPIRAL_EXPERIMENTAL. We just need to be clear about what we think is solid, and what's not.