From 8a2b2bbcb37f70b651ab8c22685a289943291bce Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 1 Dec 2023 16:13:46 +0100 Subject: [PATCH] add hidden named parameter for extra flip-and-smooth iterations --- .../STL_Extension/internal/parameters_interface.h | 1 + .../include/CGAL/tetrahedral_remeshing.h | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h index e22b053fe64..3c04be29fd0 100644 --- a/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h +++ b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h @@ -243,6 +243,7 @@ CGAL_add_named_parameter(remesh_boundaries_t, remesh_boundaries, remesh_boundari CGAL_add_named_parameter(cell_selector_t, cell_selector, cell_is_selected_map) CGAL_add_named_parameter(facet_is_constrained_t, facet_is_constrained, facet_is_constrained_map) CGAL_add_named_parameter(smooth_constrained_edges_t, smooth_constrained_edges, smooth_constrained_edges) +CGAL_add_named_parameter(nb_flip_smooth_iterations_t, nb_flip_smooth_iterations, nb_flip_smooth_iterations) // List of named parameters used in Alpha_wrap_3 CGAL_add_named_parameter(do_enforce_manifoldness_t, do_enforce_manifoldness, do_enforce_manifoldness) diff --git a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h index 320820e6180..ceda54fba84 100644 --- a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h +++ b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h @@ -201,10 +201,15 @@ void tetrahedral_isotropic_remeshing( = choose_parameter(get_parameter(np, internal_np::facet_is_constrained), typename Remesher_types::Default_FCMap(false)); + // Advanced and non documented parameters auto visitor = choose_parameter(get_parameter(np, internal_np::visitor), typename Remesher_types::Default_Visitor()); + auto nb_extra_iterations + = choose_parameter(get_parameter(np, internal_np::nb_flip_smooth_iterations), + std::size_t(3)); + #ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE std::cout << "Tetrahedral remeshing (" << "nb_iter = " << max_it << ", " @@ -231,7 +236,6 @@ void tetrahedral_isotropic_remeshing( #endif // perform remeshing - std::size_t nb_extra_iterations = 3; remesher.remesh(max_it, nb_extra_iterations); #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG @@ -401,10 +405,15 @@ void tetrahedral_isotropic_remeshing( = choose_parameter(get_parameter(np, internal_np::facet_is_constrained), typename Remesher_types::Default_FCMap(false)); + // Advanced and non documented parameters auto visitor = choose_parameter(get_parameter(np, internal_np::visitor), typename Remesher_types::Default_Visitor()); + auto nb_extra_iterations + = choose_parameter(get_parameter(np, internal_np::nb_flip_smooth_iterations), + std::size_t(3)); + #ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE std::cout << "Tetrahedral remeshing (" << "nb_iter = " << max_it << ", " @@ -430,7 +439,6 @@ void tetrahedral_isotropic_remeshing( #endif // perform remeshing - std::size_t nb_extra_iterations = 3; remesher.remesh(max_it, nb_extra_iterations); #ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE