mesh-examples/12-14-mesh/Me346.mesh.json
Sources
- MeshFix `Basic_TMesh.init` Branch 7 (*INFO_PRESERVATION_FLAG*: `if (clone_info) { nt->info = t->info
- }`)
- `MESH_HEAL_COVERAGE.md`.
Description
A 2-triangle mesh: t0=(v0,v1,v3) is valid; t1=(v0,v1,v2) is near-degenerate — v1=(1,0,0) and v2=(1+1e-8,0,0) are sub-tolerance coincident, making t1 effectively zero-area. When a healer calls init with clone_info=true, each triangle's void* info pointer is copied to the clone — including the degenerate triangle's info, which may hold a repair tag or be NULL.
Reproducer recipe
v0=(0,0,0), v1=(1,0,0), v2=(1+1e-8,0,0), v3=(0.5,1,0); t0=(v0,v1,v3), t1=(v0,v1,v2); assert_vertex_pair_distance_lt(1,2,1e-6); assert_triangle_area_lt(1,1e-9).
Expected kernel behavior
Branch 7 fires when clone_info=true; degenerate t1's info pointer is copied to clone triangle; healer must not rely on info being clean post-init.
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 1.00000001, 15 0.0, 16 0.0 17 ], 18 [ 19 0.5, 20 1.0, 21 0.0 22 ] 23 ], 24 "triangles": [ 25 [ 26 0, 27 1, 28 3 29 ], 30 [ 31 0, 32 1, 33 2 34 ] 35 ], 36 "metadata": { 37 "id": "Me346", 38 "schema_version": 0, 39 "defect_class": "near_coincident_vertex", 40 "title": "init_info_preservation_flag: near-coincident vertex pair forces clone_info to copy degenerate triangle info pointer", 41 "assertions": [ 42 { 43 "kind": "vertex_pair_distance_lt", 44 "pair": [ 45 1, 46 2 47 ], 48 "lt": 1e-06 49 }, 50 { 51 "kind": "triangle_area_lt", 52 "triangle": 1, 53 "lt": 1e-09 54 }, 55 { 56 "kind": "edge_shared_by_n_triangles", 57 "edge": [ 58 0, 59 1 60 ], 61 "n": 2 62 }, 63 { 64 "kind": "edge_shared_by_n_triangles", 65 "edge": [ 66 0, 67 3 68 ], 69 "n": 1 70 }, 71 { 72 "kind": "edge_shared_by_n_triangles", 73 "edge": [ 74 1, 75 3 76 ], 77 "n": 1 78 }, 79 { 80 "kind": "edge_shared_by_n_triangles", 81 "edge": [ 82 0, 83 2 84 ], 85 "n": 1 86 }, 87 { 88 "kind": "edge_shared_by_n_triangles", 89 "edge": [ 90 1, 91 2 92 ], 93 "n": 1 94 } 95 ] 96 } 97}