diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h index 5a8d20591a1..eede6b44447 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h @@ -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))