FAILURE MAP
← Case archive

FA-88506 / Mesh topology invariants / Open access

Loop subdivision edge count adds F instead of 3F · case 01

Predicted edge counts are low and the Euler characteristic drifts after subdivision.

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

ROOT CAUSE

Each face contributes three interior edges, but the update adds only one per face.

THE FAILURE

Each face contributes three interior edges, but the update adds only one per face.

Unsuccessful approach: E = 4E only holds for closed meshes where 3F = 2E.

Case contract

Input [V,E,arities,B,scheme,levels]: counts of a mesh with face sizes "arities" and B boundary edges. Loop (triangles only, else "non-triangle"): V+=E, E=2E+3F, F=4F. Catmull-Clark: V=V+E+F, E=2E+sum(arities), faces become sum(arities) quads. Boundary edges double per level. Return [V,E,F,B,V-E+F] after the given levels.

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):
    V,E,ar,B,scheme,levels=x
    ar=list(ar)
    for _ in range(levels):
        F=len(ar)
        S=sum(ar)
        if scheme=='loop':
            if any(n!=3 for n in ar): return 'non-triangle'
            V,E,ar=V+E,2*E+F,[3]*(4*F)
        else:
            V,E,ar=V+E+F,2*E+S,[4]*S
        B=2*B
    return [V,E,len(ar),B,V-E+len(ar)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['tetra loop 1', [[4, 6, [3, 3, 3, 3], 0, 'loop', 1]], [10, 24, 16, 0, 2]], ['tetra loop 2', [[4, 6, [3, 3, 3, 3], 0, 'loop', 2]], [34, 96, 64, 0, 2]], ['disk loop', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 1]], [16, 35, 20, 10, 1]], ['disk loop 2', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 2]], [51, 130, 80, 20, 1]], ['cube cc', [[8, 12, [4, 4, 4, 4, 4, 4], 0, 'cc', 1]], [26, 48, 24, 0, 2]], ['cube cc 2', [[8, 12, [4, 4, 4, 4, 4, 4], 0, 'cc', 2]], [98, 192, 96, 0, 2]], ['single quad cc', [[4, 4, [4], 4, 'cc', 2]], [25, 40, 16, 16, 1]]], [['tetra loop 2', [[4, 6, [3, 3, 3, 3], 0, 'loop', 2]], [34, 96, 64, 0, 2]], ['disk loop 2', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 2]], [51, 130, 80, 20, 1]], ['cube cc 2', [[8, 12, [4, 4, 4, 4, 4, 4], 0, 'cc', 2]], [98, 192, 96, 0, 2]], ['single quad cc', [[4, 4, [4], 4, 'cc', 2]], [25, 40, 16, 16, 1]], ['quad and triangle cc', [[5, 6, [4, 3], 4, 'cc', 1]], [13, 19, 7, 8, 1]], ['quad and triangle cc 2', [[5, 6, [4, 3], 4, 'cc', 2]], [39, 66, 28, 16, 1]], ['pentagon cc', [[5, 5, [5], 5, 'cc', 1]], [11, 15, 5, 10, 1]]], [['disk loop', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 1]], [16, 35, 20, 10, 1]], ['quad and triangle cc', [[5, 6, [4, 3], 4, 'cc', 1]], [13, 19, 7, 8, 1]], ['quad and triangle cc 2', [[5, 6, [4, 3], 4, 'cc', 2]], [39, 66, 28, 16, 1]], ['pentagon cc', [[5, 5, [5], 5, 'cc', 1]], [11, 15, 5, 10, 1]], ['quad under loop', [[4, 4, [4], 4, 'loop', 1]], 'non-triangle'], ['triangle then quad under loop', [[5, 6, [3, 4], 4, 'loop', 1]], 'non-triangle'], ['single triangle loop 3', [[3, 3, [3], 3, 'loop', 3]], [45, 108, 64, 24, 1]]], [['disk loop', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 1]], [16, 35, 20, 10, 1]], ['disk loop 2', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 2]], [51, 130, 80, 20, 1]], ['triangle then quad under loop', [[5, 6, [3, 4], 4, 'loop', 1]], 'non-triangle'], ['zero levels', [[4, 6, [3, 3, 3, 3], 0, 'loop', 0]], [4, 6, 4, 0, 2]], ['torus cc', [[9, 18, [4, 4, 4, 4, 4, 4, 4, 4, 4], 0, 'cc', 1]], [36, 72, 36, 0, 0]], ['triangle tetra cc', [[4, 6, [3, 3, 3, 3], 0, 'cc', 1]], [14, 24, 12, 0, 2]], ['single triangle loop 3', [[3, 3, [3], 3, 'loop', 3]], [45, 108, 64, 24, 1]]], [['tetra loop 1', [[4, 6, [3, 3, 3, 3], 0, 'loop', 1]], [10, 24, 16, 0, 2]], ['tetra loop 2', [[4, 6, [3, 3, 3, 3], 0, 'loop', 2]], [34, 96, 64, 0, 2]], ['disk loop', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 1]], [16, 35, 20, 10, 1]], ['disk loop 2', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 2]], [51, 130, 80, 20, 1]], ['torus cc', [[9, 18, [4, 4, 4, 4, 4, 4, 4, 4, 4], 0, 'cc', 1]], [36, 72, 36, 0, 0]], ['triangle tetra cc', [[4, 6, [3, 3, 3, 3], 0, 'cc', 1]], [14, 24, 12, 0, 2]], ['single triangle loop 3', [[3, 3, [3], 3, 'loop', 3]], [45, 108, 64, 24, 1]]]]
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
tetra loop 1[10, 16, 16, 0, 10][10, 24, 16, 0, 2]Failed
tetra loop 2[26, 48, 64, 0, 42][34, 96, 64, 0, 2]Failed
disk loop[16, 25, 20, 10, 11][16, 35, 20, 10, 1]Failed
disk loop 2[41, 70, 80, 20, 51][51, 130, 80, 20, 1]Failed
cube cc[26, 48, 24, 0, 2][26, 48, 24, 0, 2]Passed
cube cc 2[98, 192, 96, 0, 2][98, 192, 96, 0, 2]Passed
single quad cc[25, 40, 16, 16, 1][25, 40, 16, 16, 1]Passed

