Me565 — loopSubdivision edge_swap_candidacy: diagonal (v2,v3) connects new midpoint v2 to old vertex v3; poor aspect ratio motivates IS_VISITED2 swap (Branch 6)

§12.14 mesh defects (sub-class: loop-subdivision / post-split-swap)

topology

Sources

Description

Four triangles (t0–t3) arranged around a swap-candidate diagonal (v2,v3). v2=(1,0.1,0) is a near-base midpoint vertex (the IS_VISITED2 newly-inserted vertex after split); v3=(1,2,0) is an original old vertex. The diagonal (v2,v3) is interior (n=2, shared by t1 and t2). t0=(v0,v1,v2) is a very thin triangle (height≈0.1, base=2.0) with aspect ratio > 4; this poor quality motivates the post-split edge swap when IS_VISITED2(v2)≠IS_VISITED2(v3). Euler: V=5, E=8, F=4, chi=1.

Reproducer recipe

v0=(0,0,0), v1=(2,0,0), v2=(1,0.1,0) midpoint, v3=(1,2,0) apex, v4=(0,2,0); t0=(0,1,2), t1=(1,3,2), t2=(0,2,3), t3=(0,3,4); assert_edge_shared(v2,v3,2) swap-candidate; assert_triangle_aspect_ratio_gt(t0,4.0); euler V=5,E=8,F=4,chi=1.

Expected kernel behavior

Branch 6 fires on edge (v2,v3); IS_VISITED2(v2)=true (new midpoint), IS_VISITED2(v3)=false (original vertex); condition true → e->swap() called to improve aspect ratios.

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.5
7    ],
8    [
9      2.0,
10      0.0,
11      -0.5
12    ],
13    [
14      3.0,
15      1.0,
16      0.5
17    ],
18    [
19      2.0,
20      2.0,
21      -0.5
22    ],
23    [
24      0.0,
25      2.0,
26      0.5
27    ],
28    [
29      -1.0,
30      1.0,
31      -0.5
32    ],
33    [
34      1.0,
35      1.0,
36      0.0
37    ]
38  ],
39  "triangles": [
40    [
41      0,
42      1,
43      6
44    ],
45    [
46      1,
47      2,
48      6
49    ],
50    [
51      2,
52      3,
53      6
54    ],
55    [
56      3,
57      4,
58      6
59    ],
60    [
61      4,
62      5,
63      6
64    ],
65    [
66      5,
67      0,
68      6
69    ]
70  ],
71  "metadata": {
72    "id": "Me593",
73    "schema_version": 0,
74    "defect_class": "hole_in_hull",
75    "title": "holeFilling_TriangulateHole_normal_computation_failure: saddle-shaped hole boundary produces anti-parallel fill normals summing to zero; nor.isNull fires (Branch 4)",
76    "assertions": [
77      {
78        "kind": "edge_shared_by_n_triangles",
79        "edge": [
80          0,
81          6
82        ],
83        "n": 2
84      },
85      {
86        "kind": "edge_shared_by_n_triangles",
87        "edge": [
88          1,
89          6
90        ],
91        "n": 2
92      },
93      {
94        "kind": "edge_shared_by_n_triangles",
95        "edge": [
96          2,
97          6
98        ],
99        "n": 2
100      },
101      {
102        "kind": "edge_shared_by_n_triangles",
103        "edge": [
104          3,
105          6
106        ],
107        "n": 2
108      },
109      {
110        "kind": "edge_shared_by_n_triangles",
111        "edge": [
112          4,
113          6
114        ],
115        "n": 2
116      },
117      {
118        "kind": "edge_shared_by_n_triangles",
119        "edge": [
120          5,
121          6
122        ],
123        "n": 2
124      },
125      {
126        "kind": "edge_shared_by_n_triangles",
127        "edge": [
128          0,
129          1
130        ],
131        "n": 1
132      },
133      {
134        "kind": "edge_shared_by_n_triangles",
135        "edge": [
136          1,
137          2
138        ],
139        "n": 1
140      },
141      {
142        "kind": "edge_shared_by_n_triangles",
143        "edge": [
144          2,
145          3
146        ],
147        "n": 1
148      },
149      {
150        "kind": "edge_shared_by_n_triangles",
151        "edge": [
152          3,
153          4
154        ],
155        "n": 1
156      },
157      {
158        "kind": "edge_shared_by_n_triangles",
159        "edge": [
160          4,
161          5
162        ],
163        "n": 1
164      },
165      {
166        "kind": "edge_shared_by_n_triangles",
167        "edge": [
168          0,
169          5
170        ],
171        "n": 1
172      },
173      {
174        "kind": "hole_boundary",
175        "loop": [
176          0,
177          1,
178          2,
179          3,
180          4,
181          5
182        ]
183      },
184      {
185        "kind": "euler_characteristic",
186        "v": 7,
187        "e": 12,
188        "f": 6,
189        "chi": 1
190      }
191    ]
192  }
193}