mesh-examples/12-14-mesh/Me653.mesh.json
Sources
- MeshFix `Basic_TMesh.removeEdges` Branch 4 (*edge_removal*: `E.removeCell(e)
- delete e
- `)
- `MESH_HEAL_COVERAGE.md`.
Description
A degenerate triangle t0=(v0,v1,v2) where v0 and v1 coincide at (1,1,0) contains a zero-length edge (v0,v1). After the null-vertex check flags this edge, Branch 4 executes E.removeCell(e) to unlink it from the doubly-linked edge list and then deletes it. Two additional well-formed triangles t1=(v2,v3,v4) and t2=(v2,v4,v0) provide a surrounding mesh region. Interior shared edge (v2,v4) is n=2.
Reproducer recipe
v0=(1,1,0), v1=(1,1,0) [=v0], v2=(3,0,0), v3=(3,2,0), v4=(5,1,0); t0=(v0,v1,v2), t1=(v2,v3,v4), t2=(v2,v4,v0); vertex_pair_distance_lt(v0,v1,1e-9); triangle_area_lt(t0,1e-9); edge_shared(v2,v4,2); edge_shared(v0,v1,1).
Expected kernel behavior
Branch 4 fires; E.removeCell(e) unlinks the zero-length edge from the list; delete e frees the edge node; traversal continues via pre-saved next pointer n.
Expected validation
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1{ 2 "vertices": [ 3 [ 4 1.0, 5 1.0, 6 0.0 7 ], 8 [ 9 1.0, 10 1.0, 11 0.0 12 ], 13 [ 14 3.0, 15 0.0, 16 0.0 17 ], 18 [ 19 3.0, 20 2.0, 21 0.0 22 ], 23 [ 24 5.0, 25 1.0, 26 0.0 27 ] 28 ], 29 "triangles": [ 30 [ 31 0, 32 1, 33 2 34 ], 35 [ 36 2, 37 3, 38 4 39 ], 40 [ 41 2, 42 4, 43 0 44 ] 45 ], 46 "metadata": { 47 "id": "Me653", 48 "schema_version": 0, 49 "defect_class": "orphaned_edge", 50 "title": "removeEdges edge_removal: zero-length edge (v0==v1 at (1,1,0)) in degenerate triangle; E.removeCell+delete path (Branch 4)", 51 "assertions": [ 52 { 53 "kind": "vertex_pair_distance_lt", 54 "pair": [ 55 0, 56 1 57 ], 58 "lt": 1e-09 59 }, 60 { 61 "kind": "triangle_area_lt", 62 "triangle": 0, 63 "lt": 1e-09 64 }, 65 { 66 "kind": "edge_shared_by_n_triangles", 67 "edge": [ 68 2, 69 4 70 ], 71 "n": 2 72 }, 73 { 74 "kind": "edge_shared_by_n_triangles", 75 "edge": [ 76 0, 77 1 78 ], 79 "n": 1 80 } 81 ] 82 } 83}