Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Sep 8, 2022
1 parent 80cd5f4 commit 62885d5
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions crates/fj-kernel/src/algorithms/sweep/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mod face;
mod sketch;
mod vertex;

use fj_math::{Scalar, Vector};
use fj_math::Vector;

/// Sweep an object along a path to create another object
pub trait Sweep {
Expand All @@ -16,28 +16,3 @@ pub trait Sweep {
/// Sweep the object along the given path
fn sweep(self, path: impl Into<Vector<3>>) -> Self::Swept;
}

/// A path to be used with [`Sweep`]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub struct Path(Vector<3>);

impl Path {
/// Return the vector that defines this path
pub fn inner(&self) -> Vector<3> {
self.0
}

/// Indicate whether the path is in the negative direction
pub fn is_negative_direction(&self) -> bool {
self.0.dot(&Vector::from([0., 0., 1.])) < Scalar::ZERO
}
}

impl<T> From<T> for Path
where
T: Into<Vector<3>>,
{
fn from(value: T) -> Self {
Self(value.into())
}
}

0 comments on commit 62885d5

Please sign in to comment.