mesh-examples/12-14-mesh/Me1152.mesh.json
Sources
- CGAL PMP `PMP.keep_connected_components` Branch 1 (*by_id*: `halfedge_descriptor h = halfedge(v, pmesh)` guard @ line 308)
- `MESH_HEAL_COVERAGE.md`.
Description
Two disconnected components — Component A is a two-triangle fan (t0,t1) sharing interior edge (v0,v2), and Component B is an isolated triangle (t2) at x=50. When the caller requests keeping only component A by id, the by_id branch iterates every vertex, calls halfedge(v,pmesh) for each, identifies which component it belongs to, and removes vertices/faces of discarded CCs. Interior edge (v0,v2) n=2. Combined: V=7, E=8, F=3, chi=2.
Reproducer recipe
Component A: v0=(0,0,0), v1=(1,0,0), v2=(0.5,1,0), v3=(0,1,0), t0=(v0,v1,v2), t1=(v0,v2,v3). Component B: v4=(50,0,0), v5=(51,0,0), v6=(50.5,1,0), t2=(v4,v5,v6). assert_triangle_not_reachable_from(t2,t0); euler V=7,E=8,F=3,chi=2.
Expected kernel behavior
Branch 1 fires for each vertex in component B; halfedge(v,pmesh) returns a halfedge belonging to CC 1; those vertices are flagged for removal.
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 0.0, 20 1.0, 21 0.0 22 ], 23 [ 24 50.0, 25 0.0, 26 0.0 27 ], 28 [ 29 51.0, 30 0.0, 31 0.0 32 ], 33 [ 34 50.5, 35 1.0, 36 0.0 37 ] 38 ], 39 "triangles": [ 40 [ 41 0, 42 1, 43 2 44 ], 45 [ 46 0, 47 2, 48 3 49 ], 50 [ 51 4, 52 5, 53 6 54 ] 55 ], 56 "metadata": { 57 "id": "Me1152", 58 "schema_version": 0, 59 "defect_class": "disconnected_components", 60 "title": "keep_connected_components by_id: halfedge(v,pmesh) guard fires; two-component mesh selected by CC id", 61 "assertions": [ 62 { 63 "kind": "edge_shared_by_n_triangles", 64 "edge": [ 65 0, 66 2 67 ], 68 "n": 2 69 }, 70 { 71 "kind": "triangle_not_reachable_from", 72 "target": 2, 73 "source": 0 74 }, 75 { 76 "kind": "euler_characteristic", 77 "v": 7, 78 "e": 8, 79 "f": 3, 80 "chi": 2 81 } 82 ] 83 } 84}