From f392d9a8078ba599a63825251929a1925df2cfd2 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Sat, 23 Mar 2024 00:38:05 +0100 Subject: [PATCH] Rename variables to prepare for follow-on change --- crates/fj-core/src/algorithms/approx/curve.rs | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/curve.rs b/crates/fj-core/src/algorithms/approx/curve.rs index f76043d48..db90e56b7 100644 --- a/crates/fj-core/src/algorithms/approx/curve.rs +++ b/crates/fj-core/src/algorithms/approx/curve.rs @@ -198,14 +198,14 @@ mod tests { let mut core = Core::new(); let curve = Curve::new().insert(&mut core); - let (surface_path, boundary) = + let (path, boundary) = SurfacePath::line_from_points([[1., 1.], [2., 1.]]); let boundary = CurveBoundary::from(boundary); let surface = core.layers.geometry.xz_plane(); let tolerance = 1.; - let approx = (&curve, surface_path, &surface, boundary) - .approx(tolerance, &mut core); + let approx = + (&curve, path, &surface, boundary).approx(tolerance, &mut core); assert_eq!(approx.points, vec![]); } @@ -215,7 +215,7 @@ mod tests { let mut core = Core::new(); let curve = Curve::new().insert(&mut core); - let (surface_path, boundary) = + let (path, boundary) = SurfacePath::line_from_points([[1., 1.], [2., 1.]]); let boundary = CurveBoundary::from(boundary); let surface = SurfaceGeometry { @@ -224,8 +224,8 @@ mod tests { }; let tolerance = 1.; - let approx = (&curve, surface_path, &surface, boundary) - .approx(tolerance, &mut core); + let approx = + (&curve, path, &surface, boundary).approx(tolerance, &mut core); assert_eq!(approx.points, vec![]); } @@ -236,7 +236,7 @@ mod tests { let global_path = GlobalPath::circle_from_radius(1.); let curve = Curve::new().insert(&mut core); - let surface_path = SurfacePath::line_from_points_with_coords([ + let path = SurfacePath::line_from_points_with_coords([ ([0.], [0., 1.]), ([TAU], [TAU, 1.]), ]); @@ -247,15 +247,14 @@ mod tests { }; let tolerance = 1.; - let approx = (&curve, surface_path, &surface, boundary) - .approx(tolerance, &mut core); + let approx = + (&curve, path, &surface, boundary).approx(tolerance, &mut core); let expected_approx = (global_path, boundary) .approx(tolerance, &mut core) .into_iter() .map(|(point_local, _)| { - let point_surface = - surface_path.point_from_path_coords(point_local); + let point_surface = path.point_from_path_coords(point_local); let point_global = surface.point_from_surface_coords(point_surface); ApproxPoint::new(point_local, point_global) @@ -269,21 +268,19 @@ mod tests { let mut core = Core::new(); let curve = Curve::new().insert(&mut core); - let surface_path = - SurfacePath::circle_from_center_and_radius([0., 0.], 1.); + let path = SurfacePath::circle_from_center_and_radius([0., 0.], 1.); let boundary = CurveBoundary::from([[0.], [TAU]]); let surface = core.layers.geometry.xz_plane(); let tolerance = 1.; - let approx = (&curve, surface_path, &surface, boundary) - .approx(tolerance, &mut core); + let approx = + (&curve, path, &surface, boundary).approx(tolerance, &mut core); - let expected_approx = (&surface_path, boundary) + let expected_approx = (&path, boundary) .approx(tolerance, &mut core) .into_iter() .map(|(point_local, _)| { - let point_surface = - surface_path.point_from_path_coords(point_local); + let point_surface = path.point_from_path_coords(point_local); let point_global = surface.point_from_surface_coords(point_surface); ApproxPoint::new(point_local, point_global)