We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here is an observable notebook to play: https://observablehq.com/d/adead0595ff39aa7
let {point, BooleanOperations, Polygon} = Flatten; // Create new polygon let a = new Polygon([ point(10,10), point(10, 100), point(100, 100), point(100, 10), ]); let b = new Polygon([ point(90,50), point(120, 10), point(120, 100) ]); let stage = d3.select(DOM.svg(400, 400)); stage.html(a.svg() + b.svg() + BooleanOperations.intersect(a, b).svg({fill: 'red'}));
I expect the intersection to be there, but seems like return path is empty:
The text was updated successfully, but these errors were encountered:
Hello @anvaka ,
Polygons in boolean operation should have same orientation. You can ensure this by adding check like following:
if ([...a.faces][0].orientation() != [...b.faces][0].orientation()) { a = a.reverse() }
Then you will get expected result.
Best, Alex
Sorry, something went wrong.
That was it. Thank you!
No branches or pull requests
Here is an observable notebook to play: https://observablehq.com/d/adead0595ff39aa7
I expect the intersection to be there, but seems like return path is empty:
The text was updated successfully, but these errors were encountered: