mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-14 22:16:08 +00:00
Simplify test
This commit is contained in:
parent
567229816d
commit
3afd86aadf
@ -258,18 +258,19 @@ mod tests {
|
|||||||
|
|
||||||
let circle = Circle::from_center_and_radius(Point::origin(), 1.);
|
let circle = Circle::from_center_and_radius(Point::origin(), 1.);
|
||||||
let global_path = GlobalPath::Circle(circle);
|
let global_path = GlobalPath::Circle(circle);
|
||||||
let surface = Surface::from_uv(global_path, [0., 0., 1.], &mut core);
|
let surface_geom = SurfaceGeom {
|
||||||
|
u: global_path,
|
||||||
|
v: Vector::from([0., 0., 1.]),
|
||||||
|
};
|
||||||
|
let surface = Surface::from_geometry(surface_geom, &mut core);
|
||||||
let 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.]),
|
||||||
]);
|
]);
|
||||||
let curve =
|
|
||||||
Curve::from_path_and_surface(path, surface.clone(), &mut core);
|
|
||||||
let boundary = CurveBoundary::from([[0.], [TAU]]);
|
let boundary = CurveBoundary::from([[0.], [TAU]]);
|
||||||
|
|
||||||
let tolerance = 1.;
|
let tolerance = 1.;
|
||||||
let approx = (&curve, &surface, boundary)
|
let approx = approx_curve(&path, &surface_geom, boundary, tolerance);
|
||||||
.approx(tolerance, &core.layers.geometry);
|
|
||||||
|
|
||||||
let expected_approx = approx_circle(&circle, boundary, tolerance)
|
let expected_approx = approx_circle(&circle, boundary, tolerance)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user