Fixed handling unbounded curves that are both infinite on the left and infinite at the top

This commit is contained in:
Efi Fogel 2023-03-12 14:59:40 +02:00 committed by Laurent Rineau
parent b4c04b53e0
commit ec15089353
1 changed files with 15 additions and 0 deletions

View File

@ -272,6 +272,21 @@ before_handle_event(Event* event)
if (m_prev_minus_inf_x_event != nullptr)
m_prev_minus_inf_x_event->set_halfedge_handle(m_lh->next());
m_prev_minus_inf_x_event = event;
// If the event lies also on the top boundary, associate all curve indices
// of subcurves that "see" m_th from below with the top fictitious halfedge
// (m_th->next()).
if (ps_y == ARR_TOP_BOUNDARY) {
if (m_he_ind_map_p != nullptr) {
Indices_list& list_ref = (*m_he_ind_map_p)[m_th];
list_ref.clear();
list_ref.splice(list_ref.end(), m_subcurves_at_ubf);
}
else {
m_subcurves_at_ubf.clear();
}
CGAL_assertion(m_subcurves_at_ubf.empty());
}
return;
case ARR_RIGHT_BOUNDARY: