From cfec3bb0cceebed48231370839af8991ea36e051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 11 Apr 2024 11:44:35 +0200 Subject: [PATCH] fix values due to the diagonal change in degenerate triangulation --- ...meshing_with_isolated_constraints_test.cpp | 2 +- .../Polygon_mesh_processing/test_pmp_clip.cpp | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_with_isolated_constraints_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_with_isolated_constraints_test.cpp index 4e7ebe96092..c36a1da5696 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_with_isolated_constraints_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_with_isolated_constraints_test.cpp @@ -30,7 +30,7 @@ int main(int, char**) std::set fs; auto selected_faces = make_boolean_property_map(fs); - fs.insert(*(faces(sm).begin())); + fs.insert(Polygon_mesh::Face_index(190)); CGAL::expand_face_selection(fs, sm, 1, selected_faces, CGAL::Emptyset_iterator()); std::cout << fs.size() << " faces in the range" << std::endl; assert(fs.size() == 4); diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_clip.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_clip.cpp index c564403312a..c6c1bb1aeea 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_clip.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_clip.cpp @@ -393,31 +393,31 @@ void test() // -> closed mesh, true/true PMP::clip(tm1, K::Plane_3(-1,0,0,0), params::use_compact_clipper(true).clip_volume(true)); - assert(faces(tm1).size() == 12); + assert(faces(tm1).size() == 14); assert(CGAL::is_closed(tm1)); // -> closed mesh, false/true PMP::clip(tm1, K::Plane_3(-1,0,0,0), params::use_compact_clipper(false).clip_volume(true)); - assert(faces(tm1).size() == 12); + assert(faces(tm1).size() == 14); assert(CGAL::is_closed(tm1)); // -> closed mesh, true/false PMP::clip(tm1, K::Plane_3(-1,0,0,0), params::use_compact_clipper(true).clip_volume(false)); - assert(faces(tm1).size() == 12); + assert(faces(tm1).size() == 14); assert(CGAL::is_closed(tm1)); // -> closed mesh, false/false PMP::clip(tm1, K::Plane_3(1,0,0,-1), params::use_compact_clipper(false).clip_volume(false)); - assert(faces(tm1).size() == 10); + assert(faces(tm1).size() == 12); assert(!CGAL::is_closed(tm1)); // -> open mesh true/true PMP::clip(tm1, K::Plane_3(-1,0,0,0), params::use_compact_clipper(true).clip_volume(true)); - assert(faces(tm1).size() == 10); + assert(faces(tm1).size() == 12); // -> open mesh true/false PMP::clip(tm1, K::Plane_3(-1,0,0,0), params::use_compact_clipper(true).clip_volume(false)); - assert(faces(tm1).size() == 10); + assert(faces(tm1).size() == 12); // -> open mesh false/false PMP::clip(tm1, K::Plane_3(-1,0,0,0), params::use_compact_clipper(false).clip_volume(false)); @@ -539,7 +539,7 @@ void test() TriangleMesh tm1; std::ifstream("data-coref/open_large_cube.off") >> tm1; PMP::clip(tm1, K::Plane_3(0,0,-1,1), CGAL::parameters::use_compact_clipper(true)); - assert(vertices(tm1).size()==176); + assert(vertices(tm1).size()==178); } { @@ -553,7 +553,7 @@ void test() TriangleMesh tm1; std::ifstream("data-coref/open_large_cube.off") >> tm1; PMP::clip(tm1, K::Plane_3(0,0,-1,1), CGAL::parameters::use_compact_clipper(true).allow_self_intersections(true)); - assert(vertices(tm1).size()==176); + assert(vertices(tm1).size()==178); } } @@ -802,11 +802,11 @@ void test_isocuboid() assert(meshes.size() == 10); //if the order is not deterministc, put the num_vertices in a list and check //if the list does contain all those numbers. - assert(num_vertices(meshes[0]) == 2657); + assert(num_vertices(meshes[0]) == 2663); assert(num_vertices(meshes[1]) == 131 ); assert(num_vertices(meshes[2]) == 32 ); - assert(num_vertices(meshes[3]) == 123 ); - assert(num_vertices(meshes[4]) == 220 ); + assert(num_vertices(meshes[3]) == 125 ); + assert(num_vertices(meshes[4]) == 224 ); assert(num_vertices(meshes[5]) == 107 ); assert(num_vertices(meshes[6]) == 121 ); assert(num_vertices(meshes[7]) == 56 ); @@ -836,8 +836,8 @@ void test_isocuboid() for (int i=0; i<4; ++i) sizes.insert(vertices(meshes[i]).size()); - assert(sizes.count(22)==1); - assert(sizes.count(23)==1); + assert(sizes.count(20)==1); + assert(sizes.count(21)==1); assert(sizes.count(7)==1); assert(sizes.count(4)==1); @@ -852,7 +852,7 @@ void test_isocuboid() assert(meshes.size() == 2); //if the order is not deterministc, put the num_vertices in a list and check //if the list does contain all those numbers. - assert(vertices(meshes[0]).size() == 22); + assert(vertices(meshes[0]).size() == 20); assert(vertices(meshes[1]).size() == 4); } int main()