From 5a0b6c06c44021824c7a4f52d5c43c6dbd6ef58a Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 24 Aug 2022 13:24:20 +0200 Subject: [PATCH] Make `Sweep::sweep` easier to call --- crates/fj-kernel/src/algorithms/sweep/edge.rs | 3 ++- crates/fj-kernel/src/algorithms/sweep/face.rs | 3 ++- crates/fj-kernel/src/algorithms/sweep/mod.rs | 2 +- crates/fj-kernel/src/algorithms/sweep/sketch.rs | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/fj-kernel/src/algorithms/sweep/edge.rs b/crates/fj-kernel/src/algorithms/sweep/edge.rs index d6c90c677..33438d511 100644 --- a/crates/fj-kernel/src/algorithms/sweep/edge.rs +++ b/crates/fj-kernel/src/algorithms/sweep/edge.rs @@ -17,10 +17,11 @@ impl Sweep for Edge { fn sweep( self, path: impl Into, - tolerance: Tolerance, + tolerance: impl Into, color: Color, ) -> Self::Swept { let path = path.into(); + let tolerance = tolerance.into(); if let Some(vertices) = self.vertices().get() { let face = create_non_continuous_side_face( diff --git a/crates/fj-kernel/src/algorithms/sweep/face.rs b/crates/fj-kernel/src/algorithms/sweep/face.rs index 86558ec2f..dccca595d 100644 --- a/crates/fj-kernel/src/algorithms/sweep/face.rs +++ b/crates/fj-kernel/src/algorithms/sweep/face.rs @@ -13,10 +13,11 @@ impl Sweep for Face { fn sweep( self, path: impl Into, - tolerance: Tolerance, + tolerance: impl Into, color: Color, ) -> Self::Swept { let path = path.into(); + let tolerance = tolerance.into(); let mut faces = Vec::new(); diff --git a/crates/fj-kernel/src/algorithms/sweep/mod.rs b/crates/fj-kernel/src/algorithms/sweep/mod.rs index 745e717e6..4ced4d0df 100644 --- a/crates/fj-kernel/src/algorithms/sweep/mod.rs +++ b/crates/fj-kernel/src/algorithms/sweep/mod.rs @@ -18,7 +18,7 @@ pub trait Sweep { fn sweep( self, path: impl Into, - tolerance: Tolerance, + tolerance: impl Into, color: Color, ) -> Self::Swept; } diff --git a/crates/fj-kernel/src/algorithms/sweep/sketch.rs b/crates/fj-kernel/src/algorithms/sweep/sketch.rs index db21e17c4..cf10fe25c 100644 --- a/crates/fj-kernel/src/algorithms/sweep/sketch.rs +++ b/crates/fj-kernel/src/algorithms/sweep/sketch.rs @@ -13,10 +13,11 @@ impl Sweep for Sketch { fn sweep( self, path: impl Into, - tolerance: Tolerance, + tolerance: impl Into, color: Color, ) -> Self::Swept { let path = path.into(); + let tolerance = tolerance.into(); let mut shells = Vec::new(); for face in self.into_faces() {