Me505 — remove_almost_degenerate_faces cap_border_edge: cap long base on boundary; remove_face path (Branch 6)

§12.14 mesh defects (sub-class: almost-degenerate-face / cap-border-edge)

topology

Sources

Description

Cap triangle t0=(v0,v1,v2) with v2=(1,0.0001,0) as cap vertex. The long opposite base edge v0-v1 (length 2.0) is a boundary edge (n=1). The cap's long edges v0-v2 and v1-v2 are shared with upper support triangles (n=2). is_border returns true for the opposite halfedge of the cap vertex → algorithm removes the face.

Reproducer recipe

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

Expected kernel behavior

Branch 6 fires; is_border(opposite(cap_halfedge)) true; face removed.

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      0.0,
20      1.0,
21      0.0
22    ],
23    [
24      2.0,
25      1.0,
26      0.0
27    ]
28  ],
29  "triangles": [
30    [
31      0,
32      1,
33      2
34    ],
35    [
36      0,
37      2,
38      3
39    ],
40    [
41      3,
42      2,
43      4
44    ],
45    [
46      2,
47      1,
48      4
49    ]
50  ],
51  "metadata": {
52    "id": "Me505",
53    "schema_version": 0,
54    "defect_class": "cap_triangle",
55    "title": "remove_almost_degenerate_faces cap_border_edge: cap v2=(1,0.0001,0); long base v0-v1 on boundary (n=1); remove_face path (Branch 6)",
56    "assertions": [
57      {
58        "kind": "edge_shared_by_n_triangles",
59        "edge": [
60          0,
61          1
62        ],
63        "n": 1
64      },
65      {
66        "kind": "edge_shared_by_n_triangles",
67        "edge": [
68          0,
69          2
70        ],
71        "n": 2
72      },
73      {
74        "kind": "edge_shared_by_n_triangles",
75        "edge": [
76          1,
77          2
78        ],
79        "n": 2
80      },
81      {
82        "kind": "triangle_area_lt",
83        "triangle": 0,
84        "lt": 0.001
85      },
86      {
87        "kind": "triangle_aspect_ratio_gt",
88        "triangle": 0,
89        "gt": 1000.0
90      }
91    ]
92  }
93}