Me287 — checkGeometry_overlapping_triangles_dihedral: adjacent coplanar triangles with dihedral = 180° (Branch 8)

§12.14 mesh defects (sub-class: checkGeometry / overlapping-triangles-dihedral)

topology

Sources

Description

Two triangles sharing edge (v1,v2): t0=(v0,v1,v2) and t1=(v2,v1,v3) both lie in the z=0 plane. Both are wound counter-clockwise, giving normals in the +Z direction. The dihedral angle between them along the shared edge is 180° — they fold flat in the same direction. When projected, the triangles occupy the same half-space and form an overlapping coplanar pair. checkGeometry detects this via getDAngle returning π and returns the edge's v1 vertex.

Reproducer recipe

v0=(0,0,0), v1=(1,0,0), v2=(0,1,0), v3=(1,1,0) in z=0; t0=(v0,v1,v2) CCW; t1=(v2,v1,v3) CCW; shared edge (v1,v2) n=2; assert adjacent_triangles_normal_dot_gt > 0.99.

Expected kernel behavior

Branch 8 fires; defect logged as 'overlapping triangles detected', 'getDAngle(e->t2) == M_PI'; edge v1 returned as defect location.

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.0,
15      1.0,
16      0.0
17    ],
18    [
19      1.0,
20      1.0,
21      0.0
22    ]
23  ],
24  "triangles": [
25    [
26      0,
27      1,
28      2
29    ],
30    [
31      2,
32      1,
33      3
34    ]
35  ],
36  "metadata": {
37    "id": "Me287",
38    "schema_version": 0,
39    "defect_class": "overlapping_triangles",
40    "title": "checkGeometry_overlapping_triangles_dihedral: adjacent coplanar triangles, dihedral = 180\u00b0 (Branch 8)",
41    "assertions": [
42      {
43        "kind": "edge_shared_by_n_triangles",
44        "edge": [
45          1,
46          2
47        ],
48        "n": 2
49      },
50      {
51        "kind": "adjacent_triangles_normal_dot_gt",
52        "triangles": [
53          0,
54          1
55        ],
56        "threshold": 0.99
57      }
58    ]
59  }
60}