diff --git a/crates/fj-core/src/geometry/curve.rs b/crates/fj-core/src/geometry/curve.rs index 54b3bc3a1..9b5100581 100644 --- a/crates/fj-core/src/geometry/curve.rs +++ b/crates/fj-core/src/geometry/curve.rs @@ -86,6 +86,9 @@ impl CurveGeom2 for Line { // geometry trait. Eventually, `CurveGeom2` is expected to replace `Path`. impl CurveGeom2 for Path { fn origin(&self) -> Point { - self.origin() + match self { + Self::Circle(circle) => circle.origin(), + Self::Line(line) => line.origin(), + } } } diff --git a/crates/fj-core/src/geometry/path.rs b/crates/fj-core/src/geometry/path.rs index 26c450435..36d4739ca 100644 --- a/crates/fj-core/src/geometry/path.rs +++ b/crates/fj-core/src/geometry/path.rs @@ -4,8 +4,6 @@ use fj_math::{Circle, Line, Point, Scalar, Transform, Vector}; -use super::CurveGeom2; - /// A path through surface (2D) or global (3D) space #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] pub enum Path { @@ -106,14 +104,6 @@ impl Path { Self::Line(Line::from_points_with_line_coords(points)) } - /// Access the origin of the path's coordinate system - pub fn origin(&self) -> Point { - match self { - Self::Circle(circle) => circle.origin(), - Self::Line(line) => line.origin(), - } - } - /// Convert a point on the path into surface coordinates pub fn point_from_path_coords( &self, diff --git a/crates/fj-core/src/geometry/surface.rs b/crates/fj-core/src/geometry/surface.rs index 15a5b1e45..40e5da5a5 100644 --- a/crates/fj-core/src/geometry/surface.rs +++ b/crates/fj-core/src/geometry/surface.rs @@ -4,7 +4,7 @@ use fj_math::{Point, Scalar, Transform, Triangle, Vector}; use crate::algorithms::approx::{PathApproxParams, Tolerance}; -use super::Path; +use super::{CurveGeom2, Path}; /// The geometry that defines a surface #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]