diff --git a/BGL/include/CGAL/boost/graph/io.h b/BGL/include/CGAL/boost/graph/io.h index fb89e6e3b0a..6b079f81c71 100644 --- a/BGL/include/CGAL/boost/graph/io.h +++ b/BGL/include/CGAL/boost/graph/io.h @@ -55,10 +55,13 @@ bool write_wrl(std::ostream& os, typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::face_descriptor face_descriptor; typedef typename boost::graph_traits::vertices_size_type vertices_size_type; + + using parameters::get_parameter; + using parameters::choose_parameter; typename Polygon_mesh_processing::GetVertexPointMap::const_type - vpm = choose_param(get_param(np, internal_np::vertex_point), - get_const_property_map(CGAL::vertex_point, g)); + vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), + get_const_property_map(CGAL::vertex_point, g)); boost::container::flat_map reindex; int n = 0; @@ -148,7 +151,7 @@ bool write_off(std::ostream& os, typename Polygon_mesh_processing::GetVertexPointMap::const_type vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), - get_const_property_map(CGAL::vertex_point, g)); + get_const_property_map(CGAL::vertex_point, g)); vertices_size_type nv = static_cast(std::distance(vertices(g).first, vertices(g).second)); faces_size_type nf = static_cast(std::distance(faces(g).first, faces(g).second)); @@ -273,7 +276,7 @@ bool read_off(std::istream& is, typedef typename boost::property_traits::value_type Point_3; Vpm vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), - get_property_map(CGAL::vertex_point, g)); + get_property_map(CGAL::vertex_point, g)); vertices_size_type nv, nvf; faces_size_type nf; int ignore; @@ -379,7 +382,7 @@ bool write_inp(std::ostream& os, using parameters::get_parameter; VPM vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), - get_const_property_map(CGAL::vertex_point, g)); + get_const_property_map(CGAL::vertex_point, g)); os << "*Part, name=" << name << "\n*Node\n"; boost::container::flat_map reindex; @@ -425,8 +428,10 @@ write_polys(std::ostream& os, typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::face_iterator face_iterator; typedef typename CGAL::Polygon_mesh_processing::GetVertexIndexMap::type Vimap; - Vimap V = choose_param(get_param(np, CGAL::internal_np::vertex_index), - get_const_property_map(CGAL::internal_np::vertex_index, mesh)); + using parameters::get_parameter; + using parameters::choose_parameter; + Vimap V = choose_parameter(get_parameter(np, internal_np::vertex_index), + get_const_property_map(boost::vertex_index, mesh)); std::vector connectivity_table; std::vector offsets; @@ -460,8 +465,10 @@ write_polys_tag(std::ostream& os, typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::face_iterator face_iterator; typedef typename CGAL::Polygon_mesh_processing::GetVertexIndexMap::type Vimap; - Vimap V = choose_param(get_param(np, CGAL::internal_np::vertex_index), - get_const_property_map(CGAL::internal_np::vertex_index, mesh)); + using parameters::get_parameter; + using parameters::choose_parameter; + Vimap V = choose_parameter(get_parameter(np, internal_np::vertex_index), + get_const_property_map(boost::vertex_index, mesh)); std::string formatattribute = binary ? " format=\"appended\"" : " format=\"ascii\""; @@ -549,8 +556,10 @@ write_points_tag(std::ostream& os, { typedef typename boost::graph_traits::vertex_iterator vertex_iterator; typedef typename CGAL::Polygon_mesh_processing::GetVertexPointMap::const_type Vpmap; - Vpmap vpm = choose_param(get_param(np, CGAL::vertex_point), - get_const_property_map(CGAL::vertex_point, mesh)); + using parameters::get_parameter; + using parameters::choose_parameter; + Vpmap vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), + get_const_property_map(CGAL::vertex_point, mesh)); typedef typename boost::property_traits::value_type Point_t; typedef typename CGAL::Kernel_traits::Kernel Gt; typedef typename Gt::FT FT; @@ -592,8 +601,10 @@ write_polys_points(std::ostream& os, { typedef typename boost::graph_traits::vertex_iterator vertex_iterator; typedef typename CGAL::Polygon_mesh_processing::GetVertexPointMap::const_type Vpmap; - Vpmap vpm = choose_param(get_param(np, CGAL::vertex_point), - get_const_property_map(CGAL::vertex_point, mesh)); + using parameters::get_parameter; + using parameters::choose_parameter; + Vpmap vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), + get_const_property_map(CGAL::vertex_point, mesh)); typedef typename boost::property_traits::value_type Point_t; typedef typename CGAL::Kernel_traits::Kernel Gt; typedef typename Gt::FT FT; @@ -662,7 +673,7 @@ void write_vtp(std::ostream& os, os << " \n"; std::size_t offset = 0; - const bool binary = boost::choose_param(boost::get_param(np, internal_np::use_binary_mode), true); + const bool binary = parameters::choose_parameter(parameters::get_parameter(np, internal_np::use_binary_mode), true); internal::write_vtp::write_points_tag(os,mesh,binary,offset, np); internal::write_vtp::write_polys_tag(os,mesh,binary,offset, np); os << " \n" diff --git a/BGL/include/CGAL/boost/graph/named_params_helper.h b/BGL/include/CGAL/boost/graph/named_params_helper.h index be68585bec2..bf8c2c606da 100644 --- a/BGL/include/CGAL/boost/graph/named_params_helper.h +++ b/BGL/include/CGAL/boost/graph/named_params_helper.h @@ -331,7 +331,7 @@ namespace CGAL { >::Kernel Default_kernel; public: - typedef typename boost::lookup_named_param_def < + typedef typename internal_np::Lookup_named_param_def < internal_np::geom_traits_t, NamedParameters, Default_kernel @@ -421,7 +421,7 @@ namespace CGAL { public: typedef DummyConstrainedMap NoMap; - typedef typename boost::lookup_named_param_def < + typedef typename internal_np::Lookup_named_param_def < internal_np::point_is_constrained_t, NamedParameters, DummyConstrainedMap //default diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index 269da38f7ba..3c3a5e84b10 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -334,7 +334,7 @@ clip( TriangleMesh& tm, const NamedParameters2& np_c) { const bool clip_volume = - boost::choose_parameter(boost::get_parameter(np_tm, internal_np::clip_volume), false); + parameters::choose_parameter(parameters::get_parameter(np_tm, internal_np::clip_volume), false); if (clip_volume && is_closed(tm)) return corefine_and_compute_intersection(tm, clipper, tm, np_tm, np_c); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h index 4159605e3c8..1feeba75968 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h @@ -564,7 +564,7 @@ corefine_and_compute_boolean_operations( vpm_out_tuple, ecms_out, uv, output); // special case used for clipping open meshes - if ( boost::choose_param( boost::get_param(np1, internal_np::use_bool_op_to_clip_surface), + if ( parameters::choose_parameter( parameters::get_parameter(np1, internal_np::use_bool_op_to_clip_surface), false) ) { CGAL_assertion(output[Corefinement::INTERSECTION] != boost::none); @@ -572,7 +572,7 @@ corefine_and_compute_boolean_operations( CGAL_assertion(output[Corefinement::TM1_MINUS_TM2] == boost::none); CGAL_assertion(output[Corefinement::TM2_MINUS_TM1] == boost::none); const bool use_compact_clipper = - boost::choose_param( boost::get_param(np1, internal_np::use_compact_clipper), + parameters::choose_parameter( parameters::get_parameter(np1, internal_np::use_compact_clipper), true); ob.setup_for_clipping_a_surface(use_compact_clipper); } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h index d4600321959..7ff7a73d84f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h @@ -218,8 +218,11 @@ void merge_duplicated_vertices_in_boundary_cycle( typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename GetVertexPointMap::const_type Vpm; - Vpm vpm = choose_param(get_param(np, internal_np::vertex_point), - get_const_property_map(vertex_point, pm)); + using parameters::get_parameter; + using parameters::choose_parameter; + + Vpm vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), + get_const_property_map(vertex_point, pm)); // collect all the halfedges of the cycle std::vector< std::pair > cycle_hedges; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h index a738cbaada0..62479ad4912 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h @@ -163,7 +163,7 @@ void isotropic_remeshing(const FaceRange& faces parameters::is_default_parameter(get_parameter(np, internal_np::projection_functor)); typedef typename GetGeomTraits::type GT; - GT gt = choose_param(get_param(np, internal_np::geom_traits), GT()); + GT gt = choose_parameter(get_parameter(np, internal_np::geom_traits), GT()); typedef typename GetVertexPointMap::type VPMap; VPMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), @@ -341,7 +341,7 @@ void split_long_edges(const EdgeRange& edges using parameters::get_parameter; typedef typename GetGeomTraits::type GT; - GT gt = choose_param(get_param(np, internal_np::geom_traits), GT()); + GT gt = choose_parameter(get_parameter(np, internal_np::geom_traits), GT()); typedef typename GetVertexPointMap::type VPMap; VPMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h index 381bbb94fe8..a34cc5db2e0 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h @@ -1784,18 +1784,18 @@ std::size_t make_umbrella_manifold(typename boost::graph_traits::ha typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - using boost::get_param; - using boost::choose_param; + using parameters::get_parameter; + using parameters::choose_parameter; typedef typename GetVertexPointMap::type VertexPointMap; - VertexPointMap vpm = choose_param(get_param(np, internal_np::vertex_point), + VertexPointMap vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pm)); - typedef typename boost::lookup_named_param_def // default (no constraint pmap) >::type VerticesMap; - VerticesMap cmap = choose_param(get_param(np, internal_np::vertex_is_constrained), + VerticesMap cmap = choose_parameter(get_parameter(np, internal_np::vertex_is_constrained), Constant_property_map(false)); std::size_t nb_new_vertices = 0; @@ -1916,20 +1916,20 @@ template std::size_t duplicate_non_manifold_vertices(PolygonMesh& pm, const NamedParameters& np) { - using boost::get_param; - using boost::choose_param; + using parameters::get_parameter; + using parameters::choose_parameter; typedef boost::graph_traits GT; typedef typename GT::vertex_descriptor vertex_descriptor; typedef typename GT::halfedge_descriptor halfedge_descriptor; - typedef typename boost::lookup_named_param_def < + typedef typename internal_np::Lookup_named_param_def < internal_np::output_iterator_t, NamedParameters, Emptyset_iterator > ::type Output_iterator; Output_iterator out - = choose_param(get_param(np, internal_np::output_iterator), + = choose_parameter(get_parameter(np, internal_np::output_iterator), Emptyset_iterator()); internal::Vertex_collector dmap; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h index 28f0719b11a..13b930afcb5 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h @@ -23,7 +23,7 @@ #include -#include +#include #include #include @@ -69,7 +69,7 @@ struct Polygon_types template struct GetPolygonGeomTraits { - typedef typename boost::lookup_named_param_def < + typedef typename internal_np::Lookup_named_param_def < internal_np::geom_traits_t, NamedParameters, typename CGAL::Kernel_traits< @@ -517,11 +517,11 @@ std::size_t merge_duplicate_points_in_polygon_soup(PointRange& points, typedef typename internal::Polygon_types::Point_3 Point_3; typedef typename internal::Polygon_types::Polygon_3 Polygon_3; - using boost::get_param; - using boost::choose_param; + using parameters::get_parameter; + using parameters::choose_parameter; typedef typename internal::GetPolygonGeomTraits::type Traits; - Traits traits = choose_param(get_param(np, internal_np::geom_traits), Traits()); + Traits traits = choose_parameter(get_parameter(np, internal_np::geom_traits), Traits()); typedef typename Traits::Less_xyz_3 Less_xyz_3; @@ -908,13 +908,13 @@ std::size_t merge_duplicate_polygons_in_polygon_soup(const PointRange& points, PolygonRange& polygons, const NamedParameters& np) { - using boost::get_param; - using boost::choose_param; + using parameters::get_parameter; + using parameters::choose_parameter; typedef typename internal::Polygon_types::P_ID P_ID; - const bool erase_all_duplicates = choose_param(get_param(np, internal_np::erase_all_duplicates), false); - const bool same_orientation = choose_param(get_param(np, internal_np::require_same_orientation), false); + const bool erase_all_duplicates = choose_parameter(get_parameter(np, internal_np::erase_all_duplicates), false); + const bool same_orientation = choose_parameter(get_parameter(np, internal_np::require_same_orientation), false); #ifdef CGAL_PMP_REPAIR_POLYGON_SOUP_VERBOSE_PP std::cout << "Only polygons with the same orientation are duplicates: " << std::boolalpha << same_orientation << std::endl; @@ -922,7 +922,7 @@ std::size_t merge_duplicate_polygons_in_polygon_soup(const PointRange& points, #endif typedef typename internal::GetPolygonGeomTraits::type Traits; - Traits traits = choose_param(get_param(np, internal_np::geom_traits), Traits()); + Traits traits = choose_parameter(get_parameter(np, internal_np::geom_traits), Traits()); std::vector > all_duplicate_polygons; internal::collect_duplicate_polygons(points, polygons, std::back_inserter(all_duplicate_polygons), traits, same_orientation); @@ -1065,11 +1065,11 @@ void repair_polygon_soup(PointRange& points, PolygonRange& polygons, const NamedParameters& np) { - using boost::get_param; - using boost::choose_param; + using parameters::get_parameter; + using parameters::choose_parameter; typedef typename internal::GetPolygonGeomTraits::type Traits; - Traits traits = choose_param(get_param(np, internal_np::geom_traits), Traits()); + Traits traits = choose_parameter(get_parameter(np, internal_np::geom_traits), Traits()); #ifdef CGAL_PMP_REPAIR_POLYGON_SOUP_VERBOSE std::cout << "Repairing soup with " << points.size() << " points and " << polygons.size() << " polygons" << std::endl; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/shape_predicates.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/shape_predicates.h index c1f0b7c040b..bd863a5109a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/shape_predicates.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/shape_predicates.h @@ -75,15 +75,15 @@ bool is_degenerate_edge(typename boost::graph_traits::edge_descript const PolygonMesh& pm, const NamedParameters& np) { - using boost::get_param; - using boost::choose_param; + using parameters::get_parameter; + using parameters::choose_parameter; typedef typename GetVertexPointMap::const_type VertexPointMap; - VertexPointMap vpmap = choose_param(get_param(np, internal_np::vertex_point), + VertexPointMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(vertex_point, pm)); typedef typename GetGeomTraits::type Traits; - Traits traits = choose_param(get_param(np, internal_np::geom_traits), Traits()); + Traits traits = choose_parameter(get_parameter(np, internal_np::geom_traits), Traits()); return traits.equal_3_object()(get(vpmap, source(e, pm)), get(vpmap, target(e, pm))); } @@ -128,15 +128,15 @@ bool is_degenerate_triangle_face(typename boost::graph_traits::fac { CGAL_precondition(CGAL::is_triangle(halfedge(f, tm), tm)); - using boost::get_param; - using boost::choose_param; + using parameters::get_parameter; + using parameters::choose_parameter; typedef typename GetVertexPointMap::const_type VertexPointMap; - VertexPointMap vpmap = choose_param(get_param(np, internal_np::vertex_point), + VertexPointMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(vertex_point, tm)); typedef typename GetGeomTraits::type Traits; - Traits traits = choose_param(get_param(np, internal_np::geom_traits), Traits()); + Traits traits = choose_parameter(get_parameter(np, internal_np::geom_traits), Traits()); typename boost::graph_traits::halfedge_descriptor h = halfedge(f, tm); @@ -187,17 +187,17 @@ is_needle_triangle_face(typename boost::graph_traits::face_descrip { CGAL_precondition(threshold >= 1.); - using boost::get_param; - using boost::choose_param; + using parameters::get_parameter; + using parameters::choose_parameter; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename GetVertexPointMap::const_type VertexPointMap; - VertexPointMap vpmap = choose_param(get_param(np, internal_np::vertex_point), + VertexPointMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(vertex_point, tm)); typedef typename GetGeomTraits::type Traits; - Traits traits = choose_param(get_param(np, internal_np::geom_traits), Traits()); + Traits traits = choose_parameter(get_parameter(np, internal_np::geom_traits), Traits()); typedef typename Traits::FT FT; @@ -289,18 +289,18 @@ is_cap_triangle_face(typename boost::graph_traits::face_descriptor CGAL_precondition(threshold >= -1.); CGAL_precondition(threshold <= 0.); - using boost::get_param; - using boost::choose_param; + using parameters::get_parameter; + using parameters::choose_parameter; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename GetVertexPointMap::const_type VertexPointMap; - VertexPointMap vpmap = choose_param(get_param(np, internal_np::vertex_point), + VertexPointMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(vertex_point, tm)); typedef typename GetGeomTraits::type Traits; - Traits traits = choose_param(get_param(np, internal_np::geom_traits), Traits()); + Traits traits = choose_parameter(get_parameter(np, internal_np::geom_traits), Traits()); typedef typename Traits::FT FT; typedef typename Traits::Vector_3 Vector_3; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h index 230e4c0659c..85e1334fc75 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h @@ -551,13 +551,13 @@ template std::size_t stitch_boundary_cycles(PolygonMesh& pm, const NamedParameters& np) { - using boost::choose_param; - using boost::get_param; + using parameters::choose_parameter; + using parameters::get_parameter; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename GetVertexPointMap::const_type VPMap; - VPMap vpm = choose_param(get_param(np, internal_np::vertex_point), + VPMap vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(vertex_point, pm)); std::vector boundary_cycles; diff --git a/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h b/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h index 71bc10f7f23..123080398a3 100644 --- a/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h +++ b/Polygon_mesh_processing/include/CGAL/Rigid_triangle_mesh_collision_detection.h @@ -234,7 +234,7 @@ public: CGAL_static_assertion(same_vpm); Vpm vpm = - boost::choose_param(boost::get_param(np, internal_np::vertex_point), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), get_const_property_map(boost::vertex_point, tm) ); // now add the mesh std::size_t id = get_id_for_new_mesh(); @@ -530,8 +530,8 @@ public: using Polygon_mesh_processing::GetFaceIndexMap; const bool maybe_several_cc = - boost::choose_param( - boost::get_param(np, internal_np::apply_per_connected_component), true); + parameters::choose_parameter( + parameters::get_parameter(np, internal_np::apply_per_connected_component), true); typedef typename GetVertexPointMap::const_type Local_vpm; @@ -542,7 +542,7 @@ public: CGAL_static_assertion(same_vpm); Vpm vpm = - boost::choose_param(boost::get_param(np, internal_np::vertex_point), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), get_const_property_map(boost::vertex_point, tm) ); if (maybe_several_cc) @@ -555,7 +555,7 @@ public: NamedParameters>::type Fid_map; Fid_map fid_map = - boost::choose_param(boost::get_param(np, internal_np::face_index), + parameters::choose_parameter(parameters::get_parameter(np, internal_np::face_index), get_const_property_map(boost::face_index, tm)); std::size_t nb_cc = diff --git a/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/approximate_triangle_mesh.h b/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/approximate_triangle_mesh.h index e0afeda9673..5f493567cee 100644 --- a/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/approximate_triangle_mesh.h +++ b/Surface_mesh_approximation/include/CGAL/Surface_mesh_approximation/approximate_triangle_mesh.h @@ -27,7 +27,7 @@ #include -#include +#include #include #include @@ -127,22 +127,22 @@ unspecified_type all_default(); template bool approximate_triangle_mesh(const TriangleMesh &tm, const NamedParameters &np) { - using boost::get_param; - using boost::choose_param; - using boost::is_default_param; + using parameters::get_parameter; + using parameters::choose_parameter; + using parameters::is_default_parameter; typedef typename Polygon_mesh_processing::GetGeomTraits::type Geom_traits; typedef typename Geom_traits::FT FT; typedef typename Polygon_mesh_processing::GetVertexPointMap::type Vertex_point_map; - Vertex_point_map point_pmap = choose_param(get_param(np, internal_np::vertex_point), + Vertex_point_map point_pmap = choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, const_cast(tm))); typedef CGAL::Variational_shape_approximation L21_approx; typedef typename L21_approx::Error_metric L21_metric; - const Verbose_level vl = choose_param( - get_param(np, internal_np::verbose_level), SILENT); + const Verbose_level vl = choose_parameter( + get_parameter(np, internal_np::verbose_level), SILENT); const std::size_t number_of_faces = std::distance(faces(tm).first, faces(tm).second); const std::size_t number_of_vertices = std::distance(vertices(tm).first, vertices(tm).second); @@ -157,14 +157,14 @@ bool approximate_triangle_mesh(const TriangleMesh &tm, const NamedParameters &np L21_approx approx(tm, point_pmap, metric); // hierarchical seeding by default - const Seeding_method method = choose_param( - get_param(np, internal_np::seeding_method), HIERARCHICAL); - const std::size_t max_nb_of_proxies = choose_param( - get_param(np, internal_np::max_number_of_proxies), 0); - const FT min_error_drop = choose_param( - get_param(np, internal_np::min_error_drop), FT(0.0)); - const std::size_t nb_of_relaxations = choose_param( - get_param(np, internal_np::number_of_relaxations), 5); + const Seeding_method method = choose_parameter( + get_parameter(np, internal_np::seeding_method), HIERARCHICAL); + const std::size_t max_nb_of_proxies = choose_parameter( + get_parameter(np, internal_np::max_number_of_proxies), 0); + const FT min_error_drop = choose_parameter( + get_parameter(np, internal_np::min_error_drop), FT(0.0)); + const std::size_t nb_of_relaxations = choose_parameter( + get_parameter(np, internal_np::number_of_relaxations), 5); if (vl == VERBOSE) { std::cout << (method == RANDOM ? "Random" : @@ -179,8 +179,8 @@ bool approximate_triangle_mesh(const TriangleMesh &tm, const NamedParameters &np if (vl == MAIN_STEPS || vl == VERBOSE) std::cout << "Seeding done." << std::endl; - const std::size_t nb_of_iterations = choose_param( - get_param(np, internal_np::number_of_iterations), 20); + const std::size_t nb_of_iterations = choose_parameter( + get_parameter(np, internal_np::number_of_iterations), 20); if (vl == VERBOSE) std::cout << "\n#nb_of_iterations = " << nb_of_iterations << std::endl; @@ -193,30 +193,30 @@ bool approximate_triangle_mesh(const TriangleMesh &tm, const NamedParameters &np } // get proxy map - approx.proxy_map( get_param(np, internal_np::face_proxy_map) ); + approx.proxy_map( get_parameter(np, internal_np::face_proxy_map) ); - if (!boost::is_default_param(get_param(np, internal_np::face_proxy_map)) + if (!parameters::is_default_parameter(get_parameter(np, internal_np::face_proxy_map)) && (vl == MAIN_STEPS || vl == VERBOSE)) std::cout << "Filling face proxy map done." << std::endl; // get proxies - approx.proxies( get_param(np, internal_np::proxies) ); + approx.proxies( get_parameter(np, internal_np::proxies) ); - if (!is_default_param( get_param(np, internal_np::proxies) ) + if (!is_default_parameter( get_parameter(np, internal_np::proxies) ) && (vl == MAIN_STEPS || vl == VERBOSE)) std::cout << "Get proxies done." << std::endl; // meshing bool is_manifold = false; - if (!is_default_param( get_param(np, internal_np::anchors)) - || !is_default_param( get_param(np, internal_np::triangles) )) + if (!is_default_parameter( get_parameter(np, internal_np::anchors)) + || !is_default_parameter( get_parameter(np, internal_np::triangles) )) { if (vl == VERBOSE) { - const FT subdivision_ratio = choose_param(get_param(np, internal_np::subdivision_ratio), FT(5.0)); - const bool relative_to_chord = choose_param(get_param(np, internal_np::relative_to_chord), false); - const bool with_dihedral_angle = choose_param(get_param(np, internal_np::with_dihedral_angle), false); - const bool optimize_anchor_location = choose_param(get_param(np, internal_np::optimize_anchor_location), true); - const bool pca_plane = choose_param(get_param(np, internal_np::pca_plane), false); + const FT subdivision_ratio = choose_parameter(get_parameter(np, internal_np::subdivision_ratio), FT(5.0)); + const bool relative_to_chord = choose_parameter(get_parameter(np, internal_np::relative_to_chord), false); + const bool with_dihedral_angle = choose_parameter(get_parameter(np, internal_np::with_dihedral_angle), false); + const bool optimize_anchor_location = choose_parameter(get_parameter(np, internal_np::optimize_anchor_location), true); + const bool pca_plane = choose_parameter(get_parameter(np, internal_np::pca_plane), false); std::cout << "Meshing: " << "\nchord_error = " << subdivision_ratio << "\nrelative_to_chord = " << relative_to_chord @@ -233,16 +233,16 @@ bool approximate_triangle_mesh(const TriangleMesh &tm, const NamedParameters &np } // get anchor points - approx.anchor_points( get_param(np, internal_np::anchors) ); + approx.anchor_points( get_parameter(np, internal_np::anchors) ); - if (!is_default_param( get_param(np, internal_np::anchors) ) + if (!is_default_parameter( get_parameter(np, internal_np::anchors) ) && (vl == MAIN_STEPS || vl == VERBOSE)) std::cout << "Get anchors done." << std::endl; // get indexed triangles - approx.indexed_triangles( get_param(np, internal_np::triangles) ); + approx.indexed_triangles( get_parameter(np, internal_np::triangles) ); - if (!is_default_param( get_param(np, internal_np::triangles) ) + if (!is_default_parameter( get_parameter(np, internal_np::triangles) ) && (vl == MAIN_STEPS || vl == VERBOSE)) std::cout << "Get indexed triangles done." << std::endl; diff --git a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h index 6d2f8c2ec0d..6dd715ff50a 100644 --- a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include @@ -323,17 +323,17 @@ public: */ template std::size_t initialize_seeds(const NamedParameters &np) { - using boost::get_param; - using boost::choose_param; + using parameters::get_parameter; + using parameters::choose_parameter; - const Surface_mesh_approximation::Seeding_method method = choose_param( - get_param(np, internal_np::seeding_method), Surface_mesh_approximation::HIERARCHICAL); - std::size_t max_nb_proxies = choose_param( - get_param(np, internal_np::max_number_of_proxies), 0); - FT min_error_drop = choose_param( - get_param(np, internal_np::min_error_drop), FT(0.0)); - const std::size_t nb_relaxations = choose_param( - get_param(np, internal_np::number_of_relaxations), 5); + const Surface_mesh_approximation::Seeding_method method = choose_parameter( + get_parameter(np, internal_np::seeding_method), Surface_mesh_approximation::HIERARCHICAL); + std::size_t max_nb_proxies = choose_parameter( + get_parameter(np, internal_np::max_number_of_proxies), 0); + FT min_error_drop = choose_parameter( + get_parameter(np, internal_np::min_error_drop), FT(0.0)); + const std::size_t nb_relaxations = choose_parameter( + get_parameter(np, internal_np::number_of_relaxations), 5); // adjust parameters if (max_nb_proxies < (m_nb_of_faces / 3) && max_nb_proxies > 0) { @@ -798,14 +798,14 @@ public: */ template bool extract_mesh(const NamedParameters &np) { - using boost::get_param; - using boost::choose_param; + using parameters::get_parameter; + using parameters::choose_parameter; - const FT subdivision_ratio = choose_param(get_param(np, internal_np::subdivision_ratio), FT(5.0)); - const bool relative_to_chord = choose_param(get_param(np, internal_np::relative_to_chord), false); - const bool with_dihedral_angle = choose_param(get_param(np, internal_np::with_dihedral_angle), false); - const bool optimize_anchor_location = choose_param(get_param(np, internal_np::optimize_anchor_location), true); - const bool pca_plane = choose_param(get_param(np, internal_np::pca_plane), false); + const FT subdivision_ratio = choose_parameter(get_parameter(np, internal_np::subdivision_ratio), FT(5.0)); + const bool relative_to_chord = choose_parameter(get_parameter(np, internal_np::relative_to_chord), false); + const bool with_dihedral_angle = choose_parameter(get_parameter(np, internal_np::with_dihedral_angle), false); + const bool optimize_anchor_location = choose_parameter(get_parameter(np, internal_np::optimize_anchor_location), true); + const bool pca_plane = choose_parameter(get_parameter(np, internal_np::pca_plane), false); // compute averaged edge length, used in chord subdivision m_average_edge_length = compute_averaged_edge_length(*m_ptm, m_vpoint_map); @@ -861,19 +861,19 @@ public: */ template void output(const NamedParameters &np) const { - using boost::get_param; - using boost::choose_param; + using parameters::get_parameter; + using parameters::choose_parameter; // get proxy map - proxy_map( get_param(np, internal_np::face_proxy_map) ); + proxy_map( get_parameter(np, internal_np::face_proxy_map) ); // get proxies - proxies( get_param(np, internal_np::proxies) ); + proxies( get_parameter(np, internal_np::proxies) ); // get anchor points - anchor_points( get_param(np, internal_np::anchors) ); + anchor_points( get_parameter(np, internal_np::anchors) ); // get indexed triangles - indexed_triangles( get_param(np, internal_np::triangles) ); + indexed_triangles( get_parameter(np, internal_np::triangles) ); } /*! @@ -897,7 +897,7 @@ public: /*! * @brief dummy function for named parameters. */ - void proxy_map(boost::param_not_found) const {} + void proxy_map(internal_np::Param_not_found) const {} /*! * @brief gets the face region of the specified proxy. @@ -929,7 +929,7 @@ public: /*! * @brief dummy function for named parameters. */ - void proxies(boost::param_not_found) const {} + void proxies(internal_np::Param_not_found) const {} /*! * @brief gets the wrapped proxies. @@ -956,7 +956,7 @@ public: /*! * @brief dummy function for named parameters. */ - void anchor_points(boost::param_not_found) const {} + void anchor_points(internal_np::Param_not_found) const {} /*! * @brief gets the anchor vertices. @@ -984,7 +984,7 @@ public: /*! * @brief dummy function for named parameters. */ - void indexed_triangles(boost::param_not_found) const {} + void indexed_triangles(internal_np::Param_not_found) const {} /*! * @brief gets the indexed boundary polygon approximation.