mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-13 22:38:27 +00:00
Rename variables to prepare for follow-on change
This commit is contained in:
parent
f2621c4e88
commit
f392d9a807
@ -198,14 +198,14 @@ mod tests {
|
|||||||
let mut core = Core::new();
|
let mut core = Core::new();
|
||||||
|
|
||||||
let curve = Curve::new().insert(&mut core);
|
let curve = Curve::new().insert(&mut core);
|
||||||
let (surface_path, boundary) =
|
let (path, boundary) =
|
||||||
SurfacePath::line_from_points([[1., 1.], [2., 1.]]);
|
SurfacePath::line_from_points([[1., 1.], [2., 1.]]);
|
||||||
let boundary = CurveBoundary::from(boundary);
|
let boundary = CurveBoundary::from(boundary);
|
||||||
let surface = core.layers.geometry.xz_plane();
|
let surface = core.layers.geometry.xz_plane();
|
||||||
|
|
||||||
let tolerance = 1.;
|
let tolerance = 1.;
|
||||||
let approx = (&curve, surface_path, &surface, boundary)
|
let approx =
|
||||||
.approx(tolerance, &mut core);
|
(&curve, path, &surface, boundary).approx(tolerance, &mut core);
|
||||||
|
|
||||||
assert_eq!(approx.points, vec![]);
|
assert_eq!(approx.points, vec![]);
|
||||||
}
|
}
|
||||||
@ -215,7 +215,7 @@ mod tests {
|
|||||||
let mut core = Core::new();
|
let mut core = Core::new();
|
||||||
|
|
||||||
let curve = Curve::new().insert(&mut core);
|
let curve = Curve::new().insert(&mut core);
|
||||||
let (surface_path, boundary) =
|
let (path, boundary) =
|
||||||
SurfacePath::line_from_points([[1., 1.], [2., 1.]]);
|
SurfacePath::line_from_points([[1., 1.], [2., 1.]]);
|
||||||
let boundary = CurveBoundary::from(boundary);
|
let boundary = CurveBoundary::from(boundary);
|
||||||
let surface = SurfaceGeometry {
|
let surface = SurfaceGeometry {
|
||||||
@ -224,8 +224,8 @@ mod tests {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let tolerance = 1.;
|
let tolerance = 1.;
|
||||||
let approx = (&curve, surface_path, &surface, boundary)
|
let approx =
|
||||||
.approx(tolerance, &mut core);
|
(&curve, path, &surface, boundary).approx(tolerance, &mut core);
|
||||||
|
|
||||||
assert_eq!(approx.points, vec![]);
|
assert_eq!(approx.points, vec![]);
|
||||||
}
|
}
|
||||||
@ -236,7 +236,7 @@ mod tests {
|
|||||||
|
|
||||||
let global_path = GlobalPath::circle_from_radius(1.);
|
let global_path = GlobalPath::circle_from_radius(1.);
|
||||||
let curve = Curve::new().insert(&mut core);
|
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.]),
|
([0.], [0., 1.]),
|
||||||
([TAU], [TAU, 1.]),
|
([TAU], [TAU, 1.]),
|
||||||
]);
|
]);
|
||||||
@ -247,15 +247,14 @@ mod tests {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let tolerance = 1.;
|
let tolerance = 1.;
|
||||||
let approx = (&curve, surface_path, &surface, boundary)
|
let approx =
|
||||||
.approx(tolerance, &mut core);
|
(&curve, path, &surface, boundary).approx(tolerance, &mut core);
|
||||||
|
|
||||||
let expected_approx = (global_path, boundary)
|
let expected_approx = (global_path, boundary)
|
||||||
.approx(tolerance, &mut core)
|
.approx(tolerance, &mut core)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|(point_local, _)| {
|
.map(|(point_local, _)| {
|
||||||
let point_surface =
|
let point_surface = path.point_from_path_coords(point_local);
|
||||||
surface_path.point_from_path_coords(point_local);
|
|
||||||
let point_global =
|
let point_global =
|
||||||
surface.point_from_surface_coords(point_surface);
|
surface.point_from_surface_coords(point_surface);
|
||||||
ApproxPoint::new(point_local, point_global)
|
ApproxPoint::new(point_local, point_global)
|
||||||
@ -269,21 +268,19 @@ mod tests {
|
|||||||
let mut core = Core::new();
|
let mut core = Core::new();
|
||||||
|
|
||||||
let curve = Curve::new().insert(&mut core);
|
let curve = Curve::new().insert(&mut core);
|
||||||
let surface_path =
|
let path = SurfacePath::circle_from_center_and_radius([0., 0.], 1.);
|
||||||
SurfacePath::circle_from_center_and_radius([0., 0.], 1.);
|
|
||||||
let boundary = CurveBoundary::from([[0.], [TAU]]);
|
let boundary = CurveBoundary::from([[0.], [TAU]]);
|
||||||
let surface = core.layers.geometry.xz_plane();
|
let surface = core.layers.geometry.xz_plane();
|
||||||
|
|
||||||
let tolerance = 1.;
|
let tolerance = 1.;
|
||||||
let approx = (&curve, surface_path, &surface, boundary)
|
let approx =
|
||||||
.approx(tolerance, &mut core);
|
(&curve, path, &surface, boundary).approx(tolerance, &mut core);
|
||||||
|
|
||||||
let expected_approx = (&surface_path, boundary)
|
let expected_approx = (&path, boundary)
|
||||||
.approx(tolerance, &mut core)
|
.approx(tolerance, &mut core)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|(point_local, _)| {
|
.map(|(point_local, _)| {
|
||||||
let point_surface =
|
let point_surface = path.point_from_path_coords(point_local);
|
||||||
surface_path.point_from_path_coords(point_local);
|
|
||||||
let point_global =
|
let point_global =
|
||||||
surface.point_from_surface_coords(point_surface);
|
surface.point_from_surface_coords(point_surface);
|
||||||
ApproxPoint::new(point_local, point_global)
|
ApproxPoint::new(point_local, point_global)
|
||||||
|
Loading…
Reference in New Issue
Block a user