mesh-examples/12-14-mesh/Me1085.mesh.json
Sources
- CGAL PMP `PMP.remove_degenerate_faces` Branch 6 (*degenerate_edge_in_face*: `if (is_degenerate_edge(h, tmesh, vpm, gt)) { ... remove_degenerate_edges ... }`)
- `MESH_HEAL_COVERAGE.md`.
Description
A needle triangle t0=(n0,n1,n2) where n1 and n2 both sit at (3,0,0) — a zero-length edge that makes t0 degenerate. The triangle collapses to a line segment from (0,0,0) to (3,0,0). When remove_degenerate_faces processes t0, it iterates over the triangle's halfedges and calls is_degenerate_edge for each; the (n1,n2) halfedge returns true → Branch 6 invokes remove_degenerate_edges before the face-removal Euler operators. Clean control triangle t1=(c0,c1,c2) provides non-degenerate context. All edges of t0 are boundary (n=1).
Reproducer recipe
n0=(0,0,0), n1=(3,0,0), n2=(3,0,0) [=n1]; c0=(5,0,0), c1=(6,0,0), c2=(5.5,1,0); t0=(n0,n1,n2), t1=(c0,c1,c2); assert_vertex_pair_distance_lt(n1,n2,1e-12); assert_triangle_area_lt(t0,1e-12); assert_edge_shared(n0,n1,1); assert_edge_shared(n1,n2,1); assert_edge_shared(n0,n2,1).
Expected kernel behavior
Branch 6 fires; is_degenerate_edge returns true for halfedge (n1,n2); remove_degenerate_edges is called on the mesh before the face-level Euler operators; the zero-length edge (n1,n2) is collapsed 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 3.0, 10 0.0, 11 0.0 12 ], 13 [ 14 3.0, 15 0.0, 16 0.0 17 ], 18 [ 19 5.0, 20 0.0, 21 0.0 22 ], 23 [ 24 6.0, 25 0.0, 26 0.0 27 ], 28 [ 29 5.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": "Me1085", 48 "schema_version": 0, 49 "defect_class": "degenerate_triangle", 50 "title": "remove_degenerate_faces degenerate_edge_in_face: needle triangle n0-n1-n2 with zero-length edge (n1==n2 at (3,0,0)); is_degenerate_edge fires \u2192 remove_degenerate_edges called (Branch 6)", 51 "assertions": [ 52 { 53 "kind": "vertex_pair_distance_lt", 54 "pair": [ 55 1, 56 2 57 ], 58 "lt": 1e-12 59 }, 60 { 61 "kind": "triangle_area_lt", 62 "triangle": 0, 63 "lt": 1e-12 64 }, 65 { 66 "kind": "edge_shared_by_n_triangles", 67 "edge": [ 68 0, 69 1 70 ], 71 "n": 1 72 }, 73 { 74 "kind": "edge_shared_by_n_triangles", 75 "edge": [ 76 1, 77 2 78 ], 79 "n": 1 80 }, 81 { 82 "kind": "edge_shared_by_n_triangles", 83 "edge": [ 84 0, 85 2 86 ], 87 "n": 1 88 } 89 ] 90 } 91}