diff --git a/Mesh_3/examples/Mesh_3/mesh_3D_gray_image.cpp b/Mesh_3/examples/Mesh_3/mesh_3D_gray_image.cpp
index 4149eeaa6f9..d877389a530 100644
--- a/Mesh_3/examples/Mesh_3/mesh_3D_gray_image.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_3D_gray_image.cpp
@@ -23,8 +23,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3
C3t3;
// Criteria
typedef CGAL::Mesh_criteria_3
Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main(int argc, char*argv[])
{
@@ -37,12 +36,12 @@ int main(int argc, char*argv[])
}
/// [Domain creation]
Mesh_domain domain =
- Mesh_domain::create_gray_image_mesh_domain(image, iso_value = 2.9f, value_outside = 0.f);
+ Mesh_domain::create_gray_image_mesh_domain(image, params::iso_value(2.9f).value_outside(0.f));
/// [Domain creation]
// Mesh criteria
- Mesh_criteria criteria(facet_angle=30, facet_size=6, facet_distance=2,
- cell_radius_edge_ratio=3, cell_size=8);
+ Mesh_criteria criteria(params::facet_angle(30).facet_size(6).facet_distance(2).
+ cell_radius_edge_ratio(3).cell_size(8));
// Meshing
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria);
diff --git a/Mesh_3/examples/Mesh_3/mesh_3D_gray_image_multiple_values.cpp b/Mesh_3/examples/Mesh_3/mesh_3D_gray_image_multiple_values.cpp
index 1c99e0379f1..71b3a5950a4 100644
--- a/Mesh_3/examples/Mesh_3/mesh_3D_gray_image_multiple_values.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_3D_gray_image_multiple_values.cpp
@@ -26,8 +26,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3;
// Criteria
typedef CGAL::Mesh_criteria_3
Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
template
struct Image_to_multiple_iso_level_sets {
@@ -63,18 +62,17 @@ int main(int argc, char*argv[])
}
// Domain
- namespace p = CGAL::parameters;
Mesh_domain domain =
Mesh_domain::create_gray_image_mesh_domain
- (p::image = image,
- p::image_values_to_subdomain_indices =
- Image_to_multiple_iso_level_sets(iso_values),
- p::value_outside = 0.f
+ (params::image(image).
+ image_values_to_subdomain_indices(
+ Image_to_multiple_iso_level_sets(iso_values)).
+ value_outside(0.f)
);
// Mesh criteria
- Mesh_criteria criteria(facet_angle=30, facet_size=6, facet_distance=2,
- cell_radius_edge_ratio=3, cell_size=8);
+ Mesh_criteria criteria(params::facet_angle(30).facet_size(6).facet_distance(2).
+ cell_radius_edge_ratio(3).cell_size(8));
// Meshing
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria);
diff --git a/Mesh_3/examples/Mesh_3/mesh_3D_gray_image_with_custom_initialization.cpp b/Mesh_3/examples/Mesh_3/mesh_3D_gray_image_with_custom_initialization.cpp
index 758145532e9..afed1a34b52 100644
--- a/Mesh_3/examples/Mesh_3/mesh_3D_gray_image_with_custom_initialization.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_3D_gray_image_with_custom_initialization.cpp
@@ -32,8 +32,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3;
// Criteria
typedef CGAL::Mesh_criteria_3
Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main(int argc, char* argv[])
{
@@ -46,12 +45,12 @@ int main(int argc, char* argv[])
}
/// [Domain creation]
Mesh_domain domain =
- Mesh_domain::create_gray_image_mesh_domain(image, iso_value = 2.9f, value_outside = 0.f);
+ Mesh_domain::create_gray_image_mesh_domain(image, params::iso_value(2.9f).value_outside(0.f));
/// [Domain creation]
/// [Mesh criteria]
- Mesh_criteria criteria(facet_angle = 30, facet_size = 6, facet_distance = 2,
- cell_radius_edge_ratio = 3, cell_size = 8);
+ Mesh_criteria criteria(params::facet_angle(30).facet_size(6).facet_distance(2).
+ cell_radius_edge_ratio(3).cell_size(8));
/// [Meshing]
C3t3 c3t3;
diff --git a/Mesh_3/examples/Mesh_3/mesh_3D_gray_vtk_image.cpp b/Mesh_3/examples/Mesh_3/mesh_3D_gray_vtk_image.cpp
index a42b1144a0a..55799a97747 100644
--- a/Mesh_3/examples/Mesh_3/mesh_3D_gray_vtk_image.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_3D_gray_vtk_image.cpp
@@ -79,18 +79,17 @@ int main(int argc, char* argv[])
return 0;
}
/// [Domain creation]
- // To avoid verbose function and named parameters call
- using namespace CGAL::parameters;
+ namespace params = CGAL::parameters;
Mesh_domain domain = Mesh_domain::create_gray_image_mesh_domain
(image,
- image_values_to_subdomain_indices = Less(iso),
- value_outside = 0);
+ params::image_values_to_subdomain_indices(Less(iso)).
+ value_outside(0));
/// [Domain creation]
// Mesh criteria
- Mesh_criteria criteria(facet_angle=30, facet_size=fs, facet_distance=fd,
- cell_radius_edge_ratio=3, cell_size=cs);
+ Mesh_criteria criteria(params::facet_angle(30).facet_size(fs).facet_distance(fd).
+ cell_radius_edge_ratio(3).cell_size(cs));
// Meshing
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria);
diff --git a/Mesh_3/examples/Mesh_3/mesh_3D_image.cpp b/Mesh_3/examples/Mesh_3/mesh_3D_image.cpp
index dbae9919419..484863d158c 100644
--- a/Mesh_3/examples/Mesh_3/mesh_3D_image.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_3D_image.cpp
@@ -26,8 +26,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3;
// Criteria
typedef CGAL::Mesh_criteria_3
Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main(int argc, char* argv[])
{
@@ -45,8 +44,8 @@ int main(int argc, char* argv[])
/// [Domain creation]
// Mesh criteria
- Mesh_criteria criteria(facet_angle=30, facet_size=6, facet_distance=4,
- cell_radius_edge_ratio=3, cell_size=8);
+ Mesh_criteria criteria(params::facet_angle(30).facet_size(6).facet_distance(4).
+ cell_radius_edge_ratio(3).cell_size(8));
/// [Meshing]
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria);
diff --git a/Mesh_3/examples/Mesh_3/mesh_3D_image_variable_size.cpp b/Mesh_3/examples/Mesh_3/mesh_3D_image_variable_size.cpp
index c7f205091ba..2f07fbf3abf 100644
--- a/Mesh_3/examples/Mesh_3/mesh_3D_image_variable_size.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_3D_image_variable_size.cpp
@@ -31,8 +31,7 @@ typedef CGAL::Mesh_criteria_3 Mesh_criteria;
typedef CGAL::Mesh_constant_domain_field_3 Sizing_field;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main(int argc, char* argv[])
{
@@ -55,8 +54,8 @@ int main(int argc, char* argv[])
domain.index_from_subdomain_index(127));
// Mesh criteria
- Mesh_criteria criteria(facet_angle=30, facet_size=6, facet_distance=2,
- cell_radius_edge_ratio=3, cell_size=size);
+ Mesh_criteria criteria(params::facet_angle(30).facet_size(6).facet_distance(2).
+ cell_radius_edge_ratio(3).cell_size(size));
// Meshing
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria);
diff --git a/Mesh_3/examples/Mesh_3/mesh_3D_image_with_custom_initialization.cpp b/Mesh_3/examples/Mesh_3/mesh_3D_image_with_custom_initialization.cpp
index fcf5d94744d..253c41a920b 100644
--- a/Mesh_3/examples/Mesh_3/mesh_3D_image_with_custom_initialization.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_3D_image_with_custom_initialization.cpp
@@ -31,8 +31,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3;
// Criteria
typedef CGAL::Mesh_criteria_3
Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main()
{
@@ -44,8 +43,8 @@ int main()
Mesh_domain domain = Mesh_domain::create_labeled_image_mesh_domain(image);
// Mesh criteria
- Mesh_criteria criteria(facet_angle=30, facet_size=3, facet_distance=1,
- cell_radius_edge_ratio=3, cell_size=3);
+ Mesh_criteria criteria(params::facet_angle(30).facet_size(3).facet_distance(1).
+ cell_radius_edge_ratio(3).cell_size(3));
/// [Meshing]
C3t3 c3t3;
diff --git a/Mesh_3/examples/Mesh_3/mesh_3D_image_with_features.cpp b/Mesh_3/examples/Mesh_3/mesh_3D_image_with_features.cpp
index 877fa104635..15d8c843bcf 100644
--- a/Mesh_3/examples/Mesh_3/mesh_3D_image_with_features.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_3D_image_with_features.cpp
@@ -32,8 +32,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3
C3t3;
// Criteria
typedef CGAL::Mesh_criteria_3
Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
/// [Add 1D features]
#include "read_polylines.h"
@@ -92,9 +91,9 @@ int main(int argc, char* argv[])
/// [Call add_1D_features]
/// Note that `edge_size` is needed with 1D-features [Mesh criteria]
- Mesh_criteria criteria(edge_size=6,
- facet_angle=30, facet_size=6, facet_distance=4,
- cell_radius_edge_ratio=3, cell_size=8);
+ Mesh_criteria criteria(params::edge_size(6).
+ facet_angle(30).facet_size(6).facet_distance(4).
+ cell_radius_edge_ratio(3).cell_size(8));
/// [Mesh criteria]
// Meshing
diff --git a/Mesh_3/examples/Mesh_3/mesh_3D_weighted_image.cpp b/Mesh_3/examples/Mesh_3/mesh_3D_weighted_image.cpp
index 0374a315707..17356b21fd3 100644
--- a/Mesh_3/examples/Mesh_3/mesh_3D_weighted_image.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_3D_weighted_image.cpp
@@ -24,8 +24,7 @@ using C3t3 = CGAL::Mesh_complex_3_in_triangulation_3
;
// Criteria
using Mesh_criteria = CGAL::Mesh_criteria_3
;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main(int argc, char* argv[])
{
@@ -45,13 +44,13 @@ int main(int argc, char* argv[])
Mesh_domain domain
= Mesh_domain::create_labeled_image_mesh_domain(image,
- weights = img_weights,
- relative_error_bound = 1e-6);
+ params::weights(img_weights).
+ relative_error_bound(1e-6));
/// [Domain creation]
// Mesh criteria
- Mesh_criteria criteria(facet_angle=30, facet_size=6, facet_distance=0.5,
- cell_radius_edge_ratio=3, cell_size=8);
+ Mesh_criteria criteria(params::facet_angle(30).facet_size(6).facet_distance(0.5).
+ cell_radius_edge_ratio(3).cell_size(8));
/// [Meshing]
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria);
diff --git a/Mesh_3/examples/Mesh_3/mesh_cubes_intersection.cpp b/Mesh_3/examples/Mesh_3/mesh_cubes_intersection.cpp
index 91a4351b395..8f42c8f556d 100644
--- a/Mesh_3/examples/Mesh_3/mesh_cubes_intersection.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_cubes_intersection.cpp
@@ -19,7 +19,7 @@
// IO
#include
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
// Domain
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
@@ -76,18 +76,18 @@ int main()
Mesh_domain domain(Function_wrapper(v, vps), K::Sphere_3(CGAL::ORIGIN, 5.*5.));
// Set mesh criteria
- Mesh_criteria criteria(edge_size = 0.15,
- facet_angle = 30, facet_size = 0.2,
- cell_radius_edge_ratio = 2, cell_size = 0.4);
+ Mesh_criteria criteria(params::edge_size(0.15).
+ facet_angle(30).facet_size(0.2).
+ 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, params::no_exude().no_perturb());
// Perturbation (maximum cpu time: 10s, targeted dihedral angle: default)
- CGAL::perturb_mesh_3(c3t3, domain, time_limit = 10);
+ CGAL::perturb_mesh_3(c3t3, domain, params::time_limit(10));
// Exudation
- CGAL::exude_mesh_3(c3t3,time_limit=12);
+ CGAL::exude_mesh_3(c3t3,params::time_limit(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 11e27bf0a11..568f3fec14a 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
@@ -20,7 +20,7 @@
// IO
#include
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
// Domain
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
@@ -163,18 +163,18 @@ int main()
domain.add_features(polylines.begin(),polylines.end());
// Set mesh criteria
- Mesh_criteria criteria(edge_size = 0.15,
- facet_angle = 30, facet_size = 0.2,
- cell_radius_edge_ratio = 2, cell_size = 0.4);
+ Mesh_criteria criteria(params::edge_size(0.15).
+ facet_angle(30).facet_size(0.2).
+ 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, params::no_exude().no_perturb());
// Perturbation (maximum cpu time: 10s, targeted dihedral angle: default)
- CGAL::perturb_mesh_3(c3t3, domain, time_limit = 10);
+ CGAL::perturb_mesh_3(c3t3, domain, params::time_limit(10));
// Exudation
- CGAL::exude_mesh_3(c3t3,CGAL::parameters::time_limit = 12);
+ CGAL::exude_mesh_3(c3t3, params::time_limit(12));
// Output
std::ofstream medit_file("out_cubes_intersection_with_features.mesh");
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 31c3c0e917e..ba278c43d42 100644
--- a/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp
@@ -190,8 +190,7 @@ FT sphere_centered_at_111 (const Point& p)
return dx*dx+dy*dy+dz*dz-1;
}
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main()
{
@@ -239,7 +238,7 @@ int main()
// Mesh generation (without optimization)
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria,
- no_perturb(), no_exude());
+ params::no_perturb().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 ecce9ce2ca1..5b56c06f935 100644
--- a/Mesh_3/examples/Mesh_3/mesh_implicit_domains.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_implicit_domains.cpp
@@ -12,7 +12,7 @@
// IO
#include
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
#ifdef CGAL_CONCURRENT_MESH_3
typedef CGAL::Parallel_tag Concurrency_tag;
@@ -50,7 +50,7 @@ int main()
// Domain (Warning: Sphere_3 constructor uses square radius !)
Mesh_domain domain(Function_wrapper(v), K::Sphere_3(CGAL::ORIGIN, 5.*5.),
- CGAL::parameters::relative_error_bound(1e-6));
+ params::relative_error_bound(1e-6));
// Set mesh criteria
Facet_criteria facet_criteria(30, 0.2, 0.02); // angle, size, approximation
@@ -58,13 +58,13 @@ 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, params::no_exude().no_perturb());
// Perturbation (maximum cpu time: 10s, targeted dihedral angle: default)
- CGAL::perturb_mesh_3(c3t3, domain, time_limit = 10);
+ CGAL::perturb_mesh_3(c3t3, domain, params::time_limit(10));
// Exudation
- CGAL::exude_mesh_3(c3t3, time_limit=12);
+ CGAL::exude_mesh_3(c3t3, params::time_limit(12));
// Output
std::ofstream medit_file("out.mesh");
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 d8ea29734ee..c6fa7e3aef3 100644
--- a/Mesh_3/examples/Mesh_3/mesh_implicit_domains_2.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_implicit_domains_2.cpp
@@ -47,7 +47,7 @@ int main()
namespace params = CGAL::parameters;
Mesh_domain domain(Function_wrapper(v, vps),
K::Sphere_3(CGAL::ORIGIN,5.*5.),
- params::relative_error_bound = 1e-6);
+ params::relative_error_bound(1e-6));
/// [Domain creation]
// Set mesh criteria
@@ -56,13 +56,13 @@ int main()
Mesh_criteria criteria(facet_criteria, cell_criteria);
// Mesh generation
- C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, params::no_exude(), params::no_perturb());
+ C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, params::no_exude().no_perturb());
// Perturbation (maximum cpu time: 10s, targeted dihedral angle: default)
- CGAL::perturb_mesh_3(c3t3, domain, params::time_limit = 10);
+ CGAL::perturb_mesh_3(c3t3, domain, params::time_limit(10));
// Exudation
- CGAL::exude_mesh_3(c3t3,12);
+ CGAL::exude_mesh_3(c3t3, params::time_limit(12));
// Output
std::ofstream medit_file("out.mesh");
diff --git a/Mesh_3/examples/Mesh_3/mesh_implicit_ellipsoid.cpp b/Mesh_3/examples/Mesh_3/mesh_implicit_ellipsoid.cpp
index da98a23a98c..db7dabd145e 100644
--- a/Mesh_3/examples/Mesh_3/mesh_implicit_ellipsoid.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_implicit_ellipsoid.cpp
@@ -35,8 +35,7 @@ FT ellipsoid_function (const Point& p)
return x2+2*y2+4*z2-1;
}
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main()
{
@@ -51,7 +50,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, params::no_perturb().no_exude());
// Output
std::ofstream medit_file("out_wo.mesh");
@@ -59,7 +58,7 @@ int main()
medit_file.close();
// Perturbation (5s, 12degree)
- CGAL::perturb_mesh_3(c3t3, domain, time_limit=5, sliver_bound=12);
+ CGAL::perturb_mesh_3(c3t3, domain, params::time_limit(5).sliver_bound(12));
// Exudation
CGAL::exude_mesh_3(c3t3);
diff --git a/Mesh_3/examples/Mesh_3/mesh_implicit_sphere.cpp b/Mesh_3/examples/Mesh_3/mesh_implicit_sphere.cpp
index e69306618cc..d184da23cd5 100644
--- a/Mesh_3/examples/Mesh_3/mesh_implicit_sphere.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_implicit_sphere.cpp
@@ -28,8 +28,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3;
// Criteria
typedef CGAL::Mesh_criteria_3
Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
// Function
FT sphere_function (const Point& p)
@@ -44,8 +43,8 @@ int main()
/// [Domain creation]
// Mesh criteria
- Mesh_criteria criteria(facet_angle=30, facet_size=0.1, facet_distance=0.025,
- cell_radius_edge_ratio=2, cell_size=0.1);
+ Mesh_criteria criteria(params::facet_angle(30).facet_size(0.1).facet_distance(0.025).
+ cell_radius_edge_ratio(2).cell_size(0.1));
// Mesh generation
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria);
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 fd3f8d715ca..f04609b6a6b 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
@@ -42,8 +42,7 @@ struct Spherical_sizing_field
}
};
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
// Function
FT sphere_function (const Point& p)
@@ -52,7 +51,6 @@ FT sphere_function (const Point& p)
int main()
{
/// [Domain creation] (Warning: Sphere_3 constructor uses squared radius !)
- namespace p = CGAL::parameters;
Mesh_domain domain = Mesh_domain::create_implicit_mesh_domain
(sphere_function, K::Sphere_3(CGAL::ORIGIN, 2.)
);
@@ -60,11 +58,11 @@ int main()
// Mesh criteria
Spherical_sizing_field size;
- Mesh_criteria criteria(facet_angle=30, facet_size=0.1, facet_distance=0.025,
- cell_radius_edge_ratio=2, cell_size=size);
+ Mesh_criteria criteria(params::facet_angle(30).facet_size(0.1).facet_distance(0.025).
+ 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, params::no_exude().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 4d0e36ff5d3..dd37a7cfe25 100644
--- a/Mesh_3/examples/Mesh_3/mesh_optimization_example.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_optimization_example.cpp
@@ -26,8 +26,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3;
// Mesh Criteria
typedef CGAL::Mesh_criteria_3
Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main(int argc, char* argv[])
{
@@ -42,20 +41,20 @@ int main(int argc, char* argv[])
Mesh_domain domain = Mesh_domain::create_labeled_image_mesh_domain(image);
// Mesh criteria
- Mesh_criteria criteria(facet_angle=30, facet_size=5, facet_distance=1.5,
- cell_radius_edge_ratio=2, cell_size=7);
+ Mesh_criteria criteria(params::facet_angle(30).facet_size(5).facet_distance(1.5).
+ cell_radius_edge_ratio(2).cell_size(7));
// 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));
+ params::no_exude().
+ perturb(params::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());
+ params::no_perturb().no_exude());
- CGAL::perturb_mesh_3(c3t3_bis, domain, time_limit=15);
+ CGAL::perturb_mesh_3(c3t3_bis, domain, params::time_limit(15));
// Output
std::ofstream medit_file("out.mesh");
@@ -68,3 +67,4 @@ int main(int argc, char* argv[])
return 0;
}
+.
\ No newline at end of file
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 b4db268fc59..42b8c1d0c4a 100644
--- a/Mesh_3/examples/Mesh_3/mesh_optimization_lloyd_example.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_optimization_lloyd_example.cpp
@@ -26,8 +26,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3;
// Mesh Criteria
typedef CGAL::Mesh_criteria_3
Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main(int argc, char*argv[])
{
@@ -41,21 +40,21 @@ int main(int argc, char*argv[])
Mesh_domain domain = Mesh_domain::create_labeled_image_mesh_domain(image);
// Mesh criteria
- Mesh_criteria criteria(facet_angle=30, facet_distance=1.2,
- cell_radius_edge_ratio=2);
+ Mesh_criteria criteria(params::facet_angle(30).facet_distance(1.2).
+ cell_radius_edge_ratio(2));
// 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));
+ params::lloyd(params::time_limit(30)).
+ no_perturb().
+ exude(params::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());
+ params::no_perturb().no_exude());
- CGAL::lloyd_optimize_mesh_3(c3t3_bis, domain, time_limit=30);
- CGAL::exude_mesh_3(c3t3_bis, sliver_bound=10, time_limit=10);
+ CGAL::lloyd_optimize_mesh_3(c3t3_bis, domain, params::time_limit(30));
+ CGAL::exude_mesh_3(c3t3_bis, params::sliver_bound(10), params::time_limit(10));
// Output
std::ofstream medit_file("out.mesh");
diff --git a/Mesh_3/examples/Mesh_3/mesh_polyhedral_complex.cpp b/Mesh_3/examples/Mesh_3/mesh_polyhedral_complex.cpp
index eaee6876dc8..b502b7593e6 100644
--- a/Mesh_3/examples/Mesh_3/mesh_polyhedral_complex.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_polyhedral_complex.cpp
@@ -31,8 +31,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3<
// Criteria
typedef CGAL::Mesh_criteria_3 Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
const char* const filenames[] = {
"meshes/patch-01.off",
@@ -71,9 +70,9 @@ int main()
domain.detect_features(); //includes detection of borders
// Mesh criteria
- Mesh_criteria criteria(edge_size = 8,
- facet_angle = 25, facet_size = 8, facet_distance = 0.2,
- cell_radius_edge_ratio = 3, cell_size = 10);
+ Mesh_criteria criteria(params::edge_size(8).
+ facet_angle(25).facet_size(8).facet_distance(0.2).
+ cell_radius_edge_ratio(3).cell_size(10));
// Mesh generation
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria);
diff --git a/Mesh_3/examples/Mesh_3/mesh_polyhedral_complex_sm.cpp b/Mesh_3/examples/Mesh_3/mesh_polyhedral_complex_sm.cpp
index bc4b4821dca..9bf6c385370 100644
--- a/Mesh_3/examples/Mesh_3/mesh_polyhedral_complex_sm.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_polyhedral_complex_sm.cpp
@@ -33,8 +33,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3<
// Criteria
typedef CGAL::Mesh_criteria_3 Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
const char* const filenames[] = {
"meshes/patch-01.off",
@@ -94,9 +93,9 @@ int main()
domain.detect_features(); //includes detection of borders
// Mesh criteria
- Mesh_criteria criteria(edge_size = 8,
- facet_angle = 25, facet_size = 8, facet_distance = 0.2,
- cell_radius_edge_ratio = 3, cell_size = 10);
+ Mesh_criteria criteria(params::edge_size(8).
+ facet_angle(25).facet_size(8).facet_distance(0.2).
+ cell_radius_edge_ratio(3).cell_size(10));
#ifdef CGAL_MESHING_STEPS_WITH_CIN
std::cout << "Ready for mesh generation ? (y or n)";
diff --git a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain.cpp b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain.cpp
index eb24c7ef70a..cd56e3bc5c7 100644
--- a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain.cpp
@@ -29,8 +29,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3
C3t3;
// Criteria
typedef CGAL::Mesh_criteria_3
Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main(int argc, char*argv[])
{
@@ -54,11 +53,11 @@ int main(int argc, char*argv[])
Mesh_domain domain(polyhedron);
// Mesh criteria (no cell_size set)
- Mesh_criteria criteria(facet_angle=25, facet_size=0.15, facet_distance=0.008,
- cell_radius_edge_ratio=3);
+ Mesh_criteria criteria(params::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, params::no_perturb().no_exude());
// Output
std::ofstream medit_file("out_1.mesh");
@@ -66,10 +65,10 @@ int main(int argc, char*argv[])
medit_file.close();
// Set tetrahedron size (keep cell_radius_edge_ratio), ignore facets
- Mesh_criteria new_criteria(cell_radius_edge_ratio=3, cell_size=0.03);
+ Mesh_criteria new_criteria(params::cell_radius_edge_ratio(3).cell_size(0.03));
// Mesh refinement (and make the output manifold)
- CGAL::refine_mesh_3(c3t3, domain, new_criteria, manifold());
+ CGAL::refine_mesh_3(c3t3, domain, new_criteria, params::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 c7ab9c43a4d..eac3d9a4701 100644
--- a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_sm.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_sm.cpp
@@ -28,8 +28,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3;
// Criteria
typedef CGAL::Mesh_criteria_3
Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main(int argc, char*argv[])
{
@@ -53,11 +52,11 @@ int main(int argc, char*argv[])
Mesh_domain domain(polyhedron);
// Mesh criteria (no cell_size set)
- Mesh_criteria criteria(facet_angle=25, facet_size=0.15, facet_distance=0.008,
- cell_radius_edge_ratio=3);
+ Mesh_criteria criteria(params::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, params::no_perturb().no_exude());
// Output
std::ofstream medit_file("out_1.mesh");
@@ -65,7 +64,7 @@ int main(int argc, char*argv[])
medit_file.close();
// Set tetrahedron size (keep cell_radius_edge_ratio), ignore facets
- Mesh_criteria new_criteria(cell_radius_edge_ratio=3, cell_size=0.03);
+ Mesh_criteria new_criteria(params::cell_radius_edge_ratio(3).cell_size(0.03));
// Mesh refinement
CGAL::refine_mesh_3(c3t3, domain, new_criteria);
diff --git a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp
index c6b092e5db1..917aeec1cf4 100644
--- a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp
@@ -29,8 +29,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3<
// Criteria
typedef CGAL::Mesh_criteria_3 Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main(int argc, char*argv[])
{
@@ -55,9 +54,9 @@ int main(int argc, char*argv[])
domain.detect_features();
// Mesh criteria
- Mesh_criteria criteria(edge_size = 0.025,
- facet_angle = 25, facet_size = 0.05, facet_distance = 0.005,
- cell_radius_edge_ratio = 3, cell_size = 0.05);
+ Mesh_criteria criteria(params::edge_size(0.025).
+ facet_angle(25).facet_size(0.05).facet_distance(0.005).
+ cell_radius_edge_ratio(3).cell_size(0.05));
// Mesh generation
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria);
diff --git a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features_sm.cpp b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features_sm.cpp
index a05a3aa1669..cbdf8b90b97 100644
--- a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features_sm.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features_sm.cpp
@@ -30,8 +30,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3<
// Criteria
typedef CGAL::Mesh_criteria_3 Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main(int argc, char*argv[])
{
@@ -56,9 +55,9 @@ int main(int argc, char*argv[])
domain.detect_features();
// Mesh criteria
- Mesh_criteria criteria(edge_size = 0.025,
- facet_angle = 25, facet_size = 0.05, facet_distance = 0.005,
- cell_radius_edge_ratio = 3, cell_size = 0.05);
+ Mesh_criteria criteria(params::edge_size(0.025).
+ facet_angle(25).facet_size(0.05).facet_distance(0.005).
+ cell_radius_edge_ratio(3).cell_size(0.05));
// Mesh generation
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria);
diff --git a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_lipschitz_sizing.cpp b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_lipschitz_sizing.cpp
index d6ab36133bc..520c1b1eb4c 100644
--- a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_lipschitz_sizing.cpp
+++ b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_lipschitz_sizing.cpp
@@ -34,8 +34,7 @@ typedef CGAL::Mesh_criteria_3 Mesh_criteria;
// Sizing field
typedef CGAL::Mesh_3::Lipschitz_sizing Lip_sizing;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main(int argc, char*argv[])
{
@@ -69,12 +68,12 @@ int main(int argc, char*argv[])
0.5); //max_size
// Mesh criteria
- Mesh_criteria criteria(edge_size = min_size,
- facet_angle = 25,
- facet_size = min_size,
- facet_distance = 0.005,
- cell_radius_edge_ratio = 3,
- cell_size = lip_sizing);
+ Mesh_criteria criteria(params::edge_size(min_size).
+ facet_angle(25).
+ facet_size(min_size).
+ facet_distance(0.005).
+ cell_radius_edge_ratio(3).
+ cell_size(lip_sizing));
// Mesh generation
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria);
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..4f81ca6ce6f 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
@@ -26,8 +26,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3<
// Criteria
typedef CGAL::Mesh_criteria_3 Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main(int argc, char*argv[])
{
@@ -53,13 +52,16 @@ int main(int argc, char*argv[])
domain.detect_features();
// Mesh criteria
- Mesh_criteria criteria(edge_size = 0.025,
- facet_angle = 25, facet_size = 0.05, facet_distance = 0.005,
- cell_radius_edge_ratio = 3, cell_size = 0.05);
+ Mesh_criteria criteria(params::edge_size(0.025).
+ facet_angle(25).
+ facet_size(0.05).
+ facet_distance(0.005).
+ cell_radius_edge_ratio(3).
+ cell_size(0.05));
// Mesh generation
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria,
- no_perturb(), no_exude());
+ params::no_perturb().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 7458ae88390..781631cdb5a 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
@@ -37,8 +37,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3<
// Criteria
typedef CGAL::Mesh_criteria_3 Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
// Function
FT sphere_function1 (const Point& p)
@@ -65,9 +64,11 @@ int main()
K::Sphere_3(Point(1, 0, 0), 6.));
// Mesh criteria
- Mesh_criteria criteria(edge_size = 0.15,
- facet_angle = 25, facet_size = 0.15,
- cell_radius_edge_ratio = 2, cell_size = 0.15);
+ Mesh_criteria criteria(params::edge_size(0.15).
+ facet_angle(25).
+ facet_size(0.15).
+ cell_radius_edge_ratio(2).
+ cell_size(0.15));
// Create edge that we want to preserve
Polylines polylines (1);
@@ -85,7 +86,7 @@ int main()
// Mesh generation without feature preservation
C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria,
- CGAL::parameters::no_features());
+ params::no_features());
std::ofstream medit_file("out-no-protection.mesh");
CGAL::IO::write_MEDIT(medit_file, c3t3);
diff --git a/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface.cpp b/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface.cpp
index 3a22bb35526..2edfeed09cb 100644
--- a/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface.cpp
+++ b/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface.cpp
@@ -22,8 +22,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3<
// Criteria
typedef CGAL::Mesh_criteria_3 Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main()
{
@@ -49,13 +48,13 @@ int main()
domain.detect_features(); //includes detection of borders
// Mesh criteria
- Mesh_criteria criteria(edge_size = 0.025,
- facet_angle = 25,
- facet_size = 0.1,
- facet_distance = 0.001);
+ Mesh_criteria criteria(params::edge_size(0.025).
+ facet_angle(25).
+ facet_size(0.1).
+ 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, params::no_perturb().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..58aadb62dc7 100644
--- a/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface_sm.cpp
+++ b/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface_sm.cpp
@@ -21,8 +21,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3<
// Criteria
typedef CGAL::Mesh_criteria_3 Mesh_criteria;
-// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
int main()
{
@@ -48,13 +47,13 @@ int main()
domain.detect_features(); //includes detection of borders
// Mesh criteria
- Mesh_criteria criteria(edge_size = 0.025,
- facet_angle = 25,
- facet_size = 0.1,
- facet_distance = 0.001);
+ Mesh_criteria criteria(params::edge_size(0.025).
+ facet_angle(25).
+ facet_size(0.1).
+ 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, params::no_perturb().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/Mesh_3/parameters.h b/Mesh_3/include/CGAL/Mesh_3/parameters.h
index 39146e8e5e9..4786c7fab87 100644
--- a/Mesh_3/include/CGAL/Mesh_3/parameters.h
+++ b/Mesh_3/include/CGAL/Mesh_3/parameters.h
@@ -22,7 +22,7 @@ namespace parameters {
#define CGAL_NP_BASE internal_np::No_property
#define CGAL_NP_BUILD(P, V) P(V)
-
+
#include
#undef CGAL_NP_BASE
diff --git a/Mesh_3/include/CGAL/Mesh_3/parameters_defaults.h b/Mesh_3/include/CGAL/Mesh_3/parameters_defaults.h
index 6914525417e..b69945e77c1 100644
--- a/Mesh_3/include/CGAL/Mesh_3/parameters_defaults.h
+++ b/Mesh_3/include/CGAL/Mesh_3/parameters_defaults.h
@@ -23,7 +23,7 @@
#include
-// see also default_values_for_mesh_3 namespace
+// see also default_values_for_mesh_3 namespace
// in CGAL/STL_Extension/internal/mesh_option_classes.h
namespace CGAL {
diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_multi_domain.cpp b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_multi_domain.cpp
index 0b57091170c..b2dbdfd2bc6 100644
--- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_multi_domain.cpp
+++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_multi_domain.cpp
@@ -41,7 +41,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3;
typedef CGAL::Mesh_criteria_3
Periodic_mesh_criteria;
// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
// Implicit functions
FT sphere_function(const Point& p)
@@ -78,11 +78,11 @@ int main(int argc, char** argv)
Multi_domain_wrapper multi_domain_function(funcs, vps);
Periodic_mesh_domain domain(multi_domain_function, canonical_cube);
- Periodic_mesh_criteria criteria(facet_angle = 30,
- facet_size = 0.04,
- facet_distance = 0.025,
- cell_radius_edge_ratio = 2.,
- cell_size = 0.04);
+ Periodic_mesh_criteria criteria(params::facet_angle(30).
+ facet_size(0.04).
+ facet_distance(0.025).
+ cell_radius_edge_ratio(2.).
+ cell_size(0.04));
// Mesh generation
C3t3 c3t3 = CGAL::make_periodic_3_mesh_3(domain, criteria);
diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape.cpp b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape.cpp
index 9c39c8758e3..7e308977787 100644
--- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape.cpp
+++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape.cpp
@@ -34,7 +34,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3;
typedef CGAL::Mesh_criteria_3
Periodic_mesh_criteria;
// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
// Implicit function
FT schwarz_p(const Point& p)
@@ -57,11 +57,11 @@ int main(int argc, char** argv)
Periodic_mesh_domain domain =
Periodic_mesh_domain::create_implicit_mesh_domain(schwarz_p, canonical_cube);
- Periodic_mesh_criteria criteria(facet_angle = 30,
- facet_size = 0.035 * domain_size,
- facet_distance = 0.025 * domain_size,
- cell_radius_edge_ratio = 2.,
- cell_size = 0.05);
+ Periodic_mesh_criteria criteria(params::facet_angle(30).
+ facet_size(0.035 * domain_size).
+ facet_distance(0.025 * domain_size).
+ cell_radius_edge_ratio(2.).
+ cell_size(0.05));
// Mesh generation
C3t3 c3t3 = CGAL::make_periodic_3_mesh_3(domain, criteria);
diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_features.cpp b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_features.cpp
index 680b0153c95..b6d3cd08b66 100644
--- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_features.cpp
+++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_features.cpp
@@ -45,7 +45,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3<
typedef CGAL::Mesh_criteria_3 Periodic_mesh_criteria;
// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
// Implicit function
static const FT cx = 0.51, cy = 0.51, cz = 0.5;
@@ -91,11 +91,11 @@ int main(int argc, char** argv)
Periodic_function(cone_function, canonical_cube), canonical_cube);
// Mesh criteria
- Periodic_mesh_criteria criteria(edge_size = 0.02 * domain_size,
- facet_angle = 0.05 * domain_size,
- facet_size = 0.02 * domain_size,
- cell_radius_edge_ratio = 2,
- cell_size = 0.5);
+ Periodic_mesh_criteria criteria(params::edge_size(0.02 * domain_size).
+ facet_angle(0.05 * domain_size).
+ facet_size(0.02 * domain_size).
+ cell_radius_edge_ratio(2).
+ cell_size(0.5));
// Create the features that we want to preserve
Polylines polylines;
@@ -108,14 +108,18 @@ int main(int argc, char** argv)
domain.add_corner(Point(0.51, 0.51, 0.5));
// Mesh generation WITHOUT feature preservation (and no optimizers)
- C3t3 c3t3 = CGAL::make_periodic_3_mesh_3(domain, criteria, no_features(),
- no_exude(), no_perturb());
+ C3t3 c3t3 = CGAL::make_periodic_3_mesh_3(domain, criteria,
+ params::no_features().
+ no_exude().
+ no_perturb());
std::ofstream medit_file("output_implicit_shape_without_protection.mesh");
CGAL::IO::output_periodic_mesh_to_medit(medit_file, c3t3, number_of_copies_in_output);
// Mesh generation WITH feature preservation (and no optimizers)
- C3t3 c3t3_bis = CGAL::make_periodic_3_mesh_3(domain, criteria, features(),
- no_exude(), no_perturb());
+ C3t3 c3t3_bis = CGAL::make_periodic_3_mesh_3(domain, criteria,
+ params::features().
+ no_exude().
+ no_perturb());
std::ofstream medit_file_bis("output_implicit_shape_with_protection.mesh");
CGAL::IO::output_periodic_mesh_to_medit(medit_file_bis, c3t3_bis, number_of_copies_in_output);
diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_optimizers.cpp b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_optimizers.cpp
index 3d2c42a4c4e..d4dc33167d9 100644
--- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_optimizers.cpp
+++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_optimizers.cpp
@@ -34,7 +34,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3;
typedef CGAL::Mesh_criteria_3
Periodic_mesh_criteria;
// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
// Implicit function
FT double_p(const Point& p)
@@ -62,35 +62,37 @@ int main(int argc, char** argv)
Periodic_mesh_domain domain =
Periodic_mesh_domain::create_implicit_mesh_domain(double_p, canonical_cube);
- Periodic_mesh_criteria criteria(facet_angle = 30,
- facet_size = 0.05 * domain_size,
- facet_distance = 0.025 * domain_size,
- cell_radius_edge_ratio = 2.,
- cell_size = 0.05);
+ Periodic_mesh_criteria criteria(params::facet_angle(30).
+ facet_size(0.05 * domain_size).
+ facet_distance(0.025 * domain_size).
+ cell_radius_edge_ratio(2.).
+ cell_size(0.05));
// Mesh generation with optimizers
C3t3 c3t3 = CGAL::make_periodic_3_mesh_3(domain, criteria,
- odt(convergence=0.03, freeze_bound=0.02, time_limit=30),
- lloyd(max_iteration_number=10),
- perturb(sliver_bound=10, time_limit=30),
- exude(sliver_bound=10, time_limit=0));
+ params::odt(params::convergence(0.03).freeze_bound(0.02).time_limit(30)),
+ params::lloyd(params::max_iteration_number(10)),
+ params::perturb(params::sliver_bound(10).time_limit(30)),
+ params::exude(params::sliver_bound(10).time_limit(0)));
std::ofstream medit_file("output_implicit_shape_optimized.mesh");
CGAL::IO::output_periodic_mesh_to_medit(medit_file, c3t3);
// Below, the mesh generation and the optimizations are done in several calls
C3t3 c3t3_bis = CGAL::make_periodic_3_mesh_3(domain, criteria,
- no_odt(), no_lloyd(),
- no_perturb(), no_exude());
+ params::no_odt().
+ no_lloyd().
+ no_perturb().
+ no_exude());
std::ofstream medit_file_bis("output_implicit_shape_non-optimized.mesh");
CGAL::IO::output_periodic_mesh_to_medit(medit_file_bis, c3t3_bis);
// Now, call each optimizer with its global function
- CGAL::odt_optimize_periodic_3_mesh_3(c3t3_bis, domain, convergence=0.03, freeze_bound=0.02, time_limit=30);
- CGAL::lloyd_optimize_periodic_3_mesh_3(c3t3_bis, domain, max_iteration_number=10);
- CGAL::perturb_periodic_3_mesh_3(c3t3_bis, domain, sliver_bound=10, time_limit=30);
- CGAL::exude_periodic_3_mesh_3(c3t3_bis, sliver_bound=10, time_limit=0);
+ CGAL::odt_optimize_periodic_3_mesh_3(c3t3_bis, domain, params::convergence(0.03).freeze_bound(0.02).time_limit(30));
+ CGAL::lloyd_optimize_periodic_3_mesh_3(c3t3_bis, domain, params::max_iteration_number(10));
+ CGAL::perturb_periodic_3_mesh_3(c3t3_bis, domain, params::sliver_bound(10).time_limit(30));
+ CGAL::exude_periodic_3_mesh_3(c3t3_bis, params::sliver_bound(10).time_limit(0));
std::ofstream medit_file_ter("output_implicit_shape_two_steps.mesh");
CGAL::IO::output_periodic_mesh_to_medit(medit_file_ter, c3t3_bis, number_of_copies_in_output);
diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_subdomains.cpp b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_subdomains.cpp
index 8de56fad9a7..ecc1758386a 100644
--- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_subdomains.cpp
+++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/mesh_implicit_shape_with_subdomains.cpp
@@ -36,7 +36,7 @@ typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3;
typedef CGAL::Mesh_criteria_3
Periodic_mesh_criteria;
// To avoid verbose function and named parameters call
-using namespace CGAL::parameters;
+namespace params = CGAL::parameters;
// Function
FT schwarz_p(const Point& p)
@@ -67,11 +67,11 @@ int main(int argc, char** argv)
size.set_size(0.1, volume_dimension, domain.index_from_subdomain_index(2)); // exterior
size.set_size(0.03, volume_dimension, domain.index_from_subdomain_index(1)); // interior
- Periodic_mesh_criteria criteria(facet_angle = 30.,
- facet_size = 0.05,
- facet_distance = 0.025,
- cell_radius_edge_ratio = 2.,
- cell_size = size);
+ Periodic_mesh_criteria criteria(params::facet_angle(30.).
+ facet_size(0.05).
+ facet_distance(0.025).
+ cell_radius_edge_ratio(2.).
+ cell_size(size));
// Mesh generation
C3t3 c3t3 = CGAL::make_periodic_3_mesh_3(domain, criteria);