Me425 — removeOverlappingTriangles_swap_creates_t2_overlap_prev: post-swap t2->prevEdge overlaps neighbor; undo (Branch 6)

§12.14 mesh defects (sub-class: overlapping-triangles / swap-t2-prev-edge-side-effect)

topology

Sources

Description

Three coplanar triangles. t0=(v0,v1,v2) and t1=(v0,v1,v3) share overlapping edge (v0=(0,0), v1=(3,0)); v3=(1.5,1) is inside t0 → primary overlap. t3=(v1,v2,v4) with v4=(2.5,2) neighbors t0 via edge (v1,v2) (the prev-edge of the second incident triangle when traversed from the swapped position). After swapping, the new t2-side triangle's prev-edge would overlap t3 → Branch 6 fires, swap is undone.

Reproducer recipe

v0=(0,0,0), v1=(3,0,0), v2=(1.5,3,0), v3=(1.5,1,0), v4=(2.5,2,0); t0=(v0,v1,v2), t1=(v0,v1,v3), t3=(v1,v2,v4); assert_edge_shared(v0,v1,2); assert_edge_shared(v1,v2,2); assert_triangles_self_intersect(0,1); assert_adjacent_triangles_normal_dot_gt(0,1,0.99).

Expected kernel behavior

Branch 6 fires; after swap, `e->t2->prevEdge(e)->overlaps()` evaluates true; swap is undone via `e->swap(1)`.

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      1.5,
15      3.0,
16      0.0
17    ],
18    [
19      1.5,
20      1.0,
21      0.0
22    ],
23    [
24      2.5,
25      2.0,
26      0.0
27    ]
28  ],
29  "triangles": [
30    [
31      0,
32      1,
33      2
34    ],
35    [
36      0,
37      1,
38      3
39    ],
40    [
41      1,
42      2,
43      4
44    ]
45  ],
46  "metadata": {
47    "id": "Me425",
48    "schema_version": 0,
49    "defect_class": "overlapping_triangles",
50    "title": "removeOverlappingTriangles SWAP_CREATES_T2_OVERLAP_PREV: swap creates new overlap on t2->prevEdge (Branch 6)",
51    "assertions": [
52      {
53        "kind": "edge_shared_by_n_triangles",
54        "edge": [
55          0,
56          1
57        ],
58        "n": 2
59      },
60      {
61        "kind": "edge_shared_by_n_triangles",
62        "edge": [
63          1,
64          2
65        ],
66        "n": 2
67      },
68      {
69        "kind": "triangles_self_intersect",
70        "triangles": [
71          0,
72          1
73        ]
74      },
75      {
76        "kind": "adjacent_triangles_normal_dot_gt",
77        "triangles": [
78          0,
79          1
80        ],
81        "threshold": 0.99
82      }
83    ]
84  }
85}