mesh-examples/12-14-mesh/Me540.mesh.json
Sources
- MeshFix `checkAndRepair::removeDegenerateTriangles` Branch 1 (*CAP_GEOMETRY_OV1*: `if (pointInInnerSegment(ov1, e->v1, e->v2))` @ line 481)
- `MESH_HEAL_COVERAGE.md`.
Description
Outer triangle t0 has edge (v0,v1) as its cap edge. Sub-triangles t1 and t2 subdivide that edge via a T-junction vertex v3=(2,0,0) lying strictly between v0=(0,0,0) and v1=(4,0,0). v3 is the opposite vertex ov1 of the first cap triangle; pointInInnerSegment fires → Branch 1 queues cap edge for splitEdge.
Reproducer recipe
v0=(0,0,0), v1=(4,0,0), v2=(2,1,0), v3=(2,0,0) [on v0-v1]; t0=(v0,v1,v2), t1=(v0,v3,v2), t2=(v3,v1,v2); assert_vertex_on_edge(v3,v0,v1); area assertions; edge_shared(v2,v3,2).
Expected kernel behavior
Branch 1 fires; pointInInnerSegment(ov1, e->v1, e->v2) returns true; cap edge queued for splitEdge subdivision.
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 4.0, 10 0.0, 11 0.0 12 ], 13 [ 14 2.0, 15 1.0, 16 0.0 17 ], 18 [ 19 2.0, 20 0.0, 21 0.0 22 ] 23 ], 24 "triangles": [ 25 [ 26 0, 27 1, 28 2 29 ], 30 [ 31 0, 32 3, 33 2 34 ], 35 [ 36 3, 37 1, 38 2 39 ] 40 ], 41 "metadata": { 42 "id": "Me540", 43 "schema_version": 0, 44 "defect_class": "degenerate_triangle_cap_geometry_ov1", 45 "title": "checkAndRepair::removeDegenerateTriangles CAP_GEOMETRY_OV1: opposite vertex ov1 lies on inner segment of cap edge (T-junction triggers splitEdge)", 46 "assertions": [ 47 { 48 "kind": "vertex_on_edge", 49 "vertex": 3, 50 "edge": [ 51 0, 52 1 53 ] 54 }, 55 { 56 "kind": "triangle_area_lt", 57 "triangle": 0, 58 "lt": 3.0 59 }, 60 { 61 "kind": "triangle_area_lt", 62 "triangle": 1, 63 "lt": 2.0 64 }, 65 { 66 "kind": "triangle_area_lt", 67 "triangle": 2, 68 "lt": 2.0 69 }, 70 { 71 "kind": "edge_shared_by_n_triangles", 72 "edge": [ 73 2, 74 3 75 ], 76 "n": 2 77 }, 78 { 79 "kind": "edge_shared_by_n_triangles", 80 "edge": [ 81 0, 82 3 83 ], 84 "n": 1 85 }, 86 { 87 "kind": "edge_shared_by_n_triangles", 88 "edge": [ 89 1, 90 3 91 ], 92 "n": 1 93 } 94 ] 95 } 96}