From 109d74466d4efa6770c5749c6ec5d75577be477d Mon Sep 17 00:00:00 2001 From: GYuvanShankar Date: Tue, 21 Jun 2022 14:11:49 +0530 Subject: [PATCH] New API support and docs for make_mesh_3.h --- .../random_points_in_tetrahedral_mesh_3.cpp | 2 +- .../random_points_on_tetrahedral_mesh_3.cpp | 2 +- Mesh_3/benchmark/Mesh_3/concurrency.cpp | 42 +- Mesh_3/doc/Mesh_3/CGAL/make_mesh_3.h | 167 -------- Mesh_3/doc/Mesh_3/Doxyfile.in | 3 +- .../Mesh_3/mesh_cubes_intersection.cpp | 4 +- .../mesh_cubes_intersection_with_features.cpp | 2 +- .../Mesh_3/mesh_hybrid_mesh_domain.cpp | 2 +- .../examples/Mesh_3/mesh_implicit_domains.cpp | 2 +- .../Mesh_3/mesh_implicit_domains_2.cpp | 2 +- .../Mesh_3/mesh_implicit_ellipsoid.cpp | 2 +- .../mesh_implicit_sphere_variable_size.cpp | 2 +- .../Mesh_3/mesh_optimization_example.cpp | 6 +- .../mesh_optimization_lloyd_example.cpp | 8 +- .../Mesh_3/mesh_polyhedral_domain.cpp | 4 +- .../Mesh_3/mesh_polyhedral_domain_sm.cpp | 2 +- ..._polyhedral_domain_with_surface_inside.cpp | 2 +- .../mesh_two_implicit_spheres_with_balls.cpp | 2 +- .../Mesh_3/remesh_polyhedral_surface.cpp | 2 +- .../Mesh_3/remesh_polyhedral_surface_sm.cpp | 2 +- Mesh_3/include/CGAL/make_mesh_3.h | 403 ++++++++++++++++-- ...est_c3t3_extract_subdomains_boundaries.cpp | 2 +- Mesh_3/test/Mesh_3/test_mesh_3_issue_1554.cpp | 2 +- .../Mesh_3/test_meshing_3D_gray_image.cpp | 8 +- .../test_meshing_3D_gray_image_deprecated.cpp | 8 +- Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp | 4 +- .../test_meshing_3D_image_deprecated.cpp | 4 +- .../test/Mesh_3/test_meshing_determinism.cpp | 4 +- .../test_meshing_polyhedron_with_features.cpp | 6 +- .../poisson_and_parallel_mesh_3.cpp | 2 +- .../include/CGAL/Named_function_parameters.h | 1 + .../internal/parameters_interface.h | 1 + .../test_mesh_and_remesh_image.cpp | 2 +- 33 files changed, 428 insertions(+), 279 deletions(-) delete mode 100644 Mesh_3/doc/Mesh_3/CGAL/make_mesh_3.h diff --git a/Generator/examples/Generator/random_points_in_tetrahedral_mesh_3.cpp b/Generator/examples/Generator/random_points_in_tetrahedral_mesh_3.cpp index 79a1ea4fd14..86be1b6e2ca 100644 --- a/Generator/examples/Generator/random_points_in_tetrahedral_mesh_3.cpp +++ b/Generator/examples/Generator/random_points_in_tetrahedral_mesh_3.cpp @@ -51,7 +51,7 @@ int main() Mesh_criteria criteria(facet_angle=25, facet_size=0.15, facet_distance=0.008, cell_radius_edge_ratio=3); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_perturb(), no_exude()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, perturb_param_new = no_perturb(), exude_param_new = no_exude()); // Create the generator, input is the C3t3 c3t3 Random_points_in_tetrahedral_mesh_3 g(c3t3); diff --git a/Generator/examples/Generator/random_points_on_tetrahedral_mesh_3.cpp b/Generator/examples/Generator/random_points_on_tetrahedral_mesh_3.cpp index d564ee7c2f3..0d24d88d5b0 100644 --- a/Generator/examples/Generator/random_points_on_tetrahedral_mesh_3.cpp +++ b/Generator/examples/Generator/random_points_on_tetrahedral_mesh_3.cpp @@ -50,7 +50,7 @@ int main() Mesh_criteria criteria(facet_angle=25, facet_size=0.15, facet_distance=0.008, cell_radius_edge_ratio=3); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_perturb(), no_exude()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, perturb_param_new = no_perturb(), exude_param_new = no_exude()); // Create the generator, input is the C3t3 c3t3 Random_points_in_tetrahedral_mesh_boundary_3 g(c3t3); diff --git a/Mesh_3/benchmark/Mesh_3/concurrency.cpp b/Mesh_3/benchmark/Mesh_3/concurrency.cpp index ea383a78832..151d1f6a2a3 100644 --- a/Mesh_3/benchmark/Mesh_3/concurrency.cpp +++ b/Mesh_3/benchmark/Mesh_3/concurrency.cpp @@ -531,22 +531,22 @@ bool make_mesh_polyhedron(const std::string &input_filename, C3t3 c3t3 = CGAL::make_mesh_3( domain , criteria # ifdef CGAL_MESH_3_BENCHMARK_LLOYD - , lloyd(time_limit=timelimit) + , lloyd_param_new = lloyd(time_limit=timelimit) # else - , no_lloyd() + , lloyd_param_new = no_lloyd() # endif - , no_odt() + , odt_param_new = no_odt() # ifdef CGAL_MESH_3_BENCHMARK_PERTURB - , perturb(time_limit = timelimit, + , perturb_param_new = perturb(time_limit = timelimit, sliver_bound = sliverbound) # else - , no_perturb() + , perturb_param_new = no_perturb() #endif #ifdef CGAL_MESH_3_BENCHMARK_EXUDE - , exude(time_limit = timelimit, + , exude_param_new = exude(time_limit = timelimit, sliver_bound = sliverbound) #else - , no_exude() + , exude_param_new = no_exude() #endif ); @@ -637,22 +637,22 @@ bool make_mesh_3D_images(const std::string &input_filename, C3t3 c3t3 = CGAL::make_mesh_3( domain , criteria # ifdef CGAL_MESH_3_BENCHMARK_LLOYD - , lloyd(time_limit=timelimit) + , lloyd_param_new = lloyd(time_limit=timelimit) # else - , no_lloyd() + , lloyd_param_new = no_lloyd() # endif - , no_odt() + , odt_param_new = no_odt() # ifdef CGAL_MESH_3_BENCHMARK_PERTURB - , perturb(time_limit = timelimit, + , perturb_param_new = perturb(time_limit = timelimit, sliver_bound = sliverbound) # else - , no_perturb() + , perturb_param_new = no_perturb() #endif #ifdef CGAL_MESH_3_BENCHMARK_EXUDE - , exude(time_limit = timelimit, + , exude_param_new = exude(time_limit = timelimit, sliver_bound = sliverbound) #else - , no_exude() + , exude_param_new = no_exude() #endif ); @@ -774,22 +774,22 @@ bool make_mesh_implicit(double facet_approx, C3t3 c3t3 = CGAL::make_mesh_3( domain , criteria # ifdef CGAL_MESH_3_BENCHMARK_LLOYD - , lloyd(time_limit=timelimit) + , lloyd_param_new = lloyd(time_limit=timelimit) # else - , no_lloyd() + , lloyd_param_new = no_lloyd() # endif - , no_odt() + , odt_param_new = no_odt() # ifdef CGAL_MESH_3_BENCHMARK_PERTURB - , perturb(time_limit = timelimit, + , perturb_param_new = perturb(time_limit = timelimit, sliver_bound = sliverbound) # else - , no_perturb() + , perturb_param_new = no_perturb() #endif #ifdef CGAL_MESH_3_BENCHMARK_EXUDE - , exude(time_limit = timelimit, + , exude_param_new = exude(time_limit = timelimit, sliver_bound = sliverbound) #else - , no_exude() + , exude_param_new = no_exude() #endif ); diff --git a/Mesh_3/doc/Mesh_3/CGAL/make_mesh_3.h b/Mesh_3/doc/Mesh_3/CGAL/make_mesh_3.h deleted file mode 100644 index 08bd5ee1761..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/make_mesh_3.h +++ /dev/null @@ -1,167 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3Functions - -The function `make_mesh_3()` is a 3D -mesh generator. It produces simplicial meshes which discretize -3D domains. - -The mesh generation algorithm is a Delaunay refinement process -followed by an optimization phase. -The criteria driving the Delaunay refinement -process may be tuned to achieve the user needs with respect to -the size of mesh elements, the accuracy of boundaries approximation, -etc. - -The optimization phase is a sequence of optimization processes, -amongst the following available optimizers: an ODT-smoothing, -a Lloyd-smoothing, a sliver perturber, and a sliver exuder. -Each optimization process -can be activated or not, -according to the user requirements -and available time. -By default, only the perturber and the exuder are activated. -Note that the benefits of the exuder will be lost if the mesh -is further refined afterward, and that ODT-smoothing, Lloyd-smoothing, -and sliver perturber should never be called after the sliver exuder. -In the case of further refinement, only the sliver exuder can be used. - -The function outputs the mesh to an object which provides iterators to -traverse the resulting mesh data structure or can be written to a file -(see \ref Mesh_3_section_examples ). - - -\tparam C3T3 is required to be a model of -the concept `MeshComplex_3InTriangulation_3`. This is the return type. -The type `C3T3` is in particular required to provide a nested type -`C3T3::Triangulation` for the 3D triangulation -embedding the mesh. The vertex and cell base classes of the -triangulation `C3T3::Triangulation` are required to be models of the -concepts `MeshVertexBase_3` and `MeshCellBase_3` -respectively. - -\tparam MD is required to be a model of -the concept `MeshDomain_3`, or of the refined concept -`MeshDomainWithFeatures_3` -if the domain has corners and curves that need to be accurately represented in the mesh. -The argument `domain` -is the sole link through which the domain -to be discretized is known by the mesh generation algorithm. - - -\tparam MC has to be a model of the concept -`MeshCriteria_3`, or a model of the refined concept `MeshCriteriaWithFeatures_3` if the domain has exposed features. -The argument `criteria` of type `MC` specifies the -size and shape requirements for mesh tetrahedra -and surface facets. These criteria -form the rules which drive the refinement process. All mesh elements -satisfy those criteria at the end of the refinement process. -In addition, if the domain has features, the argument -`criteria` provides a sizing field to guide the discretization -of 1-dimensional exposed features. - -\cgalHeading{Named Parameters} - -- `features` allows -the user to specify whether 0 and 1-dimensional features have to be -taken into account or not -when the domain is a model of `MeshDomainWithFeatures_3`. -The type `Features` of this parameter is an internal undescribed type. -The library provides functions to construct appropriate values of that type. -
    -
  • \link parameters::features() `parameters::features(domain)` \endlink sets `features` according to the domain, -i.e.\ 0 and 1-dimensional features are taken into account if `domain` is a -`MeshDomainWithFeatures_3`. This is the default behavior -if parameter `features` is not specified. -
  • `parameters::no_features()` prevents the representation -of 0 and 1-dimensional features in the mesh. -
