Prevent the removal of fixed boundary edges (#7820)

Add a check before calling `remove_degerenate_faces()` to avoid removing
patch border edges
This commit is contained in:
Sebastien Loriot 2023-10-25 08:40:07 -07:00 committed by GitHub
commit 8ff56a8af4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1152,6 +1152,9 @@ bool adapt_patch(std::vector<std::vector<Point> >& point_patch,
put(local_vpm, v, projector(get(local_vpm, v)));
// The projector can create degenerate faces
for (halfedge_descriptor h : border_hedges)
if (is_degenerate_triangle_face(face(opposite(h, local_mesh), local_mesh), local_mesh))
return !has_SI;
if(!remove_degenerate_faces(local_mesh))
return !has_SI;
@ -2035,7 +2038,7 @@ remove_self_intersections_one_step(std::set<typename boost::graph_traits<Triangl
#ifdef CGAL_PMP_REMOVE_SELF_INTERSECTION_OUTPUT_INTERMEDIATE_FULL_MESH
fname = "results/mesh_at_step_"+std::to_string(step)+"_CC_"+std::to_string(cc_id)+".off";
CGAL::IO::write_polygon_mesh(fname, tmesh, CGAL::parameters::stream_precision);
CGAL::IO::write_polygon_mesh(fname, tmesh, CGAL::parameters::stream_precision(17));
#endif
// expand the region to be filled