Skip to content

Commit

Permalink
PMP::isotropic_remeshing() - Fix removal of boundary degenerate faces (
Browse files Browse the repository at this point in the history
…#8685)

## Summary of Changes

update status of border edges when removing a (degenerate) border face

## Release Management

* Affected package(s): PMP
* License and copyright ownership: unchanged
  • Loading branch information
sloriot authored Jan 17, 2025
2 parents 0eb709d + 8e0ebb9 commit 026700f
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,17 @@ namespace internal {
// else keep current status for en and eno
}

void remove_border_face(const halfedge_descriptor h)
{
CGAL_assertion(is_border(opposite(h, mesh_), mesh_));
for (halfedge_descriptor hf : halfedges_around_face(h, mesh_))
{
set_status(hf, MESH_BORDER); //only 1 or 2 of the listed halfedges
//will survive face removal, but status will be correct
}
CGAL::Euler::remove_face(h, mesh_);
}

template<typename Bimap, typename SizingFunction>
bool fix_degenerate_faces(const vertex_descriptor& v,
Bimap& short_edges,
Expand Down Expand Up @@ -1721,7 +1732,7 @@ namespace internal {

if(is_border(opposite(h, mesh_), mesh_))
{
CGAL::Euler::remove_face(h, mesh_);
remove_border_face(h);
continue;
}

Expand All @@ -1732,7 +1743,7 @@ namespace internal {

if(is_border(hfo, mesh_))
{
CGAL::Euler::remove_face(h, mesh_);
remove_border_face(h);
break;
}
vertex_descriptor vc = target(hf, mesh_);
Expand Down

0 comments on commit 026700f

Please sign in to comment.