CreativeInquiry / PEmbroider

Embroidery Library for Processing
Other
443 stars 28 forks source link

Angled Stroke Demo #80

Closed golanlevin closed 3 years ago

golanlevin commented 3 years ago

Hi @tatyanade , @LingDong- , I've made an angled stroke demo: PEmbroider_stroke_outlines_3 It should look like this:

Screen Shot 2020-07-14 at 3 36 29 AM

Taytana could you please render this with a dense shiny thread?

@LingDong- , Wwhen strokeMode is set to PERPENDICULAR there is a new error, an extra line:

Screen Shot 2020-07-14 at 3 36 06 AM

Thanks much, Golan

tatyanade commented 3 years ago

Ooo Yes I will render right now

tatyanade commented 3 years ago

Here's that with a spacing of three; ill try it with a larger stitchlength (theres the ridge down the middle) image image Also doing more prints rn so I will clean extra threads and scan in when i've filled the hoop

LingDong- commented 3 years ago

@golanlevin @tatyanade

golanlevin commented 3 years ago

Hi @tatyanade please pull Lingdong's latest changes (it should get rid of the line down the middle). I have also re-designed this example slightly, please use the latest version, I made it larger and nicer.

tatyanade commented 3 years ago

image image

The round stroke caps are too dense and cause the thread to break - tried strokeCap(SQUARE) which didnt change anything but will fiddle around and try on a diff shape

LingDong- commented 3 years ago

Added E.PERPENDICULAR_STROKE_CAP_DENSITY_MULTIPLIER = 0.5

tatyanade commented 3 years ago

Will send pics when its finished but it is looking great and the multiplier did the trick!

tatyanade commented 3 years ago

image image image

It worked with no technical issues, however visually the change in line for the circles could look nicer; I think if the half-circle edge followed the last tangent line's angle (something like this) it would look better

image

LingDong- commented 3 years ago

The line caps and joins are generated with a unified algorithm that handles all cases (line ends, corners, curves etc)

To have the other look we will need to make a special case for line ends of unclosed polylines.

image

tatyanade commented 3 years ago

I think a special case for unclosed lines makes sense

LingDong- commented 3 years ago

Added special case: a003bc3625a8a81da136a27c02d76dd34199e509

Screen Shot 2020-07-14 at 10 59 48 PM
tatyanade commented 3 years ago

Awesome; looks great! - will scan after clean up and add to the repo

imageimage