node-potrace icon indicating copy to clipboard operation
node-potrace copied to clipboard

Path Direction Issue

Open ekaratzaferis opened this issue 5 years ago • 0 comments

Hey,

We have been using the "web" version of this library in our application, and now we're trying to achieve the same functionality by using this package, but the generated path is different.

Here's an example where we feed a simple ring shape to both versions:

Screenshot 2020-10-30 at 13 09 20 This package generates a path that consists of two circles, both with a counter-clockwise direction.

Screenshot 2020-10-30 at 13 09 30 On the other hand, the web version produces these circles, but one of them has a clockwise direction.

Based on some research, the difference in the direction of the paths is what creates the "cutout" shapes that we want, and that's what the "web" version produces.

Any ideas on how to fix this?

The configuration we're using is: turnPolicy: 'minority', turdSize: 3, optCurve: true, alphaMax: 1, optTolerance: 2

ekaratzaferis avatar Oct 30 '20 11:10 ekaratzaferis