fix(fold): cross-topmost via order matrix; M/V for folded precreases #34

Merged
toph merged 1 commit from fix/cross-topmost-precrease into main 2026-07-02 22:07:03 +00:00
Owner

For #25, #27. Two pre-pocket-slice correctness fixes.

  • #25cross on stacked layers now resolves the material point on the topmost covering face via the order matrix (Fold_state.topmost_preimage), not the last preimage in face-array order. Array index carries no z-meaning; the old behavior only worked by accident of the legacy append order plus flip's array reversal, and would return the wrong point the moment a fold inserts a face between layers (pocket slice).
  • #27 — Folding along a precrease abuts the axis instead of cutting it, so no crease record was created and fold_emit fell back to the stale U/0 from subdivide. fold_with_records now finds the abutting edge and emits M/V with the proper fold angle, winning over the stale U.

Tests: topmost preimage via order, precrease upgrades U to V, and end-to-end precrease then fold emits V not U. Full suite green.

For #25, #27. Two pre-pocket-slice correctness fixes. - **#25** — `cross` on stacked layers now resolves the material point on the *topmost* covering face via the order matrix (`Fold_state.topmost_preimage`), not the last preimage in face-array order. Array index carries no z-meaning; the old behavior only worked by accident of the legacy append order plus `flip`'s array reversal, and would return the wrong point the moment a fold inserts a face between layers (pocket slice). - **#27** — Folding along a precrease abuts the axis instead of cutting it, so no crease record was created and `fold_emit` fell back to the stale `U`/0 from `subdivide`. `fold_with_records` now finds the abutting edge and emits `M`/`V` with the proper fold angle, winning over the stale `U`. Tests: `topmost preimage via order`, `precrease upgrades U to V`, and end-to-end `precrease then fold emits V not U`. Full suite green.
- #25: cross now resolves the material point on the topmost covering layer via
  the order matrix (Fold_state.topmost_preimage), not last-in-array position —
  correct once a fold inserts a face between existing layers (pocket slice).
- #27: folding along a precrease abuts the axis instead of cutting it; upgrade
  the abutting U crease to M/V so the FOLD no longer emits contradictory U/0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0193fPxvY4JrqabVCHP8csGr
toph merged commit 0f2f55aaf0 into main 2026-07-02 22:07:03 +00:00
toph deleted branch fix/cross-topmost-precrease 2026-07-02 22:07:03 +00:00
Sign in to join this conversation.
No reviewers
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!34
No description provided.