Repository navigation
Description
Epic. Make pattern definitions data, not imperative code. Express hoop/helical/skip as one declarative parametric primitive on the developed (unwrapped) cylinder surface that lowers to the Stage 1 Motion IR (#136). On a developable cylinder a constant-angle path is a straight line in the (z, θ) development, so the geometry stays closed-form — no ODE solver, no friction model (those are Stage 3b).
Why
Today the three patterns are three hand-written machine-axis move generators in planning/layer_strategies.py with near-zero shared path math: hoop (7 bespoke moves), helical (nested pattern→circuit→pass loops), skip (one move). Only the IR-recording layer (WinderMachine) and nominal_metrics are shared (Stage 1). The wind_angle name even means two different things — a true fiber angle in helical, but a delivery-head lean angle in hoop (layer_strategies.py:62).
Strategy (decided)
Developed-surface lowering now, not a byte-preserving front-end refactor. The unified primitive produces cleaner, different G-code, so byte-equality is retired as the gate and replaced by an equivalence harness:
- coverage invariants — circuit count, full angular coverage,
gcd(p, d)=1, circuit divisibility, lock-degrees slot math; - simulator parity —
nominal_metricstime/material within tolerance vs pre-cutover output; - geometry — achieved fiber angle matches target
alphawithin tolerance.
The harness lands in S2 and gates every subsequent cut-over. Risk is proven on helical (hardest) first.
Slices
- Stage 2 / S1 — pattern primitive data model + normative alpha convention + hoop naming fix #295 — S1: pattern primitive data model + normative alpha convention + hoop naming fix (byte-safe)
- Stage 2 / S2 — developed-surface geometry + single IR lowering + equivalence harness; cut over helical #296 — S2: developed-surface geometry + single IR lowering + equivalence harness; cut over helical
- Stage 2 / S3 — cut hoop over to the primitive (alpha->90) #297 — S3: cut hoop over (
alpha→90°) - Stage 2 / S4 — cut skip over (lay:false) + delete the old per-pattern generators #298 — S4: cut skip over (
lay:false) + delete the old per-pattern generators - Stage 2 / S5 — validators become spec type-checkers over the primitive + docs/roadmap #299 — S5: validators become spec type-checkers over the primitive + docs/roadmap
Done when
One declarative primitive + one lowering plans all three pattern types; the old per-pattern generators are deleted; the equivalence harness is the CI gate; validators type-check the primitive; the meridian-referenced alpha convention is normative; docs + roadmap Stage 2 marked done.
Depends on Stage 1 (#136). See docs/development/roadmap.md (Stage 2).
Activity
chore: retire TODO.md in favour of tracked issues (#150)
feat(planning): define the typed Motion IR (Move/MoveKind/Program/Pro…
feat(planning): add declarative pattern primitive + fix hoop angle na…
feat(planning): lower helical via the developed-surface primitive (#301)
feat(planning): lower hoop via the developed-surface primitive (#302)
refactor(planning): unify skip onto the developed-surface lowering (#304
chore(release): prepare 0.10.0 (#325)