mesh-examples/12-14-mesh/Me424.mesh.json
Sources
- MeshFix `checkAndRepair::removeOverlappingTriangles` Branch 5 (*SWAP_CREATES_T2_OVERLAP_NEXT*: `else if (e->t2->nextEdge(e)->overlaps())`)
- `MESH_HEAL_COVERAGE.md`.
Description
Three coplanar triangles. t0=(v0,v1,v2) and t1=(v0,v1,v3) share overlapping edge (v0=(0,0), v1=(3,0)); v3=(1.5,1) is inside t0 → primary overlap. t3=(v2,v3,v4) with v4=(2,2) neighbors the second incident triangle of the edge via the post-swap edge (v2,v3) (that triangle's next-edge). After swapping, the new t2-side triangle's next-edge overlaps t3 → Branch 5 fires, swap is undone.
Reproducer recipe
v0=(0,0,0), v1=(3,0,0), v2=(1.5,3,0), v3=(1.5,1,0), v4=(2,2,0); t0=(v0,v1,v2), t1=(v0,v1,v3), t3=(v2,v3,v4); assert_edge_shared(v0,v1,2); assert_edge_shared(v2,v3,1); assert_triangles_self_intersect(0,1); assert_adjacent_triangles_normal_dot_gt(0,1,0.99).
Expected kernel behavior
Branch 5 fires; after swap, `e->t2->nextEdge(e)->overlaps()` evaluates true; swap is undone via `e->swap(1)`.
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 3.0, 10 0.0, 11 0.0 12 ], 13 [ 14 1.5, 15 3.0, 16 0.0 17 ], 18 [ 19 1.5, 20 1.0, 21 0.0 22 ], 23 [ 24 2.0, 25 2.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 2, 42 3, 43 4 44 ] 45 ], 46 "metadata": { 47 "id": "Me424", 48 "schema_version": 0, 49 "defect_class": "overlapping_triangles", 50 "title": "removeOverlappingTriangles SWAP_CREATES_T2_OVERLAP_NEXT: swap creates new overlap on t2->nextEdge (Branch 5)", 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 2, 64 3 65 ], 66 "n": 1 67 }, 68 { 69 "kind": "triangles_self_intersect", 70 "triangles": [ 71 0, 72 1 73 ] 74 }, 75 { 76 "kind": "adjacent_triangles_normal_dot_gt", 77 "triangles": [ 78 0, 79 1 80 ], 81 "threshold": 0.99 82 } 83 ] 84 } 85}