From 4c2990ed6aebdc5488395ea5138d83d6df29e6b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 13 Mar 2020 12:28:59 +0100 Subject: [PATCH] add test failing due to non-manifold vertices --- BGL/test/BGL/test_Euler_operations.cpp | 32 +++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/BGL/test/BGL/test_Euler_operations.cpp b/BGL/test/BGL/test_Euler_operations.cpp index 7b5439470a8..09a708ffad4 100644 --- a/BGL/test/BGL/test_Euler_operations.cpp +++ b/BGL/test/BGL/test_Euler_operations.cpp @@ -2,6 +2,35 @@ #include "test_Prefix.h" #include #include +#include + +template +void +test_copy_face_graph_nm_umbrella() +{ + CGAL_GRAPH_TRAITS_MEMBERS(T); + + T g; + Kernel::Point_3 p; + + CGAL::make_tetrahedron(p, p, p, p, g); + CGAL::make_tetrahedron(p, p, p, p, g); + + std::vector verts(vertices(g).begin(), vertices(g).end()); + + //merge verts[0] and verts[4] + for (halfedge_descriptor h : CGAL::halfedges_around_target(verts[4], g)) + set_target(h, verts[0], g); + remove_vertex(verts[4], g); + + T g_copy; + CGAL::copy_face_graph(g, g_copy); + + for (halfedge_descriptor h : halfedges(g_copy)) + { + assert( target(h, g_copy) != Traits::null_vertex() ); + } +} template void @@ -405,7 +434,8 @@ test_swap_edges() template void test_Euler_operations() -{ +{ + test_copy_face_graph_nm_umbrella(); join_face_test(); add_vertex_and_face_to_border_test(); add_face_to_border_test();