Me484 — removeTriangles triangle_removal: T.removeCell+delete t; collinear t2=[v0,v1,v2] is orphan to be removed (Branch 5)

§12.14 mesh defects (sub-class: orphan-triangle-cleanup / triangle-removal)

topology

Sources

Description

Three-triangle fan. t2 = [v0, v1, v2] is degenerate: v0=(0,0,0), v1=(2,0,0), v2=(1,0,0) are collinear on y=0, so area=0. This is the triangle that would have its edge pointer nulled upstream and then be removed by T.removeCell in Branch 5. The two healthy triangles t0=(v0,v3,v2) and t1=(v1,v2,v3) remain as survivors. v2 lies at the midpoint of segment v0-v1.

Reproducer recipe

v0=(0,0,0), v1=(2,0,0), v2=(1,0,0) midpoint, v3=(1,1,0); t0=(v0,v3,v2) area=0.5, t1=(v1,v2,v3) area=0.5, t2=(v0,v1,v2) area=0 (collinear); assert_triangle_area_lt(2,1e-12); vertex_on_edge(v2,v0,v1); edge_shared(v0,v1,2).

Expected kernel behavior

Branch 5 fires; T.removeCell(n) unlinks t2; delete t frees memory.

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.0,
16      0.0
17    ],
18    [
19      1.0,
20      1.0,
21      0.0
22    ]
23  ],
24  "triangles": [
25    [
26      0,
27      3,
28      2
29    ],
30    [
31      1,
32      2,
33      3
34    ],
35    [
36      0,
37      1,
38      2
39    ]
40  ],
41  "metadata": {
42    "id": "Me484",
43    "schema_version": 0,
44    "defect_class": "degenerate_triangle",
45    "title": "removeTriangles triangle_removal: T.removeCell+delete t; t2=[v0,v1,v2] is collinear orphan to be removed (Branch 5)",
46    "assertions": [
47      {
48        "kind": "triangle_area_lt",
49        "triangle": 2,
50        "lt": 1e-12
51      },
52      {
53        "kind": "triangle_area_lt",
54        "triangle": 0,
55        "lt": 1.0
56      },
57      {
58        "kind": "triangle_area_lt",
59        "triangle": 1,
60        "lt": 1.0
61      },
62      {
63        "kind": "vertex_on_edge",
64        "vertex": 2,
65        "edge": [
66          0,
67          1
68        ]
69      }
70    ]
71  }
72}