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

traverse first through non clustered turns, remove cluster exits, make priority consistent #1300

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

barendgehrels
Copy link
Collaborator

Fixes issue #1293 #1294 and #1295

This PR fixes several issues. There are no regressions.

More detailed:

  • it changes traversal such that it first traverses non clustered turns (simpler) and only then the remaining clustered ones
  • that caused a regression in issue_630_b (a relatively simple case)
  • that was fixed by removing cluster_exits (a welcome removal, see below)
  • that caused three other regressions
  • they could be fixed by using the priority approach, earlier used only for union/buffer. It is now also used for intersection/difference and in exactly the same way

Removing cluster_exits is welcome because it was designed as a simple approach, not needing many conditions. But in the end there are conditions there as well, and (apparently) bugs. So it is welcome to remove it again and keep the code having one approach, used for both union and intersection in the same way.

@barendgehrels barendgehrels self-assigned this Jul 30, 2024
return OverlayType == overlay_buffer || is_self_turn<OverlayType>(turn)
? select_source_generic<&segment_identifier::multi_index>(
turn, candidate_seg_id, previous_seg_id)
: select_source_generic<&segment_identifier::source_index>(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not part of the fix but makes code more concise and readable

{
// Check counts: in some cases interior rings might be generated with
// polygons on both sides. For dissolve it can be anything.

// If this forms a spike, going to/from the cluster point in the same
// (opposite) direction, it can still be used.
return cinfo.spike_count > 0 ? 1 : 0;
return 1;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returning 0 was a bug, it should only have returned 1.
So that is fixed and is necessary to avoid regressions with this PR

Copy link
Member

@vissarion vissarion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@vissarion vissarion merged commit 0b4aa21 into boostorg:develop Aug 8, 2024
23 checks passed
@barendgehrels barendgehrels deleted the fix/issue-1293-1294-1295 branch December 14, 2024 11:13
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

Successfully merging this pull request may close these issues.

2 participants