Moved the operation that adds curves to the left so that an event is never left without (left or right) curves

This commit is contained in:
Efi Fogel 2018-03-21 18:00:09 +02:00
parent 3a87a54c71
commit c5351fc584
1 changed files with 4 additions and 4 deletions

View File

@ -923,6 +923,10 @@ _create_overlapping_curve(const X_monotone_curve_2& overlap_cv,
CGAL_SS_PRINT_CURVE(overlap_sc);
CGAL_SS_PRINT_EOL();
// add the overlapping curve of the right of the left end
_add_curve_to_right(left_event, overlap_sc);
right_event->add_curve_to_left(overlap_sc);
// Remove curves from the left curves of the right end
// and add them on the right otherwise
if (c1->is_end_point(right_event))
@ -935,10 +939,6 @@ _create_overlapping_curve(const X_monotone_curve_2& overlap_cv,
else
_add_curve_to_right(right_event, c2);
// add the overlapping curve of the right of the left end
_add_curve_to_right(left_event, overlap_sc);
right_event->add_curve_to_left(overlap_sc);
this->m_visitor->found_overlap(c1, c2, overlap_sc);
if (!c1->is_end_point(right_event) && !c2->is_end_point(right_event))