Skip to content
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

Most operations fail when paths have collinear edges #11

Open
samhocevar opened this issue Mar 2, 2021 · 3 comments
Open

Most operations fail when paths have collinear edges #11

samhocevar opened this issue Mar 2, 2021 · 3 comments

Comments

@samhocevar
Copy link
Contributor

Ultimately it is an issue with Raphael.js missing some intersection points, but Raphael.Boolean.js fails when paths have collinear edges because it gets confused by the odd number of intersections.

Here is a simple example with the following paths:

var path1 = paper.path("M2,11 L74,4 L62,41 L52,34 L51,36 Z");
var path2 = paper.path("M95,68 L81,17 L48,31 Z");

image

@samhocevar
Copy link
Contributor Author

This is fixed in PR #16:

image

@poilu
Copy link
Owner

poilu commented Mar 13, 2021

Including raphael lib as git submodule seemed the cleaner solution to me (626775b).
Thanks for all your work @samhocevar! It looks like Raphaël is still alive. :)
I really liked to work with it in the days when this plugin was started.

@samhocevar
Copy link
Contributor Author

Actually I don’t really use Raphaël! But I needed to do a lot of SVG batch processing with path simplification, and even after all these years, your library is still the most straightforward way to do boolean operations on paths… Thanks again for writing it.

Also now that I know you’re still somehow maintaining it, I may have a few additional bugfixes pending…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants