Skip to content

Commit

Permalink
Define curve geometry in curve approx tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Apr 26, 2024
1 parent 5c39a3b commit be5028b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions crates/fj-core/src/algorithms/approx/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ mod tests {
use crate::{
algorithms::approx::{Approx, ApproxPoint},
geometry::{CurveBoundary, GlobalPath, HalfEdgeGeom, SurfacePath},
operations::{build::BuildSurface, insert::Insert},
operations::build::{BuildCurve, BuildSurface},
topology::{Curve, Surface},
Core,
};
Expand All @@ -195,7 +195,8 @@ mod tests {
let surface = core.layers.topology.surfaces.xz_plane();
let (path, boundary) =
SurfacePath::line_from_points([[1., 1.], [2., 1.]]);
let curve = Curve::new().insert(&mut core);
let curve =
Curve::from_path_and_surface(path, surface.clone(), &mut core);
let boundary = CurveBoundary::from(boundary);
let half_edge = HalfEdgeGeom { path, boundary };

Expand All @@ -217,7 +218,8 @@ mod tests {
);
let (path, boundary) =
SurfacePath::line_from_points([[1., 1.], [2., 1.]]);
let curve = Curve::new().insert(&mut core);
let curve =
Curve::from_path_and_surface(path, surface.clone(), &mut core);
let boundary = CurveBoundary::from(boundary);
let half_edge = HalfEdgeGeom { path, boundary };

Expand All @@ -238,7 +240,8 @@ mod tests {
([0.], [0., 1.]),
([TAU], [TAU, 1.]),
]);
let curve = Curve::new().insert(&mut core);
let curve =
Curve::from_path_and_surface(path, surface.clone(), &mut core);
let boundary = CurveBoundary::from([[0.], [TAU]]);
let half_edge = HalfEdgeGeom { path, boundary };

Expand Down Expand Up @@ -268,7 +271,8 @@ mod tests {

let surface = core.layers.topology.surfaces.xz_plane();
let path = SurfacePath::circle_from_center_and_radius([0., 0.], 1.);
let curve = Curve::new().insert(&mut core);
let curve =
Curve::from_path_and_surface(path, surface.clone(), &mut core);
let boundary = CurveBoundary::from([[0.], [TAU]]);
let half_edge = HalfEdgeGeom { path, boundary };

Expand Down

0 comments on commit be5028b

Please sign in to comment.