SHA-256 / 1fed656f01da8a17efed67f75d8dfa0a1221c3dec52aec26171e123bd37194ee

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    V,E,ar,B,scheme,levels=x
    ar=list(ar)
    for _ in range(levels):
        F=len(ar)
        S=sum(ar)
        if scheme=='loop':
            if any(n!=3 for n in ar): return 'non-triangle'
            V,E,ar=V+E,4*E,[3]*(4*F)
        else:
            V,E,ar=V+E+F,2*E+S,[4]*S
        B=2*B
    return [V,E,len(ar),B,V-E+len(ar)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['tetra loop 1', [[4, 6, [3, 3, 3, 3], 0, 'loop', 1]], [10, 24, 16, 0, 2]], ['tetra loop 2', [[4, 6, [3, 3, 3, 3], 0, 'loop', 2]], [34, 96, 64, 0, 2]], ['disk loop', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 1]], [16, 35, 20, 10, 1]], ['disk loop 2', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 2]], [51, 130, 80, 20, 1]], ['cube cc', [[8, 12, [4, 4, 4, 4, 4, 4], 0, 'cc', 1]], [26, 48, 24, 0, 2]], ['cube cc 2', [[8, 12, [4, 4, 4, 4, 4, 4], 0, 'cc', 2]], [98, 192, 96, 0, 2]], ['single quad cc', [[4, 4, [4], 4, 'cc', 2]], [25, 40, 16, 16, 1]]], [['tetra loop 2', [[4, 6, [3, 3, 3, 3], 0, 'loop', 2]], [34, 96, 64, 0, 2]], ['disk loop 2', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 2]], [51, 130, 80, 20, 1]], ['cube cc 2', [[8, 12, [4, 4, 4, 4, 4, 4], 0, 'cc', 2]], [98, 192, 96, 0, 2]], ['single quad cc', [[4, 4, [4], 4, 'cc', 2]], [25, 40, 16, 16, 1]], ['quad and triangle cc', [[5, 6, [4, 3], 4, 'cc', 1]], [13, 19, 7, 8, 1]], ['quad and triangle cc 2', [[5, 6, [4, 3], 4, 'cc', 2]], [39, 66, 28, 16, 1]], ['pentagon cc', [[5, 5, [5], 5, 'cc', 1]], [11, 15, 5, 10, 1]]], [['disk loop', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 1]], [16, 35, 20, 10, 1]], ['quad and triangle cc', [[5, 6, [4, 3], 4, 'cc', 1]], [13, 19, 7, 8, 1]], ['quad and triangle cc 2', [[5, 6, [4, 3], 4, 'cc', 2]], [39, 66, 28, 16, 1]], ['pentagon cc', [[5, 5, [5], 5, 'cc', 1]], [11, 15, 5, 10, 1]], ['quad under loop', [[4, 4, [4], 4, 'loop', 1]], 'non-triangle'], ['triangle then quad under loop', [[5, 6, [3, 4], 4, 'loop', 1]], 'non-triangle'], ['single triangle loop 3', [[3, 3, [3], 3, 'loop', 3]], [45, 108, 64, 24, 1]]], [['disk loop', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 1]], [16, 35, 20, 10, 1]], ['disk loop 2', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 2]], [51, 130, 80, 20, 1]], ['triangle then quad under loop', [[5, 6, [3, 4], 4, 'loop', 1]], 'non-triangle'], ['zero levels', [[4, 6, [3, 3, 3, 3], 0, 'loop', 0]], [4, 6, 4, 0, 2]], ['torus cc', [[9, 18, [4, 4, 4, 4, 4, 4, 4, 4, 4], 0, 'cc', 1]], [36, 72, 36, 0, 0]], ['triangle tetra cc', [[4, 6, [3, 3, 3, 3], 0, 'cc', 1]], [14, 24, 12, 0, 2]], ['single triangle loop 3', [[3, 3, [3], 3, 'loop', 3]], [45, 108, 64, 24, 1]]], [['tetra loop 1', [[4, 6, [3, 3, 3, 3], 0, 'loop', 1]], [10, 24, 16, 0, 2]], ['tetra loop 2', [[4, 6, [3, 3, 3, 3], 0, 'loop', 2]], [34, 96, 64, 0, 2]], ['disk loop', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 1]], [16, 35, 20, 10, 1]], ['disk loop 2', [[6, 10, [3, 3, 3, 3, 3], 5, 'loop', 2]], [51, 130, 80, 20, 1]], ['torus cc', [[9, 18, [4, 4, 4, 4, 4, 4, 4, 4, 4], 0, 'cc', 1]], [36, 72, 36, 0, 0]], ['triangle tetra cc', [[4, 6, [3, 3, 3, 3], 0, 'cc', 1]], [14, 24, 12, 0, 2]], ['single triangle loop 3', [[3, 3, [3], 3, 'loop', 3]], [45, 108, 64, 24, 1]]]]
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
tetra loop 1[10, 24, 16, 0, 2][10, 24, 16, 0, 2]Passed
tetra loop 2[34, 96, 64, 0, 2][34, 96, 64, 0, 2]Passed
disk loop[16, 40, 20, 10, -4][16, 35, 20, 10, 1]Failed
disk loop 2[56, 160, 80, 20, -24][51, 130, 80, 20, 1]Failed
cube cc[26, 48, 24, 0, 2][26, 48, 24, 0, 2]Passed
cube cc 2[98, 192, 96, 0, 2][98, 192, 96, 0, 2]Passed
single quad cc[25, 40, 16, 16, 1][25, 40, 16, 16, 1]Passed

SHA-256 / 340d42c2af5c13645e7280ac3b104d02ce729ea118f4a4b50ced57b636d5ce5f

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / c89a50c2389dd31d20cb923ae92e8c8a1568678fc58bbfd4b8f794de4c6b7683