design: first-class topology in Fold_state (pocket-slice prerequisite) #26

Closed
opened 2026-07-02 14:03:38 +00:00 by toph · 1 comment
Owner

Fold_state.t is a bag of convex faces plus a pairwise order matrix (fold_state.ml:9) — no edges, no persistent crease identity, no face adjacency. Crease assignments live in a side list of geometric chords; the edge set is reconstructed at emission by geometric matching (fold_emit.ml:42-77), resting on the unstated invariant that chords of distinct faces have disjoint interiors.

Everything the next slices need runs into this gap: taco-taco/taco-tortilla validity checks are deferred exactly for lack of crease adjacency (fold_state.ml:38-40), unfold has nothing to un-assign or merge over an append-only chord list, the precrease U/0° bug (#27) exists because assignment is keyed to the act of cutting geometry rather than to a crease entity, and material crease semantics (#28, option a) wants crease entities to refer to. The literature model — faces + edges + faceOrders as one complex — has edges first-class; our FOLD output does, our state doesn't.

Do the retrofit as part of the pocket-slice design, not per-feature afterwards — three separate retrofits produce three inconsistent versions.

`Fold_state.t` is a bag of convex faces plus a pairwise order matrix (`fold_state.ml:9`) — no edges, no persistent crease identity, no face adjacency. Crease assignments live in a side list of geometric chords; the edge set is reconstructed at emission by geometric matching (`fold_emit.ml:42-77`), resting on the unstated invariant that chords of distinct faces have disjoint interiors. Everything the next slices need runs into this gap: taco-taco/taco-tortilla validity checks are deferred exactly for lack of crease adjacency (`fold_state.ml:38-40`), `unfold` has nothing to un-assign or merge over an append-only chord list, the precrease U/0° bug (#27) exists because assignment is keyed to the act of cutting geometry rather than to a crease entity, and material crease semantics (#28, option a) wants crease entities to refer to. The literature model — faces + edges + faceOrders as one complex — has edges first-class; our FOLD *output* does, our state doesn't. Do the retrofit as part of the pocket-slice design, not per-feature afterwards — three separate retrofits produce three inconsistent versions.
Author
Owner

The topology retrofit is done and on main. Fold_state.t now carries a first-class edge array — left/right face adjacency, persistent crease_id, eassign/eprov — and emission looks assignments up via edge_between instead of reconstructing chords by geometric matching. The crease_record side-list is gone.

Landed across: 73b385f (edge entity + adjacency) → 4e38bfd (accumulate + split edges, emit from state) → ea972ec (drop crease_record) → PR #40, then neighbors/crease_piece_on_face in PR #43.

Closing. The pocket-slice work this unblocked lives in its own issues now — taco-taco/taco-tortilla in #47, crease-segment referencing in #50.

The topology retrofit is done and on `main`. `Fold_state.t` now carries a first-class `edge` array — `left`/`right` face adjacency, persistent `crease_id`, `eassign`/`eprov` — and emission looks assignments up via `edge_between` instead of reconstructing chords by geometric matching. The `crease_record` side-list is gone. Landed across: `73b385f` (edge entity + adjacency) → `4e38bfd` (accumulate + split edges, emit from state) → `ea972ec` (drop `crease_record`) → PR #40, then `neighbors`/`crease_piece_on_face` in PR #43. Closing. The pocket-slice work this unblocked lives in its own issues now — taco-taco/taco-tortilla in #47, crease-segment referencing in #50.
toph closed this issue 2026-07-04 19:06:41 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
toph/beloch#26
No description provided.