mesh-examples/12-14-mesh/Me872.mesh.json
Sources
- MeshFix `Basic_TMesh.selectIntersectingTriangles` Branch 3 (*Spatial recursion vs termination*: `if (condition) { fork()
- } else { todo.appendTail(cell)
- }`)
- `MESH_HEAL_COVERAGE.md`.
Description
Two crossing triangles (t0 diagonal in XY, t1 in XZ plane, both sharing apex at origin) embedded in a scene with six surrounding triangles distributed across distinct spatial quadrants. The surrounding triangles populate the outer partition cells (fork() fires when those cells are too large), while the SI pair (t0,t1) ends up in a leaf cell that is small enough to trigger todo.appendTail. Two near-core triangles also exercise the fork→appendTail recursion path at an intermediate level.
Reproducer recipe
v0=(0,0,0); v1=(3,3,0), v2=(3,0,0) for t0; v3=(3,0,3), v4=(3,0,-1) for t1; t0=(v0,v1,v2), t1=(v0,v3,v4) → assert_triangles_self_intersect(t0,t1); four outer-quadrant triangles at ±3..7 in X/Y/Z → assert_triangles_do_not_intersect pairs; two near-core triangles (t6,t7) adjacent to SI pair.
Expected kernel behavior
Branch 3 fires repeatedly as partition recurses; fork() called for outer and intermediate cells; todo.appendTail called once a leaf cell containing the SI pair (t0,t1) is reached; pair-testing at the leaf detects the crossing.
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 3.0, 11 0.0 12 ], 13 [ 14 3.0, 15 0.0, 16 0.0 17 ], 18 [ 19 3.0, 20 0.0, 21 3.0 22 ], 23 [ 24 3.0, 25 0.0, 26 -1.0 27 ], 28 [ 29 -3.0, 30 -3.0, 31 0.0 32 ], 33 [ 34 -1.0, 35 -3.0, 36 0.0 37 ], 38 [ 39 -3.0, 40 -1.0, 41 0.0 42 ], 43 [ 44 5.0, 45 -3.0, 46 0.0 47 ], 48 [ 49 7.0, 50 -3.0, 51 0.0 52 ], 53 [ 54 5.0, 55 -1.0, 56 0.0 57 ], 58 [ 59 -3.0, 60 5.0, 61 0.0 62 ], 63 [ 64 -1.0, 65 5.0, 66 0.0 67 ], 68 [ 69 -3.0, 70 7.0, 71 0.0 72 ], 73 [ 74 5.0, 75 5.0, 76 2.0 77 ], 78 [ 79 7.0, 80 5.0, 81 2.0 82 ], 83 [ 84 5.0, 85 7.0, 86 2.0 87 ], 88 [ 89 1.5, 90 1.5, 91 0.0 92 ], 93 [ 94 2.5, 95 0.5, 96 0.0 97 ], 98 [ 99 1.5, 100 0.5, 101 1.5 102 ], 103 [ 104 2.5, 105 0.5, 106 1.5 107 ] 108 ], 109 "triangles": [ 110 [ 111 0, 112 1, 113 2 114 ], 115 [ 116 0, 117 3, 118 4 119 ], 120 [ 121 5, 122 6, 123 7 124 ], 125 [ 126 8, 127 9, 128 10 129 ], 130 [ 131 11, 132 12, 133 13 134 ], 135 [ 136 14, 137 15, 138 16 139 ], 140 [ 141 17, 142 18, 143 2 144 ], 145 [ 146 19, 147 20, 148 3 149 ] 150 ], 151 "metadata": { 152 "id": "Me872", 153 "schema_version": 0, 154 "defect_class": "self_intersection_face_pair", 155 "title": "selectIntersectingTriangles spatial-recursion vs termination: fork() at outer cells then todo.appendTail at leaf cell containing SI pair (Branch 3)", 156 "assertions": [ 157 { 158 "kind": "triangles_self_intersect", 159 "triangles": [ 160 0, 161 1 162 ] 163 }, 164 { 165 "kind": "triangles_do_not_intersect", 166 "triangles": [ 167 2, 168 3 169 ] 170 }, 171 { 172 "kind": "triangles_do_not_intersect", 173 "triangles": [ 174 4, 175 5 176 ] 177 } 178 ] 179 } 180}