diff --git a/BGL/include/CGAL/boost/graph/properties_Polyhedron_3.h b/BGL/include/CGAL/boost/graph/properties_Polyhedron_3.h index fd21fdaae8b..735742cb0bb 100644 --- a/BGL/include/CGAL/boost/graph/properties_Polyhedron_3.h +++ b/BGL/include/CGAL/boost/graph/properties_Polyhedron_3.h @@ -465,6 +465,11 @@ struct vertex_property_type > typedef CGAL::vertex_point_t type; }; +template +struct vertex_property_type > +{ + typedef CGAL::vertex_point_t type; +}; } // namespace boost diff --git a/Surface_mesh_segmentation/include/CGAL/mesh_segmentation.h b/Surface_mesh_segmentation/include/CGAL/mesh_segmentation.h index 60054e9c8ed..e7625db724b 100644 --- a/Surface_mesh_segmentation/include/CGAL/mesh_segmentation.h +++ b/Surface_mesh_segmentation/include/CGAL/mesh_segmentation.h @@ -42,9 +42,10 @@ sdf_values( const Polyhedron& polyhedron, bool postprocess = true, GeomTraits traits = GeomTraits()) { - typedef boost::property_map::type VPMap; + typedef boost::property_map::type VPMap; + VPMap vpm = get(vertex_point,const_cast(polyhedron)); internal::Surface_mesh_segmentation - algorithm(polyhedron, traits, get(vertex_point,polyhedron)); + algorithm(polyhedron, traits,vpm); return algorithm.calculate_sdf_values(cone_angle, number_of_rays, sdf_values_map, postprocess); } @@ -177,7 +178,7 @@ segmentation_from_sdf_values( const Polyhedron& polyhedron, { typedef boost::property_map::type VPMap; internal::Surface_mesh_segmentation algorithm( - polyhedron, traits, get(vertex_point,polyhedron)); + polyhedron, traits, get(vertex_point,const_cast(polyhedron))); return algorithm.partition(number_of_clusters, smoothing_lambda, sdf_values_map, segment_ids, !output_cluster_ids); }