mesh-examples/12-14-mesh/Me280.mesh.json
Sources
- MeshFix `checkAndRepair::checkGeometry` Branch 1 (*MEMORY_ALLOCATION_FAILURE*: vertex array alloc fails, skip coincident-vertex scan)
- `MESH_HEAL_COVERAGE.md`.
Description
A 3-triangle mesh where vertex v0=(0,0,0) and vertex v6=(5e-8,0,0) are spatially near-coincident (distance < 1e-7) but belong to different triangles with no shared edge. Branch 1 fires when the sort buffer for vertex coordinates cannot be allocated — the function skips the coincident-vertex scan entirely. The same geometry would be caught by Branch 2 (COINCIDENT_VERTICES_EDGE_ABSENT) if allocation succeeds.
Reproducer recipe
t0=(v0,v1,v2) upper triangle; t1=(v3,v4,v5) clean lower triangle; t2=(v6,v7,v8) with v6 at (5e-8,0,0) near v0; assert v0-v6 distance < 1e-7 and no shared triangle.
Expected kernel behavior
Branch 1 fires on alloc failure; coincident vertex pair (v0,v6) would be flagged as COINCIDENT_VERTICES_EDGE_ABSENT by Branch 2 if alloc succeeds.
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 0.0, 20 0.0, 21 2.0 22 ], 23 [ 24 1.0, 25 0.0, 26 2.0 27 ], 28 [ 29 0.5, 30 1.0, 31 2.0 32 ], 33 [ 34 5e-08, 35 0.0, 36 0.0 37 ], 38 [ 39 0.5, 40 -1.0, 41 0.0 42 ], 43 [ 44 -0.5, 45 -1.0, 46 0.0 47 ] 48 ], 49 "triangles": [ 50 [ 51 0, 52 1, 53 2 54 ], 55 [ 56 3, 57 4, 58 5 59 ], 60 [ 61 6, 62 7, 63 8 64 ] 65 ], 66 "metadata": { 67 "id": "Me280", 68 "schema_version": 0, 69 "defect_class": "coincident_vertices", 70 "title": "checkGeometry_memory_alloc_fail_vertices: near-coincident vertex pair, alloc guard (Branch 1)", 71 "assertions": [ 72 { 73 "kind": "vertex_pair_distance_lt", 74 "pair": [ 75 0, 76 6 77 ], 78 "lt": 1e-07 79 }, 80 { 81 "kind": "vertex_pair_no_shared_triangle", 82 "pair": [ 83 0, 84 6 85 ] 86 } 87 ] 88 } 89}