mesh-examples/12-14-mesh/Me1011.mesh.json
Sources
- CGAL PMP `PMP.run_stitch_borders` Branch 2 (*second-vertex-pair-distinct*: `if(get(uvpm, h2_src) != get(uvpm, h1_tgt))`)
- `MESH_HEAL_COVERAGE.md`.
Description
Two open V-shaped patches sharing a two-segment horizontal seam. Patch A: v0=(0,0,0), v1=(1,0,0), v2=(2,0,0), v3=(1,1,0); t0=(v0,v1,v3), t1=(v1,v2,v3). Patch B: v4=(0,0,0), v5=(1,0,0), v6=(2,0,0), v7=(1,-1,0); t2=(v4,v7,v5), t3=(v5,v7,v6). The seam spans two edges (v0,v1)/(v4,v5) and (v1,v2)/(v5,v6). When processing halfedge h1 (A: v0→v1), h2_src=v5 at (1,0,0) is B's counterpart to h1_tgt=v1. Since v5 starts with its own union-find representative distinct from v1's master, Branch 2 fires and merges h2_src into h1_tgt's master. Three coincident pairs: v0==v4, v1==v5, v2==v6. Euler: V=8, E=10, F=4, chi=2.
Reproducer recipe
Patch A: v0-v3 with t0=(v0,v1,v3), t1=(v1,v2,v3). Patch B: v4-v7 with t2=(v4,v7,v5), t3=(v5,v7,v6). edge_shared(v0,v1,1); edge_shared(v1,v2,1); edge_shared(v4,v5,1); edge_shared(v5,v6,1); vertex_pair_distance_lt pairs (v0,v4), (v1,v5), (v2,v6) lt=1e-9; no_shared_triangle pairs; euler V=8,E=10,F=4,chi=2.
Expected kernel behavior
Branch 2 fires; h2_src's initial representative differs from h1_tgt's master, so the union-find merges h2_src into that master, ensuring the two vertex records on B's side of the seam midpoint are unified.
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 1.0, 20 1.0, 21 0.0 22 ], 23 [ 24 0.0, 25 0.0, 26 0.0 27 ], 28 [ 29 1.0, 30 0.0, 31 0.0 32 ], 33 [ 34 2.0, 35 0.0, 36 0.0 37 ], 38 [ 39 1.0, 40 -1.0, 41 0.0 42 ] 43 ], 44 "triangles": [ 45 [ 46 0, 47 1, 48 3 49 ], 50 [ 51 1, 52 2, 53 3 54 ], 55 [ 56 4, 57 7, 58 5 59 ], 60 [ 61 5, 62 7, 63 6 64 ] 65 ], 66 "metadata": { 67 "id": "Me1011", 68 "schema_version": 0, 69 "defect_class": "open_boundary_stitch_gap", 70 "title": "run_stitch_borders second-vertex-pair-distinct: h2_src representative differs from h1_tgt master; conditional merge fires (Branch 2)", 71 "assertions": [ 72 { 73 "kind": "edge_shared_by_n_triangles", 74 "edge": [ 75 0, 76 1 77 ], 78 "n": 1 79 }, 80 { 81 "kind": "edge_shared_by_n_triangles", 82 "edge": [ 83 1, 84 2 85 ], 86 "n": 1 87 }, 88 { 89 "kind": "edge_shared_by_n_triangles", 90 "edge": [ 91 4, 92 5 93 ], 94 "n": 1 95 }, 96 { 97 "kind": "edge_shared_by_n_triangles", 98 "edge": [ 99 5, 100 6 101 ], 102 "n": 1 103 }, 104 { 105 "kind": "vertex_pair_distance_lt", 106 "pair": [ 107 0, 108 4 109 ], 110 "lt": 1e-09 111 }, 112 { 113 "kind": "vertex_pair_distance_lt", 114 "pair": [ 115 1, 116 5 117 ], 118 "lt": 1e-09 119 }, 120 { 121 "kind": "vertex_pair_distance_lt", 122 "pair": [ 123 2, 124 6 125 ], 126 "lt": 1e-09 127 }, 128 { 129 "kind": "vertex_pair_no_shared_triangle", 130 "pair": [ 131 0, 132 4 133 ] 134 }, 135 { 136 "kind": "vertex_pair_no_shared_triangle", 137 "pair": [ 138 1, 139 5 140 ] 141 }, 142 { 143 "kind": "vertex_pair_no_shared_triangle", 144 "pair": [ 145 2, 146 6 147 ] 148 }, 149 { 150 "kind": "euler_characteristic", 151 "v": 8, 152 "e": 10, 153 "f": 4, 154 "chi": 2 155 } 156 ] 157 } 158}