From 34e2180b22a57441eda3bc6caba7aee5ba5b3ce5 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 1 Apr 2021 13:36:57 +0200 Subject: [PATCH] rename match_faces --- Installation/CHANGES.md | 2 +- .../PackageDescription.txt | 2 +- .../compare_meshes_example.cpp | 2 +- .../CGAL/Polygon_mesh_processing/measure.h | 20 +++++++++---------- .../Polygon_mesh_processing/measures_test.cpp | 8 ++++---- .../Diff_between_meshes_plugin.cpp | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 51f5f044456..141e0c86abf 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -7,7 +7,7 @@ Release date: December 2021 ### [Polygon Mesh Processing](https://doc.cgal.org/5.4/Manual/packages.html#PkgPolygonMeshProcessing) -- Added the function `CGAL::Polygon_mesh_processing::compare_meshes()` that given two polygon meshes identifies faces present in only one of the two meshes as well as faces present in both. +- Added the function `CGAL::Polygon_mesh_processing::match_faces()` that given two polygon meshes identifies faces present in only one of the two meshes as well as faces present in both. [Release 5.3](https://github.com/CGAL/cgal/releases/tag/v5.3) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt index acdaa96e9ca..8e64ce9b07f 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt @@ -198,7 +198,7 @@ The page \ref bgl_namedparameters "Named Parameters" describes their usage. - \link measure_grp `CGAL::Polygon_mesh_processing::edge_length()` \endlink - \link measure_grp `CGAL::Polygon_mesh_processing::face_border_length()` \endlink - \link measure_grp `CGAL::Polygon_mesh_processing::centroid()` \endlink -- \link measure_grp `CGAL::Polygon_mesh_processing::compare_meshes()` \endlink +- \link measure_grp `CGAL::Polygon_mesh_processing::match_faces()` \endlink \cgalCRPSection{Distance Functions} - `CGAL::Polygon_mesh_processing::approximate_Hausdorff_distance()` diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/compare_meshes_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/compare_meshes_example.cpp index 3f9d726b405..40748393a9e 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/compare_meshes_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/compare_meshes_example.cpp @@ -34,7 +34,7 @@ int main(int argc, char* argv[]) CGAL::Euler::add_center_vertex(*halfedges(mesh2).begin(),mesh2); std::vector > common; std::vector m1_only, m2_only; - PMP::compare_meshes(mesh1, mesh2, std::back_inserter(common), std::back_inserter(m1_only), std::back_inserter(m2_only)); + PMP::match_faces(mesh1, mesh2, std::back_inserter(common), std::back_inserter(m1_only), std::back_inserter(m2_only)); std::cout<<"Faces only in m1 : "< -void compare_meshes(const PolygonMesh& m1, const PolygonMesh& m2, - FacePairOutputIterator common, FaceOutputIterator m1_only, FaceOutputIterator m2_only, - const NamedParameters1& np1, const NamedParameters2& np2) +void match_faces(const PolygonMesh& m1, const PolygonMesh& m2, + FacePairOutputIterator common, FaceOutputIterator m1_only, FaceOutputIterator m2_only, + const NamedParameters1& np1, const NamedParameters2& np2) { using parameters::choose_parameter; using parameters::get_parameter; @@ -987,18 +987,18 @@ void compare_meshes(const PolygonMesh& m1, const PolygonMesh& m2, } template -void compare_meshes(const PolygonMesh& m1, const PolygonMesh& m2, - FacePairOutputIterator common, FaceOutputIterator m1_only, FaceOutputIterator m2_only, - const NamedParameters& np) +void match_faces(const PolygonMesh& m1, const PolygonMesh& m2, + FacePairOutputIterator common, FaceOutputIterator m1_only, FaceOutputIterator m2_only, + const NamedParameters& np) { - compare_meshes(m1, m2, common, m1_only, m2_only, np, parameters::all_default()); + match_faces(m1, m2, common, m1_only, m2_only, np, parameters::all_default()); } template -void compare_meshes(const PolygonMesh& m1, const PolygonMesh& m2, - FacePairOutputIterator common, FaceOutputIterator m1_only, FaceOutputIterator m2_only) +void match_faces(const PolygonMesh& m1, const PolygonMesh& m2, + FacePairOutputIterator common, FaceOutputIterator m1_only, FaceOutputIterator m2_only) { - compare_meshes(m1, m2, common, m1_only, m2_only, parameters::all_default(), parameters::all_default()); + match_faces(m1, m2, common, m1_only, m2_only, parameters::all_default(), parameters::all_default()); } } // namespace Polygon_mesh_processing diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp index 3ce828e8faa..701b9a2a3a6 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp @@ -234,7 +234,7 @@ void test_compare() return; } input.close(); - PMP::compare_meshes(mesh1, mesh2, std::back_inserter(common), std::back_inserter(m1_only), std::back_inserter(m2_only), CGAL::parameters::all_default(), CGAL::parameters::all_default()); + PMP::match_faces(mesh1, mesh2, std::back_inserter(common), std::back_inserter(m1_only), std::back_inserter(m2_only), CGAL::parameters::all_default(), CGAL::parameters::all_default()); assert(common.size() == 7); assert(m1_only.size() == 11); assert(m2_only.size() == 11); @@ -274,7 +274,7 @@ void test_compare() { fim2.insert(std::make_pair(f, id++)); } - PMP::compare_meshes(mesh1, mesh2, std::back_inserter(common), std::back_inserter(m1_only), std::back_inserter(m2_only), CGAL::parameters::all_default(), CGAL::parameters::all_default()); + PMP::match_faces(mesh1, mesh2, std::back_inserter(common), std::back_inserter(m1_only), std::back_inserter(m2_only), CGAL::parameters::all_default(), CGAL::parameters::all_default()); assert(common.size() == 3); assert(m1_only.size() == 3); assert(fim1[m1_only[0]] == 0); @@ -308,7 +308,7 @@ void test_compare() return; } input.close(); - PMP::compare_meshes(mesh1, mesh2, std::back_inserter(common), std::back_inserter(m1_only), std::back_inserter(m2_only), CGAL::parameters::all_default(), CGAL::parameters::all_default()); + PMP::match_faces(mesh1, mesh2, std::back_inserter(common), std::back_inserter(m1_only), std::back_inserter(m2_only), CGAL::parameters::all_default(), CGAL::parameters::all_default()); assert(common.size() == 17); assert(m1_only.size() == 1); assert(m2_only.size() == 0); @@ -337,7 +337,7 @@ void test_compare() return; } input.close(); - PMP::compare_meshes(mesh1, mesh2, std::back_inserter(common), std::back_inserter(m1_only), + PMP::match_faces(mesh1, mesh2, std::back_inserter(common), std::back_inserter(m1_only), std::back_inserter(m2_only)); assert(common.size() == 0); assert(m1_only.size() == 18); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Diff_between_meshes_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Diff_between_meshes_plugin.cpp index 1fba8c28759..095002379b7 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Diff_between_meshes_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Diff_between_meshes_plugin.cpp @@ -88,7 +88,7 @@ void Polyhedron_demo_diff_between_meshes_plugin::diff() m2=*m2_item->face_graph(); std::vector m1_only, m2_only; std::vector > common; - CGAL::Polygon_mesh_processing::compare_meshes( + CGAL::Polygon_mesh_processing::match_faces( m1, m2, std::back_inserter(common),