diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/data_stitching/folded_cycle.off b/Polygon_mesh_processing/test/Polygon_mesh_processing/data_stitching/folded_cycle.off new file mode 100644 index 00000000000..f2a40878de9 --- /dev/null +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/data_stitching/folded_cycle.off @@ -0,0 +1,59 @@ +# Output of a CGAL tool +#CBP +# polyhedral_surface 0 +# halfedges 0 +# triangulated 0 +# non_empty_facets 0 +# terrain 0 +# normalized_to_sphere 0 +# radius 0 +# rounded 0 +# rounded_bits 0 +# ENDCBP + +NOFF +16 16 0 + +# 16 vertices +# ------------------------------------------ + + +-21.8983 -6.38823 63.7562 0.521628 -0.428916 0.73752 +-21.9152 -6.40483 63.7541 0.42945 -0.529738 0.731403 +-21.9057 -6.32693 63.7553 0.99181 0.00120314 0.127719 +-21.8832 -6.80033 63.7582 0.126127 6.70899e-05 -0.992014 +-21.9216 -6.40893 63.551 0.67402 -0.738711 -0.00201436 +-21.9075 -6.25023 63.7552 -0.995002 -0.0234773 -0.0970594 +-21.8983 -6.38823 63.7562 0.117647 -0.000135467 -0.993055 +-21.9021 -6.75613 63.7558 0.117647 -0.000135467 -0.993055 +-21.9057 -6.32693 63.7553 -0.0977085 -0.99516 -0.010509 +-21.8752 -6.32923 63.7592 -0.126943 -0.00144678 0.991909 +-21.9611 -6.89043 63.7501 0.0910592 0.000407086 -0.995845 +-21.9418 -6.23043 63.7515 -0.109893 -0.00197042 0.993942 +-21.927 -6.32803 63.7529 -0.111856 -0.00218345 0.993722 +-21.9001 -6.39073 63.5534 0.765209 -0.643781 0.00114436 +-21.8874 -6.29763 63.7577 0.341741 -0.938826 0.0426494 +-21.882 -6.36043 63.7583 0.551822 -0.379642 0.742539 + +# 16 facets +# ------------------------------------------ + +3 0 4 13 +3 15 0 13 +3 8 10 5 +3 8 1 0 +3 6 2 14 +3 9 14 2 +3 6 7 10 +3 1 4 0 +3 7 6 14 +3 1 8 12 +3 0 15 2 +3 15 9 2 +3 5 11 8 +3 3 7 14 +3 6 10 8 +3 8 11 12 + + +# End of OFF # diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_stitching.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_stitching.cpp index 7ae4b674f9a..7fd2d5d820e 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_stitching.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_stitching.cpp @@ -73,6 +73,7 @@ void test_stitch_boundary_cycles() test_stitch_boundary_cycles("data_stitching/boundary_cycle.off", 4); test_stitch_boundary_cycles("data_stitching/boundary_cycle_2.off", 2); test_stitch_boundary_cycles("data_stitching/complex_hole.off", 3); + test_stitch_boundary_cycles("data_stitching/folded_cycle.off", 2); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -119,9 +120,9 @@ void test_stitch_borders(const char* fname, typedef PMP::internal::Halfedges_keeper_with_marked_edge_priority Keeper; Marked_edges marks = get(Edge_property_tag(), mesh); - int id = 0; + int eid = 0; for(edge_descriptor e : edges(mesh)) - put(marks, e, (unconstrained_edge_ids.count(id++) == 0)); + put(marks, e, (unconstrained_edge_ids.count(eid++) == 0)); Keeper kpr(marks, mesh);