Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

Coil: clippy

bherbruck218d19d75303
diff --git a/apps/solvecraft-cli/src/recipe.rs b/apps/solvecraft-cli/src/recipe.rs
index 033a4c5a4c..727660b87a 100644
--- a/apps/solvecraft-cli/src/recipe.rs
+++ b/apps/solvecraft-cli/src/recipe.rs
@@ -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 {
diff --git a/crates/kernel/src/helix.rs b/crates/kernel/src/helix.rs
index 9bb01e23fa..878f4f42af 100644
--- a/crates/kernel/src/helix.rs
+++ b/crates/kernel/src/helix.rs
@@ -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;