FAILURE MAP
← Case archive

FA-88801 / Mesh topology invariants / Open access

Valence is taken from incident face count plus one · case 01

Interior vertices of closed meshes are over-counted by one each.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The valence proxy adds one to the incident-face count for every vertex, which only fits boundary vertices.

VERIFIED REPAIR

Count distinct edge neighbours.

Unsuccessful approach: Using the raw face count under-counts boundary vertices.

Case contract

Input [faces, kind] with kind "tri" or "quad". Valence = number of edge neighbours; boundary vertices touch an edge used once. Regular valence is 6/4 (tri interior/boundary) or 4/3 (quad). Index sum = sum of (regular - valence). Return [index sum, chi=V-E+F, index sum == k*chi] with k=6 for tri and 4 for quad.

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):
    faces,kind=x
    nb={}
    inc={}
    cnt={}
    for f in faces:
        n=len(f)
        for v in f: inc[v]=inc.get(v,0)+1
        for i in range(n):
            a,b=f[i],f[(i+1)%n]
            nb.setdefault(a,set()).add(b)
            nb.setdefault(b,set()).add(a)
            k=(min(a,b),max(a,b))
            cnt[k]=cnt.get(k,0)+1
    bnd={v for k,c in cnt.items() if c==1 for v in k}
    reg_i,reg_b,mult=(6,4,6) if kind=='tri' else (4,3,4)
    idx=sum((reg_b if v in bnd else reg_i)-(inc[v]+1) for v in nb)
    chi=len(nb)-len(cnt)+len(faces)
    return [idx,chi,idx==mult*chi]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]]], [['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]]], [['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]], ['single quad', [[[[0, 1, 2, 3]], 'quad']], [4, 1, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]], [['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]], [['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]]]]
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 fixtureActualExpectedOutcome
tetrahedron[8, 2, False][12, 2, True]Failed
octahedron[6, 2, False][12, 2, True]Failed
disk[5, 1, False][6, 1, True]Failed
triangle torus[-9, 0, False][0, 0, True]Failed
triangle grid[5, 1, False][6, 1, True]Failed
cube[0, 2, False][8, 2, True]Failed
quad grid[3, 1, False][4, 1, True]Failed

SHA-256 / f20a4de87cda8af14e8ae965b4e344ab1bf692cf374be1a005304ecb3c110fb8

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    faces,kind=x
    nb={}
    inc={}
    cnt={}
    for f in faces:
        n=len(f)
        for v in f: inc[v]=inc.get(v,0)+1
        for i in range(n):
            a,b=f[i],f[(i+1)%n]
            nb.setdefault(a,set()).add(b)
            nb.setdefault(b,set()).add(a)
            k=(min(a,b),max(a,b))
            cnt[k]=cnt.get(k,0)+1
    bnd={v for k,c in cnt.items() if c==1 for v in k}
    reg_i,reg_b,mult=(6,4,6) if kind=='tri' else (4,3,4)
    idx=sum((reg_b if v in bnd else reg_i)-inc[v] for v in nb)
    chi=len(nb)-len(cnt)+len(faces)
    return [idx,chi,idx==mult*chi]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]]], [['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]]], [['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]], ['single quad', [[[[0, 1, 2, 3]], 'quad']], [4, 1, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]], [['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]], [['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]]]]
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 fixtureActualExpectedOutcome
tetrahedron[12, 2, True][12, 2, True]Passed
octahedron[12, 2, True][12, 2, True]Passed
disk[11, 1, False][6, 1, True]Failed
triangle torus[0, 0, True][0, 0, True]Passed
triangle grid[14, 1, False][6, 1, True]Failed
cube[8, 2, True][8, 2, True]Passed
quad grid[12, 1, False][4, 1, True]Failed

SHA-256 / fcd6a797fd8e24c14d004b880350a7d563f5723955a47c50e66b69815b45eecf

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    faces,kind=x
    nb={}
    cnt={}
    for f in faces:
        n=len(f)
        for i in range(n):
            a,b=f[i],f[(i+1)%n]
            nb.setdefault(a,set()).add(b)
            nb.setdefault(b,set()).add(a)
            k=(min(a,b),max(a,b))
            cnt[k]=cnt.get(k,0)+1
    bnd={v for k,c in cnt.items() if c==1 for v in k}
    reg_i,reg_b,mult=(6,4,6) if kind=='tri' else (4,3,4)
    idx=sum((reg_b if v in bnd else reg_i)-len(nb[v]) for v in nb)
    chi=len(nb)-len(cnt)+len(faces)
    return [idx,chi,idx==mult*chi]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]]], [['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]]], [['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]], ['single quad', [[[[0, 1, 2, 3]], 'quad']], [4, 1, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]], [['tetrahedron', [[[[0, 2, 1], [0, 1, 3], [1, 2, 3], [0, 3, 2]], 'tri']], [12, 2, True]], ['octahedron', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 1], [5, 2, 1], [5, 3, 2], [5, 4, 3], [5, 1, 4]], 'tri']], [12, 2, True]], ['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['quad annulus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0]], 'quad']], [0, 0, True]], ['fan', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4]], 'tri']], [6, 1, True]]], [['disk', [[[[0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [0, 5, 1]], 'tri']], [6, 1, True]], ['triangle torus', [[[[0, 3, 4], [0, 4, 1], [1, 4, 5], [1, 5, 2], [2, 5, 3], [2, 3, 0], [3, 6, 7], [3, 7, 4], [4, 7, 8], [4, 8, 5], [5, 8, 6], [5, 6, 3], [6, 0, 1], [6, 1, 7], [7, 1, 2], [7, 2, 8], [8, 2, 0], [8, 0, 6]], 'tri']], [0, 0, True]], ['triangle grid', [[[[0, 1, 4], [0, 4, 3], [1, 2, 5], [1, 5, 4], [3, 4, 7], [3, 7, 6], [4, 5, 8], [4, 8, 7]], 'tri']], [6, 1, True]], ['cube', [[[[0, 3, 2, 1], [4, 5, 6, 7], [0, 1, 5, 4], [1, 2, 6, 5], [2, 3, 7, 6], [3, 0, 4, 7]], 'quad']], [8, 2, True]], ['quad grid', [[[[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]], 'quad']], [4, 1, True]], ['quad torus', [[[[0, 3, 4, 1], [1, 4, 5, 2], [2, 5, 3, 0], [3, 6, 7, 4], [4, 7, 8, 5], [5, 8, 6, 3], [6, 0, 1, 7], [7, 1, 2, 8], [8, 2, 0, 6]], 'quad']], [0, 0, True]], ['open cylinder', [[[[0, 1, 5], [0, 5, 4], [1, 2, 6], [1, 6, 5], [2, 3, 7], [2, 7, 6], [3, 0, 4], [3, 4, 7]], 'tri']], [0, 0, True]]]]
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 fixtureActualExpectedOutcome
tetrahedron[12, 2, True][12, 2, True]Passed
octahedron[12, 2, True][12, 2, True]Passed
disk[6, 1, True][6, 1, True]Passed
triangle torus[0, 0, True][0, 0, True]Passed
triangle grid[6, 1, True][6, 1, True]Passed
cube[8, 2, True][8, 2, True]Passed
quad grid[4, 1, True][4, 1, True]Passed

SHA-256 / c48923af9f2c98b25be04875054ba77af8a1821d522184d604a663094b2f6faa

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:11.554940+00:00.

Case digest / 301281b47eb9ae108ed688a6083811224798ccce019fb448569661d60323d871