From 25590438626094f1e91739cdda15a29c9656c8bd Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 24 Feb 2023 14:20:14 +0100 Subject: [PATCH] Move `CurveBuilder::update_as_v_axis` --- crates/fj-kernel/src/builder/curve.rs | 11 ----------- crates/fj-kernel/src/builder/edge.rs | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/fj-kernel/src/builder/curve.rs b/crates/fj-kernel/src/builder/curve.rs index 607adb56d..d91864962 100644 --- a/crates/fj-kernel/src/builder/curve.rs +++ b/crates/fj-kernel/src/builder/curve.rs @@ -4,11 +4,6 @@ use crate::{geometry::path::SurfacePath, partial::PartialCurve}; /// Builder API for [`PartialCurve`] pub trait CurveBuilder { - /// Update partial curve to represent the v-axis of the surface it is on - /// - /// Returns the updated path. - fn update_as_v_axis(&mut self) -> SurfacePath; - /// Update partial curve to be a circle, from the provided radius /// /// Returns the updated path. @@ -44,12 +39,6 @@ pub trait CurveBuilder { } impl CurveBuilder for PartialCurve { - fn update_as_v_axis(&mut self) -> SurfacePath { - let path = SurfacePath::v_axis(); - self.path = Some(path.into()); - path - } - fn update_as_circle_from_radius( &mut self, radius: impl Into, diff --git a/crates/fj-kernel/src/builder/edge.rs b/crates/fj-kernel/src/builder/edge.rs index 523a70e7a..42cd7d241 100644 --- a/crates/fj-kernel/src/builder/edge.rs +++ b/crates/fj-kernel/src/builder/edge.rs @@ -19,6 +19,11 @@ pub trait HalfEdgeBuilder { /// Returns the updated path. fn update_as_u_axis(&mut self) -> SurfacePath; + /// Update partial curve to represent the v-axis of the surface it is on + /// + /// Returns the updated path. + fn update_as_v_axis(&mut self) -> SurfacePath; + /// Update partial half-edge to be a circle, from the given radius fn update_as_circle_from_radius(&mut self, radius: impl Into); @@ -74,6 +79,12 @@ impl HalfEdgeBuilder for PartialHalfEdge { path } + fn update_as_v_axis(&mut self) -> SurfacePath { + let path = SurfacePath::v_axis(); + self.curve.write().path = Some(path.into()); + path + } + fn update_as_circle_from_radius(&mut self, radius: impl Into) { let path = self.curve.write().update_as_circle_from_radius(radius);