Me751 — simplify_polygons_in_polygon_soup degenerate_polygon_skip: all-same-index triangle (v0,v0,v0) represents size-1 polygon; continue fired (Branch 2)

§12.14 mesh defects (sub-class: degenerate-triangle / polygon-soup-skip)

topology

Sources

Description

Polygon soup containing one fully-degenerate entry (v0,v0,v0) — all three indices reference the same vertex, representing a polygon that has been collapsed to a single locus. This proxies a size-1 polygon soup entry (the state reached after simplify_polygon reduces [v0,v0,v0] → [v0]). The skip guard fires for this entry so simplify_polygon() is never called on degenerate input. A second clean triangle (v1,v2,v3) is present to exercise Branch 1 on a non-degenerate polygon.

Reproducer recipe

v0=(0,0,0); t_degen=(v0,v0,v0) [all-same indices]; v1=(3,0,0), v2=(4,0,0), v3=(3.5,1,0); t_clean=(v1,v2,v3); assert_triangle_area_lt(t_degen,1e-12); three boundary edges on t_clean n=1.

Expected kernel behavior

Branch 2 fires for t_degen (size <= 1 proxy); Branch 1 fires for t_clean; simplified_polygons_n=0.

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      3.0,
10      0.0,
11      0.0
12    ],
13    [
14      4.0,
15      0.0,
16      0.0
17    ],
18    [
19      3.5,
20      1.0,
21      0.0
22    ]
23  ],
24  "triangles": [
25    [
26      0,
27      0,
28      0
29    ],
30    [
31      1,
32      2,
33      3
34    ]
35  ],
36  "metadata": {
37    "id": "Me751",
38    "schema_version": 0,
39    "defect_class": "degenerate_triangle",
40    "title": "simplify_polygons_in_polygon_soup degenerate_polygon_skip: all-same-index triangle (v0,v0,v0) represents size-1 polygon; continue fired (Branch 2)",
41    "assertions": [
42      {
43        "kind": "triangle_area_lt",
44        "triangle": 0,
45        "lt": 1e-12
46      },
47      {
48        "kind": "edge_shared_by_n_triangles",
49        "edge": [
50          1,
51          2
52        ],
53        "n": 1
54      },
55      {
56        "kind": "edge_shared_by_n_triangles",
57        "edge": [
58          2,
59          3
60        ],
61        "n": 1
62      },
63      {
64        "kind": "edge_shared_by_n_triangles",
65        "edge": [
66          1,
67          3
68        ],
69        "n": 1
70      }
71    ]
72  }
73}