mesh-examples/12-14-mesh/Me752.mesh.json
Sources
- CGAL PMP `PMP.simplify_polygons_in_polygon_soup` Branch 3 (*consecutive_duplicate_removal*: `simplify_polygon(points, polygon, traits)`)
- `MESH_HEAL_COVERAGE.md`.
Description
Polygon soup with one defect triangle [v0,v0,v1] — the first two consecutive indices are identical (positions 0 and 1). simplify_polygon() finds the pair, erases one copy of v0, and reduces the polygon to [v0,v1] (a degenerate edge-polygon of size 2). Branch 3 fires when simplify_polygon is called and finds the consecutive duplicate. A second clean triangle (v2,v3,v4) is present to exercise Branch 1. Defect edge (v0,v1) n=1; clean triangle boundary edges n=1 each.
Reproducer recipe
v0=(0,0,0), v1=(1,0,0); t_defect=(v0,v0,v1) [index list 0,0,1; consecutive dup at 0-1]; v2=(3,0,0), v3=(4,0,0), v4=(3.5,1,0); t_clean=(v2,v3,v4); assert_triangle_area_lt(t_defect,1e-12); assert_edge_shared(v0,v1,1); three clean boundary edges n=1.
Expected kernel behavior
Branch 3 fires for t_defect; simplify_polygon removes one v0; polygon reduced to [v0,v1]; simplified_polygons_n not incremented (simplify_polygon return value handling in Branch 4).
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 3.0, 15 0.0, 16 0.0 17 ], 18 [ 19 4.0, 20 0.0, 21 0.0 22 ], 23 [ 24 3.5, 25 1.0, 26 0.0 27 ] 28 ], 29 "triangles": [ 30 [ 31 0, 32 0, 33 1 34 ], 35 [ 36 2, 37 3, 38 4 39 ] 40 ], 41 "metadata": { 42 "id": "Me752", 43 "schema_version": 0, 44 "defect_class": "degenerate_triangle", 45 "title": "simplify_polygons_in_polygon_soup consecutive_duplicate_removal: triangle (v0,v0,v1) has consecutive duplicate at index 0-1; simplify_polygon erases copy (Branch 3)", 46 "assertions": [ 47 { 48 "kind": "triangle_area_lt", 49 "triangle": 0, 50 "lt": 1e-12 51 }, 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 2, 64 3 65 ], 66 "n": 1 67 }, 68 { 69 "kind": "edge_shared_by_n_triangles", 70 "edge": [ 71 3, 72 4 73 ], 74 "n": 1 75 }, 76 { 77 "kind": "edge_shared_by_n_triangles", 78 "edge": [ 79 2, 80 4 81 ], 82 "n": 1 83 } 84 ] 85 } 86}