-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specific boolean intersection case fail since v0.10.4 #1619
Comments
The way boolean operations are currently implemented, unfortunately there will likely always be some edge cases that fail. @hkrish has some good ideas about a better approach to boolean operations, but implementing it in paper.js is far from trivial. I am very reluctant to spending more time on ironing out kinks in edge cases, but maybe @iconexperience could take a look? He helped a lot with the past iterations of improvements... |
I've read passed discussion about boolean operations but I didn't get far enough to understand how they are implemented in detail. |
I've looked at InkScape in the past, but I think the code is rather massive... Size is a concern here too. Not sure what's best to do at this point, as we've progressed pretty far with the current approach. It just feels like edge cases don't stop to pop up! |
Is it such a crazy idea to deprecate boolean ops altogether within the core library, and inherit from some thing like https://skia.org/user/modules/pathkit? |
Oh wow, I wasn't aware of this! Not such a crazy idea, but the asm.js is almost twice the size of the whole paper.js library, and the wasm version is about the same size... I guess outsourcing would make sense though. @hkrish did you test it? Is it good? I remember Skia's boolean ops having some glitches and side-effects in the early days? |
It is quite a large library for sure (gzipped download size, for wasm seems to be comparable to paperjs, was it ~130K?). I haven't tried it yet, so no idea on glitches or accuracy. It seems they have been working on it though --https://skia.org/dev/present/pathops. |
I've set up a little fiddle running |
Wow... That's pretty crazy :) And kinda good news for our code! It means we're not doing that badly... |
😆
|
I've reduced this case to this sketch for further analysis. |
Description/Steps to reproduce
Do boolean intersection between 2 specific shapes.
Link to reproduction test-case
The bug is reproduced in this sketch.
Expected result
Actual result
Additional information
This bug only shows up in versions 0.10.4 and later.
It was originally reported here.
The text was updated successfully, but these errors were encountered: