use try/catch to pre-catch non-planar PLC facets when CDT_2 fails

This commit is contained in:
Jane Tournois 2025-06-02 11:22:38 +02:00
parent 1f3e98abac
commit ab8fed4841
1 changed files with 6 additions and 1 deletions

View File

@ -1691,7 +1691,12 @@ private:
<< tr().point(vh_2d->info().vertex_handle_3d)
<< ")\n";
}
cdt_2.insert_constraint(previous_2d, vh_2d);
try {
cdt_2.insert_constraint(previous_2d, vh_2d);
} catch(typename CDT_2::Intersection_of_constraints_exception&) {
// intersection of constraints probably due to the projection
CGAL_error_msg("Error : Input PLC facet is not coplanar!");
}
previous_2d = vh_2d;
}
}