From 5c945f5b45f1a0c23109cad2f89bc66293bb8890 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Thu, 22 Aug 2024 20:42:02 +0200 Subject: [PATCH 1/2] Fix cylinder surface providing wrong origin point --- crates/fj-core/src/geometry/surface.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/fj-core/src/geometry/surface.rs b/crates/fj-core/src/geometry/surface.rs index d06cfb352..61656d55a 100644 --- a/crates/fj-core/src/geometry/surface.rs +++ b/crates/fj-core/src/geometry/surface.rs @@ -20,10 +20,7 @@ impl SurfaceGeom { /// # Access the origin of the surface pub fn origin(&self) -> Point<3> { let Self { u, .. } = self; - match u { - Path::Circle(circle) => circle.center(), - Path::Line(line) => line.origin(), - } + u.origin() } /// # Return the triangle at the provided point on the surface From bed5d5c70d53abb2405eb229c612a02cd2cac39a Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Thu, 22 Aug 2024 20:42:46 +0200 Subject: [PATCH 2/2] Simplify --- crates/fj-core/src/geometry/surface.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/fj-core/src/geometry/surface.rs b/crates/fj-core/src/geometry/surface.rs index 61656d55a..b6ea62f63 100644 --- a/crates/fj-core/src/geometry/surface.rs +++ b/crates/fj-core/src/geometry/surface.rs @@ -19,8 +19,7 @@ pub struct SurfaceGeom { impl SurfaceGeom { /// # Access the origin of the surface pub fn origin(&self) -> Point<3> { - let Self { u, .. } = self; - u.origin() + self.u.origin() } /// # Return the triangle at the provided point on the surface