Me1071 — filter_stitchable_pairs border-two-edge-exception: two border halfedges on coincident boundary edge; both border → manifold-safe stitch accepted (Branch 2)

§12.14 mesh defects (sub-class: coincident-boundary-vertex / stitchable-pairs-filter)

topology

Sources

Description

Two triangular patches whose stitchable boundary edges are coincident. Patch A: p0=(0,0,0), p1=(1,0,0), p2=(0.5,1,0). Patch B: q0=(2,0,0), q1=(1,0,0), q2=(0.5,1,0) with q1≡p1 and q2≡p2. After vertex merge the candidate edge (p1,p2) has exactly 2 halfedges — one from each patch — and both are border edges. Branch 2 fires: is_border_edge checks both and passes, accepting the pair as manifold-safe. All 6 edges n=1 boundary. Euler: V=6, E=6, F=2, chi=2.

Reproducer recipe

p0=(0,0,0), p1=(1,0,0), p2=(0.5,1,0); q0=(2,0,0), q1=(1,0,0), q2=(0.5,1,0); t0=(p0,p1,p2), t1=(q0,q1,q2); all 6 edges n=1; vertex_pair_distance_lt(p1,q1,1e-9), vertex_pair_distance_lt(p2,q2,1e-9); vertex_pair_no_shared_triangle pairs; euler V=6,E=6,F=2,chi=2.

Expected kernel behavior

Branch 2 fires; both halfedges on the merged candidate edge are border edges; is_border_edge returns true for both → pair accepted into stitchable output.

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      1.0,
25      0.0,
26      0.0
27    ],
28    [
29      1.0,
30      1.0,
31      0.0
32    ],
33    [
34      2.0,
35      0.0,
36      0.0
37    ],
38    [
39      2.0,
40      1.0,
41      0.0
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      7
59    ],
60    [
61      4,
62      7,
63      5
64    ]
65  ],
66  "metadata": {
67    "id": "Me1010",
68    "schema_version": 0,
69    "defect_class": "open_boundary_stitch_gap",
70    "title": "run_stitch_borders vertex-merge-necessity: h1_tgt representative differs from v_to_keep; redirect to master (Branch 1)",
71    "assertions": [
72      {
73        "kind": "edge_shared_by_n_triangles",
74        "edge": [
75          1,
76          2
77        ],
78        "n": 1
79      },
80      {
81        "kind": "edge_shared_by_n_triangles",
82        "edge": [
83          4,
84          5
85        ],
86        "n": 1
87      },
88      {
89        "kind": "vertex_pair_distance_lt",
90        "pair": [
91          1,
92          4
93        ],
94        "lt": 1e-09
95      },
96      {
97        "kind": "vertex_pair_distance_lt",
98        "pair": [
99          2,
100          5
101        ],
102        "lt": 1e-09
103      },
104      {
105        "kind": "vertex_pair_no_shared_triangle",
106        "pair": [
107          1,
108          4
109        ]
110      },
111      {
112        "kind": "vertex_pair_no_shared_triangle",
113        "pair": [
114          2,
115          5
116        ]
117      },
118      {
119        "kind": "euler_characteristic",
120        "v": 8,
121        "e": 10,
122        "f": 4,
123        "chi": 2
124      }
125    ]
126  }
127}