Me012 — inconsistent face orientation: triangle 2 wound CW inside CCW mesh

§12.14 mesh defects (sub-class: orientation/inconsistent)

topology

Sources

Description

a 4-triangle patch has three faces wound CCW (normal +Z) and one face wound CW (normal -Z). Triangles 2 and 3 share edge `(v1,v5)` but their normals are antiparallel (dot product < 0), causing a visible seam in shading and incorrect CSG Boolean results.

Reproducer recipe

6 vertices on a 2×2 grid; face 0 = `(v0,v1,v3)`, face 1 = `(v1,v4,v3)` — both CCW; face 2 = `(v1,v5,v2)` — CW (swapped from `(v1,v2,v5)`); face 3 = `(v1,v5,v4)` — CCW. Faces 2 and 3 share edge `(v1,v5)` with opposite normals.

Expected kernel behavior

propagate consistent orientation (e.g. BFS from any seed face) and flip triangle 2 to match its neighbors.

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      2.0,
15      0.0,
16      0.0
17    ],
18    [
19      0.0,
20      1.0,
21      0.0
22    ],
23    [
24      1.0,
25      1.0,
26      0.0
27    ],
28    [
29      2.0,
30      1.0,
31      0.0
32    ]
33  ],
34  "triangles": [
35    [
36      0,
37      1,
38      3
39    ],
40    [
41      1,
42      4,
43      3
44    ],
45    [
46      1,
47      5,
48      2
49    ],
50    [
51      1,
52      5,
53      4
54    ]
55  ],
56  "metadata": {
57    "id": "Me012",
58    "schema_version": 0,
59    "defect_class": "inconsistent_face_orientation",
60    "title": "inconsistent face orientation: triangle 2 wound CW inside CCW mesh",
61    "assertions": [
62      {
63        "kind": "adjacent_triangles_inconsistent_winding",
64        "triangles": [
65          2,
66          3
67        ]
68      }
69    ]
70  }
71}