mesh-examples/12-14-mesh/Me520.mesh.json
Sources
- MeshFix `Basic_TMesh.iterativeEdgeSwaps` Branch 1 (*selection_exists*: `if (IS_VISITED(t)) selection = 1
- `)
- `MESH_HEAL_COVERAGE.md`.
Description
Six-vertex, four-triangle mesh with two adjacent quads. The left quad (t0, t1) represents the "selected" region (IS_VISITED). When iterativeEdgeSwaps scans all triangles and finds at least one with IS_VISITED set, it sets `selection=1` (Branch 1 fires) and subsequent edge-swap candidates are restricted to the selected region only. The interior edge (v1,v2) is shared by t0 and t1 (within selection); (v1,v3) crosses the selection boundary. Three interior edges (n=2); six boundary edges (n=1).
Reproducer recipe
v0=(0,0,0), v1=(1,0,0), v2=(0.5,1,0), v3=(1.5,1,0), v4=(2,0,0), v5=(1,2,0); t0=(v0,v1,v2), t1=(v1,v3,v2) [selected], t2=(v1,v4,v3), t3=(v3,v5,v2); assert_edge_shared(v1,v2,2), (v1,v3,2), (v2,v3,2); boundary edges n=1.
Expected kernel behavior
Branch 1 fires; `selection` variable set to 1; subsequent edge swap candidates are only enqueued from triangles where IS_VISITED(t) is true.
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 0.5, 15 1.0, 16 0.0 17 ], 18 [ 19 1.5, 20 1.0, 21 0.0 22 ], 23 [ 24 2.0, 25 0.0, 26 0.0 27 ], 28 [ 29 1.0, 30 2.0, 31 0.0 32 ] 33 ], 34 "triangles": [ 35 [ 36 0, 37 1, 38 2 39 ], 40 [ 41 1, 42 3, 43 2 44 ], 45 [ 46 1, 47 4, 48 3 49 ], 50 [ 51 3, 52 5, 53 2 54 ] 55 ], 56 "metadata": { 57 "id": "Me520", 58 "schema_version": 0, 59 "defect_class": "mesh_optimization", 60 "title": "iterativeEdgeSwaps selection_exists: partial selection of triangles restricts swaps to IS_VISITED region (Branch 1)", 61 "assertions": [ 62 { 63 "kind": "edge_shared_by_n_triangles", 64 "edge": [ 65 1, 66 2 67 ], 68 "n": 2 69 }, 70 { 71 "kind": "edge_shared_by_n_triangles", 72 "edge": [ 73 1, 74 3 75 ], 76 "n": 2 77 }, 78 { 79 "kind": "edge_shared_by_n_triangles", 80 "edge": [ 81 2, 82 3 83 ], 84 "n": 2 85 }, 86 { 87 "kind": "edge_shared_by_n_triangles", 88 "edge": [ 89 0, 90 1 91 ], 92 "n": 1 93 }, 94 { 95 "kind": "edge_shared_by_n_triangles", 96 "edge": [ 97 0, 98 2 99 ], 100 "n": 1 101 }, 102 { 103 "kind": "edge_shared_by_n_triangles", 104 "edge": [ 105 3, 106 4 107 ], 108 "n": 1 109 }, 110 { 111 "kind": "edge_shared_by_n_triangles", 112 "edge": [ 113 1, 114 4 115 ], 116 "n": 1 117 }, 118 { 119 "kind": "edge_shared_by_n_triangles", 120 "edge": [ 121 3, 122 5 123 ], 124 "n": 1 125 }, 126 { 127 "kind": "edge_shared_by_n_triangles", 128 "edge": [ 129 2, 130 5 131 ], 132 "n": 1 133 } 134 ] 135 } 136}