CreativeInquiry / PEmbroider

Embroidery Library for Processing
Other
443 stars 28 forks source link

Tangent stroke error #78

Closed tatyanade closed 4 years ago

tatyanade commented 4 years ago

Hi @LingDong- Was updating some syntax in PEmbroider_strokes - changed the stroke mode for this vertex shape to tangent from parallel and it gets funky in the concave part (but is fine for perpendicular)

image

image

LingDong- commented 4 years ago

Hi @tatyanade

This is due to CONCENTRIC_ANTIALIGN setting being too high, so turning of small angles are interpolated to create the zig zag stitch position. try:

E.CONCENTRIC_ANTIALIGN = 0.1 /*radians*/;

For polygons with straight sides and few key points this parameter needs to be lower whereas for curves with a lot of key points this can be higher.

tatyanade commented 4 years ago

ah okay; I'll not this in the example