Rename variables to prepare for follow-on change

This commit is contained in:
Hanno Braun 2024-03-23 00:38:05 +01:00
parent f2621c4e88
commit f392d9a807

View File

@ -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)