Closed Keavon closed 5 months ago
I know an old thread in Paper.js which is all about the robustness of their Booleans. They eventually implemented it pretty good. Thread: https://github.com/paperjs/paper.js/issues/761 Tests (A LOT!): https://github.com/paperjs/paper.js/blob/master/test/tests/Path_Boolean.js
Thanks for the links @be5invis! I did actually attempt a (partially-complete) port of the paper.js logic: https://github.com/GraphiteEditor/Graphite/tree/paperjs-boolean-ops However I got stuck once it started depending on other files within their library. Any help porting this by a community member would be amazing and very helpful to us. Thanks!
One more idea: instead of porting paper.js, we could do a Rust -> JS -> Rust call to use it as an actual JS library (just doing data type conversion before and after).
Throwing in PathKit (Skia's WASM interface) for reference: https://skia.org/docs/user/modules/pathkit/#makefromoppathone-pathtwo-op
I see you went with calls to Paper.js... https://github.com/GraphiteEditor/Graphite/pull/1759/files#diff-be0d7c77db82f95796c8fe3ccc8e86a6c0ac1a1b15f12767a279d74ca45ff643 👍
The legacy boolean operations were unstable, and are no longer compatible with the migration of vector data to nodes (#1065) so they had to be removed. But they're very important in the artist's workflow, so re-adding them as a node is high priority.
In order of importance, this should:
Each of these would be suitable for a single or separate PRs depending on the author's approach.