mesh-examples/12-14-mesh/Me1084.mesh.json
Sources
- CGAL PMP `PMP.remove_degenerate_faces` Branch 5 (*border_degenerate_face*: `if (is_border(opposite(halfedge(f, tmesh), tmesh), tmesh)) { border_deg_faces.push(f)
- continue
- }`)
- `MESH_HEAL_COVERAGE.md`.
Description
A clean non-degenerate triangle t0=(v0,v1,v3) with area=0.5 sharing edge (v0,v1) with a collinear degenerate triangle t1=(v0,v1,v2). The degenerate face t1 has two boundary edges: (v1,v2) and (v0,v2), each incident on only one face (n=1). When processing t1, the algorithm checks is_border for the opposite halfedges of these two edges; the check returns true → Branch 5 queues t1 in border_deg_faces for boundary-aware processing. Shared edge (v0,v1) n=2; boundary edges (v1,v2) and (v0,v2) n=1; clean triangle boundary edges (v0,v3) and (v1,v3) n=1.
Reproducer recipe
v0=(0,0,0), v1=(1,0,0), v2=(2,0,0), v3=(0.5,1,0); t0=(v0,v1,v3), t1=(v0,v1,v2); assert_triangle_area_lt(t1,1e-12); assert_edge_shared(v0,v1,2); assert_edge_shared(v1,v2,1); assert_edge_shared(v0,v2,1); assert_edge_shared(v0,v3,1); assert_edge_shared(v1,v3,1).
Expected kernel behavior
Branch 5 fires for t1; is_border(opposite) returns true for at least one halfedge of t1; border_deg_faces.push(t1); main repair loop continues to the next face without modifying t1 immediately.
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 2.0, 15 0.0, 16 0.0 17 ], 18 [ 19 0.5, 20 1.0, 21 0.0 22 ] 23 ], 24 "triangles": [ 25 [ 26 0, 27 1, 28 3 29 ], 30 [ 31 0, 32 1, 33 2 34 ] 35 ], 36 "metadata": { 37 "id": "Me1084", 38 "schema_version": 0, 39 "defect_class": "degenerate_triangle", 40 "title": "remove_degenerate_faces border_degenerate_face: collinear t1 shares interior edge with clean t0; two boundary edges on t1 trigger is_border(opposite) \u2192 border_deg_faces (Branch 5)", 41 "assertions": [ 42 { 43 "kind": "triangle_area_lt", 44 "triangle": 1, 45 "lt": 1e-12 46 }, 47 { 48 "kind": "edge_shared_by_n_triangles", 49 "edge": [ 50 0, 51 1 52 ], 53 "n": 2 54 }, 55 { 56 "kind": "edge_shared_by_n_triangles", 57 "edge": [ 58 1, 59 2 60 ], 61 "n": 1 62 }, 63 { 64 "kind": "edge_shared_by_n_triangles", 65 "edge": [ 66 0, 67 2 68 ], 69 "n": 1 70 }, 71 { 72 "kind": "edge_shared_by_n_triangles", 73 "edge": [ 74 0, 75 3 76 ], 77 "n": 1 78 }, 79 { 80 "kind": "edge_shared_by_n_triangles", 81 "edge": [ 82 1, 83 3 84 ], 85 "n": 1 86 } 87 ] 88 } 89}