Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Sweep::sweep easier to call #991

Merged
merged 2 commits into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions crates/fj-kernel/src/algorithms/sweep/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ impl Sweep for Edge {
fn sweep(
self,
path: impl Into<Path>,
tolerance: crate::algorithms::Tolerance,
color: fj_interop::mesh::Color,
tolerance: impl Into<Tolerance>,
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(
Expand Down
9 changes: 6 additions & 3 deletions crates/fj-kernel/src/algorithms/sweep/face.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use fj_interop::mesh::Color;

use crate::{
algorithms::{reverse_face, TransformObject},
algorithms::{reverse_face, Tolerance, TransformObject},
objects::{Face, Shell},
};

Expand All @@ -11,10 +13,11 @@ impl Sweep for Face {
fn sweep(
self,
path: impl Into<Path>,
tolerance: crate::algorithms::Tolerance,
color: fj_interop::mesh::Color,
tolerance: impl Into<Tolerance>,
color: Color,
) -> Self::Swept {
let path = path.into();
let tolerance = tolerance.into();

let mut faces = Vec::new();

Expand Down
2 changes: 1 addition & 1 deletion crates/fj-kernel/src/algorithms/sweep/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub trait Sweep {
fn sweep(
self,
path: impl Into<Path>,
tolerance: Tolerance,
tolerance: impl Into<Tolerance>,
color: Color,
) -> Self::Swept;
}
Expand Down
3 changes: 2 additions & 1 deletion crates/fj-kernel/src/algorithms/sweep/sketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ impl Sweep for Sketch {
fn sweep(
self,
path: impl Into<Path>,
tolerance: Tolerance,
tolerance: impl Into<Tolerance>,
color: Color,
) -> Self::Swept {
let path = path.into();
let tolerance = tolerance.into();

let mut shells = Vec::new();
for face in self.into_faces() {
Expand Down