-
Notifications
You must be signed in to change notification settings - Fork 223
Union of ring and ring returns empty result. #1108
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
Comments
I can reproduce this as well, and indeed the get_cluster threshold is important here. |
I think we have to make the threshold in These case(s) should then be fixed in another way. As far as I can see, there is something wrong or missing in the turn information, from that one cluster (two turns) it should be able to find the next intersection point (which is: itself) and create the inner ring. It's a bit messy, but the important info is in red: No next IP. That's wrong, it should find one. To be continued. |
Thank you for chasing this issue. I understand if we make the cluster threshold higher, this case is resolved. But it just bypasses the turn issue. |
Indeed, we cannot change the cluster only, there is some other logic as well. |
There are more specific checks necessary, or a more general approach. So I can't finish it today. More specificly, if you remove this check here : https://github.com/boostorg/geometry/blob/develop/include/boost/geometry/algorithms/detail/overlay/traversal.hpp#L971 Then the clustersize can be enlarged again (I use 100 now) without breaking #1081 |
I'm convinced now that that check should not be there. Because a union and intersection are similar (apart from travel direction), so there should not be code to handle it separately. We have it in a few places, therefore I mention: a more general approach. |
I looked at it closer today. I couldn't finish it for 100% but basically the solution is there and I'll create a PR soon (probably this weekend) |
Fixed by mentioned PR. All works now fine for me. |
Thank you so much to fix #1108 and #1109. I have tested these cases and it works well. However, I've found a regression case.
This case works well with 1.81.0 but fails with new code. |
Thanks @Mitsuhiko-Matsukawa , I will look to this situation as well. |
Closing this issue, after creating a new one of the regression |
fixes: boostorg#1109 and boostorg#1108 keeps fixed: boostorg#1081 (cherry picked from commit ec7f9c9)
boost1.81.0
Visual Studio 2019. x64 debug
This is a regression from 1.80.0.
If I revert a commit a908a21, it works well.
However, this commit is useful and it's not good to revert.
We need to fix overlay, but I'm sorry I have no idea so far.
If I change #if 1 to 0, it works well.
The text was updated successfully, but these errors were encountered: