mesh-examples/12-14-mesh/Me1032.mesh.json
Sources
- CGAL PMP `PMP.remove_invalid_polygons_in_polygon_soup` Branch 2 (*erase_execution*: `polygons.erase(rit, polygons.end())`)
- `MESH_HEAL_COVERAGE.md`.
Description
Polygon soup with two valid triangles (t0=(v0,v1,v2), t1=(v1,v3,v2)) and two degenerate triangles with duplicate vertex indices (t2=[v0,v0,v1], t3=[v1,v1,v2]). Both degenerate faces are flagged by the Branch 1 predicate and moved to the tail by remove_if. Branch 2 then calls polygons.erase(rit, end()), permanently truncating the container. The clean outer boundary edges (v0-v2, v1-v3, v2-v3) each have n=1.
Reproducer recipe
v0=(0,0,0), v1=(2,0,0), v2=(1,2,0), v3=(3,0,0); t0=(v0,v1,v2), t1=(v1,v3,v2); t2=(v0,v0,v1), t3=(v1,v1,v2); assert_triangle_area_lt(t2,1e-9); assert_triangle_area_lt(t3,1e-9); edges (v0,v2), (v1,v3), (v2,v3) each n=1.
Expected kernel behavior
Branch 2 fires; polygons.erase removes both degenerate faces; remaining container holds only the two valid triangles t0 and t1.
Expected validation
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1{ 2 "vertices": [ 3 [ 4 0.0, 5 0.0, 6 0.0 7 ], 8 [ 9 2.0, 10 0.0, 11 0.0 12 ], 13 [ 14 1.0, 15 2.0, 16 0.0 17 ], 18 [ 19 3.0, 20 0.0, 21 0.0 22 ] 23 ], 24 "triangles": [ 25 [ 26 0, 27 1, 28 2 29 ], 30 [ 31 1, 32 3, 33 2 34 ], 35 [ 36 0, 37 0, 38 1 39 ], 40 [ 41 1, 42 1, 43 2 44 ] 45 ], 46 "metadata": { 47 "id": "Me1032", 48 "schema_version": 0, 49 "defect_class": "degenerate_triangle", 50 "title": "remove_invalid_polygons_erase_execution: two degenerate triangles erased by polygons.erase(rit, end()); two valid triangles remain (Branch 2)", 51 "assertions": [ 52 { 53 "kind": "triangle_area_lt", 54 "triangle": 2, 55 "lt": 1e-09 56 }, 57 { 58 "kind": "triangle_area_lt", 59 "triangle": 3, 60 "lt": 1e-09 61 }, 62 { 63 "kind": "edge_shared_by_n_triangles", 64 "edge": [ 65 0, 66 2 67 ], 68 "n": 1 69 }, 70 { 71 "kind": "edge_shared_by_n_triangles", 72 "edge": [ 73 1, 74 3 75 ], 76 "n": 1 77 }, 78 { 79 "kind": "edge_shared_by_n_triangles", 80 "edge": [ 81 2, 82 3 83 ], 84 "n": 1 85 } 86 ] 87 } 88}