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 70771b6c81b..bee2a645b2c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h @@ -344,7 +344,14 @@ void isotropic_remeshing(const FaceRange& faces , PolygonMesh& pmesh , const NamedParameters& np = parameters::default_values()) { - Uniform_sizing_field sizing(target_edge_length, pmesh); + using parameters::choose_parameter; + using parameters::get_parameter; + + typedef typename GetVertexPointMap::type VPMap; + VPMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), + get_property_map(vertex_point, pmesh)); + + Uniform_sizing_field sizing(target_edge_length, vpmap); if (target_edge_length > 0) isotropic_remeshing(faces, sizing, pmesh, np); else diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp index 3f1816d7ce3..a819c2c2294 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp @@ -435,7 +435,7 @@ public Q_SLOTS: selection_item->constrained_edges_pmap(), get(CGAL::vertex_point, *selection_item->polyhedron()), CGAL::Constant_property_map(1), - CGAL::Polygon_mesh_processing::Uniform_sizing_field( 4. / 3. * target_length, pmesh))) + CGAL::Polygon_mesh_processing::Uniform_sizing_field( 4. / 3. * target_length, pmesh))) { QApplication::restoreOverrideCursor(); //If facets are selected, splitting edges will add facets that won't be selected, and it will mess up the rest. @@ -741,7 +741,7 @@ public Q_SLOTS: ecm, get(CGAL::vertex_point, pmesh), CGAL::Constant_property_map(1), - CGAL::Polygon_mesh_processing::Uniform_sizing_field(4. / 3. * target_length, pmesh))) + CGAL::Polygon_mesh_processing::Uniform_sizing_field(4. / 3. * target_length, pmesh))) { QApplication::restoreOverrideCursor(); QMessageBox::warning(mw, tr("Error"),