mesh-examples/12-14-mesh/Me285.mesh.json
Sources
- MeshFix `checkAndRepair::checkGeometry` Branch 6 (*DEGENERATE_TRIANGLE_ZERO_ANGLE*: `ang == 0`)
- `MESH_HEAL_COVERAGE.md`.
Description
Triangle t1=(p0,p1,p2) with p0=(1,-1,0), p1=(0,-1,0), p2=(2,-1,0) — all collinear along y=-1. The pivot vertex is p1 at the LEFT END of the collinear triple. Vectors from p1 to p0=(+1,0,0) and from p1 to p2=(+2,0,0) both point in the +X direction (same direction). The interior angle at p1 = arccos(+1) = 0°. Area is exactly zero. Contrast with Branch 7 where the pivot is in the MIDDLE (angle = 180°).
Reproducer recipe
c0-c2 clean triangle (t0); p0=(1,-1,0), p1=(0,-1,0), p2=(2,-1,0) collinear with p1 at end (t1); assert triangle_area_lt(1, 1e-12).
Expected kernel behavior
Branch 6 fires; defect logged as 'degenerate triangle detected'; function returns p1 as defect vertex.
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 1.0, 10 0.0, 11 0.0 12 ], 13 [ 14 0.5, 15 1.0, 16 0.0 17 ], 18 [ 19 1.0, 20 -1.0, 21 0.0 22 ], 23 [ 24 0.0, 25 -1.0, 26 0.0 27 ], 28 [ 29 2.0, 30 -1.0, 31 0.0 32 ] 33 ], 34 "triangles": [ 35 [ 36 0, 37 1, 38 2 39 ], 40 [ 41 3, 42 4, 43 5 44 ] 45 ], 46 "metadata": { 47 "id": "Me285", 48 "schema_version": 0, 49 "defect_class": "degenerate_triangle", 50 "title": "checkGeometry_degenerate_triangle_zero_angle: interior angle = 0\u00b0 at pivot vertex (Branch 6)", 51 "assertions": [ 52 { 53 "kind": "triangle_area_lt", 54 "triangle": 1, 55 "lt": 1e-12 56 } 57 ] 58 } 59}