diff --git a/crates/fj-kernel/src/algorithms/transform/curve.rs b/crates/fj-kernel/src/algorithms/transform/curve.rs index 109002f10..960114022 100644 --- a/crates/fj-kernel/src/algorithms/transform/curve.rs +++ b/crates/fj-kernel/src/algorithms/transform/curve.rs @@ -29,11 +29,11 @@ impl TransformObject for PartialCurve { objects: &Objects, ) -> Result { let surface = self - .surface() + .surface .map(|surface| surface.transform(transform, objects)) .transpose()?; let global_form = self - .global_form() + .global_form .map(|global_form| global_form.transform(transform, objects)) .transpose()?; @@ -41,7 +41,7 @@ impl TransformObject for PartialCurve { // coordinates, and thus transforming `surface` takes care of it. Ok(Self::default() .with_surface(surface) - .with_path(self.path()) + .with_path(self.path) .with_global_form(global_form)) } } diff --git a/crates/fj-kernel/src/builder/edge.rs b/crates/fj-kernel/src/builder/edge.rs index 928583ca0..9a7eab91e 100644 --- a/crates/fj-kernel/src/builder/edge.rs +++ b/crates/fj-kernel/src/builder/edge.rs @@ -71,7 +71,7 @@ impl HalfEdgeBuilder for PartialHalfEdge { .with_global_form(Some(self.extract_global_curve())) .update_as_circle_from_radius(radius); - let path = curve.path().expect("Expected path that was just created"); + let path = curve.path.expect("Expected path that was just created"); let [a_curve, b_curve] = [Scalar::ZERO, Scalar::TAU].map(|coord| Point::from([coord])); @@ -88,7 +88,7 @@ impl HalfEdgeBuilder for PartialHalfEdge { let surface_vertex = SurfaceVertex::partial() .with_position(Some(path.point_from_path_coords(a_curve))) - .with_surface(curve.surface()) + .with_surface(curve.surface.clone()) .with_global_form(Some(global_vertex)) .build(objects)? .insert(objects)?; diff --git a/crates/fj-kernel/src/builder/vertex.rs b/crates/fj-kernel/src/builder/vertex.rs index 813268a74..ca2776ff8 100644 --- a/crates/fj-kernel/src/builder/vertex.rs +++ b/crates/fj-kernel/src/builder/vertex.rs @@ -57,10 +57,10 @@ impl GlobalVertexBuilder for PartialGlobalVertex { ) -> Self { let curve = curve.into().into_partial(); - let path = curve.path().expect( + let path = curve.path.expect( "Need path to create `GlobalVertex` from curve and position", ); - let surface = curve.surface().expect( + let surface = curve.surface.expect( "Need surface to create `GlobalVertex` from curve and position", ); diff --git a/crates/fj-kernel/src/partial/maybe_partial.rs b/crates/fj-kernel/src/partial/maybe_partial.rs index 03caa5e6c..3db76684d 100644 --- a/crates/fj-kernel/src/partial/maybe_partial.rs +++ b/crates/fj-kernel/src/partial/maybe_partial.rs @@ -142,7 +142,7 @@ impl MaybePartial { pub fn path(&self) -> Option { match self { MaybePartial::Full(full) => Some(full.path()), - MaybePartial::Partial(partial) => partial.path(), + MaybePartial::Partial(partial) => partial.path, } } @@ -150,7 +150,7 @@ impl MaybePartial { pub fn surface(&self) -> Option> { match self { MaybePartial::Full(full) => Some(full.surface().clone()), - MaybePartial::Partial(partial) => partial.surface(), + MaybePartial::Partial(partial) => partial.surface.clone(), } } @@ -158,7 +158,7 @@ impl MaybePartial { pub fn global_form(&self) -> Option> { match self { Self::Full(full) => Some(full.global_form().clone().into()), - Self::Partial(partial) => partial.global_form(), + Self::Partial(partial) => partial.global_form.clone(), } } } diff --git a/crates/fj-kernel/src/partial/objects/curve.rs b/crates/fj-kernel/src/partial/objects/curve.rs index 0b3729aa8..18d6ab5bf 100644 --- a/crates/fj-kernel/src/partial/objects/curve.rs +++ b/crates/fj-kernel/src/partial/objects/curve.rs @@ -22,21 +22,6 @@ pub struct PartialCurve { } impl PartialCurve { - /// Access the path that defines the [`Curve`] - pub fn path(&self) -> Option { - self.path - } - - /// Access the surface that the [`Curve`] is defined in - pub fn surface(&self) -> Option> { - self.surface.clone() - } - - /// Access the global form of the [`Curve`] - pub fn global_form(&self) -> Option> { - self.global_form.clone() - } - /// Provide a path for the partial curve pub fn with_path(mut self, path: Option) -> Self { if let Some(path) = path {