FOLD decoding, validator and step reading (Tasks 1–3) !3

merged merged by cmc on 2026-10-19 22:43 UTC · krz/fold:format-and-steps into main

Discussion

cmc

Batch B. Closes #2.

  • Task 1: Packages/FoldKit with FoldFormat (FOLD 1.2 decoding with the krz: keys, frame inheritance, topology on the file) and FoldKitTestSupport (28 synthetic fixtures, fixture(_:)).
  • Task 2: the validator — topology, fold-angle range and sign, isometry and face shape, normalised acyclic face orders, the crease, nesting and inside layer rules, mid-fold orders, firstCreasedAtStep with subdivision edges defined by motion, traditional authorship.
  • Task 3: readSteps — axis direction and origin, windows on t, Hermite curves, the axis tree, reorientation steps, pop records; the degree-4 vertex fixture built in code.
  • Plan and design doc: subdivision edges by motion, pop-axis windows, an end-frame check in the catalogue gate, compiler requirements (counterclockwise faces, 257-sample curves, popped count).

swift test --package-path Packages/FoldKit: 55 tests pass (FoldFormat 37, Folding 18).