FA-88445 / Mesh topology invariants / Member archive
Half-edge prev pointer is stored reversed · case 05
prev returns the twin direction of the real previous half-edge.
Case contract
Input [faces, queries]. Build half-edges (f[i], f[i+1 mod n]) with face index, next and prev half-edges. A repeated directed half-edge returns ["duplicate-halfedge", [a,b]]. For each query (a,b) return null if it is not a half-edge, else [face, next, prev, twin] with twin [b,a] when that directed half-edge exists, else null.
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.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| quad then triangle | [[0, [1, 2], [0, 3], null], [1, [4, 3], [2, 3], null], [1, [2, 4], [3, 4], [2, 3]], [0, [3, 0], [2, 1], [3, 2]]] | [[0, [1, 2], [3, 0], null], [1, [4, 3], [3, 2], null], [1, [2, 4], [4, 3], [2, 3]], [0, [3, 0], [1, 2], [3, 2]]] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