diff --git a/BGL/include/CGAL/boost/graph/Euler_operations.h b/BGL/include/CGAL/boost/graph/Euler_operations.h index c46cab32593..9ff71f26135 100644 --- a/BGL/include/CGAL/boost/graph/Euler_operations.h +++ b/BGL/include/CGAL/boost/graph/Euler_operations.h @@ -932,7 +932,6 @@ add_vertex_and_face_to_border(typename boost::graph_traits::halfedge_desc set_next(h1,ohe1,g); set_target(he1,target(h1,g),g); set_target(ohe1,v,g); - set_next(he2,he1,g); set_next(ohe1,ohe2,g); set_target(he2,v,g); @@ -940,16 +939,16 @@ add_vertex_and_face_to_border(typename boost::graph_traits::halfedge_desc set_next(ohe2,next(h2,g),g); set_target(ohe2,target(h2,g),g); set_next(h2,he2,g); - internal::set_border(ohe1,g); - internal::set_border(ohe2,g); + internal::set_border(he1,g); + internal::set_border(he2,g); CGAL::Halfedge_around_face_iterator hafib,hafie; - for(boost::tie(hafib, hafie) = halfedges_around_face(he1, g); + for(boost::tie(hafib, hafie) = halfedges_around_face(ohe1, g); hafib != hafie; ++hafib){ set_face(*hafib, f, g); } - set_halfedge(f, he1, g); + set_halfedge(f, ohe1, g); return ohe2; } diff --git a/BGL/test/BGL/data/fixture1.off b/BGL/test/BGL/data/fixture1.off index 0842d7cee04..19bcbc9991a 100644 --- a/BGL/test/BGL/data/fixture1.off +++ b/BGL/test/BGL/data/fixture1.off @@ -1,5 +1,13 @@ OFF 5 3 0 +0 0 0 +1 0 0 +0 1 0 +1 1 0 +2 0 0 +3 0 2 1 +3 1 2 3 +3 1 3 4 # yo # |\ # | \ @@ -9,12 +17,3 @@ OFF # | \ | # |f1\| # uo---ow -0 0 0 -1 0 0 -0 1 0 -1 1 0 -2 0 0 -# faces -3 0 2 1 -3 1 2 3 -3 1 3 4 diff --git a/BGL/test/BGL/data/fixture2.off b/BGL/test/BGL/data/fixture2.off index 24e701e75b2..ed8a8845af1 100644 --- a/BGL/test/BGL/data/fixture2.off +++ b/BGL/test/BGL/data/fixture2.off @@ -1,5 +1,14 @@ OFF 5 4 0 +0 2 0 +2 2 0 +0 0 0 +2 0 0 +1 1 0 +3 0 4 1 +3 0 2 4 +3 2 3 4 +3 3 1 4 # u v # +--------+ # |\ /| @@ -12,13 +21,3 @@ OFF # |/ \| # +--------+ # w x -0 2 0 -2 2 0 -0 0 0 -2 0 0 -1 1 0 -# faces -3 0 4 1 -3 0 2 4 -3 2 3 4 -3 3 1 4 diff --git a/BGL/test/BGL/data/fixture3.off b/BGL/test/BGL/data/fixture3.off index cc7f437f20e..d92b67ac335 100644 --- a/BGL/test/BGL/data/fixture3.off +++ b/BGL/test/BGL/data/fixture3.off @@ -1,5 +1,13 @@ OFF 6 2 0 +0 1 0 +0 0 0 +1 0 0 +1 1 0 +2 0 0 +2 1 0 +4 0 1 2 3 +4 3 2 4 5 # u x z # +------------+------------+ # | | | @@ -9,12 +17,3 @@ OFF # | | | # +------------+------------+ # v w y -0 1 0 -0 0 0 -1 0 0 -1 1 0 -2 0 0 -2 1 0 -# faces -4 0 1 2 3 -4 3 2 4 5 diff --git a/BGL/test/BGL/test_Euler_operations.cpp b/BGL/test/BGL/test_Euler_operations.cpp index 0a6abcc2fe1..97f0fa1a40a 100644 --- a/BGL/test/BGL/test_Euler_operations.cpp +++ b/BGL/test/BGL/test_Euler_operations.cpp @@ -24,7 +24,7 @@ join_face_test() assert(CGAL::internal::exact_num_edges(f.m) == 6); CGAL::Halfedge_around_face_iterator begin, end; - boost::tie(begin, end) = halfedges_around_face(halfedge(f.f1, f.m), f.m); + boost::tie(begin, end) = CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m); assert(std::distance(begin, end) == 4); for(; begin != end; ++begin) { @@ -163,8 +163,8 @@ join_vertex_interior_test() assert(CGAL::internal::exact_num_faces(f.m) == 2); assert(CGAL::internal::exact_num_vertices(f.m) == 5); assert(CGAL::internal::exact_num_edges(f.m) == 6); - assert(boost::distance(halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 3); - assert(boost::distance(halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3); + assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 3); + assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3); assert(degree(f.x, f.m) == 4); assert(CGAL::is_valid(f.m)); } @@ -188,8 +188,8 @@ join_vertex_exterior_test() assert(CGAL::internal::exact_num_faces(f.m) == 2); assert(CGAL::internal::exact_num_vertices(f.m) == 5); assert(CGAL::internal::exact_num_edges(f.m) == 6); - assert(boost::distance(halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4); - assert(boost::distance(halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3); + assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4); + assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3); assert(degree(f.y, f.m) == 3); assert(CGAL::is_valid(f.m)); } @@ -207,8 +207,8 @@ join_vertex_exterior_test() assert(CGAL::internal::exact_num_faces(f.m) == 2); assert(CGAL::internal::exact_num_vertices(f.m) == 5); assert(CGAL::internal::exact_num_edges(f.m) == 6); - assert(boost::distance(halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4); - assert(boost::distance(halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3); + assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4); + assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3); assert(CGAL::is_valid(f.m)); assert(degree(f.w, f.m) == 3); @@ -237,8 +237,8 @@ split_vertex() assert(CGAL::is_valid(f.m)); assert(CGAL::internal::exact_num_vertices(f.m) == 7); assert(CGAL::internal::exact_num_edges(f.m) == 8); - assert(boost::distance(halfedges_around_face(h1, f.m)) == 5); - assert(boost::distance(halfedges_around_face(h2, f.m)) == 7); + assert(boost::distance(CGAL::halfedges_around_face(h1, f.m)) == 5); + assert(boost::distance(CGAL::halfedges_around_face(h2, f.m)) == 7); } template @@ -264,8 +264,8 @@ split_join_vertex_inverse() assert(CGAL::internal::exact_num_faces(f.m) == 2); assert(CGAL::internal::exact_num_edges(f.m) == 6); assert(CGAL::internal::exact_num_halfedges(f.m) == 12); - assert(boost::distance(halfedges_around_face(h1, f.m)) == 3); - assert(boost::distance(halfedges_around_face(h2, f.m)) == 3); + assert(boost::distance(CGAL::halfedges_around_face(h1, f.m)) == 3); + assert(boost::distance(CGAL::halfedges_around_face(h2, f.m)) == 3); } @@ -383,7 +383,7 @@ int main() test_Euler_operations(); #ifdef CGAL_USE_OPENMESH - test_Euler_operations(); + test_Euler_operations(); #endif std::cerr << "done\n"; diff --git a/BGL/test/BGL/test_Prefix.h b/BGL/test/BGL/test_Prefix.h index c9533a6618b..e76a3e53c5d 100644 --- a/BGL/test/BGL/test_Prefix.h +++ b/BGL/test/BGL/test_Prefix.h @@ -8,7 +8,7 @@ #include -#include +#include #include #include @@ -25,7 +25,7 @@ // ATTN: If you change this kernel remember to also hack // properties_PolyMesh_ArrayKernelT.h accordingly -typedef CGAL::Simple_cartesian Kernel; +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Polyhedron_3 Polyhedron; typedef Kernel::Point_3 Point_3; @@ -173,12 +173,12 @@ struct Surface_fixture_1 { assert(x != boost::graph_traits::null_vertex()); assert(y != boost::graph_traits::null_vertex()); - f1 = is_border(halfedge(u, m),m) ? face(opposite(halfedge(u, m), m), m) : face(halfedge(u, m), m); + f1 = CGAL::is_border(halfedge(u, m),m) ? face(opposite(halfedge(u, m), m), m) : face(halfedge(u, m), m); assert(f1 != boost::graph_traits::null_face()); CGAL::Halfedge_around_face_iterator hafib, hafie; - for(boost::tie(hafib, hafie) = halfedges_around_face(halfedge(f1, m), m); hafib != hafie; ++hafib) + for(boost::tie(hafib, hafie) = CGAL::halfedges_around_face(halfedge(f1, m), m); hafib != hafie; ++hafib) { - if(! is_border(opposite(*hafib, m), m)) + if(! CGAL::is_border(opposite(*hafib, m), m)) f2 = face(opposite(*hafib, m), m); } typename boost::graph_traits::face_iterator fb, fe; @@ -226,25 +226,25 @@ struct Surface_fixture_2 { bool found; boost::tie(h, found) = halfedge(x, v, m); assert(found); - assert(! is_border(h,m)); + assert(! CGAL::is_border(h,m)); f1 = face(h, m); assert(f1 != boost::graph_traits::null_face()); boost::tie(h, found) = halfedge(v, u, m); assert(found); - assert(!is_border(h,m)); + assert(!CGAL::is_border(h,m)); f2 = face(h, m); assert(f2 != boost::graph_traits::null_face()); boost::tie(h, found) = halfedge(u, w, m); assert(found); - assert(!is_border(h,m)); + assert(!CGAL::is_border(h,m)); f3 = face(h, m); assert(f3 != boost::graph_traits::null_face()); boost::tie(h, found) = halfedge(w, x, m); assert(found); - assert(!is_border(h,m)); + assert(!CGAL::is_border(h,m)); f4 = face(h, m); assert(f4 != boost::graph_traits::null_face()); } @@ -287,8 +287,8 @@ struct Surface_fixture_3 { assert(y != boost::graph_traits::null_vertex()); assert(z != boost::graph_traits::null_vertex()); - f1 = is_border(halfedge(u, m),m) ? face(opposite(halfedge(u, m), m), m) : face(halfedge(u, m), m); - f2 = is_border(halfedge(u, m),m) ? face(opposite(halfedge(z, m), m), m) : face(halfedge(z, m), m); + f1 = CGAL::is_border(halfedge(u, m),m) ? face(opposite(halfedge(u, m), m), m) : face(halfedge(u, m), m); + f2 = CGAL::is_border(halfedge(u, m),m) ? face(opposite(halfedge(z, m), m), m) : face(halfedge(z, m), m); assert(f1 != boost::graph_traits::null_face()); assert(f2 != boost::graph_traits::null_face()); @@ -314,7 +314,7 @@ struct Surface_fixture_4 { int found = 0; typename boost::graph_traits::halfedge_iterator hb, he; for(boost::tie(hb, he) = halfedges(m); hb != he; ++hb) { - if(is_border(*hb,m)){ + if(CGAL::is_border(*hb,m)){ if(get(pm, target(*hb,m)) == Point_3(0,0,0)){ if(found == 0){ h1 = *hb; @@ -349,7 +349,7 @@ struct Surface_fixture_5 { int found = 0; typename boost::graph_traits::halfedge_iterator hb, he; for(boost::tie(hb, he) = halfedges(m); hb != he; ++hb) { - if(is_border(*hb,m)){ + if(CGAL::is_border(*hb,m)){ if(get(pm, target(*hb,m)) == Point_3(2,1,0)){ h1 = *hb; found++;