- -- `manifold` allows the user to drive the meshing algorithm, -and ensure that the output mesh surface follows the given manifold criterion. -It can be activated with `parameters::manifold()`, `parameters::manifold_with_boundary()` -and `parameters::non_manifold()`. Note that the meshing algorithm cannot generate a manifold -surface if the input surface is not manifold. - -The four additional parameters are optimization parameters. -They control which optimization processes are performed -and allow the user to tune the parameters of the optimization processes. -Individual optimization parameters are not described here as they are -internal types (see instead the documentation page of each optimizer). -For each optimization algorithm, there exist two global functions -that allow to enable or disable the optimizer: - -- `lloyd`: `parameters::lloyd()` and `parameters::no_lloyd()` are designed to -trigger or not a call to `lloyd_optimize_mesh_3()` function and to set the -parameters of this optimizer. If one parameter is not set, the default value of -`lloyd_optimize_mesh_3()` is used for this parameter. - -- `ODT`: `parameters::odt()` and `parameters::no_odt()` are designed to -trigger or not a call to `odt_optimize_mesh_3` function and -to set the parameters of this optimizer. -If one parameter is not set, the default value of -`odt_optimize_mesh_3()` is used for this parameter. - -- `perturb`: `parameters::perturb()` and `parameters::no_perturb()` are designed to -trigger or not a call to `perturb_mesh_3` function and -to set the parameters of this optimizer. If one parameter is not set, the default value of -`CGAL::perturb_mesh_3` is used for this parameter, except for the time bound which is set to be -equal to the refinement CPU time. - -- `exude`: `parameters::exude()` and `parameters::no_exude()` are designed to -trigger or not a call to `exude_mesh_3()` function and to override to set the -parameters of this optimizer. If one parameter is not set, the default value of -`exude_mesh_3()` is used for this parameter, except for the time bound which is set to be -equal to the refinement CPU time. - -The optimization parameters can be passed in an arbitrary order. If one parameter -is not passed, its default value is used. The default values are -`no_lloyd()`, `no_odt()`, `perturb()` and `exude()`. - -Note that whatever may be the optimization processes activated, -they are always launched in the order that is a suborder -of the following (see user manual for further -details): *ODT-smoother*, *Lloyd-smoother*, *perturber*, and *exuder*. - -Beware that optimization of the mesh is obtained -by perturbing mesh vertices and modifying the mesh connectivity -and that this has an impact -on the strict compliance to the refinement criteria. -Though a strict compliance to mesh criteria -is guaranteed at the end of the Delaunay refinement, this may no longer be true after -some optimization processes. Also beware that the default behavior does involve some -optimization processes. - -\sa `refine_mesh_3()` -\sa `parameters::features()` -\sa `parameters::no_features()` -\sa `parameters::manifold()` -\sa `parameters::manifold_with_boundary()` -\sa `parameters::non_manifold()` -\sa `exude_mesh_3()` -\sa `perturb_mesh_3()` -\sa `lloyd_optimize_mesh_3()` -\sa `odt_optimize_mesh_3()` -\sa `parameters::exude()` -\sa `parameters::no_exude()` -\sa `parameters::perturb()` -\sa `parameters::no_perturb()` -\sa `parameters::lloyd()` -\sa `parameters::no_lloyd()` -\sa `parameters::odt()` -\sa `parameters::no_odt()` - -*/ - -template -C3T3 make_mesh_3(const MD& domain, - const MC& criteria, - parameters::internal::Features_options features = parameters::features(domain), - parameters::internal::Lloyd_options lloyd = parameters::no_lloyd(), - parameters::internal::Odt_options odt = parameters::no_odt(), - parameters::internal::Perturb_options perturb = parameters::perturb(), - parameters::internal::Exude_options exude = parameters::exude(), - parameters::internal::Manifold_options manifold = parameters::non_manifold()); - -} /* namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/Doxyfile.in b/Mesh_3/doc/Mesh_3/Doxyfile.in index 4e3c799b245..0eecbbb80cc 100644 --- a/Mesh_3/doc/Mesh_3/Doxyfile.in +++ b/Mesh_3/doc/Mesh_3/Doxyfile.in @@ -11,7 +11,8 @@ INPUT += \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/odt_optimize_mesh_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/lloyd_optimize_mesh_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/perturb_mesh_3.h \ - ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/refine_mesh_3.h + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/refine_mesh_3.h \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/make_mesh_3.h PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - 3D Mesh Generation" HTML_EXTRA_FILES = ${CGAL_PACKAGE_DOC_DIR}/fig/implicit_domain_3.jpg \ ${CGAL_PACKAGE_DOC_DIR}/fig/implicit_domain_4.jpg \ diff --git a/Mesh_3/examples/Mesh_3/mesh_cubes_intersection.cpp b/Mesh_3/examples/Mesh_3/mesh_cubes_intersection.cpp index 38f4363a04b..2a5e5f17480 100644 --- a/Mesh_3/examples/Mesh_3/mesh_cubes_intersection.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_cubes_intersection.cpp @@ -81,13 +81,13 @@ int main() cell_radius_edge_ratio = 2, cell_size = 0.4); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_exude(), no_perturb()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, exude_param_new = no_exude(), perturb_param_new = no_perturb()); // Perturbation (maximum cpu time: 10s, targeted dihedral angle: default) CGAL::perturb_mesh_3(c3t3, domain, time_limit_new = 10); // Exudation - CGAL::exude_mesh_3(c3t3,CGAL::parameters::time_limit_new=12); + CGAL::exude_mesh_3(c3t3,time_limit_new=12); // Output std::ofstream medit_file("out_cubes_intersection.mesh"); diff --git a/Mesh_3/examples/Mesh_3/mesh_cubes_intersection_with_features.cpp b/Mesh_3/examples/Mesh_3/mesh_cubes_intersection_with_features.cpp index 9ef132eaf23..3478946f53c 100644 --- a/Mesh_3/examples/Mesh_3/mesh_cubes_intersection_with_features.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_cubes_intersection_with_features.cpp @@ -168,7 +168,7 @@ int main() cell_radius_edge_ratio = 2, cell_size = 0.4); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_exude(), no_perturb()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, exude_param_new = no_exude(), perturb_param_new = no_perturb()); // Perturbation (maximum cpu time: 10s, targeted dihedral angle: default) CGAL::perturb_mesh_3(c3t3, domain, time_limit_new = 10); diff --git a/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp b/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp index c638395342c..e1bf3711a82 100644 --- a/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp @@ -240,7 +240,7 @@ int main() // Mesh generation (without optimization) C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - no_perturb(), no_exude()); + perturb_param_new = no_perturb(), exude_param_new = no_exude()); // Output dump_c3t3(c3t3, "out"); diff --git a/Mesh_3/examples/Mesh_3/mesh_implicit_domains.cpp b/Mesh_3/examples/Mesh_3/mesh_implicit_domains.cpp index b3adb97954d..decc6822b62 100644 --- a/Mesh_3/examples/Mesh_3/mesh_implicit_domains.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_implicit_domains.cpp @@ -57,7 +57,7 @@ int main() Mesh_criteria criteria(facet_criteria, cell_criteria); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_exude(), no_perturb()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, exude_param_new = no_exude(), perturb_param_new = no_perturb()); // Perturbation (maximum cpu time: 10s, targeted dihedral angle: default) CGAL::perturb_mesh_3(c3t3, domain, time_limit_new = 10); diff --git a/Mesh_3/examples/Mesh_3/mesh_implicit_domains_2.cpp b/Mesh_3/examples/Mesh_3/mesh_implicit_domains_2.cpp index 6d50993bbdd..647e13a72d4 100644 --- a/Mesh_3/examples/Mesh_3/mesh_implicit_domains_2.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_implicit_domains_2.cpp @@ -59,7 +59,7 @@ int main() Mesh_criteria criteria(facet_criteria, cell_criteria); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_exude(), no_perturb()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, exude_param_new = no_exude(), perturb_param_new = no_perturb()); // Perturbation (maximum cpu time: 10s, targeted dihedral angle: default) CGAL::perturb_mesh_3(c3t3, domain, time_limit = 10); diff --git a/Mesh_3/examples/Mesh_3/mesh_implicit_ellipsoid.cpp b/Mesh_3/examples/Mesh_3/mesh_implicit_ellipsoid.cpp index 4f3ee34b2e7..8d699afd3de 100644 --- a/Mesh_3/examples/Mesh_3/mesh_implicit_ellipsoid.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_implicit_ellipsoid.cpp @@ -51,7 +51,7 @@ int main() Mesh_criteria criteria(facet_criteria, cell_criteria); // Mesh generation (without optimization) - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_perturb(), no_exude()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, perturb_param_new = no_perturb(), exude_param_new = no_exude()); // Output std::ofstream medit_file("out_wo.mesh"); diff --git a/Mesh_3/examples/Mesh_3/mesh_implicit_sphere_variable_size.cpp b/Mesh_3/examples/Mesh_3/mesh_implicit_sphere_variable_size.cpp index 3eaa7ce389f..3c1fc5c163d 100644 --- a/Mesh_3/examples/Mesh_3/mesh_implicit_sphere_variable_size.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_implicit_sphere_variable_size.cpp @@ -65,7 +65,7 @@ int main() cell_radius_edge_ratio=2, cell_size=size); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_exude(), no_perturb()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, exude_param_new = no_exude(), perturb_param_new = no_perturb()); // Output std::ofstream medit_file("out.mesh"); diff --git a/Mesh_3/examples/Mesh_3/mesh_optimization_example.cpp b/Mesh_3/examples/Mesh_3/mesh_optimization_example.cpp index 1053b4f1d21..41485abadd3 100644 --- a/Mesh_3/examples/Mesh_3/mesh_optimization_example.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_optimization_example.cpp @@ -48,12 +48,12 @@ int main(int argc, char* argv[]) // Mesh generation and optimization in one call (sliver_bound is the // targeted dihedral angle in degrees) C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - no_exude(), - perturb(sliver_bound=10, time_limit=15)); + exude_param_new = no_exude(), + perturb_param_new = perturb(sliver_bound=10, time_limit=15)); // Mesh generation and optimization in several call C3t3 c3t3_bis = CGAL::make_mesh_3(domain, criteria, - no_perturb(), no_exude()); + perturb_param_new = no_perturb(), exude_param_new = no_exude()); CGAL::perturb_mesh_3(c3t3_bis, domain, time_limit_new=15); diff --git a/Mesh_3/examples/Mesh_3/mesh_optimization_lloyd_example.cpp b/Mesh_3/examples/Mesh_3/mesh_optimization_lloyd_example.cpp index 3fa00ebf9aa..12752c2d5f6 100644 --- a/Mesh_3/examples/Mesh_3/mesh_optimization_lloyd_example.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_optimization_lloyd_example.cpp @@ -46,13 +46,13 @@ int main(int argc, char*argv[]) // Mesh generation and optimization in one call C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - lloyd(time_limit=30), - no_perturb(), - exude(time_limit=10, sliver_bound=10)); + lloyd_param_new = lloyd(time_limit=30), + perturb_param_new = no_perturb(), + exude_param_new = exude(time_limit=10, sliver_bound=10)); // Mesh generation and optimization in several call C3t3 c3t3_bis = CGAL::make_mesh_3(domain, criteria, - no_perturb(), no_exude()); + perturb_param_new = no_perturb(), exude_param_new = no_exude()); CGAL::lloyd_optimize_mesh_3(c3t3_bis, domain, time_limit_new=30); CGAL::exude_mesh_3(c3t3_bis, sliver_bound_new=10, time_limit_new=10); diff --git a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain.cpp b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain.cpp index 8598715077c..2d9ca52a2fe 100644 --- a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain.cpp @@ -57,7 +57,7 @@ int main(int argc, char*argv[]) cell_radius_edge_ratio=3); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_perturb(), no_exude()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, perturb_param_new = no_perturb(), exude_param_new = no_exude()); // Output std::ofstream medit_file("out_1.mesh"); @@ -68,7 +68,7 @@ int main(int argc, char*argv[]) Mesh_criteria new_criteria(cell_radius_edge_ratio=3, cell_size=0.03); // Mesh refinement (and make the output manifold) - CGAL::refine_mesh_3(c3t3, domain, new_criteria, CGAL::parameters::manifold_options_param_new = manifold()); + CGAL::refine_mesh_3(c3t3, domain, new_criteria, manifold_options_param_new = manifold()); // Output medit_file.open("out_2.mesh"); diff --git a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_sm.cpp b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_sm.cpp index 7cb6dda697d..7888d04ccfe 100644 --- a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_sm.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_sm.cpp @@ -57,7 +57,7 @@ int main(int argc, char*argv[]) cell_radius_edge_ratio=3); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_perturb(), no_exude()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, perturb_param_new = no_perturb(), exude_param_new = no_exude()); // Output std::ofstream medit_file("out_1.mesh"); diff --git a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_surface_inside.cpp b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_surface_inside.cpp index 51009ad7cb8..c9ebc63fa74 100644 --- a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_surface_inside.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_surface_inside.cpp @@ -59,7 +59,7 @@ int main(int argc, char*argv[]) // Mesh generation C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - no_perturb(), no_exude()); + perturb_param_new = no_perturb(), exude_param_new = no_exude()); std::cerr << t.time() << " sec." << std::endl; // Output diff --git a/Mesh_3/examples/Mesh_3/mesh_two_implicit_spheres_with_balls.cpp b/Mesh_3/examples/Mesh_3/mesh_two_implicit_spheres_with_balls.cpp index bdc5ac62e7a..f161329d59d 100644 --- a/Mesh_3/examples/Mesh_3/mesh_two_implicit_spheres_with_balls.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_two_implicit_spheres_with_balls.cpp @@ -85,7 +85,7 @@ int main() // Mesh generation without feature preservation C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - CGAL::parameters::no_features()); + features_param_new = CGAL::parameters::no_features()); std::ofstream medit_file("out-no-protection.mesh"); c3t3.output_to_medit(medit_file); diff --git a/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface.cpp b/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface.cpp index 3a22bb35526..2236aab3a21 100644 --- a/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface.cpp +++ b/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface.cpp @@ -55,7 +55,7 @@ int main() facet_distance = 0.001); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_perturb(), no_exude()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, perturb_param_new = no_perturb(), exude_param_new = no_exude()); // Output the facets of the c3t3 to an OFF file. The facets will not be // oriented. diff --git a/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface_sm.cpp b/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface_sm.cpp index 1ddf6772d04..49b4e61b19f 100644 --- a/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface_sm.cpp +++ b/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface_sm.cpp @@ -54,7 +54,7 @@ int main() facet_distance = 0.001); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_perturb(), no_exude()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, perturb_param_new = no_perturb(), exude_param_new = no_exude()); // Output the facets of the c3t3 to an OFF file. The facets will not be // oriented. diff --git a/Mesh_3/include/CGAL/make_mesh_3.h b/Mesh_3/include/CGAL/make_mesh_3.h index ab440913779..0eb2b65b071 100644 --- a/Mesh_3/include/CGAL/make_mesh_3.h +++ b/Mesh_3/include/CGAL/make_mesh_3.h @@ -369,57 +369,202 @@ struct C3t3_initializer < C3T3, MD, MC, true, CGAL::Tag_false > // make_mesh_3 stuff // ----------------------------------- -// Manual redirections -// boost::parameter can't handle make_mesh_3 return_type alone... -template -C3T3 make_mesh_3(const MD& md, const MC& mc, const T& ...t) +/*! +\ingroup PkgMesh3Functions + +The function `make_mesh_3()` is a 3D +mesh generator. It produces simplicial meshes which discretize +3D domains. + +The mesh generation algorithm is a Delaunay refinement process +followed by an optimization phase. +The criteria driving the Delaunay refinement +process may be tuned to achieve the user needs with respect to +the size of mesh elements, the accuracy of boundaries approximation, +etc. + +The optimization phase is a sequence of optimization processes, +amongst the following available optimizers: an ODT-smoothing, +a Lloyd-smoothing, a sliver perturber, and a sliver exuder. +Each optimization process +can be activated or not, +according to the user requirements +and available time. +By default, only the perturber and the exuder are activated. +Note that the benefits of the exuder will be lost if the mesh +is further refined afterward, and that ODT-smoothing, Lloyd-smoothing, +and sliver perturber should never be called after the sliver exuder. +In the case of further refinement, only the sliver exuder can be used. + +The function outputs the mesh to an object which provides iterators to +traverse the resulting mesh data structure or can be written to a file +(see \ref Mesh_3_section_examples ). + + +\tparam C3T3 is required to be a model of +the concept `MeshComplex_3InTriangulation_3`. This is the return type. +The type `C3T3` is in particular required to provide a nested type +`C3T3::Triangulation` for the 3D triangulation +embedding the mesh. The vertex and cell base classes of the +triangulation `C3T3::Triangulation` are required to be models of the +concepts `MeshVertexBase_3` and `MeshCellBase_3` +respectively. + +\tparam MD is required to be a model of +the concept `MeshDomain_3`, or of the refined concept +`MeshDomainWithFeatures_3` +if the domain has corners and curves that need to be accurately represented in the mesh. +The argument `domain` +is the sole link through which the domain +to be discretized is known by the mesh generation algorithm. + +\tparam MC has to be a model of the concept +`MeshCriteria_3`, or a model of the refined concept `MeshCriteriaWithFeatures_3` if the domain has exposed features. +The argument `criteria` of type `MC` specifies the +size and shape requirements for mesh tetrahedra +and surface facets. These criteria +form the rules which drive the refinement process. All mesh elements +satisfy those criteria at the end of the refinement process. +In addition, if the domain has features, the argument +`criteria` provides a sizing field to guide the discretization +of 1-dimensional exposed features. + +\tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + +\cgalNamedParamsBegin + \cgalParamNBegin{features_param_new} + \cgalParamDescription{allows the user to specify whether 0 and 1-dimensional features have to be + taken into account or not + when the domain is a model of `MeshDomainWithFeatures_3`. + The type `Features` of this parameter is an internal undescribed type. + The library provides functions to construct appropriate values of that type. +
    +
  • \link parameters::features() `parameters::features(domain)` \endlink sets `features` according to the domain, + i.e.\ 0 and 1-dimensional features are taken into account if `domain` is a + `MeshDomainWithFeatures_3`. This is the default behavior + if parameter `features` is not specified. +
  • `parameters::no_features()` prevents the representation + of 0 and 1-dimensional features in the mesh. +
} + \cgalParamType{`parameters::features()' OR `parameters::features(domain)`} + \cgalParamDefault{`parameters::features(domain)`} + + \cgalParamNBegin{manifold_options_param_new} + \cgalParamDescription{allows the user to drive the meshing algorithm, + and ensure that the output mesh surface follows the given manifold criterion. + It can be activated with `parameters::manifold()`, `parameters::manifold_with_boundary()` + and `parameters::non_manifold()`. Note that the meshing algorithm cannot generate a manifold + surface if the input surface is not manifold.} + \cgalParamType{`parameters::manifold()` OR `parameters::manifold_with_boundary()` OR `parameters::non_manifold()`} + \cgalParamDefault{`parameters::non_manifold()`} + + \cgalParamNBegin{lloyd_param_new} + \cgalParamDescription{`parameters::lloyd()` and `parameters::no_lloyd()` are designed to + trigger or not a call to `lloyd_optimize_mesh_3()` function and to set the + parameters of this optimizer. If one parameter is not set, the default value of + `lloyd_optimize_mesh_3()` is used for this parameter.} + \cgalParamType{`parameters::lloyd()` OR `parameters::no_lloyd()`} + \cgalParamDefault{`parameters::no_lloyd()`} + + \cgalParamNBegin{odt_param_new} + \cgalParamDescription{`parameters::odt()` and `parameters::no_odt()` are designed to + trigger or not a call to `odt_optimize_mesh_3()` function and + to set the parameters of this optimizer. + If one parameter is not set, the default value of + `odt_optimize_mesh_3()` is used for this parameter.} + \cgalParamType{`parameters::odt()` OR `parameters::no_odt()`} + \cgalParamDefault{`parameters::no_odt()`} + + \cgalParamNBegin{perturb_param_new} + \cgalParamDescription{`parameters::perturb()` and `parameters::no_perturb()` are designed to + trigger or not a call to `perturb_mesh_3()` function and + to set the parameters of this optimizer. If one parameter is not set, the default value of + `perturb_mesh_3()` is used for this parameter, except for the time bound which is set to be + equal to the refinement CPU time.} + \cgalParamType{`parameters::perturb()` and `parameters::no_perturb()`} + \cgalParamDefault{`parameters::no_perturb`} + + \cgalParamNBegin{exude_param_new} + \cgalParamDescription{parameters::exude()` and `parameters::no_exude()` are designed to + trigger or not a call to `exude_mesh_3()` function and to override to set the + parameters of this optimizer. If one parameter is not set, the default value of + `exude_mesh_3()` is used for this parameter, except for the time bound which is set to be + equal to the refinement CPU time.} + \cgalParamType{`parameters::exude()` and `parameters::no_exude()`} + \cgalParamDefault{`parameters::no_exude`} + +\cgalNamedParamsEnd + + The optimization parameters can be passed in an arbitrary order. If one parameter +is not passed, its default value is used. The default values are +`no_lloyd()`, `no_odt()`, `perturb()` and `exude()`. + +Note that whatever may be the optimization processes activated, +they are always launched in the order that is a suborder +of the following (see user manual for further +details): *ODT-smoother*, *Lloyd-smoother*, *perturber*, and *exuder*. + +Beware that optimization of the mesh is obtained +by perturbing mesh vertices and modifying the mesh connectivity +and that this has an impact +on the strict compliance to the refinement criteria. +Though a strict compliance to mesh criteria +is guaranteed at the end of the Delaunay refinement, this may no longer be true after +some optimization processes. Also beware that the default behavior does involve some +optimization processes. + +\sa `refine_mesh_3()` +\sa `parameters::features()` +\sa `parameters::no_features()` +\sa `parameters::manifold()` +\sa `parameters::manifold_with_boundary()` +\sa `parameters::non_manifold()` +\sa `exude_mesh_3()` +\sa `perturb_mesh_3()` +\sa `lloyd_optimize_mesh_3()` +\sa `odt_optimize_mesh_3()` +\sa `parameters::exude()` +\sa `parameters::no_exude()` +\sa `parameters::perturb()` +\sa `parameters::no_perturb()` +\sa `parameters::lloyd()` +\sa `parameters::no_lloyd()` +\sa `parameters::odt()` +\sa `parameters::no_odt()` +*/ + +template +C3T3 make_mesh_3(MeshDomain& domain, MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values()) { - C3T3 c3t3; - make_mesh_3_bp(c3t3,md,mc,t...); - return c3t3; + using parameters::choose_parameter; + using parameters::get_parameter; + C3T3 c3t3; + parameters::internal::Exude_options exude_param = choose_parameter(get_parameter(np, internal_np::exude_options_param), parameters::exude()); + parameters::internal::Perturb_options perturb_param = choose_parameter(get_parameter(np, internal_np::perturb_options_param), parameters::perturb()); + parameters::internal::Odt_options odt_param = choose_parameter(get_parameter(np, internal_np::odt_options_param), parameters::no_odt()); + parameters::internal::Lloyd_options lloyd_param = choose_parameter(get_parameter(np, internal_np::lloyd_options_param), parameters::no_lloyd()); + parameters::internal::Features_options features_param = choose_parameter(get_parameter(np, internal_np::features_options_param), parameters::features(domain)); + parameters::internal::Mesh_3_options mesh_options_param = choose_parameter(get_parameter(np, internal_np::mesh_param), parameters::internal::Mesh_3_options()); + parameters::internal::Manifold_options manifold_options_param = choose_parameter(get_parameter(np, internal_np::manifold_param), parameters::internal::Manifold_options()); + + make_mesh_3_impl(c3t3, domain, criteria, + exude_param, perturb_param, odt_param, lloyd_param, + features_param.features(), mesh_options_param, + manifold_options_param); + return c3t3; } -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4003) // not enough actual parameters for macro -#endif -// see -CGAL_PRAGMA_DIAG_PUSH -// see -CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS - -BOOST_PARAMETER_FUNCTION( - (void), - make_mesh_3_bp, - parameters::tag, - (required (in_out(c3t3),*) (domain,*) (criteria,*) ) // nondeduced - (deduced - (optional - (features_param, (parameters::internal::Features_options), parameters::features(domain)) - (exude_param, (parameters::internal::Exude_options), parameters::exude()) - (perturb_param, (parameters::internal::Perturb_options), parameters::perturb()) - (odt_param, (parameters::internal::Odt_options), parameters::no_odt()) - (lloyd_param, (parameters::internal::Lloyd_options), parameters::no_lloyd()) - (mesh_options_param, (parameters::internal::Mesh_3_options), - parameters::internal::Mesh_3_options()) - (manifold_options_param, (parameters::internal::Manifold_options), - parameters::internal::Manifold_options()) - ) - ) -) +#ifndef DOXYGEN_RUNNING +#ifndef CGAL_NO_DEPRECATED_CODE +template +C3T3 make_mesh_3(MeshDomain& domain, MeshCriteria& criteria, const NP_PACK&...nps) { - make_mesh_3_impl(c3t3, domain, criteria, - exude_param, perturb_param, odt_param, lloyd_param, - features_param.features(), mesh_options_param, - manifold_options_param); + return make_mesh_3(domain, criteria, internal_np::combine_named_parameters(nps...)); } -CGAL_PRAGMA_DIAG_POP +#endif //CGAL_NO_DEPRECATED_CODE -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif /** * @brief This function meshes the domain defined by mesh_traits @@ -470,9 +615,177 @@ void make_mesh_3_impl(C3T3& c3t3, parameters::reset_param_new=parameters::no_reset_c3t3(), parameters::mesh_options_param_new= mesh_options, parameters::manifold_options_param_new= manifold_options); } +#else +namespace CGAL { +/*! +\ingroup PkgMesh3Functions +\deprecated This function is deprecated since \cgal 5.5, the overload using `NamedParameters` must be used instead. + +The function `make_mesh_3()` is a 3D +mesh generator. It produces simplicial meshes which discretize +3D domains. + +The mesh generation algorithm is a Delaunay refinement process +followed by an optimization phase. +The criteria driving the Delaunay refinement +process may be tuned to achieve the user needs with respect to +the size of mesh elements, the accuracy of boundaries approximation, +etc. + +The optimization phase is a sequence of optimization processes, +amongst the following available optimizers: an ODT-smoothing, +a Lloyd-smoothing, a sliver perturber, and a sliver exuder. +Each optimization process +can be activated or not, +according to the user requirements +and available time. +By default, only the perturber and the exuder are activated. +Note that the benefits of the exuder will be lost if the mesh +is further refined afterward, and that ODT-smoothing, Lloyd-smoothing, +and sliver perturber should never be called after the sliver exuder. +In the case of further refinement, only the sliver exuder can be used. + +The function outputs the mesh to an object which provides iterators to +traverse the resulting mesh data structure or can be written to a file +(see \ref Mesh_3_section_examples ). + + +\tparam C3T3 is required to be a model of +the concept `MeshComplex_3InTriangulation_3`. This is the return type. +The type `C3T3` is in particular required to provide a nested type +`C3T3::Triangulation` for the 3D triangulation +embedding the mesh. The vertex and cell base classes of the +triangulation `C3T3::Triangulation` are required to be models of the +concepts `MeshVertexBase_3` and `MeshCellBase_3` +respectively. + +\tparam MD is required to be a model of +the concept `MeshDomain_3`, or of the refined concept +`MeshDomainWithFeatures_3` +if the domain has corners and curves that need to be accurately represented in the mesh. +The argument `domain` +is the sole link through which the domain +to be discretized is known by the mesh generation algorithm. + + +\tparam MC has to be a model of the concept +`MeshCriteria_3`, or a model of the refined concept `MeshCriteriaWithFeatures_3` if the domain has exposed features. +The argument `criteria` of type `MC` specifies the +size and shape requirements for mesh tetrahedra +and surface facets. These criteria +form the rules which drive the refinement process. All mesh elements +satisfy those criteria at the end of the refinement process. +In addition, if the domain has features, the argument +`criteria` provides a sizing field to guide the discretization +of 1-dimensional exposed features. + +\cgalHeading{Named Parameters} + +- `features` allows +the user to specify whether 0 and 1-dimensional features have to be +taken into account or not +when the domain is a model of `MeshDomainWithFeatures_3`. +The type `Features` of this parameter is an internal undescribed type. +The library provides functions to construct appropriate values of that type. +
    +
  • \link parameters::features() `parameters::features(domain)` \endlink sets `features` according to the domain, +i.e.\ 0 and 1-dimensional features are taken into account if `domain` is a +`MeshDomainWithFeatures_3`. This is the default behavior +if parameter `features` is not specified. +
  • `parameters::no_features()` prevents the representation +of 0 and 1-dimensional features in the mesh. +
