Skip to content

feat(planning): declarative pattern primitive + hoop angle naming fix (S1) - #300

Merged
CameronBrooks11 merged 1 commit into
mainfrom
feat/137-s1-pattern-primitive
Jun 29, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
feat/137-s1-pattern-primitive

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Closes #295. First slice of the Stage 2 epic #137.

Byte-safe groundwork — introduces the declarative pattern primitive and normalizes naming, with no output change (all goldens stay byte-equal; the planner still uses the per-pattern generators until S2).

What's here

  • fiberpath/planning/pattern.py — PatternSpec, one machine-agnostic description of a winding layer on the developed cylinder, plus adapters mapping each layer model onto it:
    • helical → constant-angle path with coverage (pattern_number/skip_index) + turnarounds;
    • hoop → the alpha → 90° limit of that path;
    • skip → lay=False, a non-laying reposition.
  • Hoop naming fix — plan_hoop_layer's misnamed wind_angle local (it's the delivery-head lean, 90 − atan(D/w), not a fiber angle) renamed to delivery_head_lean, with a comment tying it to PatternSpec.alpha_deg.
  • Docs — windAngle documented as the normative meridian-referenced convention (0° axial, 90° hoop), noting hoop is its → 90° limit.

Verification

  • New unit tests pin the three adapters + the unknown-layer guard (tests/planning/test_pattern.py).
  • Full backend suite green (161 passed); golden/layer/validator byte-equality gate unchanged.
  • ruff format --check, ruff check, mypy all clean.

Not in this slice

The primitive is constructed but not lowered — the single developed-surface lowering + equivalence harness lands in S2 (#296), which is where output (and goldens) change.

…ming

Stage 2 / S1 (#295). Introduce PatternSpec, a single machine-agnostic
description of a winding layer on the developed cylinder, with adapters
mapping hoop/helical/skip onto it (hoop = alpha->90, skip = lay:false).
The primitive is constructed but not yet lowered -- the planner still
uses the per-pattern generators -- so output is unchanged and all goldens
stay byte-equal.

Also rename hoop's misnamed `wind_angle` local to `delivery_head_lean`:
it is the delivery-head tilt (90 - atan(D/w)), not a fiber/wind angle.
Document the meridian-referenced wind-angle convention as normative.

Refs #137.
@CameronBrooks11
CameronBrooks11 merged commit 8da8fd9 into main Jun 29, 2026
21 checks passed
@CameronBrooks11
CameronBrooks11 deleted the feat/137-s1-pattern-primitive branch June 29, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stage 2 / S1 — pattern primitive data model + normative alpha convention + hoop naming fix

1 participant