Me1046 — stitch_borders single-pass-manifold-filtering: global mode (per_cc=false) single CC; manifold_halfedge_pairs called once for all collected pairs (Branch 7)

§12.14 mesh defects (sub-class: boundary_gap_thin / global-manifold-filter)

topology

Sources

Description

A single connected component with three triangles: t0=(v0,v1,v2), t1=(v1,v3,v2) sharing interior edge (v1,v2) (n=2), and t2=(v1,v4,v5) connected via shared vertex v1. Vertices v4≈v2 and v5≈v3 are coincident with boundary vertices, forming a stitchable seam. With per_cc=false (single CC, else branch), the dispatcher collects all border halfedges globally and calls manifold_halfedge_pairs once for all candidate pairs. Branch 7 fires when the else branch is entered. Euler: V=6, E=8, F=3, chi=1.

Reproducer recipe

v0=(0,0,0), v1=(1,0,0), v2=(0.5,1,0), v3=(1.5,0,0), v4=(0.5,1,0)[=v2], v5=(1.5,0,0)[=v3]; t0=(v0,v1,v2), t1=(v1,v3,v2), t2=(v1,v4,v5); assert_edge_shared(v1,v2,2); vertex_pair_distance_lt(v2,v4,1e-9); vertex_pair_distance_lt(v3,v5,1e-9); vertex_pair_no_shared_triangle(v2,v4); euler V=6,E=8,F=3,chi=1.

Expected kernel behavior

Branch 7 fires; else path taken (per_cc=false); single global manifold_halfedge_pairs call filters all collected pairs at once before stitching.

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      1.5,
20      0.0,
21      0.0
22    ],
23    [
24      0.5,
25      1.0,
26      0.0
27    ],
28    [
29      1.5,
30      0.0,
31      0.0
32    ]
33  ],
34  "triangles": [
35    [
36      0,
37      1,
38      2
39    ],
40    [
41      1,
42      3,
43      2
44    ],
45    [
46      1,
47      4,
48      5
49    ]
50  ],
51  "metadata": {
52    "id": "Me1046",
53    "schema_version": 0,
54    "defect_class": "boundary_gap_thin",
55    "title": "stitch_borders single-pass-manifold-filtering: global mode (per_cc=false) single CC; manifold_halfedge_pairs called once for all collected pairs",
56    "assertions": [
57      {
58        "kind": "edge_shared_by_n_triangles",
59        "edge": [
60          1,
61          2
62        ],
63        "n": 2
64      },
65      {
66        "kind": "edge_shared_by_n_triangles",
67        "edge": [
68          2,
69          3
70        ],
71        "n": 1
72      },
73      {
74        "kind": "edge_shared_by_n_triangles",
75        "edge": [
76          4,
77          5
78        ],
79        "n": 1
80      },
81      {
82        "kind": "vertex_pair_distance_lt",
83        "pair": [
84          2,
85          4
86        ],
87        "lt": 1e-09
88      },
89      {
90        "kind": "vertex_pair_distance_lt",
91        "pair": [
92          3,
93          5
94        ],
95        "lt": 1e-09
96      },
97      {
98        "kind": "vertex_pair_no_shared_triangle",
99        "pair": [
100          2,
101          4
102        ]
103      },
104      {
105        "kind": "vertex_pair_no_shared_triangle",
106        "pair": [
107          3,
108          5
109        ]
110      },
111      {
112        "kind": "edge_shared_by_n_triangles",
113        "edge": [
114          0,
115          1
116        ],
117        "n": 1
118      },
119      {
120        "kind": "edge_shared_by_n_triangles",
121        "edge": [
122          0,
123          2
124        ],
125        "n": 1
126      },
127      {
128        "kind": "edge_shared_by_n_triangles",
129        "edge": [
130          1,
131          3
132        ],
133        "n": 1
134      },
135      {
136        "kind": "edge_shared_by_n_triangles",
137        "edge": [
138          1,
139          4
140        ],
141        "n": 1
142      },
143      {
144        "kind": "edge_shared_by_n_triangles",
145        "edge": [
146          1,
147          5
148        ],
149        "n": 1
150      },
151      {
152        "kind": "euler_characteristic",
153        "v": 6,
154        "e": 8,
155        "f": 3,
156        "chi": 1
157      }
158    ]
159  }
160}