diff --git a/crates/fj-core/src/operations/build/half_edge.rs b/crates/fj-core/src/operations/build/half_edge.rs index e1c6074ce..bdf1abf64 100644 --- a/crates/fj-core/src/operations/build/half_edge.rs +++ b/crates/fj-core/src/operations/build/half_edge.rs @@ -87,6 +87,8 @@ pub trait BuildHalfEdge { surface: Handle, core: &mut Core, ) -> Handle { + let boundary = boundary.unwrap_or_default(); + let half_edge = HalfEdge::unjoined(core).insert(core); half_edge.curve().clone().make_line_on_surface( @@ -96,12 +98,9 @@ pub trait BuildHalfEdge { &mut core.layers.geometry, ); - core.layers.geometry.define_half_edge( - half_edge.clone(), - HalfEdgeGeom { - boundary: boundary.unwrap_or_default(), - }, - ); + core.layers + .geometry + .define_half_edge(half_edge.clone(), HalfEdgeGeom { boundary }); half_edge } diff --git a/crates/fj-core/src/operations/build/shell.rs b/crates/fj-core/src/operations/build/shell.rs index c0d94e47a..9062dccb3 100644 --- a/crates/fj-core/src/operations/build/shell.rs +++ b/crates/fj-core/src/operations/build/shell.rs @@ -92,7 +92,7 @@ pub trait BuildShell { let curve = curve.make_line_on_surface( positions, - Some(boundary), + boundary, surface.clone(), &mut core.layers.geometry, ); diff --git a/crates/fj-core/src/operations/geometry/curve.rs b/crates/fj-core/src/operations/geometry/curve.rs index b4ccf2755..8418fe4a8 100644 --- a/crates/fj-core/src/operations/geometry/curve.rs +++ b/crates/fj-core/src/operations/geometry/curve.rs @@ -35,7 +35,7 @@ pub trait UpdateCurveGeometry { fn make_line_on_surface( self, points_surface: [impl Into>; 2], - points_curve: Option>>, + points_curve: CurveBoundary>, surface: Handle, geometry: &mut Layer, ) -> Self; @@ -71,11 +71,10 @@ impl UpdateCurveGeometry for Handle { fn make_line_on_surface( self, points_surface: [impl Into>; 2], - points_curve: Option>>, + points_curve: CurveBoundary>, surface: Handle, geometry: &mut Layer, ) -> Self { - let points_curve = points_curve.unwrap_or_default(); let path = SurfacePath::line_from_points_with_coords( points_curve.inner.zip_ext(points_surface), ); diff --git a/crates/fj-core/src/operations/sweep/half_edge.rs b/crates/fj-core/src/operations/sweep/half_edge.rs index 3e350152a..d87ac7f3d 100644 --- a/crates/fj-core/src/operations/sweep/half_edge.rs +++ b/crates/fj-core/src/operations/sweep/half_edge.rs @@ -133,7 +133,7 @@ impl SweepHalfEdge for Handle { .unwrap_or_else(|| Curve::new().insert(core)) .make_line_on_surface( [start, end], - Some(boundary), + boundary, surface.clone(), &mut core.layers.geometry, );