Me179 — orient opposite_orientation_edge: reverse-direction shared edge correctly pairs two CCW triangles

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

topology

Sources

Description

Two consistently CCW triangles share edge {v0,v1} with opposite directed traversal — t0 uses directed edge v0→v1; t1 uses directed edge v1→v0. This is the correct manifold pairing. Branch 10 fires when the orient DFS checks the reverse-direction edge map and finds a unique neighbor. A third CW triangle (t2) is added to demonstrate the inconsistency that Branch 10 avoids.

Reproducer recipe

v0=(0,0,0), v1=(1,0,0), v2=(0.5,1,0), v3=(0.5,-1,0), v4=(0.5,2,0); t0=(v0,v1,v2) CCW; t1=(v1,v0,v3) CCW (opposite directed shared edge); t2=(v0,v4,v2) CW (contrast defect).

Expected kernel behavior

opposite-direction edge recognized as correct pairing by Branch 10; t1 pushed as consistently oriented; t2 detected as inconsistent.

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.5,
15      1.0,
16      0.0
17    ],
18    [
19      0.5,
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      0,
42      4,
43      2
44    ]
45  ],
46  "metadata": {
47    "id": "Me179",
48    "schema_version": 0,
49    "defect_class": "inconsistent_winding",
50    "title": "orient opposite_orientation_edge: reverse-direction shared edge correctly pairs two CCW triangles",
51    "assertions": [
52      {
53        "kind": "edge_shared_by_n_triangles",
54        "edge": [
55          0,
56          1
57        ],
58        "n": 2
59      },
60      {
61        "kind": "triangle_normal_z_negative",
62        "triangle": 2
63      },
64      {
65        "kind": "edge_shared_by_n_triangles",
66        "edge": [
67          0,
68          2
69        ],
70        "n": 2
71      },
72      {
73        "kind": "adjacent_triangles_inconsistent_winding",
74        "triangles": [
75          0,
76          2
77        ]
78      }
79    ]
80  }
81}