mesh-examples/12-14-mesh/Me683.mesh.json
Sources
- MeshFix `holeFilling::TriangulateHole@L98` Branch 4 (*DELAUNAY_SWAP_IMPROVES_ANGLE*: `if (e->delaunayMinAngle() <= ang) { e->swap(1)
- fast = 1
- }`)
- `MESH_HEAL_COVERAGE.md`.
Description
Six-vertex diamond hole mesh. The hole boundary is [v0,v1,v2,v3] with v0=(-3,0,0), v1=(0,-0.1,0), v2=(3,0,0), v3=(0,0.1,0) — a very elongated diamond where v1 and v3 are only 0.2 apart in y but v0 and v2 are 6 units apart. Naive fill splits along the short diagonal (v1,v3) producing severely needle-shaped triangles. The optimization loop finds delaunayMinAngle() of the short diagonal <= ang (threshold from the adjacent wide triangle); Branch 4: swap performed, fast=1 set. Euler: V=6, E=10, F=4, chi=0.
Reproducer recipe
v0=(-3,0,0), v1=(0,-0.1,0), v2=(3,0,0), v3=(0,0.1,0), v4=(0,-2,0), v5=(0,2,0); t0=(v0,v1,v4), t1=(v1,v2,v4), t2=(v2,v3,v5), t3=(v3,v0,v5); hole boundary [v0,v1,v2,v3]; euler V=6,E=10,F=4,chi=0.
Expected kernel behavior
Branch 4 fires in post-fill optimization; delaunayMinAngle() on needle diagonal <= ang; edge->swap(1) called; fast=1 set.
Expected validation
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1{ 2 "vertices": [ 3 [ 4 -3.0, 5 0.0, 6 0.0 7 ], 8 [ 9 0.0, 10 -0.1, 11 0.0 12 ], 13 [ 14 3.0, 15 0.0, 16 0.0 17 ], 18 [ 19 0.0, 20 0.1, 21 0.0 22 ], 23 [ 24 0.0, 25 -2.0, 26 0.0 27 ], 28 [ 29 0.0, 30 2.0, 31 0.0 32 ] 33 ], 34 "triangles": [ 35 [ 36 0, 37 1, 38 4 39 ], 40 [ 41 1, 42 2, 43 4 44 ], 45 [ 46 2, 47 3, 48 5 49 ], 50 [ 51 3, 52 0, 53 5 54 ] 55 ], 56 "metadata": { 57 "id": "Me683", 58 "schema_version": 0, 59 "defect_class": "hole_in_hull", 60 "title": "TriangulateHole@L98 DELAUNAY_SWAP_IMPROVES_ANGLE: diamond hole v0-v1-v2-v3; short diagonal (v1,v3) yields needle triangles; delaunayMinAngle()<=ang; swap+fast=1 (Branch 4)", 61 "assertions": [ 62 { 63 "kind": "edge_shared_by_n_triangles", 64 "edge": [ 65 1, 66 4 67 ], 68 "n": 2 69 }, 70 { 71 "kind": "edge_shared_by_n_triangles", 72 "edge": [ 73 3, 74 5 75 ], 76 "n": 2 77 }, 78 { 79 "kind": "edge_shared_by_n_triangles", 80 "edge": [ 81 0, 82 1 83 ], 84 "n": 1 85 }, 86 { 87 "kind": "edge_shared_by_n_triangles", 88 "edge": [ 89 1, 90 2 91 ], 92 "n": 1 93 }, 94 { 95 "kind": "edge_shared_by_n_triangles", 96 "edge": [ 97 2, 98 3 99 ], 100 "n": 1 101 }, 102 { 103 "kind": "edge_shared_by_n_triangles", 104 "edge": [ 105 0, 106 3 107 ], 108 "n": 1 109 }, 110 { 111 "kind": "hole_boundary", 112 "loop": [ 113 0, 114 1, 115 2, 116 3 117 ] 118 }, 119 { 120 "kind": "triangle_aspect_ratio_gt", 121 "triangle": 0, 122 "gt": 5.0 123 }, 124 { 125 "kind": "euler_characteristic", 126 "v": 6, 127 "e": 10, 128 "f": 4, 129 "chi": 0 130 } 131 ] 132 } 133}