Me610 — is_cap_triangle_face degenerate_edge: first edge (v0,v1) has zero squared length; coincident endpoints trigger early-exit Branch 1

§12.14 mesh defects (sub-class: cap-triangle / degenerate-edge)

topology

Sources

Description

A single degenerate triangle (v0, v1, v2) where v0 and v1 both occupy (0,0,0). The squared length of the first edge sq_lengths[0] = dist(v0,v1)^2 = 0, triggering the early-exit guard at line 460 before any cap classification is attempted. A second valid context triangle is included. Vertex pair (v0,v1) distance is zero.

Reproducer recipe

v0=(0,0,0), v1=(0,0,0), v2=(1,0,0), v3=(0,1,0), v4=(1,1,0); t0=(v0,v1,v2) degenerate; t1=(v2,v3,v4) context; assert_vertex_pair_distance_lt(v0,v1,1e-12); assert_triangle_area_lt(t0,1e-12).

Expected kernel behavior

Branch 1 fires; is_zero(sq_lengths[0]) returns true for edge (v0,v1) with coincident endpoints; cap detection exits early without classifying the triangle.

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      0.0,
10      0.0,
11      0.0
12    ],
13    [
14      1.0,
15      0.0,
16      0.0
17    ],
18    [
19      0.0,
20      1.0,
21      0.0
22    ],
23    [
24      1.0,
25      1.0,
26      0.0
27    ]
28  ],
29  "triangles": [
30    [
31      0,
32      1,
33      2
34    ],
35    [
36      2,
37      3,
38      4
39    ]
40  ],
41  "metadata": {
42    "id": "Me610",
43    "schema_version": 0,
44    "defect_class": "degenerate_triangle",
45    "title": "is_cap_triangle_face degenerate_edge: first edge (v0,v1) has zero squared length; coincident endpoints trigger early-exit Branch 1",
46    "assertions": [
47      {
48        "kind": "vertex_pair_distance_lt",
49        "pair": [
50          0,
51          1
52        ],
53        "lt": 1e-12
54      },
55      {
56        "kind": "triangle_area_lt",
57        "triangle": 0,
58        "lt": 1e-12
59      }
60    ]
61  }
62}