Repository navigation
feat(planning): geodesic (Clairaut) cone helical kinematics + development - #310
Merged
Merged
Conversation
…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.
This was referenced Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.pycompute_cone_helical_kinematics— half-angle, Clairaut constant, large-end coverage; rejects zero-taper (useCylinder), 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), reuseslower_developed_pathunchanged._equivalence.py) —assert_cone_geometry(Clairaut invariantr·sin α = C) +assert_cone_coverage.Validation
dθ/dz = tanα/(r·cos φ)to ~1e-10.5e-3tolerance rejects non-geodesic by ~2000×).pytest208 passed (10 new cone tests); cylinder goldens byte-identical;ruff+mypyclean.Scope (deliberate)
NO
.wind/dispatch wiring (S3); cones are driven by an internalConein 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
θ_fullcan 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.num_circuits % patternNumber), expanding cones, hoop-on-cone.Refs #307.