Me891 — merge_duplicated_vertices_in_boundary_cycles cycle_iteration: 2-patch mesh; extract_boundary_cycles finds 2 boundary cycles; for-loop iterates both; coincident pairs on each (Branch 2)

§12.14 mesh defects (sub-class: coincident-boundary-vertex / multi-cycle-dispatch)

topology

Sources

Description

Two disjoint open-disk patches (4 triangles total) in the same mesh object, forming two independent boundary cycles. Patch A: a0-a1-a2-a3 with a1 and a3 coincident at (1,0,0). Patch B: b0-b1-b2-b3 with b1 and b3 coincident at (4,0,0). extract_boundary_cycles finds two cycles (one per patch); the for-loop iterates twice, calling merge_duplicated_vertices_in_boundary_cycle for each → Branch 2 fires on both iterations. Each patch: interior edge n=2, four boundary edges n=1. Euler: V=8, E=10, F=4, chi=2 (two disjoint open disks).

Reproducer recipe

Patch A: a0=(0,0,0), a1=(1,0,0), a2=(0.5,1,0), a3=(1,0,0) [=a1]; t0=(a0,a1,a2), t1=(a0,a2,a3). Patch B: b0=(3,0,0), b1=(4,0,0), b2=(3.5,1,0), b3=(4,0,0) [=b1]; t2=(b0,b1,b2), t3=(b0,b2,b3). Interior edges n=2; boundary edges n=1; coincident pairs vertex_pair_distance_lt(a1,a3,1e-9) and vertex_pair_distance_lt(b1,b3,1e-9); euler V=8,E=10,F=4,chi=2.

Expected kernel behavior

Branch 2 fires; for-loop body executes twice (once per patch); merge_duplicated_vertices_in_boundary_cycle is invoked with the representative halfedge of each boundary cycle independently.

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.0,
20      0.0,
21      0.0
22    ],
23    [
24      3.0,
25      0.0,
26      0.0
27    ],
28    [
29      4.0,
30      0.0,
31      0.0
32    ],
33    [
34      3.5,
35      1.0,
36      0.0
37    ],
38    [
39      4.0,
40      0.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      5,
58      6
59    ],
60    [
61      4,
62      6,
63      7
64    ]
65  ],
66  "metadata": {
67    "id": "Me891",
68    "schema_version": 0,
69    "defect_class": "near_coincident_vertex",
70    "title": "merge_duplicated_vertices_in_boundary_cycles cycle_iteration: 2-patch mesh; extract_boundary_cycles finds 2 boundary cycles; for-loop iterates both; coincident pairs on each (Branch 2)",
71    "assertions": [
72      {
73        "kind": "edge_shared_by_n_triangles",
74        "edge": [
75          0,
76          2
77        ],
78        "n": 2
79      },
80      {
81        "kind": "edge_shared_by_n_triangles",
82        "edge": [
83          4,
84          6
85        ],
86        "n": 2
87      },
88      {
89        "kind": "edge_shared_by_n_triangles",
90        "edge": [
91          0,
92          1
93        ],
94        "n": 1
95      },
96      {
97        "kind": "edge_shared_by_n_triangles",
98        "edge": [
99          1,
100          2
101        ],
102        "n": 1
103      },
104      {
105        "kind": "edge_shared_by_n_triangles",
106        "edge": [
107          2,
108          3
109        ],
110        "n": 1
111      },
112      {
113        "kind": "edge_shared_by_n_triangles",
114        "edge": [
115          0,
116          3
117        ],
118        "n": 1
119      },
120      {
121        "kind": "edge_shared_by_n_triangles",
122        "edge": [
123          4,
124          5
125        ],
126        "n": 1
127      },
128      {
129        "kind": "edge_shared_by_n_triangles",
130        "edge": [
131          5,
132          6
133        ],
134        "n": 1
135      },
136      {
137        "kind": "edge_shared_by_n_triangles",
138        "edge": [
139          6,
140          7
141        ],
142        "n": 1
143      },
144      {
145        "kind": "edge_shared_by_n_triangles",
146        "edge": [
147          4,
148          7
149        ],
150        "n": 1
151      },
152      {
153        "kind": "vertex_pair_distance_lt",
154        "pair": [
155          1,
156          3
157        ],
158        "lt": 1e-09
159      },
160      {
161        "kind": "vertex_pair_no_shared_triangle",
162        "pair": [
163          1,
164          3
165        ]
166      },
167      {
168        "kind": "vertex_pair_distance_lt",
169        "pair": [
170          5,
171          7
172        ],
173        "lt": 1e-09
174      },
175      {
176        "kind": "vertex_pair_no_shared_triangle",
177        "pair": [
178          5,
179          7
180        ]
181      },
182      {
183        "kind": "euler_characteristic",
184        "v": 8,
185        "e": 10,
186        "f": 4,
187        "chi": 2
188      }
189    ]
190  }
191}