diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_c3t3.cpp b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_c3t3.cpp index 6564db46be2..ba0dbe1d30d 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_c3t3.cpp +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_c3t3.cpp @@ -6,11 +6,15 @@ #include #include +#include #include #include +#include +#include + // Domain using K = CGAL::Exact_predicates_inexact_constructions_kernel; using Polyhedron = CGAL::Mesh_polyhedron_3::type; @@ -78,7 +82,7 @@ int main(int argc, char* argv[]) Corners_pmap corners_pmap(corners); Triangulation_3 tr = CGAL::convert_to_triangulation_3(std::move(c3t3), - CGAL::parameters::edge_is_constrained_map(constraints_pmap). + edge_is_constrained_map(constraints_pmap). vertex_is_constrained_map(corners_pmap)); //note we use the move semantic, with std::move(c3t3), @@ -90,7 +94,7 @@ int main(int argc, char* argv[]) const double target_edge_length = 0.1;//coarsen the mesh CGAL::tetrahedral_isotropic_remeshing(tr, target_edge_length, - CGAL::parameters::number_of_iterations(5) + number_of_iterations(5) .smooth_constrained_edges(true) .edge_is_constrained_map(constraints_pmap)); diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_polyhedral_domain_with_features.cpp b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_polyhedral_domain_with_features.cpp index a7f801382cf..9946160aaff 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_polyhedral_domain_with_features.cpp +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_polyhedral_domain_with_features.cpp @@ -10,12 +10,16 @@ #include #include +#include #include +#include +#include + // Domain using K = CGAL::Exact_predicates_inexact_constructions_kernel; -using Polyhedron = CGAL::Surface_mesh; -using Mesh_domain = CGAL::Polyhedral_mesh_domain_with_features_3; +using Surface_mesh = CGAL::Surface_mesh; +using Mesh_domain = CGAL::Polyhedral_mesh_domain_with_features_3; #ifdef CGAL_CONCURRENT_MESH_3 using Concurrency_tag = CGAL::Parallel_if_available_tag; @@ -48,22 +52,22 @@ int main(int argc, char* argv[]) const int nb_iter = (argc > 2) ? atoi(argv[2]) : 5; std::ifstream input(fname); - Polyhedron polyhedron; + Surface_mesh mesh; std::string filename(fname); - input >> polyhedron; + input >> mesh; if (input.fail()) { std::cerr << "Error: Cannot read file " << fname << std::endl; return EXIT_FAILURE; } - if (!CGAL::is_triangle_mesh(polyhedron)) { + if (!CGAL::is_triangle_mesh(mesh)) { std::cerr << "Input geometry is not triangulated." << std::endl; return EXIT_FAILURE; } // Create domain - Mesh_domain domain(polyhedron); + Mesh_domain domain(mesh); // Get sharp features domain.detect_features(); @@ -71,11 +75,11 @@ int main(int argc, char* argv[]) // Mesh criteria const double size = 0.072; Mesh_criteria criteria(edge_size = size, - facet_angle = 25, - facet_size = size, - facet_distance = 0.1 * size, - cell_radius_edge_ratio = 2, - cell_size = size); + facet_angle = 25, + facet_size = size, + facet_distance = 0.1 * size, + cell_radius_edge_ratio = 2, + cell_size = size); // Mesh generation C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_perturb(), no_exude()); @@ -84,11 +88,11 @@ int main(int argc, char* argv[]) Constraints_pmap constraints_pmap(constraints); Triangulation_3 tr = CGAL::convert_to_triangulation_3(std::move(c3t3), - CGAL::parameters::edge_is_constrained_map(constraints_pmap)); + edge_is_constrained_map(constraints_pmap)); // Remeshing CGAL::tetrahedral_isotropic_remeshing(tr, size, - CGAL::parameters::number_of_iterations(nb_iter) + number_of_iterations(nb_iter) .edge_is_constrained_map(constraints_pmap)); std::ofstream out("out_remeshed.mesh"); diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_with_adaptive_sizing.cpp b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_with_adaptive_sizing.cpp index ba9dc5da3da..9bf687c548d 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_with_adaptive_sizing.cpp +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_with_adaptive_sizing.cpp @@ -1,5 +1,3 @@ -#define CGAL_TETRAHEDRAL_REMESHING_VERBOSE - #include #include @@ -15,6 +13,8 @@ #include +#include + // Domain using K = CGAL::Exact_predicates_inexact_constructions_kernel; using Point = K::Point_3; diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_with_sizing.cpp b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_with_sizing.cpp index 001875d92f7..53b8c484b68 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_with_sizing.cpp +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/mesh_and_remesh_with_sizing.cpp @@ -67,7 +67,7 @@ int main() // Mesh criteria Spherical_sizing_field size; Mesh_criteria criteria(params::facet_angle(30).facet_size(0.1).facet_distance(0.025). - cell_radius_edge_ratio(2).cell_size(size)); + cell_radius_edge_ratio(2).cell_size(size)); // Mesh generation C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, params::no_exude().no_perturb()); diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_of_one_subdomain.cpp b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_of_one_subdomain.cpp index 46feca51a48..a51c2d4c448 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_of_one_subdomain.cpp +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_of_one_subdomain.cpp @@ -3,6 +3,8 @@ #include #include +#include + #include "tetrahedral_remeshing_generate_input.h" using K = CGAL::Exact_predicates_inexact_constructions_kernel; diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_with_features_and_sizing.cpp b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_with_features_and_sizing.cpp index 67abdb43715..24c6e7dad02 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_with_features_and_sizing.cpp +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_with_features_and_sizing.cpp @@ -1,13 +1,3 @@ -#define CGAL_DUMP_REMESHING_STEPS -#define CGAL_TETRAHEDRAL_REMESHING_VERBOSE -#define CGAL_TETRAHEDRAL_REMESHING_DEBUG - -// experiments on sizing -//#define CGAL_AVERAGE_SIZING_AFTER_COLLAPSE -#define CGAL_MAX_SIZING_IN_IS_TOO_LONG -#define CGAL_MIN_SIZING_IN_IS_TOO_SHORT - - #include #include @@ -16,10 +6,13 @@ #include #include +#include #include #include +#include +#include // Domain typedef CGAL::Exact_predicates_inexact_constructions_kernel K; @@ -54,7 +47,7 @@ struct Distance_from_corner_sizing_field typedef K::FT FT; typedef K::Point_3 Point_3; - const Point_3 corner = Point_3{ -1., -1., -1 }; //lower corner of the cube + const Point_3 corner{ -1., -1., -1 }; //lower corner of the cube template FT operator()(const Point_3& p, const int dim, const Index&) const @@ -67,7 +60,7 @@ struct Distance_from_corner_sizing_field }; // To avoid verbose function and named parameters call -using namespace CGAL::parameters; +namespace p = CGAL::parameters; int main(int argc, char* argv[]) { @@ -87,18 +80,18 @@ int main(int argc, char* argv[]) domain.detect_features(); // Mesh criteria - Mesh_criteria criteria(edge_size = 0.1, - facet_size = 0.1, - facet_distance = 0.005); + Mesh_criteria criteria(p::edge_size = 0.1, + p::facet_size = 0.1, + p::facet_distance = 0.005); // Mesh generation - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_perturb(), no_exude()); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, p::no_perturb().no_exude()); Constraints_set constraints; Constraints_pmap constraints_pmap(constraints); Triangulation_3 tr = CGAL::convert_to_triangulation_3(std::move(c3t3), - CGAL::parameters::edge_is_constrained_map(constraints_pmap)); + p::edge_is_constrained_map(constraints_pmap)); //note we use the move semantic, with std::move(c3t3), // to avoid a copy of the triangulation by the function @@ -109,7 +102,7 @@ int main(int argc, char* argv[]) CGAL::tetrahedral_isotropic_remeshing(tr, Distance_from_corner_sizing_field(), - CGAL::parameters::number_of_iterations(3) + p::number_of_iterations(3) .edge_is_constrained_map(constraints_pmap) .smooth_constrained_edges(true));