mesh-examples/12-14-mesh/Me1083.mesh.json
Sources
- CGAL PMP `PMP.remove_degenerate_faces` Branch 4 (*null_edge_face_detection*: `if (is_degenerate_triangle_face(adj_fd, tmesh, vpm, gt)) faces_to_visit.push(adj_fd)
- `)
- `MESH_HEAL_COVERAGE.md`.
Description
Two collinear triangles sharing an interior edge, where t0=(v0,v1,v2) has a zero-length edge (v1==v2 at (1,0,0)) making it immediately degenerate. The second triangle t1=(v0,v2,v3) shares edge (v0,v2) with t0; after the edge collapse of (v1,v2), t1's vertices become (0,0,0),(1,0,0),(2,0,0) — all collinear — so it becomes a cascading degenerate face. The is_degenerate_triangle_face check fires for the adjacent face adj_fd=t1 → Branch 4 pushes t1 onto faces_to_visit. Clean control triangle t2=(v4,v5,v6) provides non-degenerate context. Shared edge (v0,v2) n=2.
Reproducer recipe
v0=(0,0,0), v1=(1,0,0), v2=(1,0,0) [=v1], v3=(2,0,0); t0=(v0,v1,v2), t1=(v0,v2,v3); assert_triangle_area_lt(t0,1e-12); assert_vertex_pair_distance_lt(v1,v2,1e-12); assert_triangle_area_lt(t1,1e-12); assert_edge_shared(v0,v2,2).
Expected kernel behavior
Branch 4 fires; after processing t0 (via zero-length edge collapse), is_degenerate_triangle_face is called on the adjacent face t1; result is true → t1 is pushed onto faces_to_visit for subsequent processing.
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 1.0, 10 0.0, 11 0.0 12 ], 13 [ 14 1.0, 15 0.0, 16 0.0 17 ], 18 [ 19 2.0, 20 0.0, 21 0.0 22 ], 23 [ 24 5.0, 25 0.0, 26 0.0 27 ], 28 [ 29 6.0, 30 0.0, 31 0.0 32 ], 33 [ 34 5.5, 35 1.0, 36 0.0 37 ] 38 ], 39 "triangles": [ 40 [ 41 0, 42 1, 43 2 44 ], 45 [ 46 0, 47 2, 48 3 49 ], 50 [ 51 4, 52 5, 53 6 54 ] 55 ], 56 "metadata": { 57 "id": "Me1083", 58 "schema_version": 0, 59 "defect_class": "degenerate_triangle", 60 "title": "remove_degenerate_faces null_edge_face_detection: zero-length edge in t0 induces collinear degeneracy in adjacent t1 after edge collapse; is_degenerate_triangle_face(adj_fd) fires (Branch 4)", 61 "assertions": [ 62 { 63 "kind": "triangle_area_lt", 64 "triangle": 0, 65 "lt": 1e-12 66 }, 67 { 68 "kind": "vertex_pair_distance_lt", 69 "pair": [ 70 1, 71 2 72 ], 73 "lt": 1e-12 74 }, 75 { 76 "kind": "triangle_area_lt", 77 "triangle": 1, 78 "lt": 1e-12 79 }, 80 { 81 "kind": "edge_shared_by_n_triangles", 82 "edge": [ 83 0, 84 2 85 ], 86 "n": 2 87 } 88 ] 89 } 90}