Skip to content

feat(planning): geodesic (Clairaut) cone helical kinematics + development - #310

Merged
CameronBrooks11 merged 1 commit into
mainfrom
feat/cone-s2-kinematics
Jun 29, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
feat/cone-s2-kinematics

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Summary

Stage 3a S2 (#307) of epic #138 — the cone winding math. Adds the geodesic (Clairaut) helical path on a frustum: a straight line in the developed sector (closed-form, no ODE). The wind angle is anchored at the large end r0 (decided model), so C = r0·sin(α) is the Clairaut invariant and the local angle α(z) = asin(C/r(z)) grows toward the small radius — the slip-stable geodesic.

What's here

  • calculations.py
    • compute_cone_helical_kinematics — half-angle, Clairaut constant, large-end coverage; rejects zero-taper (use Cylinder), expanding frusta (r1 > r0), and unreachable angles (C > r1).
    • cone_geodesic_theta_deg — closed form θ(z) = [arccos(C/r0) − arccos(C/r(z))] / sin φ.
    • cone_local_alpha_deg — asin(C/r(z)).
  • developed.py — build_cone_helical_developed_path: samples the curved geodesic at ~1 mm (θ is nonlinear in z), lean ramps over the lead-in then tracks α(z), reuses lower_developed_path unchanged.
  • Harness (_equivalence.py) — assert_cone_geometry (Clairaut invariant r·sin α = C) + assert_cone_coverage.

Validation

  • Geodesic closed form matches independent ODE integration of dθ/dz = tanα/(r·cos φ) to ~1e-10.
  • Harness discriminates: emitted geodesic Clairaut drift ~8e-4 vs a constant-angle path's ~11 (the 5e-3 tolerance rejects non-geodesic by ~2000×).
  • pytest 208 passed (10 new cone tests); cylinder goldens byte-identical; ruff + mypy clean.
  • Adversarial review: no blockers (math verified independently).

Scope (deliberate)

NO .wind/dispatch wiring (S3); cones are driven by an internal Cone in tests. Reducing-frustum, helical only. Engineering defaults flagged in-code (# minimal:): large-end coverage anchor, lean tracks local α with half-angle correction deferred to hardware calibration, ~1 mm sampling.

Deferred to S3 (#308) — from review

  • Cone turnaround / lock semantics: the cylinder dwell formula with the cone's large θ_full can go negative → a ~30° backward mandrel spin at each turnaround. The laying geometry (validated here) is unaffected, but this needs revisiting before cones go live, and the harness should then assert mandrel monotonicity and pattern-distribution coverage on cones.
  • Validator wiring (reachability, num_circuits % patternNumber), expanding cones, hoop-on-cone.

Refs #307.

…ment

Add the cone winding path as a geodesic (a straight line in the developed
sector), the closed-form alternative to an ODE solve on a developable surface.
The wind angle is anchored at the large end r0 (Clairaut constant
C = r0*sin(alpha)), so the local angle alpha(z) = asin(C/r(z)) grows toward the
small radius -- the physically slip-stable path.

- calculations.py: compute_cone_helical_kinematics (reachability + large-end
  coverage), cone_geodesic_theta_deg (closed form theta(z) =
  [arccos(C/r0) - arccos(C/r(z))]/sin phi), cone_local_alpha_deg; guards for
  zero-taper and expanding frusta.
- developed.py: build_cone_helical_developed_path -- samples the curved geodesic
  at ~1mm (theta is nonlinear in z), lean tracks alpha(z), reuses
  lower_developed_path unchanged.
- equivalence harness: assert_cone_geometry (Clairaut invariant r*sin(alpha)=C)
  + assert_cone_coverage. Validated to discriminate geodesic (drift ~8e-4) from
  a constant-angle path (drift ~11).

Cones are not yet wired into the planner/.wind (S3); driven by an internal Cone
in tests. Cylinder goldens unchanged (byte-identical). Reducing-frustum, helical
only; turnaround/lock semantics + pattern distribution on cones deferred to S3.

S2 of #138 (Stage 3a cones). Refs #307.
@CameronBrooks11
CameronBrooks11 merged commit a3467a3 into main Jun 29, 2026
21 checks passed
@CameronBrooks11
CameronBrooks11 deleted the feat/cone-s2-kinematics branch June 29, 2026 19:56
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.

1 participant