mesh-examples/12-14-mesh/Me1045.mesh.json
Sources
- CGAL PMP `PMP.stitch_borders (internal dispatcher)` Branch 6 (*halfedge-pair-orientation*: `if (hd_kpr(hp.second, hp.first)) std::swap(hp.first, hp.second)
- `)
- `MESH_HEAL_COVERAGE.md`.
Description
Two disconnected open triangles with a coincident seam edge in reversed orientation. Patch A: t0=(v0,v1,v2) with seam edge boundary halfedge along (v0,v1). Patch B: t1=(v3,v4,v5) where v3≈v1 and v4≈v0 — the seam edge on Patch B traverses (v3,v4)=(v1',v0'), opposite direction to (v0,v1). The discovered halfedge pair may have the Patch B halfedge as hp.first and Patch A as hp.second. If hd_kpr(hp.second,hp.first) is true, the swap fires to enforce canonical ordering. Branch 6 fires for this orientation check. Coincident pairs: v0≈v4, v1≈v3.
Reproducer recipe
v0=(0,0,0), v1=(1,0,0), v2=(0.5,1,0), v3=(1,0,0)[=v1], v4=(0,0,0)[=v0], v5=(0.5,-1,0); t0=(v0,v1,v2), t1=(v3,v4,v5); vertex_pair_distance_lt(v0,v4,1e-9); vertex_pair_distance_lt(v1,v3,1e-9); vertex_pair_no_shared_triangle(v0,v4); triangle_not_reachable_from(t1,t0).
Expected kernel behavior
Branch 6 fires; hd_kpr comparator evaluates pair orientation; swap is performed to place the canonically smaller halfedge descriptor as hp.first.
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.0, 20 0.0, 21 0.0 22 ], 23 [ 24 0.0, 25 0.0, 26 0.0 27 ], 28 [ 29 0.5, 30 -1.0, 31 0.0 32 ] 33 ], 34 "triangles": [ 35 [ 36 0, 37 1, 38 2 39 ], 40 [ 41 3, 42 4, 43 5 44 ] 45 ], 46 "metadata": { 47 "id": "Me1045", 48 "schema_version": 0, 49 "defect_class": "boundary_gap_thin", 50 "title": "stitch_borders halfedge-pair-orientation: hd_kpr canonical swap fires for non-canonical halfedge pair; two patches with reversed coincident boundary edge", 51 "assertions": [ 52 { 53 "kind": "edge_shared_by_n_triangles", 54 "edge": [ 55 0, 56 1 57 ], 58 "n": 1 59 }, 60 { 61 "kind": "edge_shared_by_n_triangles", 62 "edge": [ 63 1, 64 2 65 ], 66 "n": 1 67 }, 68 { 69 "kind": "edge_shared_by_n_triangles", 70 "edge": [ 71 0, 72 2 73 ], 74 "n": 1 75 }, 76 { 77 "kind": "edge_shared_by_n_triangles", 78 "edge": [ 79 3, 80 4 81 ], 82 "n": 1 83 }, 84 { 85 "kind": "edge_shared_by_n_triangles", 86 "edge": [ 87 4, 88 5 89 ], 90 "n": 1 91 }, 92 { 93 "kind": "edge_shared_by_n_triangles", 94 "edge": [ 95 3, 96 5 97 ], 98 "n": 1 99 }, 100 { 101 "kind": "vertex_pair_distance_lt", 102 "pair": [ 103 0, 104 4 105 ], 106 "lt": 1e-09 107 }, 108 { 109 "kind": "vertex_pair_distance_lt", 110 "pair": [ 111 1, 112 3 113 ], 114 "lt": 1e-09 115 }, 116 { 117 "kind": "vertex_pair_no_shared_triangle", 118 "pair": [ 119 0, 120 4 121 ] 122 }, 123 { 124 "kind": "vertex_pair_no_shared_triangle", 125 "pair": [ 126 1, 127 3 128 ] 129 }, 130 { 131 "kind": "triangle_not_reachable_from", 132 "target": 1, 133 "source": 0 134 } 135 ] 136 } 137}