Open fjenett opened 6 years ago
Hello, indeed, I'm aware of the segmentation of compound paths, I have tried multiple times integrating the relevant code parts from paper.js in g.js (the graphics engine of NBL) but never really succeeded in a satisfying manner. Paper.js is very much an immediate mode drawing tool and its model unfortunately doesn't sit well with the functional approach used in g.js and NBL. In terms of porting it, it's not just about porting the compound paths code, but also all the other constructs that come with it, like Segment and Curve objects (which don't exist in NodeBox paths) and the way paper.js handles Grouped elements (also different in NBL). I'd be very happy if someone is ever be able to make it work.
The
compound
node currently turns shapes into polygons before applying the compound operation. This leads to curves being broken into very many small line segments. To be able to use the shapes for other design work it would be good to keep the path geometry.Paper.js has a good implementation: http://paperjs.org/examples/boolean-operations/