mesh-examples/12-14-mesh/Me1012.mesh.json
Sources
- CGAL PMP `PMP.run_stitch_borders` Branch 3 (*second-target-merge-necessity*: `if(get(uvpm, h2_tgt) != get(uvpm, v_to_keep))`)
- `MESH_HEAL_COVERAGE.md`.
Description
Two open patches with different fan sizes sharing a single-edge seam. Patch A (three-triangle fan above y=0): v0=(0,0,0), v1=(1,0,0), v2=(-0.5,0,0), v3=(1.5,0,0), v4=(0.5,1,0); t0=(v0,v1,v4), t1=(v2,v0,v4), t2=(v1,v3,v4). Patch B (two triangles below y=0): v5=(0,0,0), v6=(1,0,0), v7=(-0.5,0,0), v8=(0.5,-1,0); t3=(v6,v5,v8), t4=(v5,v7,v8). Seam edge: (v0,v1) in A, (v5,v6) in B. When h1 runs v0→v1 and h2 runs v6→v5, h2_tgt=v5 at (0,0,0) has its own representative distinct from the master for v0's seam position; Branch 3 fires and merges h2_tgt into that master. Euler: V=9, E=12, F=5, chi=2.
Reproducer recipe
Patch A V=5: v0=(0,0,0), v1=(1,0,0), v2=(-0.5,0,0), v3=(1.5,0,0), v4=(0.5,1,0). Patch B V=4: v5=(0,0,0), v6=(1,0,0), v7=(-0.5,0,0), v8=(0.5,-1,0). Triangles as in source. edge_shared(v0,v1,1); edge_shared(v5,v6,1); vertex_pair_distance_lt(v0,v5,1e-9); vertex_pair_distance_lt(v1,v6,1e-9); no_shared_triangle(v0,v5); no_shared_triangle(v1,v6); euler V=9,E=12,F=5,chi=2.
Expected kernel behavior
Branch 3 fires; h2_tgt's union-find representative is distinct from the second-endpoint master v_to_keep_2, so all halfedges at h2_tgt's old representative are redirected to v_to_keep_2, completing the second-vertex stitch operation.
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 0.0, 16 0.0 17 ], 18 [ 19 1.5, 20 0.0, 21 0.0 22 ], 23 [ 24 0.5, 25 1.0, 26 0.0 27 ], 28 [ 29 0.0, 30 0.0, 31 0.0 32 ], 33 [ 34 1.0, 35 0.0, 36 0.0 37 ], 38 [ 39 -0.5, 40 0.0, 41 0.0 42 ], 43 [ 44 0.5, 45 -1.0, 46 0.0 47 ] 48 ], 49 "triangles": [ 50 [ 51 0, 52 1, 53 4 54 ], 55 [ 56 2, 57 0, 58 4 59 ], 60 [ 61 1, 62 3, 63 4 64 ], 65 [ 66 6, 67 5, 68 8 69 ], 70 [ 71 5, 72 7, 73 8 74 ] 75 ], 76 "metadata": { 77 "id": "Me1012", 78 "schema_version": 0, 79 "defect_class": "open_boundary_stitch_gap", 80 "title": "run_stitch_borders second-target-merge-necessity: h2_tgt representative differs from second-endpoint master; union_find merge fires (Branch 3)", 81 "assertions": [ 82 { 83 "kind": "edge_shared_by_n_triangles", 84 "edge": [ 85 0, 86 1 87 ], 88 "n": 1 89 }, 90 { 91 "kind": "edge_shared_by_n_triangles", 92 "edge": [ 93 5, 94 6 95 ], 96 "n": 1 97 }, 98 { 99 "kind": "vertex_pair_distance_lt", 100 "pair": [ 101 0, 102 5 103 ], 104 "lt": 1e-09 105 }, 106 { 107 "kind": "vertex_pair_distance_lt", 108 "pair": [ 109 1, 110 6 111 ], 112 "lt": 1e-09 113 }, 114 { 115 "kind": "vertex_pair_no_shared_triangle", 116 "pair": [ 117 0, 118 5 119 ] 120 }, 121 { 122 "kind": "vertex_pair_no_shared_triangle", 123 "pair": [ 124 1, 125 6 126 ] 127 }, 128 { 129 "kind": "euler_characteristic", 130 "v": 9, 131 "e": 12, 132 "f": 5, 133 "chi": 2 134 } 135 ] 136 } 137}