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

fix the fetal bug of the convolution calculation part of the Minkowski sum #8573

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 @@ -533,7 +533,7 @@ class Minkowski_sum_by_convolution_2 {
// list for subsequences sharing a common move_on indicator. When we
// encounter such a subsequence that equals the size of the corresponding
// polygon, we can safely remove it from the convolution cycle.
typename std::list<Labeled_segment_2>::iterator first, curr;
typename std::list<Labeled_segment_2>::iterator first, curr, newins;
bool move_on;
unsigned int count = 1;
bool reduced_cycle = false;
Expand Down Expand Up @@ -611,7 +611,7 @@ class Minkowski_sum_by_convolution_2 {
res = f_compare_xy(curr_pt, next_pt);

if (res != EQUAL) {
cycle.insert(curr,
newins = cycle.insert(curr,
Labeled_segment_2(Segment_2(curr_pt, next_pt),
X_curve_label((res == SMALLER),
cycle_id,
Expand All @@ -621,7 +621,13 @@ class Minkowski_sum_by_convolution_2 {

cycle.erase(curr);
cycle.erase(next);
curr = after_next;
if (res != EQUAL) {
//continue comparing the new combined line with the next line
curr = newins;
}
else {
curr = after_next;
}

if (after_next != cycle.end()) {
next = curr;
Expand Down