diff --git a/crates/fj-kernel/src/builder/curve.rs b/crates/fj-kernel/src/builder/curve.rs index f9e5f3c50..dc35072ca 100644 --- a/crates/fj-kernel/src/builder/curve.rs +++ b/crates/fj-kernel/src/builder/curve.rs @@ -1,25 +1,9 @@ -use fj_math::Point; - -use crate::{geometry::path::SurfacePath, partial::PartialCurve}; +use crate::partial::PartialCurve; /// Builder API for [`PartialCurve`] pub trait CurveBuilder { - /// Update partial curve to be a line, from provided points and line coords - /// - /// Returns the updated path. - fn update_as_line_from_points_with_line_coords( - &mut self, - points: [(impl Into>, impl Into>); 2], - ) -> SurfacePath; + // No methods are currently defined. This trait serves as a placeholder, to + // make it clear where to add such methods, once necessary. } -impl CurveBuilder for PartialCurve { - fn update_as_line_from_points_with_line_coords( - &mut self, - points: [(impl Into>, impl Into>); 2], - ) -> SurfacePath { - let path = SurfacePath::from_points_with_line_coords(points); - self.path = Some(path.into()); - path - } -} +impl CurveBuilder for PartialCurve {} diff --git a/crates/fj-kernel/src/builder/edge.rs b/crates/fj-kernel/src/builder/edge.rs index 92f8d66a3..8812b6810 100644 --- a/crates/fj-kernel/src/builder/edge.rs +++ b/crates/fj-kernel/src/builder/edge.rs @@ -10,8 +10,6 @@ use crate::{ partial::{MaybeSurfacePath, Partial, PartialGlobalEdge, PartialHalfEdge}, }; -use super::CurveBuilder; - /// Builder API for [`PartialHalfEdge`] pub trait HalfEdgeBuilder { /// Update partial half-edge to represent the u-axis of the surface it is on @@ -174,12 +172,12 @@ impl HalfEdgeBuilder for PartialHalfEdge { }); let path = if let [Some(start), Some(end)] = boundary { - let boundary = [start, end]; - self.curve - .write() - .update_as_line_from_points_with_line_coords( - boundary.zip_ext(points_surface), - ) + let points = [start, end].zip_ext(points_surface); + + let path = SurfacePath::from_points_with_line_coords(points); + self.curve.write().path = Some(path.into()); + + path } else { let (path, _) = SurfacePath::line_from_points(points_surface); self.curve.write().path = Some(path.into());