From 073531e5f3230184b7ad349a296df1c04175faaf Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 22 Feb 2023 13:37:55 +0100 Subject: [PATCH] Update name of `GlobalEdgeApprox` --- crates/fj-kernel/src/algorithms/approx/edge.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/fj-kernel/src/algorithms/approx/edge.rs b/crates/fj-kernel/src/algorithms/approx/edge.rs index 5ef3a7082..84ead283e 100644 --- a/crates/fj-kernel/src/algorithms/approx/edge.rs +++ b/crates/fj-kernel/src/algorithms/approx/edge.rs @@ -103,7 +103,7 @@ fn approx_edge( surface: &Surface, range: RangeOnPath, tolerance: impl Into, -) -> GlobalCurveApprox { +) -> GlobalEdgeApprox { // There are different cases of varying complexity. Circles are the hard // part here, as they need to be approximated, while lines don't need to be. // @@ -171,13 +171,13 @@ fn approx_edge( ApproxPoint::new(point_curve, point_global) }) .collect(); - GlobalCurveApprox { points } + GlobalEdgeApprox { points } } /// A cache for results of an approximation #[derive(Default)] pub struct CurveCache { - inner: BTreeMap<(ObjectId, RangeOnPath), GlobalCurveApprox>, + inner: BTreeMap<(ObjectId, RangeOnPath), GlobalEdgeApprox>, } impl CurveCache { @@ -191,8 +191,8 @@ impl CurveCache { &mut self, handle: Handle, range: RangeOnPath, - approx: GlobalCurveApprox, - ) -> GlobalCurveApprox { + approx: GlobalEdgeApprox, + ) -> GlobalEdgeApprox { self.inner.insert((handle.id(), range), approx.clone()); approx } @@ -202,7 +202,7 @@ impl CurveCache { &self, handle: Handle, range: RangeOnPath, - ) -> Option { + ) -> Option { if let Some(approx) = self.inner.get(&(handle.id(), range)) { return Some(approx.clone()); } @@ -218,12 +218,12 @@ impl CurveCache { /// An approximation of a [`GlobalCurve`] #[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] -pub struct GlobalCurveApprox { +pub struct GlobalEdgeApprox { /// The points that approximate the curve pub points: Vec>, } -impl GlobalCurveApprox { +impl GlobalEdgeApprox { /// Reverse the order of the approximation pub fn reverse(mut self) -> Self { self.points.reverse();