FA-88601 / Mesh topology invariants / Open access
Welding compares faces without canonical rotation · case 01
The same face listed from a different start corner is kept twice.
ROOT CAUSE
Duplicate detection uses the face tuple as stored.
VERIFIED REPAIR
Rotate so the smallest id is first, preserving orientation.
Unsuccessful approach: Sorting the corners also merges faces with opposite orientation.
Case contract
Input [points, faces, eps]. Points weld when floor(c/eps+0.5) agrees on every coordinate; the welded vertex takes the next new id and is represented by its lowest original index. Remap faces, merge consecutive equal corners (also across the wrap), drop faces with fewer than 3 corners, rotate each face so its smallest id comes first (orientation kept) and drop later copies of an identical rotated face. Return [representatives, faces].
Why this case matters
Mesh processing pipelines (remeshing, export, simulation, printing) trust these topological counts and adjacency answers; a wrong invariant silently accepts broken meshes or rejects valid ones.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
pts,faces,eps=x
key_to_new={}
remap=[]
reps=[]
for i,p in enumerate(pts):
k=tuple(math.floor(c/eps+0.5) for c in p)
if k not in key_to_new:
key_to_new[k]=len(reps)
reps.append(i)
remap.append(key_to_new[k])
out=[]
seen=set()
for f in faces:
g=[remap[v] for v in f]
h=[]
for v in g:
if not h or h[-1]!=v: h.append(v)
while len(h)>1 and h[0]==h[-1]: h.pop()
if len(h)<3: continue
m=h.index(min(h))
c=tuple(h)
if c in seen: continue
seen.add(c)
out.append(list(c))
return [reps,out]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['near duplicate corner', [[[[0, 0], [1, 0], [0, 1], [1.02, 0.01]], [[0, 1, 2], [3, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]]], [['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['three points weld to one', [[[[5, 5], [5.01, 5], [4.99, 5.01], [6, 5], [5, 6]], [[3, 0, 4], [1, 3, 4], [2, 4, 3]], 0.1]], [[0, 3, 4], [[0, 2, 1], [0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]]], [['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['three points weld to one', [[[[5, 5], [5.01, 5], [4.99, 5.01], [6, 5], [5, 6]], [[3, 0, 4], [1, 3, 4], [2, 4, 3]], 0.1]], [[0, 3, 4], [[0, 2, 1], [0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['near duplicate corner', [[[[0, 0], [1, 0], [0, 1], [1.02, 0.01]], [[0, 1, 2], [3, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| near duplicate corner | [[0, 1, 2], [[0, 1, 2]]] | [[0, 1, 2], [[0, 1, 2]]] | Passed |
| negative coordinates | [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]] | [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]] | Passed |
| half grid step | [[0, 1, 2, 3], [[0, 1, 2], [3, 1, 2]]] | [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]] | Failed |
| collapsing triangle | [[0, 2, 3], [[0, 1, 2]]] | [[0, 2, 3], [[0, 1, 2]]] | Passed |
| rotated duplicate | [[0, 1, 2], [[0, 1, 2], [1, 2, 0], [2, 1, 0]]] | [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]] | Failed |
| wrap-around duplicate | [[0, 1, 2], [[0, 1, 2]]] | [[0, 1, 2], [[0, 1, 2]]] | Passed |
| trailing repeats | [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]] | [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]] | Passed |
SHA-256 / 0402793e0adea09ac5cc2f17820c44a405239717f02713eb1c3051f00414f5ba
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
pts,faces,eps=x
key_to_new={}
remap=[]
reps=[]
for i,p in enumerate(pts):
k=tuple(math.floor(c/eps+0.5) for c in p)
if k not in key_to_new:
key_to_new[k]=len(reps)
reps.append(i)
remap.append(key_to_new[k])
out=[]
seen=set()
for f in faces:
g=[remap[v] for v in f]
h=[]
for v in g:
if not h or h[-1]!=v: h.append(v)
while len(h)>1 and h[0]==h[-1]: h.pop()
if len(h)<3: continue
m=h.index(min(h))
c=tuple(sorted(h))
if c in seen: continue
seen.add(c)
out.append(list(c))
return [reps,out]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['near duplicate corner', [[[[0, 0], [1, 0], [0, 1], [1.02, 0.01]], [[0, 1, 2], [3, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]]], [['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['three points weld to one', [[[[5, 5], [5.01, 5], [4.99, 5.01], [6, 5], [5, 6]], [[3, 0, 4], [1, 3, 4], [2, 4, 3]], 0.1]], [[0, 3, 4], [[0, 2, 1], [0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]]], [['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['three points weld to one', [[[[5, 5], [5.01, 5], [4.99, 5.01], [6, 5], [5, 6]], [[3, 0, 4], [1, 3, 4], [2, 4, 3]], 0.1]], [[0, 3, 4], [[0, 2, 1], [0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['near duplicate corner', [[[[0, 0], [1, 0], [0, 1], [1.02, 0.01]], [[0, 1, 2], [3, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| near duplicate corner | [[0, 1, 2], [[0, 1, 2]]] | [[0, 1, 2], [[0, 1, 2]]] | Passed |
| negative coordinates | [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]] | [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]] | Passed |
| half grid step | [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]] | [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]] | Passed |
| collapsing triangle | [[0, 2, 3], [[0, 1, 2]]] | [[0, 2, 3], [[0, 1, 2]]] | Passed |
| rotated duplicate | [[0, 1, 2], [[0, 1, 2]]] | [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]] | Failed |
| wrap-around duplicate | [[0, 1, 2], [[0, 1, 2]]] | [[0, 1, 2], [[0, 1, 2]]] | Passed |
| trailing repeats | [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]] | [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]] | Passed |
SHA-256 / e5958dd4428151bc39b45a3aca67b86df99e98e36ec0574099dc48db5fe64554
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
pts,faces,eps=x
key_to_new={}
remap=[]
reps=[]
for i,p in enumerate(pts):
k=tuple(math.floor(c/eps+0.5) for c in p)
if k not in key_to_new:
key_to_new[k]=len(reps)
reps.append(i)
remap.append(key_to_new[k])
out=[]
seen=set()
for f in faces:
g=[remap[v] for v in f]
h=[]
for v in g:
if not h or h[-1]!=v: h.append(v)
while len(h)>1 and h[0]==h[-1]: h.pop()
if len(h)<3: continue
m=h.index(min(h))
c=tuple(h[m:]+h[:m])
if c in seen: continue
seen.add(c)
out.append(list(c))
return [reps,out]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['near duplicate corner', [[[[0, 0], [1, 0], [0, 1], [1.02, 0.01]], [[0, 1, 2], [3, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]]], [['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['three points weld to one', [[[[5, 5], [5.01, 5], [4.99, 5.01], [6, 5], [5, 6]], [[3, 0, 4], [1, 3, 4], [2, 4, 3]], 0.1]], [[0, 3, 4], [[0, 2, 1], [0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]]], [['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['three points weld to one', [[[[5, 5], [5.01, 5], [4.99, 5.01], [6, 5], [5, 6]], [[3, 0, 4], [1, 3, 4], [2, 4, 3]], 0.1]], [[0, 3, 4], [[0, 2, 1], [0, 1, 2]]]], ['non-consecutive repeat kept', [[[[0, 0], [1, 0], [2, 0], [1, 1], [1.01, 1]], [[0, 1, 3, 2, 4]], 0.1]], [[0, 1, 2, 3], [[0, 1, 3, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['near duplicate corner', [[[[0, 0], [1, 0], [0, 1], [1.02, 0.01]], [[0, 1, 2], [3, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['opposite orientation kept', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [0, 2, 1]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]], ['bowed quad two repeats', [[[[0, 0], [1, 0], [1, 0.01], [1, 1], [0, 1]], [[0, 1, 2, 3, 4]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2, 3]]]], ['two-corner collapse', [[[[0, 0], [0, 0.01], [3, 3], [3.01, 3]], [[0, 2, 1, 3]], 0.1]], [[0, 2], [[0, 1, 0, 1]]]]], [['negative coordinates', [[[[-0.7, 0], [0.3, 0], [0, 1], [1, 1]], [[0, 2, 3], [1, 2, 3]], 1.0]], [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]]], ['half grid step', [[[[0.5, 0], [2.5, 0], [1.5, 1], [0.4, 0], [2.6, 0]], [[0, 1, 2], [3, 4, 2]], 1.0]], [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]]], ['collapsing triangle', [[[[0, 0], [0.01, 0], [1, 1], [2, 2]], [[0, 1, 2], [1, 2, 3]], 0.1]], [[0, 2, 3], [[0, 1, 2]]]], ['rotated duplicate', [[[[0, 0], [1, 0], [0, 1]], [[0, 1, 2], [1, 2, 0], [2, 1, 0]], 0.1]], [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]]], ['wrap-around duplicate', [[[[0, 0], [1, 0], [1, 1], [0.01, 0.01]], [[0, 1, 2, 3], [3, 0, 1, 2, 3]], 0.1]], [[0, 1, 2], [[0, 1, 2]]]], ['trailing repeats', [[[[0, 0], [1, 0], [1, 1], [0, 1], [0.02, 0]], [[0, 1, 2, 4, 4], [0, 2, 3]], 0.1]], [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]]], ['late lowest representative', [[[[3, 3], [1, 1], [3.04, 3], [1, 0], [0, 0]], [[1, 3, 0], [4, 3, 2]], 0.1]], [[0, 1, 3, 4], [[0, 1, 2], [0, 3, 2]]]]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| near duplicate corner | [[0, 1, 2], [[0, 1, 2]]] | [[0, 1, 2], [[0, 1, 2]]] | Passed |
| negative coordinates | [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]] | [[0, 1, 2, 3], [[0, 2, 3], [1, 2, 3]]] | Passed |
| half grid step | [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]] | [[0, 1, 2, 3], [[0, 1, 2], [1, 2, 3]]] | Passed |
| collapsing triangle | [[0, 2, 3], [[0, 1, 2]]] | [[0, 2, 3], [[0, 1, 2]]] | Passed |
| rotated duplicate | [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]] | [[0, 1, 2], [[0, 1, 2], [0, 2, 1]]] | Passed |
| wrap-around duplicate | [[0, 1, 2], [[0, 1, 2]]] | [[0, 1, 2], [[0, 1, 2]]] | Passed |
| trailing repeats | [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]] | [[0, 1, 2, 3], [[0, 1, 2], [0, 2, 3]]] | Passed |
SHA-256 / e3220ff45c6c577c0722e691a2f64214afa621f19961292ef57ecb3676037614
Verification & scope
Pure combinatorial teaching model over integer face lists with a stipulated contract; no geometry kernel or file format is implied. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:51:09.592633+00:00.
Case digest / ba216c7d508635d6e5192cd58c328562ae19316409940b8f692c3c66638435b6