diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h index db03324b9fa..271329f689e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h @@ -58,9 +58,8 @@ namespace CGAL { using boost::choose_const_pmap; using boost::get_param; typename GetVertexPointMap::const_type - vpm = choose_const_pmap(get_param(np, CGAL::vertex_point), - pmesh, - CGAL::vertex_point); + vpm = choose_param(get_param(np, vertex_point), + get_const_property_map(CGAL::vertex_point, pmesh)); typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h index f4ef8cc1b06..23bbab1291e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h @@ -139,7 +139,7 @@ compute_face_normal(typename boost::graph_traits::face_descriptor f Vector normal = traits.construct_vector_3_object()(CGAL::NULL_VECTOR); sum_normals(pmesh, f - , choose_const_pmap(get_param(np, CGAL::vertex_point), pmesh, CGAL::vertex_point) + , choose_param(get_param(np, vertex_point), get_const_property_map(CGAL::vertex_point, pmesh)) , normal , traits); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h index 4af36f99d4f..eda485ca947 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h @@ -80,7 +80,7 @@ namespace internal { fairing does not fail, but the mesh gets shrinked to `CGAL::ORIGIN`. @tparam TriangleMesh a model of `FaceGraph` and `MutableFaceGraph` - that has an internal property map for `CGAL::vertex_point_t` + that has an internal property map for `CGAL::vertex_point_t` @tparam VertexRange a range of vertex descriptors of `TriangleMesh`, model of `Range`. Its iterator type is `InputIterator`. @tparam NamedParameters a sequence of \ref namedparameters @@ -143,7 +143,8 @@ namespace internal { typedef CGAL::internal::Cotangent_weight_with_voronoi_area_fairing Default_Weight_calculator; - VPMap vpmap_ = choose_param(get_param(np, vertex_point), get(CGAL::vertex_point, tmesh)); + VPMap vpmap_ = choose_param(get_param(np, vertex_point), + get_property_map(vertex_point, tmesh)); return internal::fair(tmesh, vertices, choose_param(get_param(np, sparse_linear_solver), Default_solver()), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index 3457888125b..a6617e9bc69 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -85,9 +85,8 @@ namespace Polygon_mesh_processing { using boost::get_param; typename GetVertexPointMap::const_type - vpm = choose_const_pmap(get_param(np, CGAL::vertex_point), - pmesh, - CGAL::vertex_point); + vpm = choose_param(get_param(np, vertex_point), + get_const_property_map(CGAL::vertex_point, pmesh)); return CGAL::approximate_sqrt(CGAL::squared_distance(get(vpm, source(h, pmesh)), get(vpm, target(h, pmesh)))); @@ -231,9 +230,8 @@ namespace Polygon_mesh_processing { CGAL_precondition(boost::graph_traits::null_face() != f); typename GetVertexPointMap::const_type - vpm = choose_const_pmap(get_param(np, CGAL::vertex_point), - tmesh, - CGAL::vertex_point); + vpm = choose_param(get_param(np, vertex_point), + get_const_property_map(CGAL::vertex_point, tmesh)); typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; halfedge_descriptor hd = halfedge(f, tmesh); @@ -416,9 +414,8 @@ namespace Polygon_mesh_processing { using boost::get_param; typename GetVertexPointMap::const_type - vpm = choose_const_pmap(get_param(np, CGAL::vertex_point), - tmesh, - CGAL::vertex_point); + vpm = choose_param(get_param(np, vertex_point), + get_const_property_map(CGAL::vertex_point, tmesh)); typename GetGeomTraits::type::Point_3 origin(0, 0, 0); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h index b3c487e2b23..db00ac1af78 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h @@ -96,9 +96,8 @@ bool is_outward_oriented(const PolygonMesh& pmesh, //VertexPointMap typedef typename GetVertexPointMap::const_type VPMap; - VPMap vpmap = choose_const_pmap(get_param(np, boost::vertex_point), - pmesh, - boost::vertex_point); + VPMap vpmap = choose_param(get_param(np, vertex_point), + get_const_property_map(vertex_point, pmesh)); //Kernel typedef typename GetGeomTraits::type Kernel; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/refine.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/refine.h index a3978d5072d..af754e2609c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/refine.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/refine.h @@ -84,9 +84,8 @@ namespace Polygon_mesh_processing { CGAL_precondition(is_triangle_mesh(tmesh) ); typedef typename GetVertexPointMap::type VPmap; - VPmap vpm = choose_pmap(get_param(np, boost::vertex_point), - tmesh, - boost::vertex_point); + VPmap vpm = choose_param(get_param(np, vertex_point), + get_property_map(vertex_point, tmesh)); internal::Refine_Polyhedron_3 refine_functor(tmesh, vpm); refine_functor.refine(faces, 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 4e6cde6a2f7..fdc0dc57b14 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h @@ -141,9 +141,8 @@ void isotropic_remeshing(const FaceRange& faces typedef typename GetGeomTraits::type GT; typedef typename GetVertexPointMap::type VPMap; - VPMap vpmap = choose_pmap(get_param(np, boost::vertex_point), - pmesh, - boost::vertex_point); + VPMap vpmap = choose_param(get_param(np, vertex_point), + get_property_map(vertex_point, pmesh)); typedef typename GetFaceIndexMap::type FIMap; FIMap fimap = choose_param(get_param(np, face_index), @@ -311,13 +310,12 @@ void split_long_edges(const EdgeRange& edges typedef typename GetGeomTraits::type GT; typedef typename GetVertexPointMap::type VPMap; - VPMap vpmap = choose_pmap(get_param(np, boost::vertex_point), - pmesh, - boost::vertex_point); + VPMap vpmap = choose_param(get_param(np, vertex_point), + get_property_map(vertex_point, pmesh)); typedef typename GetFaceIndexMap::type FIMap; FIMap fimap = choose_param(get_param(np, face_index), - get_property_map(face_index, pmesh)); + get_property_map(face_index, pmesh)); typedef typename boost::lookup_named_param_def < CGAL::edge_is_constrained_t, 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 9163f9b0c0e..ca823fdd92c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h @@ -163,9 +163,8 @@ std::size_t remove_null_edges( typedef typename GT::vertex_descriptor vertex_descriptor; typedef typename GetVertexPointMap::type VertexPointMap; - VertexPointMap vpmap = choose_pmap(get_param(np, boost::vertex_point), - tmesh, - boost::vertex_point); + VertexPointMap vpmap = choose_param(get_param(np, vertex_point), + get_property_map(vertex_point, tmesh)); typedef typename GetGeomTraits::type Traits; Traits traits = choose_param(get_param(np, geom_traits), Traits()); @@ -485,9 +484,8 @@ std::size_t remove_degenerate_faces(TriangleMesh& tmesh, typedef typename GT::vertex_descriptor vertex_descriptor; typedef typename GetVertexPointMap::type VertexPointMap; - VertexPointMap vpmap = choose_pmap(get_param(np, boost::vertex_point), - tmesh, - boost::vertex_point); + VertexPointMap vpmap = choose_param(get_param(np, vertex_point), + get_property_map(vertex_point, tmesh)); typedef typename GetGeomTraits::type Traits; Traits traits = choose_param(get_param(np, geom_traits), Traits()); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h index 7edcef02eea..246295a20e0 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h @@ -306,9 +306,8 @@ self_intersections( const FaceRange& face_range, ); typedef typename GetVertexPointMap::const_type VertexPointMap; - VertexPointMap vpmap = choose_const_pmap(get_param(np, boost::vertex_point), - tmesh, - boost::vertex_point); + VertexPointMap vpmap = choose_param(get_param(np, vertex_point), + get_const_property_map(vertex_point, tmesh)); BOOST_FOREACH(face_descriptor f, face_range) { 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 6e2e99702f1..402ff0b8b3e 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 @@ -304,9 +304,8 @@ void stitch_borders(PolygonMesh& pmesh, using boost::get_param; typedef typename GetVertexPointMap::const_type VPMap; - VPMap vpm = choose_const_pmap(get_param(np, boost::vertex_point), - pmesh, - boost::vertex_point); + VPMap vpm = choose_param(get_param(np, vertex_point), + get_const_property_map(vertex_point, pmesh)); internal::Naive_border_stitching_modifier modifier(hedge_pairs_to_stitch, vpm); @@ -356,9 +355,8 @@ void stitch_borders(PolygonMesh& pmesh, const CGAL_PMP_NP_CLASS& np) std::vector< std::pair > hedge_pairs_to_stitch; typedef typename GetVertexPointMap::const_type VPMap; - VPMap vpm = choose_const_pmap(get_param(np, boost::vertex_point), - pmesh, - boost::vertex_point); + VPMap vpm = choose_param(get_param(np, vertex_point), + get_const_property_map(vertex_point, pmesh)); internal::detect_duplicated_boundary_edges(pmesh, std::back_inserter(hedge_pairs_to_stitch), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h index 76687bfc123..0704bad66ff 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h @@ -329,9 +329,8 @@ bool triangulate_face(typename boost::graph_traits::face_descripto //VertexPointMap typedef typename GetVertexPointMap::type VPMap; - VPMap vpmap = choose_pmap(get_param(np, boost::vertex_point), - pmesh, - boost::vertex_point); + VPMap vpmap = choose_param(get_param(np, vertex_point), + get_property_map(vertex_point, pmesh)); //Kernel typedef typename GetGeomTraits::type Kernel; @@ -379,9 +378,8 @@ bool triangulate_faces(FaceRange face_range, //VertexPointMap typedef typename GetVertexPointMap::type VPMap; - VPMap vpmap = choose_pmap(get_param(np, boost::vertex_point), - pmesh, - boost::vertex_point); + VPMap vpmap = choose_param(get_param(np, vertex_point), + get_property_map(vertex_point, pmesh)); //Kernel typedef typename GetGeomTraits::type Kernel; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index f03f7d10735..551f9e3726d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -98,7 +98,7 @@ namespace Polygon_mesh_processing { return internal::triangulate_hole_polygon_mesh(pmesh, border_halfedge, out, - choose_param(get_param(np, vertex_point), get(CGAL::vertex_point, pmesh)), + choose_param(get_param(np, vertex_point), get_property_map(vertex_point, pmesh)), use_dt3, choose_param(get_param(np, geom_traits), typename GetGeomTraits::type())) .first;