Me506 — remove_almost_degenerate_faces cap_flip_fails: existing edge v2-v3 blocks flip; collapse fallback (Branch 7)

§12.14 mesh defects (sub-class: almost-degenerate-face / cap-flip-fails)

topology

Sources

Description

Cap triangle t0=(v0,v1,v2) with v2=(1,0.0001,0) as cap vertex. Interior base v0-v1 (n=2) is shared with below-neighbor t1=(v1,v0,v3). Flipping v0-v1 would create edge v2-v3, but blocking triangle t2=(v2,v3,v4) already introduces v2-v3 as a boundary edge (n=1). The link condition for the flip fails → algorithm collapses a cap edge instead.

Reproducer recipe

v0=(0,0,0), v1=(2,0,0), v2=(1,0.0001,0), v3=(1,-1,0), v4=(0.5,-0.5,0); t0=(v0,v1,v2), t1=(v1,v0,v3), t2=(v2,v3,v4), t3=(v0,v4,v2); edge_shared(v0,v1,2); edge_shared(v2,v3,1); triangle_area_lt(0,0.001); triangle_aspect_ratio_gt(0,1000).

Expected kernel behavior

Branch 7 fires; does_satisfy_link_condition(flip_edge) false; collapse fallback attempted on a cap edge.

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      2.0,
10      0.0,
11      0.0
12    ],
13    [
14      1.0,
15      0.0001,
16      0.0
17    ],
18    [
19      1.0,
20      -1.0,
21      0.0
22    ],
23    [
24      0.5,
25      -0.5,
26      0.0
27    ]
28  ],
29  "triangles": [
30    [
31      0,
32      1,
33      2
34    ],
35    [
36      1,
37      0,
38      3
39    ],
40    [
41      2,
42      3,
43      4
44    ],
45    [
46      0,
47      4,
48      2
49    ]
50  ],
51  "metadata": {
52    "id": "Me506",
53    "schema_version": 0,
54    "defect_class": "cap_triangle",
55    "title": "remove_almost_degenerate_faces cap_flip_fails: existing edge v2-v3 blocks flip; collapse fallback for cap v2=(1,0.0001,0) (Branch 7)",
56    "assertions": [
57      {
58        "kind": "edge_shared_by_n_triangles",
59        "edge": [
60          0,
61          1
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": "triangle_area_lt",
75        "triangle": 0,
76        "lt": 0.001
77      },
78      {
79        "kind": "triangle_aspect_ratio_gt",
80        "triangle": 0,
81        "gt": 1000.0
82      }
83    ]
84  }
85}