From 69f5e092cab591d872b024f675aa2c5c1e5141d7 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 22 Feb 2023 13:40:30 +0100 Subject: [PATCH] Update name of struct field --- .../fj-kernel/src/algorithms/approx/edge.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/crates/fj-kernel/src/algorithms/approx/edge.rs b/crates/fj-kernel/src/algorithms/approx/edge.rs index cebf72bfb..2636a5ed2 100644 --- a/crates/fj-kernel/src/algorithms/approx/edge.rs +++ b/crates/fj-kernel/src/algorithms/approx/edge.rs @@ -35,7 +35,7 @@ impl Approx for (&Handle, &Surface) { ) .with_source((half_edge.clone(), half_edge.boundary()[0])); - let curve_approx = { + let points = { let global_curve_approx = match cache .get(half_edge.global_form().clone(), range) { @@ -69,10 +69,7 @@ impl Approx for (&Handle, &Surface) { .collect() }; - HalfEdgeApprox { - first, - curve_approx, - } + HalfEdgeApprox { first, points } } } @@ -83,7 +80,7 @@ pub struct HalfEdgeApprox { pub first: ApproxPoint<2>, /// The approximation of the edge's curve - pub curve_approx: Vec>, + pub points: Vec>, } impl HalfEdgeApprox { @@ -92,7 +89,7 @@ impl HalfEdgeApprox { let mut points = Vec::new(); points.push(self.first.clone()); - points.extend(self.curve_approx.clone()); + points.extend(self.points.clone()); points } @@ -265,7 +262,7 @@ mod tests { let tolerance = 1.; let approx = (&half_edge, surface.deref()).approx(tolerance); - assert_eq!(approx.curve_approx, Vec::new()); + assert_eq!(approx.points, Vec::new()); } #[test] @@ -292,7 +289,7 @@ mod tests { let tolerance = 1.; let approx = (&half_edge, surface.deref()).approx(tolerance); - assert_eq!(approx.curve_approx, Vec::new()); + assert_eq!(approx.points, Vec::new()); } #[test] @@ -336,7 +333,7 @@ mod tests { ApproxPoint::new(point_surface, point_global) }) .collect::>(); - assert_eq!(approx.curve_approx, expected_approx); + assert_eq!(approx.points, expected_approx); } #[test] @@ -369,6 +366,6 @@ mod tests { ApproxPoint::new(point_surface, point_global) }) .collect::>(); - assert_eq!(approx.curve_approx, expected_approx); + assert_eq!(approx.points, expected_approx); } }