Skip to content

Update orient_polygon_soup.h #8764

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -388,20 +388,24 @@ struct Polygon_soup_orienter
vertices_to_duplicate.back().second.push_back(other_p_id);
}
while(next!=neighbors[0]);

if (next==v_id){
/// turn the otherway round
/// turn the other way round
next = neighbors[0];
V_ID last_next = next; // store the initial value
do{
P_ID other_p_id;
std::tie(next, other_p_id) = next_ccw_vertex_around_target(next, v_id, polygons, edges, marked_edges);
if (next==v_id) break;
// If the new 'next' is the same as the previous one, break to avoid an infinite loop.
if (next == last_next) break;
last_next = next;
visited_polygons.insert(other_p_id);
if(nb_link_ccs != 1)
vertices_to_duplicate.back().second.push_back(other_p_id);
}
while(true);
}

if (nb_link_ccs != 1)
visitor.link_connected_polygons(v_id, vertices_to_duplicate.back().second);
}
Expand Down