Skip to content

Commit

Permalink
Remove From implementation
Browse files Browse the repository at this point in the history
It will be difficult to keep it around, due to changes I'm working on.
  • Loading branch information
hannobraun committed Aug 29, 2022
1 parent 5600913 commit 0dfa683
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
10 changes: 0 additions & 10 deletions crates/fj-kernel/src/algorithms/approx/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,6 @@ impl RangeOnCurve {
}
}

impl<P> From<[P; 2]> for RangeOnCurve
where
P: Into<Point<1>>,
{
fn from(points: [P; 2]) -> Self {
let boundary = points.map(Into::into);
Self { boundary }
}
}

#[cfg(test)]
mod tests {
use fj_math::Scalar;
Expand Down
6 changes: 4 additions & 2 deletions crates/fj-kernel/src/algorithms/approx/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use fj_math::{Point, Scalar};

use crate::objects::{Edge, Vertex, VerticesOfEdge};

use super::Approx;
use super::{curve::RangeOnCurve, Approx};

impl Approx for Edge {
type Approximation = Vec<(Point<1>, Point<3>)>;
Expand All @@ -16,7 +16,9 @@ impl Approx for Edge {
let mut points = self.curve().approx(
tolerance,
// The range is only used for circles right now.
[[Scalar::ZERO], [Scalar::TAU]].into(),
RangeOnCurve {
boundary: [[Scalar::ZERO].into(), [Scalar::TAU].into()],
},
);
approx_edge(*self.vertices(), &mut points);

Expand Down

0 comments on commit 0dfa683

Please sign in to comment.