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

Difference of gpolygons giving wrong result #1349

Open
gastald88 opened this issue Nov 27, 2024 · 3 comments
Open

Difference of gpolygons giving wrong result #1349

gastald88 opened this issue Nov 27, 2024 · 3 comments
Assignees
Milestone

Comments

@gastald88
Copy link

I have two polygons, p1 (orange) and p2 (blue) as in figure.
The difference of p1 and p2 returns a (wrong) empty result.
Image

This can be replicated in the following godbolt link:
https://godbolt.org/z/GT7aWaWzW

@barendgehrels
Copy link
Collaborator

barendgehrels commented Nov 27, 2024

Thanks for the report. I can reproduce it.

issue_1349<d> a: 2354350.1 b: 230426.9 union: 2355360.2 intersection: 229416.76
diff(a-b): 0 diff(b-a): 1010.1469 sym_diff: 1010.1469 
checks: 1.1641532e-10 2124933.3 -2.6557245e-10 0 OK WRONG OK OK

@barendgehrels barendgehrels self-assigned this Nov 27, 2024
@barendgehrels barendgehrels added this to the 1.88 milestone Nov 27, 2024
@barendgehrels
Copy link
Collaborator

Detailed note (mainly for myself).

It's caused by the fix of #869 , a condition for difference added by me in 2021.

I have to revise that part of the code. Skipping the reverseMeaningInTurn is fine for all test cases, except issue_869 which has correct areas, but is considered as invalid.

In the traversal_switch_detector.hpp it should not be necessary change behavior for difference.

@barendgehrels
Copy link
Collaborator

PR fixing this issue is published

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

2 participants