Me366 — remove_isolated_points_index_remapping: isolated vertex at non-tail position forces non-trivial index remap

§12.14 mesh defects (sub-class: isolated_vertex / remove-isolated-points-in-polygon-soup)

topology

Sources

Description

Four vertices where index 1 (v_iso) is isolated and the triangle references indices 0, 2, 3. After the swap phase moves v_iso to the tail and a referenced vertex fills index 1, the remap step must update every polygon reference to use the new compacted indices. Branch 7 inner loop fires for each vertex in each polygon.

Reproducer recipe

v0=(0,0,0) idx=0, v_iso=(5,5,5) idx=1, v1=(1,0,0) idx=2, v2=(0.5,1,0) idx=3; t0=(0,2,3); assert_isolated_vertex(1); all triangle edges n=1.

Expected kernel behavior

Branch 7 fires 3 times (one per polygon vertex); indices remapped from {0,2,3} → {0,1,2} after compact; v_iso erased.

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      5.0,
10      5.0,
11      5.0
12    ],
13    [
14      1.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      2,
28      3
29    ]
30  ],
31  "metadata": {
32    "id": "Me366",
33    "schema_version": 0,
34    "defect_class": "isolated_vertex",
35    "title": "remove_isolated_points_index_remapping: isolated vertex at non-tail position forces non-trivial index remap",
36    "assertions": [
37      {
38        "kind": "isolated_vertex",
39        "vertex": 1
40      },
41      {
42        "kind": "edge_shared_by_n_triangles",
43        "edge": [
44          0,
45          2
46        ],
47        "n": 1
48      },
49      {
50        "kind": "edge_shared_by_n_triangles",
51        "edge": [
52          2,
53          3
54        ],
55        "n": 1
56      },
57      {
58        "kind": "edge_shared_by_n_triangles",
59        "edge": [
60          0,
61          3
62        ],
63        "n": 1
64      }
65    ]
66  }
67}