Skip to content

Commit 06fa730

Browse files
authored
Flip it if you can't collapse it (#8609)
if a needle is also a cap, it will be handled as a needle only. But if we can't collapse the edge, a flip will not be tried. Try the flip too. Note that this will slow down the method as the status of a triangle is tested twice. Fix #8605
2 parents b55bdc0 + 0737a8f commit 06fa730

File tree

3 files changed

+176
-114
lines changed

3 files changed

+176
-114
lines changed

Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,14 +871,14 @@ namespace internal {
871871
std::array<halfedge_descriptor, 2> r1 = internal::is_badly_shaped(
872872
face(he, mesh_),
873873
mesh_, vpmap_, vcmap_, ecmap_, gt_,
874-
cap_threshold, // bound on the angle: above 160 deg => cap
875874
4, // bound on shortest/longest edge above 4 => needle
875+
cap_threshold, // bound on the angle: above 160 deg => cap
876876
0,// collapse length threshold : not needed here
877877
0); // flip triangle height threshold
878878

879879
std::array<halfedge_descriptor, 2> r2 = internal::is_badly_shaped(
880880
face(opposite(he, mesh_), mesh_),
881-
mesh_, vpmap_, vcmap_, ecmap_, gt_, cap_threshold, 4, 0, 0);
881+
mesh_, vpmap_, vcmap_, ecmap_, gt_, 4, cap_threshold, 0, 0);
882882

883883
const bool badly_shaped = (r1[0] != boost::graph_traits<PolygonMesh>::null_halfedge()//needle
884884
|| r1[1] != boost::graph_traits<PolygonMesh>::null_halfedge()//cap

0 commit comments

Comments
 (0)