mesh-examples/12-14-mesh/Me432.mesh.json
Sources
- MeshFix `checkAndRepair::forceNormalConsistence` Branch 3 (*ADJACENT_NORMAL_T3_INCONSISTENT*: `if (!t->checkAdjNor(t3)) { t3->invert()
- }`)
- `MESH_HEAL_COVERAGE.md`.
Description
Four triangles. t0=(v0,v1,v2) is the reference (+z normal, edges e1=(v0,v1), e2=(v1,v2), e3=(v2,v0)). t1=(v1,v0,v3) shares e1 in opposite sense → consistent +z. t2=(v2,v1,v4) shares e2 in opposite sense → consistent +z. t3=(v2,v0,v5) shares e3 in SAME sense as t0 (both list v2→v0 direction) → normal −z: ADJACENT_NORMAL_T3_INCONSISTENT. Branch 3 fires on the THIRD neighbour check. V=6, three interior edges n=2, six boundary edges n=1.
Reproducer recipe
v0=(0,0,0), v1=(2,0,0), v2=(1,2,0), v3=(3,-1,0), v4=(2,3,0), v5=(-1,1,0); t0=(v0,v1,v2), t1=(v1,v0,v3), t2=(v2,v1,v4), t3=(v2,v0,v5); interior edges (v0,v1),(v1,v2),(v0,v2) n=2; assert_adjacent_triangles_inconsistent_winding(0,3).
Expected kernel behavior
Branch 3 fires; t3->invert() reverses t3's winding to align its normal with t0's +z orientation; r=1 signals a fix.
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 2.0, 10 0.0, 11 0.0 12 ], 13 [ 14 1.0, 15 2.0, 16 0.0 17 ], 18 [ 19 3.0, 20 -1.0, 21 0.0 22 ], 23 [ 24 2.0, 25 3.0, 26 0.0 27 ], 28 [ 29 -1.0, 30 1.0, 31 0.0 32 ] 33 ], 34 "triangles": [ 35 [ 36 0, 37 1, 38 2 39 ], 40 [ 41 1, 42 0, 43 3 44 ], 45 [ 46 2, 47 1, 48 4 49 ], 50 [ 51 2, 52 0, 53 5 54 ] 55 ], 56 "metadata": { 57 "id": "Me432", 58 "schema_version": 0, 59 "defect_class": "inconsistent_face_orientation", 60 "title": "forceNormalConsistence t3-inconsistent: adjacent triangle flipped across shared edge e3 (Branch 3)", 61 "assertions": [ 62 { 63 "kind": "edge_shared_by_n_triangles", 64 "edge": [ 65 0, 66 1 67 ], 68 "n": 2 69 }, 70 { 71 "kind": "edge_shared_by_n_triangles", 72 "edge": [ 73 1, 74 2 75 ], 76 "n": 2 77 }, 78 { 79 "kind": "edge_shared_by_n_triangles", 80 "edge": [ 81 0, 82 2 83 ], 84 "n": 2 85 }, 86 { 87 "kind": "adjacent_triangles_inconsistent_winding", 88 "triangles": [ 89 0, 90 3 91 ] 92 }, 93 { 94 "kind": "edge_shared_by_n_triangles", 95 "edge": [ 96 0, 97 3 98 ], 99 "n": 1 100 }, 101 { 102 "kind": "edge_shared_by_n_triangles", 103 "edge": [ 104 1, 105 3 106 ], 107 "n": 1 108 }, 109 { 110 "kind": "edge_shared_by_n_triangles", 111 "edge": [ 112 1, 113 4 114 ], 115 "n": 1 116 }, 117 { 118 "kind": "edge_shared_by_n_triangles", 119 "edge": [ 120 2, 121 4 122 ], 123 "n": 1 124 }, 125 { 126 "kind": "edge_shared_by_n_triangles", 127 "edge": [ 128 0, 129 5 130 ], 131 "n": 1 132 }, 133 { 134 "kind": "edge_shared_by_n_triangles", 135 "edge": [ 136 2, 137 5 138 ], 139 "n": 1 140 } 141 ] 142 } 143}