mesh-examples/12-14-mesh/Me343.mesh.json
Sources
- MeshFix `Basic_TMesh.init` Branch 4 (*TRIANGLE_COPY_ITERATION*: `FOREACHVTTRIANGLE((&tin->T), t, n) { newTriangle(...)
- t->info = nt
- }`)
- `MESH_HEAL_COVERAGE.md`.
Description
A 2-triangle mesh: t0=(v0,v3,v1) is valid; t1=(v0,v1,v2) is degenerate — v0=(0,0,0), v1=(1,0,0), v2=(2,0,0) are collinear, yielding zero area. The FOREACHVTTRIANGLE loop copies all 2 triangle entries including the degenerate one; the clone inherits the zero-area face.
Reproducer recipe
v0=(0,0,0), v1=(1,0,0), v2=(2,0,0), v3=(0.5,1,0); t0=(v0,v3,v1), t1=(v0,v1,v2); assert_triangle_area_lt(1, 1e-9); edge (v0,v1) n=2.
Expected kernel behavior
Branch 4 fires for both triangles; clone mesh contains the degenerate triangle; healer must detect and remove it 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 2.0, 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 3, 28 1 29 ], 30 [ 31 0, 32 1, 33 2 34 ] 35 ], 36 "metadata": { 37 "id": "Me343", 38 "schema_version": 0, 39 "defect_class": "degenerate_triangle", 40 "title": "init_triangle_copy_iteration: degenerate zero-area triangle forces FOREACHVTTRIANGLE over 3 entries", 41 "assertions": [ 42 { 43 "kind": "triangle_area_lt", 44 "triangle": 1, 45 "lt": 1e-09 46 }, 47 { 48 "kind": "edge_shared_by_n_triangles", 49 "edge": [ 50 0, 51 1 52 ], 53 "n": 2 54 }, 55 { 56 "kind": "edge_shared_by_n_triangles", 57 "edge": [ 58 1, 59 2 60 ], 61 "n": 1 62 }, 63 { 64 "kind": "edge_shared_by_n_triangles", 65 "edge": [ 66 0, 67 2 68 ], 69 "n": 1 70 } 71 ] 72 } 73}