mesh-examples/12-14-mesh/Me910.mesh.json
Sources
- MeshFix `di_cell.selectIntersections` Branch 1 (*Redundant pair-test detection*: `t->info != NULL && t->info->containsNode(s) → continue`)
- `MESH_HEAL_COVERAGE.md`.
Description
Two triangles with a proper transverse self-intersection whose bounding boxes straddle the octree cell boundary at y=0. t0=(-1,0,0),(1,0,0),(0,0,2) in the XZ plane; t1=(0,-1,1),(0,1,1),(2,0,1) crossing at z=1. Edge (v3,v4) of t1 pierces t0's interior; edge (v1,v2) of t0 pierces t1's interior. Because both triangles appear on both sides of y=0, di_cell.selectIntersections encounters the same (t0,t1) pair in two cells. On the second encounter t0->info already contains a node for t1 → containsNode(t1)==true → Branch 1 fires and the re-test is skipped.
Reproducer recipe
v0=(-1,0,0), v1=(1,0,0), v2=(0,0,2); v3=(0,-1,1), v4=(0,1,1), v5=(2,0,1); t0=(v0,v1,v2), t1=(v3,v4,v5); assert_vertex_pair_no_shared_triangle(v0,v3); assert_vertex_pair_no_shared_triangle(v1,v4); assert_triangles_self_intersect(0,1).
Expected kernel behavior
Branch 1 fires on second cell encounter; containsNode(t1)==true → continue; duplicate intersection test skipped.
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 0.0, 6 0.0 7 ], 8 [ 9 1.0, 10 0.0, 11 0.0 12 ], 13 [ 14 0.0, 15 0.0, 16 2.0 17 ], 18 [ 19 0.0, 20 -1.0, 21 1.0 22 ], 23 [ 24 0.0, 25 1.0, 26 1.0 27 ], 28 [ 29 2.0, 30 0.0, 31 1.0 32 ] 33 ], 34 "triangles": [ 35 [ 36 0, 37 1, 38 2 39 ], 40 [ 41 3, 42 4, 43 5 44 ] 45 ], 46 "metadata": { 47 "id": "Me910", 48 "schema_version": 0, 49 "defect_class": "self_intersection_face_pair", 50 "title": "di_cell.selectIntersections redundant-pair-test: crossing pair cached in t->info; containsNode returns true \u2192 second-cell test skipped (Branch 1)", 51 "assertions": [ 52 { 53 "kind": "vertex_pair_no_shared_triangle", 54 "pair": [ 55 0, 56 3 57 ] 58 }, 59 { 60 "kind": "vertex_pair_no_shared_triangle", 61 "pair": [ 62 1, 63 4 64 ] 65 }, 66 { 67 "kind": "triangles_self_intersect", 68 "triangles": [ 69 0, 70 1 71 ] 72 } 73 ] 74 } 75}