diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event_base.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event_base.h index dd8b20ca1b3..0f28b6d9d6d 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event_base.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event_base.h @@ -172,7 +172,8 @@ public: Subcurve_iterator iter = this->right_curves_begin(); for (Subcurve_iterator end = this->right_curves_end(); iter!=end; ++iter) { - if (*iter == curve) + // TODO refine the condition + if ( (*iter)->is_leaf(curve) || curve->is_leaf(*iter) || curve->has_common_leaf(*iter) ) break; } CGAL_assertion( iter!=this->right_curves_end() ); 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 a356c8e3494..3cd25731b0d 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 @@ -712,7 +712,9 @@ template Point_2 left_end = this->m_traits->construct_min_vertex_2_object()(icv); // split the x-monotone curve at current event - if ( this->m_queueEventLess(left_end, event_for_overlap) == SMALLER) + // TODO handle unbounded curves? + // TODO: check event_for_overlap is still needed + if ( this->m_queueEventLess(left_end, event_for_overlap==NULL ? this->m_currentEvent : event_for_overlap) == SMALLER) { this->m_traits->split_2_object()(icv, event_for_overlap->point(),