mesh-examples/12-14-mesh/Me426.mesh.json
Sources
- MeshFix `checkAndRepair::removeOverlappingTriangles` Branch 7 (*UNRESOLVABLE_OVERLAP*: `unlinkTriangle(t1)
- unlinkTriangle(t2)
- nr++
- `)
- `MESH_HEAL_COVERAGE.md`.
Description
Three coplanar triangles forming a multi-overlap tangle. t0=(v0,v1,v2) is the large outer triangle (vertices (0,0)-(4,0)-(2,4)). t1=(v0,v1,v3) shares edge (v0,v1) with t0; v3=(2,2) is inside t0 → first overlapping pair. t2=(v0,v4,v2) shares edge (v0,v2) with t0; v4=(2,3) is inside t0 → second overlapping pair. Whichever overlap is addressed first by swapping, the other persists and creates a cascading condition where the swap cannot cleanly resolve the tangle — both triangles of the first pair must be unlinked.
Reproducer recipe
v0=(0,0,0), v1=(4,0,0), v2=(2,4,0), v3=(2,2,0), v4=(2,3,0); t0=(v0,v1,v2), t1=(v0,v1,v3), t2=(v0,v4,v2); assert_edge_shared(v0,v1,2); assert_edge_shared(v0,v2,2); assert_triangles_self_intersect(0,1); assert_triangles_self_intersect(0,2); assert_adjacent_triangles_normal_dot_gt(0,1,0.99); assert_adjacent_triangles_normal_dot_gt(0,2,0.99).
Expected kernel behavior
Branch 7 fires; no successful swap path exists that resolves both overlaps; `unlinkTriangle(t1); unlinkTriangle(t2)` removes both triangles from the mesh and increments the removed-triangle counter.
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 4.0, 10 0.0, 11 0.0 12 ], 13 [ 14 2.0, 15 4.0, 16 0.0 17 ], 18 [ 19 2.0, 20 2.0, 21 0.0 22 ], 23 [ 24 2.0, 25 3.0, 26 0.0 27 ] 28 ], 29 "triangles": [ 30 [ 31 0, 32 1, 33 2 34 ], 35 [ 36 0, 37 1, 38 3 39 ], 40 [ 41 0, 42 4, 43 2 44 ] 45 ], 46 "metadata": { 47 "id": "Me426", 48 "schema_version": 0, 49 "defect_class": "overlapping_triangles", 50 "title": "removeOverlappingTriangles UNRESOLVABLE_OVERLAP: multi-overlap tangle; both triangles unlinked (Branch 7)", 51 "assertions": [ 52 { 53 "kind": "edge_shared_by_n_triangles", 54 "edge": [ 55 0, 56 1 57 ], 58 "n": 2 59 }, 60 { 61 "kind": "edge_shared_by_n_triangles", 62 "edge": [ 63 0, 64 2 65 ], 66 "n": 2 67 }, 68 { 69 "kind": "triangles_self_intersect", 70 "triangles": [ 71 0, 72 1 73 ] 74 }, 75 { 76 "kind": "triangles_self_intersect", 77 "triangles": [ 78 0, 79 2 80 ] 81 }, 82 { 83 "kind": "adjacent_triangles_normal_dot_gt", 84 "triangles": [ 85 0, 86 1 87 ], 88 "threshold": 0.99 89 }, 90 { 91 "kind": "adjacent_triangles_normal_dot_gt", 92 "triangles": [ 93 0, 94 2 95 ], 96 "threshold": 0.99 97 } 98 ] 99 } 100}