Coil: clippy

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
bherbruckandClaude Opus 5.5 committed 2026-10-08 01:19:55 +00:00
1 parent 9df954cd94
commit 218d19d753
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -250,6 +250,7 @@ fn helix_path(features: &[Value], f: &Value) -> Option<([f64; 3], f64, f64, f64,
}
/// Least-squares circle through the points' (x, y): x² + y² + D x + E y + F = 0 (Kåsa).
#[allow(clippy::needless_range_loop)]
fn circle_fit(pts: &[[f64; 3]]) -> Option<(f64, f64)> {
let mut m = [[0.0f64; 4]; 3];
for p in pts {
+1 -1
View File
@@ -105,7 +105,7 @@ mod tests {
fn coil_volume_is_section_times_helix_length() {
// A 2 mm circle in a plane through the Z axis, 20 mm out, 3 turns, pitch 8: a screw
// motion of an axial section sweeps π r² · 2πR · turns (Fusion's spline helix: 4738.1).
let pl = Plane::named("XZ").unwrap_or_else(|| Plane { origin: Vec3::ZERO, x: Vec3::X, y: Vec3::Z });
let pl = Plane { origin: Vec3::ZERO, x: Vec3::X, y: Vec3::Z };
let region = Region2 { outer: Loop2::circle(Vec2::new(20.0, 0.0), 2.0), holes: vec![] };
let b = sweep_helix(&pl, &region, Vec3::ZERO, Vec3::Z, 8.0, 3.0).unwrap();
let v = crate::measure(&b).unwrap().volume;