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

Calling unite on two identical paths results in empty path #885

Closed
iconexperience opened this issue Jan 4, 2016 · 3 comments
Closed

Calling unite on two identical paths results in empty path #885

iconexperience opened this issue Jan 4, 2016 · 3 comments

Comments

@iconexperience
Copy link
Contributor

When I try to unite two identical paths, the result is an empty path.

Here is a simple example:

var p1 = new paper.Path.Rectangle(100, 100, 100, 100);
var p2 = p1.clone();

var res = p1.unite(p2);
p1.strokeColor = "green";
res.fullySelected = true;
console.log(res.getArea());
@iconexperience
Copy link
Contributor Author

The same problem occurs with circles, more complex paths, and even compound paths. Is this due to all intersections being overlaps?

@lehni
Copy link
Member

lehni commented Jan 4, 2016

Might be. Perhaps we don't start in segments with intersections or overlaps? I need to check this later, now off to other things non-paper.js

@lehni
Copy link
Member

lehni commented Jan 6, 2016

I love it when the solution to a new problem emerges beautifully and minimally from another fix that was just implemented. This now also gives us tools to compare the results of boolean operations structurally.

And oh dear, another mess with branches here : ) I struggle with keeping boolean-debug (before boolean-fix) and develop in sync but hopefully soon that won't be required anymore.

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

No branches or pull requests

2 participants