From f8cc9e6bd0d2e34847632ff52d50084dac9fa98a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 2 Mar 2023 14:49:17 +0100 Subject: [PATCH] rename np --- .../CGAL/Polygon_mesh_processing/remesh_planar_patches.h | 4 ++-- .../test_decimation_of_planar_patches.cpp | 6 +++--- .../Polyhedron/Plugins/PMP/Remesh_planar_patches_plugin.cpp | 4 ++-- .../CGAL/STL_Extension/internal/parameters_interface.h | 1 - 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h index 831de8f80d3..6101b424034 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h @@ -1340,7 +1340,7 @@ bool decimate_meshes_with_common_interfaces_impl(TriangleMeshRange& meshes, * as key type and `std::size_t` as value type} * \cgalParamDefault{None} * \cgalParamNEnd - * \cgalParamNBegin{cosinus_threshold} + * \cgalParamNBegin{cosine_of_maxium_angle} * \cgalParamDescription{the cosinus an angle that is used as the lower bound of both the dihedral angle between two adjacent * triangles to consider then as coplanar, and the angle between adjacent segments to consider then as collinear.} * \cgalParamType{`FT` type from the `geom_traits` parameter} @@ -1407,7 +1407,7 @@ void remesh_planar_patches(const TriangleMeshIn& tm_in, typedef typename graph_traits::vertex_descriptor vertex_descriptor; typedef typename graph_traits::face_descriptor face_descriptor; - double coplanar_cos_threshold = choose_parameter(get_parameter(np_in, internal_np::cosinus_threshold), -1); + double coplanar_cos_threshold = choose_parameter(get_parameter(np_in, internal_np::cosine_of_maxium_angle), -1); CGAL_precondition(coplanar_cos_threshold<0); // initialize property maps (fill user provided or user internal ones) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_decimation_of_planar_patches.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_decimation_of_planar_patches.cpp index ccc95628e00..e0850564c57 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_decimation_of_planar_patches.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_decimation_of_planar_patches.cpp @@ -115,7 +115,7 @@ int main() // call the decimation function Surface_mesh sm_out; - PMP::remesh_planar_patches(sm, sm_out, CGAL::parameters::cosinus_threshold(-0.99)); + PMP::remesh_planar_patches(sm, sm_out, CGAL::parameters::cosine_of_maxium_angle(-0.99)); ss=std::stringstream(); ss << "out_a" << i << ".off"; std::ofstream out(ss.str().c_str()); @@ -391,7 +391,7 @@ int main() std::ifstream in("data/decimation/sphere.off"); in >> sm; Surface_mesh sm_out; - PMP::remesh_planar_patches(sm, sm_out, CGAL::parameters::cosinus_threshold(-0.99)); + PMP::remesh_planar_patches(sm, sm_out, CGAL::parameters::cosine_of_maxium_angle(-0.99)); } { Surface_mesh sm; @@ -399,7 +399,7 @@ int main() std::ifstream in("data/decimation/sphere_selection.off"); in >> sm; Surface_mesh sm_out; - PMP::remesh_planar_patches(sm, sm_out, CGAL::parameters::cosinus_threshold(-0.99)); + PMP::remesh_planar_patches(sm, sm_out, CGAL::parameters::cosine_of_maxium_angle(-0.99)); std::ofstream out("sphere_selection_app.off"); out << sm_out; std::cout << "output written to sphere_selection_app.off\n"; diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Remesh_planar_patches_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Remesh_planar_patches_plugin.cpp index b899946b0c3..1c36f442cfb 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Remesh_planar_patches_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Remesh_planar_patches_plugin.cpp @@ -202,7 +202,7 @@ public Q_SLOTS: CGAL::Polygon_mesh_processing::remesh_planar_patches(pmesh, out, - CGAL::parameters::cosinus_threshold(cos_threshold) + CGAL::parameters::cosine_of_maxium_angle(cos_threshold) .face_patch_map(in_fpmap) .do_not_triangulate_faces(do_not_triangulate_faces), CGAL::parameters::face_patch_map(out_fpmap)); @@ -226,7 +226,7 @@ public Q_SLOTS: { CGAL::Polygon_mesh_processing::remesh_planar_patches(pmesh, pmesh, - CGAL::parameters::cosinus_threshold(cos_threshold) + CGAL::parameters::cosine_of_maxium_angle(cos_threshold) .do_not_triangulate_faces(do_not_triangulate_faces), CGAL::parameters::visitor([](Mesh& pmesh){pmesh.clear_without_removing_property_maps ();})); diff --git a/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h index fc34ca68f8b..afd9a835a2a 100644 --- a/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h +++ b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h @@ -147,7 +147,6 @@ CGAL_add_named_parameter(mesh_facet_angle_t, mesh_facet_angle, mesh_facet_angle) CGAL_add_named_parameter(mesh_facet_distance_t, mesh_facet_distance, mesh_facet_distance) CGAL_add_named_parameter(mesh_facet_topology_t, mesh_facet_topology, mesh_facet_topology) CGAL_add_named_parameter(polyline_constraints_t, polyline_constraints, polyline_constraints) -CGAL_add_named_parameter(cosinus_threshold_t, cosinus_threshold, cosinus_threshold) CGAL_add_named_parameter(vertex_corner_map_t, vertex_corner_map, vertex_corner_map) CGAL_add_named_parameter(normals_of_patches_t, normals_of_patches, normals_of_patches)