mesh-examples/12-14-mesh/Me045.mesh.json
Sources
- CGAL `PMP.merge_duplicate_polygons_in_polygon_soup` Branch 10 @ line 1029 (*mark_treated*) and Branch 11 @ line 1035 (*final_erase*)
- `MESH_HEAL_COVERAGE.md`.
Description
5-triangle soup with 3 copies of (0,1,2). With KEEP_ONE_IF_ODD, size%2==1 so 1 copy is kept; treated[] is set true for the 2 removed copies; polygons.erase(first, end()) physically shrinks the container from 5 to 3 triangles. Exercises both the mark_treated bit-write and the final container erase together.
Reproducer recipe
3 copies of (0,1,2) then 2 distinct clean triangles; KEEP_ONE_IF_ODD keeps 1, treated[] marks 2, erase fires once.
Expected kernel behavior
treated[] set for 2 polygons; single erase() call removes back region; result = 3 triangles.
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.5, 20 1.0, 21 0.0 22 ], 23 [ 24 2.0, 25 0.0, 26 0.0 27 ] 28 ], 29 "triangles": [ 30 [ 31 0, 32 1, 33 2 34 ], 35 [ 36 0, 37 1, 38 2 39 ], 40 [ 41 0, 42 1, 43 2 44 ], 45 [ 46 1, 47 3, 48 2 49 ], 50 [ 51 3, 52 4, 53 2 54 ] 55 ], 56 "metadata": { 57 "id": "Me045", 58 "schema_version": 0, 59 "defect_class": "duplicate_triangles", 60 "title": "duplicate_polygons mark_treated+final_erase: KEEP_ONE_IF_ODD with 3 copies", 61 "assertions": [ 62 { 63 "kind": "duplicate_polygon_group", 64 "triangles": [ 65 0, 66 1, 67 2 68 ], 69 "n": 3 70 } 71 ] 72 } 73}