Fix templating error in isotropic remeshing overload

This commit is contained in:
Ivan Paden 2023-08-17 00:29:19 +02:00
parent 9e91abb539
commit dccf973186
2 changed files with 10 additions and 3 deletions

View File

@ -344,7 +344,14 @@ void isotropic_remeshing(const FaceRange& faces
, PolygonMesh& pmesh , PolygonMesh& pmesh
, const NamedParameters& np = parameters::default_values()) , 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<PolygonMesh, NamedParameters>::type VPMap;
VPMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point),
get_property_map(vertex_point, pmesh));
Uniform_sizing_field<PolygonMesh, VPMap> sizing(target_edge_length, vpmap);
if (target_edge_length > 0) if (target_edge_length > 0)
isotropic_remeshing(faces, sizing, pmesh, np); isotropic_remeshing(faces, sizing, pmesh, np);
else else

View File

@ -435,7 +435,7 @@ public Q_SLOTS:
selection_item->constrained_edges_pmap(), selection_item->constrained_edges_pmap(),
get(CGAL::vertex_point, *selection_item->polyhedron()), get(CGAL::vertex_point, *selection_item->polyhedron()),
CGAL::Constant_property_map<face_descriptor, std::size_t>(1), CGAL::Constant_property_map<face_descriptor, std::size_t>(1),
CGAL::Polygon_mesh_processing::Uniform_sizing_field<FaceGraph>( 4. / 3. * target_length, pmesh))) CGAL::Polygon_mesh_processing::Uniform_sizing_field( 4. / 3. * target_length, pmesh)))
{ {
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
//If facets are selected, splitting edges will add facets that won't be selected, and it will mess up the rest. //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, ecm,
get(CGAL::vertex_point, pmesh), get(CGAL::vertex_point, pmesh),
CGAL::Constant_property_map<face_descriptor, std::size_t>(1), CGAL::Constant_property_map<face_descriptor, std::size_t>(1),
CGAL::Polygon_mesh_processing::Uniform_sizing_field<FaceGraph>(4. / 3. * target_length, pmesh))) CGAL::Polygon_mesh_processing::Uniform_sizing_field(4. / 3. * target_length, pmesh)))
{ {
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
QMessageBox::warning(mw, tr("Error"), QMessageBox::warning(mw, tr("Error"),