mesh-examples/12-14-mesh/Me800.mesh.json
Sources
- CGAL PMP `PMP.is_polygon_soup_a_polygon_mesh` Branch 1 (*duplicate_vertex_in_polygon*: `for(std::size_t j=0
- j<polygon.size()
- ++j){ if(polygon[j]==polygon[k]) return false
- }`)
- `MESH_HEAL_COVERAGE.md`.
Description
Three-triangle soup with one collapsed polygon. Triangle t0 is [v0, v1, v0] — vertex index 0 appears at positions 0 and 2. The inner loop over index pairs detects this repeated index and returns false immediately, without inspecting the rest of the soup. Triangles t1 and t2 form a valid manifold pair (edge (v1,v2) shared n=2) to show the surrounding geometry is otherwise ordinary. t0 has zero area because two corners coincide at the same point.
Reproducer recipe
v0=(0,0,0), v1=(1,0,0), v2=(0.5,1,0), v3=(1.5,1,0); t0=(v0,v1,v0) collapsed, t1=(v0,v1,v2), t2=(v1,v3,v2); assert_triangle_area_lt(0,1e-9); assert_edge_shared(v1,v2,2).
Expected kernel behavior
Branch 1 fires on polygon t0; is_polygon_soup_a_polygon_mesh returns false; the soup is rejected as non-mesh-representable due to the self-repeated vertex.
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 "triangles": [ 25 [ 26 0, 27 1, 28 0 29 ], 30 [ 31 0, 32 1, 33 2 34 ], 35 [ 36 1, 37 3, 38 2 39 ] 40 ], 41 "metadata": { 42 "id": "Me800", 43 "schema_version": 0, 44 "defect_class": "degenerate_triangle", 45 "title": "is_polygon_soup_a_polygon_mesh duplicate_vertex_in_polygon: triangle [v0,v1,v0] has repeated index (Branch 1)", 46 "assertions": [ 47 { 48 "kind": "triangle_area_lt", 49 "triangle": 0, 50 "lt": 1e-09 51 }, 52 { 53 "kind": "edge_shared_by_n_triangles", 54 "edge": [ 55 1, 56 2 57 ], 58 "n": 2 59 } 60 ] 61 } 62}