mesh-examples/12-14-mesh/Me1013.mesh.json
Sources
- CGAL PMP `PMP.run_stitch_borders` Branch 4 (*opposite-edge-source-merge*: `if(get(uvpm, h1_src) != get(uvpm, v_to_keep_2))`)
- `MESH_HEAL_COVERAGE.md`.
Description
Two open rectangular patches meeting at a horizontal seam along y=0. Patch A (above): v0=(0,0,0), v1=(2,0,0), v2=(0,2,0), v3=(2,2,0); t0=(v0,v1,v3), t1=(v0,v3,v2). Patch B (below): v4=(0,0,0), v5=(2,0,0), v6=(0,-2,0), v7=(2,-2,0); t2=(v5,v4,v6), t3=(v5,v6,v7). Seam edge: (v0,v1) open in A, (v4,v5) open in B. Halfedge h1 runs v0→v1 in A; h2 runs v5→v4 in B. After Branches 1-3 handle h1_tgt=v1 and h2_tgt=v4, Branch 4 checks h1_src=v0: its union-find representative is distinct from the master assigned to v_to_keep_2=v4, so Branch 4 fires and merges v0 into v4's master, completing the full two-endpoint stitching. Coincident pairs: v0==v4 at (0,0,0), v1==v5 at (2,0,0). Euler: V=8, E=10, F=4, chi=2.
Reproducer recipe
Patch A: v0=(0,0,0), v1=(2,0,0), v2=(0,2,0), v3=(2,2,0); t0=(v0,v1,v3), t1=(v0,v3,v2). Patch B: v4=(0,0,0), v5=(2,0,0), v6=(0,-2,0), v7=(2,-2,0); t2=(v5,v4,v6), t3=(v5,v6,v7). edge_shared(v0,v1,1); edge_shared(v4,v5,1); vertex_pair_distance_lt(v0,v4,1e-9); vertex_pair_distance_lt(v1,v5,1e-9); no_shared_triangle pairs; euler V=8,E=10,F=4,chi=2.
Expected kernel behavior
Branch 4 fires; h1_src (v0 in patch A) has its own union-find representative distinct from the master assigned to h2_tgt (v4 in patch B). The union-find merges h1_src into v_to_keep_2, completing the stitch of both boundary vertices for this halfedge pair.
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 2.0, 10 0.0, 11 0.0 12 ], 13 [ 14 0.0, 15 2.0, 16 0.0 17 ], 18 [ 19 2.0, 20 2.0, 21 0.0 22 ], 23 [ 24 0.0, 25 0.0, 26 0.0 27 ], 28 [ 29 2.0, 30 0.0, 31 0.0 32 ], 33 [ 34 0.0, 35 -2.0, 36 0.0 37 ], 38 [ 39 2.0, 40 -2.0, 41 0.0 42 ] 43 ], 44 "triangles": [ 45 [ 46 0, 47 1, 48 3 49 ], 50 [ 51 0, 52 3, 53 2 54 ], 55 [ 56 5, 57 4, 58 6 59 ], 60 [ 61 5, 62 6, 63 7 64 ] 65 ], 66 "metadata": { 67 "id": "Me1013", 68 "schema_version": 0, 69 "defect_class": "open_boundary_stitch_gap", 70 "title": "run_stitch_borders opposite-edge-source-merge: h1_src representative distinct from h2_tgt master; merge completes two-endpoint stitch (Branch 4)", 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 4, 84 5 85 ], 86 "n": 1 87 }, 88 { 89 "kind": "vertex_pair_distance_lt", 90 "pair": [ 91 0, 92 4 93 ], 94 "lt": 1e-09 95 }, 96 { 97 "kind": "vertex_pair_distance_lt", 98 "pair": [ 99 1, 100 5 101 ], 102 "lt": 1e-09 103 }, 104 { 105 "kind": "vertex_pair_no_shared_triangle", 106 "pair": [ 107 0, 108 4 109 ] 110 }, 111 { 112 "kind": "vertex_pair_no_shared_triangle", 113 "pair": [ 114 1, 115 5 116 ] 117 }, 118 { 119 "kind": "euler_characteristic", 120 "v": 8, 121 "e": 10, 122 "f": 4, 123 "chi": 2 124 } 125 ] 126 } 127}