mesh-examples/12-14-mesh/Me523.mesh.json
Sources
- MeshFix `Basic_TMesh.iterativeEdgeSwaps` Branch 4 (*swap_improves_angle*: `if (e->swap() && delaunayMinAngle improved) ...`)
- `MESH_HEAL_COVERAGE.md`.
Description
A tall thin quad with vertices v0=(0,0,0), v1=(4,0,0) (horizontal tips) and v2=(2,3,0), v3=(2,-3,0) (vertical apices). The current triangulation uses the long vertical diagonal (v2,v3) as the shared edge, creating two elongated triangles with very small minimum angles (aspect ratio > 2). Flipping to the horizontal diagonal (v0,v1) would produce two better-balanced triangles with larger minimum angles — the swap is accepted. Both triangles have high aspect ratio before the swap. Euler: V=4, E=5, F=2, chi=1.
Reproducer recipe
v0=(0,0,0), v1=(4,0,0), v2=(2,3,0), v3=(2,-3,0); t0=(v0,v2,v3), t1=(v2,v1,v3); assert_edge_shared(v2,v3,2); assert_triangle_aspect_ratio_gt(t0,2.0), (t1,2.0); euler V=4,E=5,F=2,chi=1.
Expected kernel behavior
Branch 4 fires; swap of (v2,v3) to (v0,v1) succeeds; min-angle test passes (new min angle > old min angle); adjacent edges of the swapped quad added to candidate queue.
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 3.0, 16 0.0 17 ], 18 [ 19 2.0, 20 -3.0, 21 0.0 22 ] 23 ], 24 "triangles": [ 25 [ 26 0, 27 2, 28 3 29 ], 30 [ 31 2, 32 1, 33 3 34 ] 35 ], 36 "metadata": { 37 "id": "Me523", 38 "schema_version": 0, 39 "defect_class": "mesh_optimization", 40 "title": "iterativeEdgeSwaps swap_improves_angle: thin non-Delaunay quad; flip of long diagonal (v2,v3) improves min angle (Branch 4)", 41 "assertions": [ 42 { 43 "kind": "edge_shared_by_n_triangles", 44 "edge": [ 45 2, 46 3 47 ], 48 "n": 2 49 }, 50 { 51 "kind": "edge_shared_by_n_triangles", 52 "edge": [ 53 0, 54 2 55 ], 56 "n": 1 57 }, 58 { 59 "kind": "edge_shared_by_n_triangles", 60 "edge": [ 61 0, 62 3 63 ], 64 "n": 1 65 }, 66 { 67 "kind": "edge_shared_by_n_triangles", 68 "edge": [ 69 1, 70 2 71 ], 72 "n": 1 73 }, 74 { 75 "kind": "edge_shared_by_n_triangles", 76 "edge": [ 77 1, 78 3 79 ], 80 "n": 1 81 }, 82 { 83 "kind": "triangle_aspect_ratio_gt", 84 "triangle": 0, 85 "gt": 2.0 86 }, 87 { 88 "kind": "triangle_aspect_ratio_gt", 89 "triangle": 1, 90 "gt": 2.0 91 }, 92 { 93 "kind": "euler_characteristic", 94 "v": 4, 95 "e": 5, 96 "f": 2, 97 "chi": 1 98 } 99 ] 100 } 101}