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

Intersection error on barely touching polygons #281

Open
ZuiDet opened this issue Mar 14, 2025 · 0 comments
Open

Intersection error on barely touching polygons #281

ZuiDet opened this issue Mar 14, 2025 · 0 comments

Comments

@ZuiDet
Copy link

ZuiDet commented Mar 14, 2025

I found a very strange bug for the intersection of the following two polygons:

poly1 = GI.Polygon([[(0.0, 0.9), (0.09999999999999998, 0.9), (0.09999999999999998, 1.0), (0.0, 1.0), (0.0, 0.9)]]);
poly2 = GI.Polygon([[(-0.1000000000000057, 0.9000000000000031), (-4.761357969939932e-15, 0.8999999999999989), (1.0572338493419614e-30, 1.0), (-0.09999999999999998, 1.0), (-0.1000000000000057, 0.9000000000000031)]]);

Image

poly_int = GO.intersection(poly2 poly1; target=GI.PolygonTrait()); returns an empty list as expected

However,
poly_int = GO.intersection(poly1 poly2; target=GI.PolygonTrait());

returns the left polygon completely.

Image

I assume, this is connected to #193.

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

1 participant