-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Wrong intersection depending on minor difference in coordinates #102
Comments
You can get even more bizarre intersections if you delete the decimal places from lines 21 and 25 (so that the coordinates become [27, 74]). This intersection selects a portion of the polygon that is outside of the bounding polygon and a random line from across the polygon. |
Another check against polybooljs. It also seems to avoid the problem: I'll stop making these comparisons now. What I wanted to find out is whether looking into polybooljs may help to fix some of the open issues -- which seems to be the case. After all, there might be even a single cause of all the issues, e.g., just a missing edge case check. |
It's the precision model, I suspect. |
Resolved in v |
Turns out the demo site I used to check the ouput was doing some funky things and this isn't resolved :( |
The intersection operation appears to be working 0.7.3, although the difference operations seem to be generating a few stray segments |
You can view the issue here: https://codepen.io/purplecomet1/pen/WqOZRB
The polygons are defined on lines 9-12 and 21-25 respectively.
If you select 'Intersection' and run it, only a portion of it is highlighted instead of the whole shape.
If you edit certain coordinates slightly, however, it will produce the correct intersection. For example, adding '.0001' to either the x or y coordinate on line 10 will produce the correct intersection. The same is true for removing the last 3 decimal places of the y-coordinate on line 23.
The text was updated successfully, but these errors were encountered: