mesh-examples/12-14-mesh/Me431.mesh.json
Sources
- MeshFix `checkAndRepair::forceNormalConsistence` Branch 2 (*ADJACENT_NORMAL_T2_INCONSISTENT*: `if (!t->checkAdjNor(t2)) { t2->invert()
- }`)
- `MESH_HEAL_COVERAGE.md`.
Description
Three triangles. t0=(v0,v1,v2) is the reference (+z normal). t1=(v1,v0,v3) shares edge (v0,v1) in the correct opposite sense (v1→v0) → consistent +z normal. t2=(v1,v2,v4) shares edge (v1,v2) in the SAME sense as t0 (both v1→v2), giving t2 a −z normal — ADJACENT_NORMAL_T2_INCONSISTENT. The inconsistency is on the SECOND edge checked (e2), triggering Branch 2. V=5, two interior edges n=2, five boundary edges n=1.
Reproducer recipe
v0=(0,0,0), v1=(1,0,0), v2=(0,1,0), v3=(1,-1,0), v4=(0.5,2,0); t0=(v0,v1,v2), t1=(v1,v0,v3), t2=(v1,v2,v4); assert_edge_shared(v0,v1,2); assert_edge_shared(v1,v2,2); assert_adjacent_triangles_inconsistent_winding(0,2); boundary edges n=1.
Expected kernel behavior
Branch 2 fires; t2->invert() reverses t2's winding to align its normal with t0's +z orientation.
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 1.0, 10 0.0, 11 0.0 12 ], 13 [ 14 0.0, 15 1.0, 16 0.0 17 ], 18 [ 19 1.0, 20 -1.0, 21 0.0 22 ], 23 [ 24 0.5, 25 2.0, 26 0.0 27 ] 28 ], 29 "triangles": [ 30 [ 31 0, 32 1, 33 2 34 ], 35 [ 36 1, 37 0, 38 3 39 ], 40 [ 41 1, 42 2, 43 4 44 ] 45 ], 46 "metadata": { 47 "id": "Me431", 48 "schema_version": 0, 49 "defect_class": "inconsistent_face_orientation", 50 "title": "forceNormalConsistence t2-inconsistent: adjacent triangle flipped across shared edge e2 (Branch 2)", 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 1, 64 2 65 ], 66 "n": 2 67 }, 68 { 69 "kind": "adjacent_triangles_inconsistent_winding", 70 "triangles": [ 71 0, 72 2 73 ] 74 }, 75 { 76 "kind": "edge_shared_by_n_triangles", 77 "edge": [ 78 0, 79 2 80 ], 81 "n": 1 82 }, 83 { 84 "kind": "edge_shared_by_n_triangles", 85 "edge": [ 86 0, 87 3 88 ], 89 "n": 1 90 }, 91 { 92 "kind": "edge_shared_by_n_triangles", 93 "edge": [ 94 1, 95 3 96 ], 97 "n": 1 98 }, 99 { 100 "kind": "edge_shared_by_n_triangles", 101 "edge": [ 102 2, 103 4 104 ], 105 "n": 1 106 }, 107 { 108 "kind": "edge_shared_by_n_triangles", 109 "edge": [ 110 1, 111 4 112 ], 113 "n": 1 114 } 115 ] 116 } 117}