Me423 — removeOverlappingTriangles_swap_creates_neighbor_overlap_prev: post-swap prevEdge(t1) overlaps neighbor; undo (Branch 4)

§12.14 mesh defects (sub-class: overlapping-triangles / swap-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. t2=(v3,v0,v4) with v4=(−0.5,0.5) neighbors t1 via edge (v3,v0) (t1's prev-edge before e). After swapping (v0,v1) to (v2,v3), the new t1=(v0,v2,v3) would have its prev-edge (v3,v0) neighbor t2 in an overlapping arrangement — Branch 4 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=(−0.5,0.5,0); t0=(v0,v1,v2), t1=(v0,v1,v3), t2=(v3,v0,v4); assert_edge_shared(v0,v1,2); assert_edge_shared(v0,v3,2); assert_triangles_self_intersect(0,1); assert_adjacent_triangles_normal_dot_gt(0,1,0.99).

Expected kernel behavior

Branch 4 fires; after swap, `e->prevEdge(e)->overlaps()` evaluates true for the new t1's prev-edge vs t2; swap is undone.

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      -0.5,
25      0.5,
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      3,
42      0,
43      4
44    ]
45  ],
46  "metadata": {
47    "id": "Me423",
48    "schema_version": 0,
49    "defect_class": "overlapping_triangles",
50    "title": "removeOverlappingTriangles SWAP_CREATES_NEIGHBOR_OVERLAP_PREV: swap creates new overlap on prevEdge(t1) (Branch 4)",
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          0,
64          3
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}