+ +- `manifold` allows the user to drive the meshing algorithm, +and ensure that the output mesh surface follows the given manifold criterion. +It can be activated with `parameters::manifold()`, `parameters::manifold_with_boundary()` +and `parameters::non_manifold()`. Note that the meshing algorithm cannot generate a manifold +surface if the input surface is not manifold. + +The four additional parameters are optimization parameters. +They control which optimization processes are performed +and allow the user to tune the parameters of the optimization processes. +Individual optimization parameters are not described here as they are +internal types (see instead the documentation page of each optimizer). +For each optimization algorithm, there exist two global functions +that allow to enable or disable the optimizer: + +- `lloyd`: `parameters::lloyd()` and `parameters::no_lloyd()` are designed to +trigger or not a call to `lloyd_optimize_mesh_3()` function and to set the +parameters of this optimizer. If one parameter is not set, the default value of +`lloyd_optimize_mesh_3()` is used for this parameter. + +- `ODT`: `parameters::odt()` and `parameters::no_odt()` are designed to +trigger or not a call to `odt_optimize_mesh_3` function and +to set the parameters of this optimizer. +If one parameter is not set, the default value of +`odt_optimize_mesh_3()` is used for this parameter. + +- `perturb`: `parameters::perturb()` and `parameters::no_perturb()` are designed to +trigger or not a call to `perturb_mesh_3` function and +to set the parameters of this optimizer. If one parameter is not set, the default value of +`CGAL::perturb_mesh_3` is used for this parameter, except for the time bound which is set to be +equal to the refinement CPU time. + +- `exude`: `parameters::exude()` and `parameters::no_exude()` are designed to +trigger or not a call to `exude_mesh_3()` function and to override to set the +parameters of this optimizer. If one parameter is not set, the default value of +`exude_mesh_3()` is used for this parameter, except for the time bound which is set to be +equal to the refinement CPU time. + +The optimization parameters can be passed in an arbitrary order. If one parameter +is not passed, its default value is used. The default values are +`no_lloyd()`, `no_odt()`, `perturb()` and `exude()`. + +Note that whatever may be the optimization processes activated, +they are always launched in the order that is a suborder +of the following (see user manual for further +details): *ODT-smoother*, *Lloyd-smoother*, *perturber*, and *exuder*. + +Beware that optimization of the mesh is obtained +by perturbing mesh vertices and modifying the mesh connectivity +and that this has an impact +on the strict compliance to the refinement criteria. +Though a strict compliance to mesh criteria +is guaranteed at the end of the Delaunay refinement, this may no longer be true after +some optimization processes. Also beware that the default behavior does involve some +optimization processes. + +\sa `refine_mesh_3()` +\sa `parameters::features()` +\sa `parameters::no_features()` +\sa `parameters::manifold()` +\sa `parameters::manifold_with_boundary()` +\sa `parameters::non_manifold()` +\sa `exude_mesh_3()` +\sa `perturb_mesh_3()` +\sa `lloyd_optimize_mesh_3()` +\sa `odt_optimize_mesh_3()` +\sa `parameters::exude()` +\sa `parameters::no_exude()` +\sa `parameters::perturb()` +\sa `parameters::no_perturb()` +\sa `parameters::lloyd()` +\sa `parameters::no_lloyd()` +\sa `parameters::odt()` +\sa `parameters::no_odt()` + +*/ + +template +C3T3 make_mesh_3(const MD& domain, + const MC& criteria, + parameters::internal::Features_options features = parameters::features(domain), + parameters::internal::Lloyd_options lloyd = parameters::no_lloyd(), + parameters::internal::Odt_options odt = parameters::no_odt(), + parameters::internal::Perturb_options perturb = parameters::perturb(), + parameters::internal::Exude_options exude = parameters::exude(), + parameters::internal::Manifold_options manifold = parameters::non_manifold()); + +} /* namespace CGAL */ + +#endif //DOXYGEN_RUNNING } // end namespace CGAL -#include - #endif // CGAL_MAKE_MESH_3_H diff --git a/Mesh_3/test/Mesh_3/test_c3t3_extract_subdomains_boundaries.cpp b/Mesh_3/test/Mesh_3/test_c3t3_extract_subdomains_boundaries.cpp index 54c31079acf..67047b119a8 100644 --- a/Mesh_3/test/Mesh_3/test_c3t3_extract_subdomains_boundaries.cpp +++ b/Mesh_3/test/Mesh_3/test_c3t3_extract_subdomains_boundaries.cpp @@ -76,7 +76,7 @@ int main() Mesh_criteria criteria(facet_criteria, cell_criteria); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_exude(), no_perturb()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, exude_param_new = no_exude(), perturb_param_new = no_perturb()); // Output std::stringstream off_file; diff --git a/Mesh_3/test/Mesh_3/test_mesh_3_issue_1554.cpp b/Mesh_3/test/Mesh_3/test_mesh_3_issue_1554.cpp index fe31c62f6a4..df88c7451a2 100644 --- a/Mesh_3/test/Mesh_3/test_mesh_3_issue_1554.cpp +++ b/Mesh_3/test/Mesh_3/test_mesh_3_issue_1554.cpp @@ -66,7 +66,7 @@ int main(int argc, char*argv[]) cell_radius_edge_ratio = 3); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_perturb(), no_exude()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, perturb_param_new = no_perturb(), exude_param_new = no_exude()); Gt::Construct_weighted_circumcenter_3 w_circumcenter = c3t3.triangulation().geom_traits().construct_weighted_circumcenter_3_object(); diff --git a/Mesh_3/test/Mesh_3/test_meshing_3D_gray_image.cpp b/Mesh_3/test/Mesh_3/test_meshing_3D_gray_image.cpp index eb41399c0d5..bbb5951b56c 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_3D_gray_image.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_3D_gray_image.cpp @@ -82,10 +82,10 @@ public: // Mesh generation C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - no_perturb(), - no_exude(), - mesh_3_options(number_of_initial_points_new = 30), - non_manifold() + perturb_param_new = no_perturb(), + exude_param_new = no_exude(), + mesh_options_param_new = mesh_3_options(number_of_initial_points_new = 30), + manifold_options_param_new = non_manifold() ); // Verify diff --git a/Mesh_3/test/Mesh_3/test_meshing_3D_gray_image_deprecated.cpp b/Mesh_3/test/Mesh_3/test_meshing_3D_gray_image_deprecated.cpp index e9105ff2a9e..c785c2f528e 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_3D_gray_image_deprecated.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_3D_gray_image_deprecated.cpp @@ -74,10 +74,10 @@ public: // Mesh generation C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - no_perturb(), - no_exude(), - mesh_3_options(number_of_initial_points_new = 30), - non_manifold() + perturb_param_new = no_perturb(), + exude_param_new = no_exude(), + mesh_options_param_new = mesh_3_options(number_of_initial_points_new = 30), + manifold_options_param_new = non_manifold() ); // Verify diff --git a/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp b/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp index 0d151fc1b9b..5edfe1648a6 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp @@ -58,8 +58,8 @@ public: // Mesh generation C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - CGAL::parameters::no_exude(), - CGAL::parameters::no_perturb()); + CGAL::parameters::exude_param_new = CGAL::parameters::no_exude(), + CGAL::parameters::perturb_param_new = CGAL::parameters::no_perturb()); c3t3.remove_isolated_vertices(); diff --git a/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp b/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp index ed1a1fbd14b..3a931aced34 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_3D_image_deprecated.cpp @@ -42,8 +42,8 @@ public: // Mesh generation C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - CGAL::parameters::no_exude(), - CGAL::parameters::no_perturb()); + CGAL::parameters::exude_param_new = CGAL::parameters::no_exude(), + CGAL::parameters::perturb_param_new = CGAL::parameters::no_perturb()); // Verify this->verify_c3t3_volume(c3t3, 1772330*0.95, 1772330*1.05); diff --git a/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp b/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp index 000202adef4..27aefc874ed 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp @@ -73,8 +73,8 @@ void test() { std::cout << "------- Iteration " << (i+1) << " -------" << std::endl; C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - no_perturb(), - no_exude()); + perturb_param_new = no_perturb(), + exude_param_new = no_exude()); std::ostringstream oss; c3t3.output_to_medit(oss); output_c3t3.push_back(oss.str()); //[5*i] diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp index 9babdd1a160..014777bcea9 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp @@ -125,9 +125,9 @@ struct Polyhedron_with_features_tester : public Tester // Mesh generation C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, - CGAL::parameters::manifold(), - CGAL::parameters::no_exude(), - CGAL::parameters::no_perturb()); + CGAL::parameters::manifold_options_param_new = CGAL::parameters::manifold(), + CGAL::parameters::exude_param_new = CGAL::parameters::no_exude(), + CGAL::parameters::perturb_param_new = CGAL::parameters::no_perturb()); CGAL::remove_far_points_in_mesh_3(c3t3); diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_and_parallel_mesh_3.cpp b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_and_parallel_mesh_3.cpp index 6e584c7aa44..a270c889e9a 100644 --- a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_and_parallel_mesh_3.cpp +++ b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_and_parallel_mesh_3.cpp @@ -72,7 +72,7 @@ int main(int, char**) CGAL::parameters::facet_size = 4, CGAL::parameters::facet_distance = 0.1); C3t3 c3t3 = CGAL::make_mesh_3 (domain, criteria, - CGAL::parameters::manifold()); + CGAL::parameters::manifold_options_param_new = CGAL::parameters::manifold()); return EXIT_SUCCESS; } diff --git a/STL_Extension/include/CGAL/Named_function_parameters.h b/STL_Extension/include/CGAL/Named_function_parameters.h index 6aa6bd51b6d..b0ab6d00de5 100644 --- a/STL_Extension/include/CGAL/Named_function_parameters.h +++ b/STL_Extension/include/CGAL/Named_function_parameters.h @@ -366,6 +366,7 @@ const Boost_parameter_compatibility_wrapper const Boost_parameter_compatibility_wrapper reset_param_new; const Boost_parameter_compatibility_wrapper mesh_options_param_new; const Boost_parameter_compatibility_wrapper manifold_options_param_new; +const Boost_parameter_compatibility_wrapper features_param_new; #endif // function to extract a parameter 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 e723acf187e..c45593c5aab 100644 --- a/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h +++ b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h @@ -277,3 +277,4 @@ CGAL_add_named_parameter(lloyd_options_param_t, lloyd_options_param, lloyd_optio CGAL_add_named_parameter(reset_options_param_t, reset_options_param, reset_options_param) CGAL_add_named_parameter(mesh_param_t, mesh_param, mesh_param) CGAL_add_named_parameter(manifold_param_t, manifold_param, manifold_param) +CGAL_add_named_parameter(features_option_param_t,features_options_param,features_options_param) \ No newline at end of file diff --git a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_mesh_and_remesh_image.cpp b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_mesh_and_remesh_image.cpp index cf75b94c0a5..2b6164634de 100644 --- a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_mesh_and_remesh_image.cpp +++ b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_mesh_and_remesh_image.cpp @@ -47,7 +47,7 @@ int main() Mesh_criteria criteria(facet_criteria, cell_criteria); // Meshing - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_exude(), no_perturb()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, exude_param_new = no_exude(), perturb_param_new = no_perturb()); std::cout << "Meshing done." << std::endl;