Me981 — merge_reversible_connected_components orientation_flip_feasibility: Patch-B wound CW vs Patch-A CCW; flip Patch-B enables stitch (Branch 2)

§12.14 mesh defects (sub-class: multi-component / orientation-flip)

topology

Sources

Description

Two disconnected flat quad patches (each two triangles). Patch A at z=0 is wound CCW (normal=+Z). Patch B at z=0.001 covers the same XY rectangle but wound CW (normal=-Z; inverted). Their boundary loops are geometrically coincident after flip. The orientation_flip_feasibility branch fires: flipping Patch B's winding makes its border halfedges align with Patch A's, enabling stitch_borders to merge them. Interior diagonal of each patch shared by 2 triangles. Euler: V=8, E=10, F=4, chi=2.

Reproducer recipe

a0-a3 at z=0 CCW; b0-b3 at z=0.001 CW (t2,t3 reversed winding); assert_triangle_not_reachable_from(2,0); assert_edge_shared(a0,a2,2); assert_edge_shared(b0,b2,2); assert_triangle_normal_z_negative(2); euler V=8,E=10,F=4,chi=2.

Expected kernel behavior

Branch 2 fires; can_stitch_after_flip returns true because reversing Patch B's winding aligns its boundary halfedges with Patch A's boundary; reverse_face_orientations + stitch_borders merge the two components.

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      1.0,
15      1.0,
16      0.0
17    ],
18    [
19      0.0,
20      1.0,
21      0.0
22    ],
23    [
24      0.0,
25      0.0,
26      0.001
27    ],
28    [
29      1.0,
30      0.0,
31      0.001
32    ],
33    [
34      1.0,
35      1.0,
36      0.001
37    ],
38    [
39      0.0,
40      1.0,
41      0.001
42    ]
43  ],
44  "triangles": [
45    [
46      0,
47      1,
48      2
49    ],
50    [
51      0,
52      2,
53      3
54    ],
55    [
56      4,
57      6,
58      5
59    ],
60    [
61      4,
62      7,
63      6
64    ]
65  ],
66  "metadata": {
67    "id": "Me981",
68    "schema_version": 0,
69    "defect_class": "inverted_normals",
70    "title": "merge_reversible_connected_components orientation_flip_feasibility: Patch-B wound CW vs Patch-A CCW; flip Patch-B enables stitch (Branch 2)",
71    "assertions": [
72      {
73        "kind": "triangle_not_reachable_from",
74        "target": 2,
75        "source": 0
76      },
77      {
78        "kind": "edge_shared_by_n_triangles",
79        "edge": [
80          0,
81          2
82        ],
83        "n": 2
84      },
85      {
86        "kind": "edge_shared_by_n_triangles",
87        "edge": [
88          4,
89          6
90        ],
91        "n": 2
92      },
93      {
94        "kind": "triangle_normal_z_negative",
95        "triangle": 2
96      },
97      {
98        "kind": "euler_characteristic",
99        "v": 8,
100        "e": 10,
101        "f": 4,
102        "chi": 2
103      }
104    ]
105  }
106}