From 4d86db22dc3764fec94a147b4bb1a16826d05b63 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 22 Mar 2024 23:17:15 +0100 Subject: [PATCH 01/12] Rename argument to prepare for follow-on change --- .../fj-core/src/operations/geometry/half_edge.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/crates/fj-core/src/operations/geometry/half_edge.rs b/crates/fj-core/src/operations/geometry/half_edge.rs index 8dad70c2b..81d7e34e4 100644 --- a/crates/fj-core/src/operations/geometry/half_edge.rs +++ b/crates/fj-core/src/operations/geometry/half_edge.rs @@ -8,20 +8,12 @@ use crate::{ /// Update the geometry of a [`HalfEdge`] pub trait UpdateHalfEdgeGeometry { /// Set the path of the half-edge - fn set_path( - self, - path: SurfacePath, - geometry: &mut Layer, - ) -> Self; + fn set_path(self, path: SurfacePath, layer: &mut Layer) -> Self; } impl UpdateHalfEdgeGeometry for Handle { - fn set_path( - self, - path: SurfacePath, - geometry: &mut Layer, - ) -> Self { - geometry.define_half_edge(self.clone(), HalfEdgeGeometry { path }); + fn set_path(self, path: SurfacePath, layer: &mut Layer) -> Self { + layer.define_half_edge(self.clone(), HalfEdgeGeometry { path }); self } } From 4b2ea9dd6bd59628ba4c639775ba07499ba86820 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 22 Mar 2024 23:18:54 +0100 Subject: [PATCH 02/12] Inline redundant variable --- crates/fj-core/src/operations/reverse/cycle.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/fj-core/src/operations/reverse/cycle.rs b/crates/fj-core/src/operations/reverse/cycle.rs index 8ed73a81a..3d352ee0b 100644 --- a/crates/fj-core/src/operations/reverse/cycle.rs +++ b/crates/fj-core/src/operations/reverse/cycle.rs @@ -14,8 +14,6 @@ impl Reverse for Cycle { .half_edges() .pairs() .map(|(current, next)| { - let path = core.layers.geometry.of_half_edge(current).path; - HalfEdge::new( current.boundary().reverse(), current.curve().clone(), @@ -23,7 +21,10 @@ impl Reverse for Cycle { ) .insert(core) .derive_from(current, core) - .set_path(path, &mut core.layers.geometry) + .set_path( + core.layers.geometry.of_half_edge(current).path, + &mut core.layers.geometry, + ) }) .collect::>(); From 4f7f679e77b8e2f507f5a53931fa8d20c1d600e2 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 22 Mar 2024 23:20:33 +0100 Subject: [PATCH 03/12] Refactor to prepare for follow-on change --- crates/fj-core/src/validate/shell.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/fj-core/src/validate/shell.rs b/crates/fj-core/src/validate/shell.rs index d53751566..20104ef2c 100644 --- a/crates/fj-core/src/validate/shell.rs +++ b/crates/fj-core/src/validate/shell.rs @@ -445,6 +445,11 @@ mod tests { cycle.update_half_edge( cycle.half_edges().nth_circular(0), |half_edge, core| { + let geometry = core + .layers + .geometry + .of_half_edge(half_edge); + [HalfEdge::new( half_edge.boundary().reverse(), half_edge.curve().clone(), @@ -452,11 +457,7 @@ mod tests { ) .insert(core) .set_path( - core.layers - .geometry - .of_half_edge(half_edge) - .path - .reverse(), + geometry.path.reverse(), &mut core.layers.geometry, )] }, From f227217623a85404265e109c59b27f2e3202e462 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 22 Mar 2024 23:21:14 +0100 Subject: [PATCH 04/12] Refactor to prepare for follow-on change --- crates/fj-core/src/validate/shell.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/fj-core/src/validate/shell.rs b/crates/fj-core/src/validate/shell.rs index 20104ef2c..03be71f09 100644 --- a/crates/fj-core/src/validate/shell.rs +++ b/crates/fj-core/src/validate/shell.rs @@ -445,10 +445,11 @@ mod tests { cycle.update_half_edge( cycle.half_edges().nth_circular(0), |half_edge, core| { - let geometry = core + let mut geometry = core .layers .geometry .of_half_edge(half_edge); + geometry.path = geometry.path.reverse(); [HalfEdge::new( half_edge.boundary().reverse(), @@ -457,7 +458,7 @@ mod tests { ) .insert(core) .set_path( - geometry.path.reverse(), + geometry.path, &mut core.layers.geometry, )] }, From d4439b8378d1a38926b739c2aa7cc625bb6aa41a Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 22 Mar 2024 23:23:10 +0100 Subject: [PATCH 05/12] Rename `set_path` to `set_geometry` --- crates/fj-core/src/operations/build/half_edge.rs | 2 +- crates/fj-core/src/operations/build/shell.rs | 2 +- crates/fj-core/src/operations/geometry/half_edge.rs | 12 ++++++++++-- crates/fj-core/src/operations/join/cycle.rs | 6 +++--- crates/fj-core/src/operations/reverse/cycle.rs | 2 +- crates/fj-core/src/operations/split/edge.rs | 2 +- crates/fj-core/src/operations/split/face.rs | 2 +- crates/fj-core/src/operations/sweep/half_edge.rs | 2 +- crates/fj-core/src/validate/shell.rs | 4 ++-- 9 files changed, 21 insertions(+), 13 deletions(-) diff --git a/crates/fj-core/src/operations/build/half_edge.rs b/crates/fj-core/src/operations/build/half_edge.rs index a02e9a0a1..c222637c7 100644 --- a/crates/fj-core/src/operations/build/half_edge.rs +++ b/crates/fj-core/src/operations/build/half_edge.rs @@ -112,7 +112,7 @@ pub trait BuildHalfEdge { HalfEdge::unjoined(boundary, core) .insert(core) - .set_path(path, &mut core.layers.geometry) + .set_geometry(path, &mut core.layers.geometry) } } diff --git a/crates/fj-core/src/operations/build/shell.rs b/crates/fj-core/src/operations/build/shell.rs index 57a5666f6..1b8f54d3b 100644 --- a/crates/fj-core/src/operations/build/shell.rs +++ b/crates/fj-core/src/operations/build/shell.rs @@ -101,7 +101,7 @@ pub trait BuildShell { .update_start_vertex(|_, _| vertex, core) .update_curve(|_, _| curve, core) .insert(core) - .set_path( + .set_geometry( core.layers .geometry .of_half_edge(&half_edge) diff --git a/crates/fj-core/src/operations/geometry/half_edge.rs b/crates/fj-core/src/operations/geometry/half_edge.rs index 81d7e34e4..967feeee8 100644 --- a/crates/fj-core/src/operations/geometry/half_edge.rs +++ b/crates/fj-core/src/operations/geometry/half_edge.rs @@ -8,11 +8,19 @@ use crate::{ /// Update the geometry of a [`HalfEdge`] pub trait UpdateHalfEdgeGeometry { /// Set the path of the half-edge - fn set_path(self, path: SurfacePath, layer: &mut Layer) -> Self; + fn set_geometry( + self, + path: SurfacePath, + layer: &mut Layer, + ) -> Self; } impl UpdateHalfEdgeGeometry for Handle { - fn set_path(self, path: SurfacePath, layer: &mut Layer) -> Self { + fn set_geometry( + self, + path: SurfacePath, + layer: &mut Layer, + ) -> Self { layer.define_half_edge(self.clone(), HalfEdgeGeometry { path }); self } diff --git a/crates/fj-core/src/operations/join/cycle.rs b/crates/fj-core/src/operations/join/cycle.rs index c66ae593c..8dc9633c0 100644 --- a/crates/fj-core/src/operations/join/cycle.rs +++ b/crates/fj-core/src/operations/join/cycle.rs @@ -97,7 +97,7 @@ impl JoinCycle for Cycle { core, ) .insert(core) - .set_path(path, &mut core.layers.geometry) + .set_geometry(path, &mut core.layers.geometry) }) .collect::>(); self.add_half_edges(half_edges, core) @@ -141,7 +141,7 @@ impl JoinCycle for Cycle { core, ) .insert(core) - .set_path( + .set_geometry( core.layers .geometry .of_half_edge(half_edge) @@ -160,7 +160,7 @@ impl JoinCycle for Cycle { core, ) .insert(core) - .set_path( + .set_geometry( core.layers .geometry .of_half_edge(half_edge) diff --git a/crates/fj-core/src/operations/reverse/cycle.rs b/crates/fj-core/src/operations/reverse/cycle.rs index 3d352ee0b..0adeda2d3 100644 --- a/crates/fj-core/src/operations/reverse/cycle.rs +++ b/crates/fj-core/src/operations/reverse/cycle.rs @@ -21,7 +21,7 @@ impl Reverse for Cycle { ) .insert(core) .derive_from(current, core) - .set_path( + .set_geometry( core.layers.geometry.of_half_edge(current).path, &mut core.layers.geometry, ) diff --git a/crates/fj-core/src/operations/split/edge.rs b/crates/fj-core/src/operations/split/edge.rs index 93dcb8cb5..ac5fc85d1 100644 --- a/crates/fj-core/src/operations/split/edge.rs +++ b/crates/fj-core/src/operations/split/edge.rs @@ -50,7 +50,7 @@ impl SplitEdge for Shell { core, ) .insert(core) - .set_path( + .set_geometry( core.layers.geometry.of_half_edge(&sibling_b).path, &mut core.layers.geometry, ); diff --git a/crates/fj-core/src/operations/split/face.rs b/crates/fj-core/src/operations/split/face.rs index a68dbbd2d..de2fbf5d9 100644 --- a/crates/fj-core/src/operations/split/face.rs +++ b/crates/fj-core/src/operations/split/face.rs @@ -120,7 +120,7 @@ impl SplitFace for Shell { half_edge .update_start_vertex(|_, _| b.start_vertex().clone(), core) .insert(core) - .set_path( + .set_geometry( core.layers.geometry.of_half_edge(&half_edge).path, &mut core.layers.geometry, ) diff --git a/crates/fj-core/src/operations/sweep/half_edge.rs b/crates/fj-core/src/operations/sweep/half_edge.rs index d2db2834b..4cc466bc6 100644 --- a/crates/fj-core/src/operations/sweep/half_edge.rs +++ b/crates/fj-core/src/operations/sweep/half_edge.rs @@ -134,7 +134,7 @@ impl SweepHalfEdge for Handle { half_edge }; - half_edge.insert(core).set_path( + half_edge.insert(core).set_geometry( core.layers.geometry.of_half_edge(&line_segment).path, &mut core.layers.geometry, ) diff --git a/crates/fj-core/src/validate/shell.rs b/crates/fj-core/src/validate/shell.rs index 03be71f09..2a06ee715 100644 --- a/crates/fj-core/src/validate/shell.rs +++ b/crates/fj-core/src/validate/shell.rs @@ -457,7 +457,7 @@ mod tests { half_edge.start_vertex().clone(), ) .insert(core) - .set_path( + .set_geometry( geometry.path, &mut core.layers.geometry, )] @@ -536,7 +536,7 @@ mod tests { core, ) .insert(core) - .set_path( + .set_geometry( core.layers .geometry .of_half_edge(half_edge) From ee8bfe4c7c3072aeb537e1ae73c876af8238569b Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 22 Mar 2024 23:24:38 +0100 Subject: [PATCH 06/12] Accept full `HalfEdgeGeometry` in `set_geometry` --- crates/fj-core/src/operations/build/half_edge.rs | 2 +- crates/fj-core/src/operations/build/shell.rs | 3 +-- crates/fj-core/src/operations/geometry/half_edge.rs | 8 ++++---- crates/fj-core/src/operations/join/cycle.rs | 13 +++++++------ crates/fj-core/src/operations/reverse/cycle.rs | 2 +- crates/fj-core/src/operations/split/edge.rs | 2 +- crates/fj-core/src/operations/split/face.rs | 2 +- crates/fj-core/src/operations/sweep/half_edge.rs | 2 +- crates/fj-core/src/validate/shell.rs | 5 ++--- 9 files changed, 19 insertions(+), 20 deletions(-) diff --git a/crates/fj-core/src/operations/build/half_edge.rs b/crates/fj-core/src/operations/build/half_edge.rs index c222637c7..18c8c22b2 100644 --- a/crates/fj-core/src/operations/build/half_edge.rs +++ b/crates/fj-core/src/operations/build/half_edge.rs @@ -112,7 +112,7 @@ pub trait BuildHalfEdge { HalfEdge::unjoined(boundary, core) .insert(core) - .set_geometry(path, &mut core.layers.geometry) + .set_geometry(HalfEdgeGeometry { path }, &mut core.layers.geometry) } } diff --git a/crates/fj-core/src/operations/build/shell.rs b/crates/fj-core/src/operations/build/shell.rs index 1b8f54d3b..d024ebf1b 100644 --- a/crates/fj-core/src/operations/build/shell.rs +++ b/crates/fj-core/src/operations/build/shell.rs @@ -104,8 +104,7 @@ pub trait BuildShell { .set_geometry( core.layers .geometry - .of_half_edge(&half_edge) - .path, + .of_half_edge(&half_edge), &mut core.layers.geometry, ) }) diff --git a/crates/fj-core/src/operations/geometry/half_edge.rs b/crates/fj-core/src/operations/geometry/half_edge.rs index 967feeee8..0bddac7ac 100644 --- a/crates/fj-core/src/operations/geometry/half_edge.rs +++ b/crates/fj-core/src/operations/geometry/half_edge.rs @@ -1,5 +1,5 @@ use crate::{ - geometry::{Geometry, HalfEdgeGeometry, SurfacePath}, + geometry::{Geometry, HalfEdgeGeometry}, layers::Layer, objects::HalfEdge, storage::Handle, @@ -10,7 +10,7 @@ pub trait UpdateHalfEdgeGeometry { /// Set the path of the half-edge fn set_geometry( self, - path: SurfacePath, + geometry: HalfEdgeGeometry, layer: &mut Layer, ) -> Self; } @@ -18,10 +18,10 @@ pub trait UpdateHalfEdgeGeometry { impl UpdateHalfEdgeGeometry for Handle { fn set_geometry( self, - path: SurfacePath, + geometry: HalfEdgeGeometry, layer: &mut Layer, ) -> Self { - layer.define_half_edge(self.clone(), HalfEdgeGeometry { path }); + layer.define_half_edge(self.clone(), geometry); self } } diff --git a/crates/fj-core/src/operations/join/cycle.rs b/crates/fj-core/src/operations/join/cycle.rs index 8dc9633c0..ce2d26431 100644 --- a/crates/fj-core/src/operations/join/cycle.rs +++ b/crates/fj-core/src/operations/join/cycle.rs @@ -4,7 +4,7 @@ use fj_math::Point; use itertools::Itertools; use crate::{ - geometry::{CurveBoundary, SurfacePath}, + geometry::{CurveBoundary, HalfEdgeGeometry, SurfacePath}, objects::{Cycle, HalfEdge}, operations::{ build::BuildHalfEdge, @@ -97,7 +97,10 @@ impl JoinCycle for Cycle { core, ) .insert(core) - .set_geometry(path, &mut core.layers.geometry) + .set_geometry( + HalfEdgeGeometry { path }, + &mut core.layers.geometry, + ) }) .collect::>(); self.add_half_edges(half_edges, core) @@ -144,8 +147,7 @@ impl JoinCycle for Cycle { .set_geometry( core.layers .geometry - .of_half_edge(half_edge) - .path, + .of_half_edge(half_edge), &mut core.layers.geometry, )] }, @@ -163,8 +165,7 @@ impl JoinCycle for Cycle { .set_geometry( core.layers .geometry - .of_half_edge(half_edge) - .path, + .of_half_edge(half_edge), &mut core.layers.geometry, )] }, diff --git a/crates/fj-core/src/operations/reverse/cycle.rs b/crates/fj-core/src/operations/reverse/cycle.rs index 0adeda2d3..8372faaf9 100644 --- a/crates/fj-core/src/operations/reverse/cycle.rs +++ b/crates/fj-core/src/operations/reverse/cycle.rs @@ -22,7 +22,7 @@ impl Reverse for Cycle { .insert(core) .derive_from(current, core) .set_geometry( - core.layers.geometry.of_half_edge(current).path, + core.layers.geometry.of_half_edge(current), &mut core.layers.geometry, ) }) diff --git a/crates/fj-core/src/operations/split/edge.rs b/crates/fj-core/src/operations/split/edge.rs index ac5fc85d1..84496ca44 100644 --- a/crates/fj-core/src/operations/split/edge.rs +++ b/crates/fj-core/src/operations/split/edge.rs @@ -51,7 +51,7 @@ impl SplitEdge for Shell { ) .insert(core) .set_geometry( - core.layers.geometry.of_half_edge(&sibling_b).path, + core.layers.geometry.of_half_edge(&sibling_b), &mut core.layers.geometry, ); diff --git a/crates/fj-core/src/operations/split/face.rs b/crates/fj-core/src/operations/split/face.rs index de2fbf5d9..f9e6d8b49 100644 --- a/crates/fj-core/src/operations/split/face.rs +++ b/crates/fj-core/src/operations/split/face.rs @@ -121,7 +121,7 @@ impl SplitFace for Shell { .update_start_vertex(|_, _| b.start_vertex().clone(), core) .insert(core) .set_geometry( - core.layers.geometry.of_half_edge(&half_edge).path, + core.layers.geometry.of_half_edge(&half_edge), &mut core.layers.geometry, ) }; diff --git a/crates/fj-core/src/operations/sweep/half_edge.rs b/crates/fj-core/src/operations/sweep/half_edge.rs index 4cc466bc6..3014c16b2 100644 --- a/crates/fj-core/src/operations/sweep/half_edge.rs +++ b/crates/fj-core/src/operations/sweep/half_edge.rs @@ -135,7 +135,7 @@ impl SweepHalfEdge for Handle { }; half_edge.insert(core).set_geometry( - core.layers.geometry.of_half_edge(&line_segment).path, + core.layers.geometry.of_half_edge(&line_segment), &mut core.layers.geometry, ) }; diff --git a/crates/fj-core/src/validate/shell.rs b/crates/fj-core/src/validate/shell.rs index 2a06ee715..6a0078c49 100644 --- a/crates/fj-core/src/validate/shell.rs +++ b/crates/fj-core/src/validate/shell.rs @@ -458,7 +458,7 @@ mod tests { ) .insert(core) .set_geometry( - geometry.path, + geometry, &mut core.layers.geometry, )] }, @@ -539,8 +539,7 @@ mod tests { .set_geometry( core.layers .geometry - .of_half_edge(half_edge) - .path, + .of_half_edge(half_edge), &mut core.layers.geometry, )] }, From 4abb422653902cba3952aa86b37e877d4aa7ebad Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 22 Mar 2024 23:26:15 +0100 Subject: [PATCH 07/12] Refactor to simplify --- crates/fj-core/src/operations/build/half_edge.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/fj-core/src/operations/build/half_edge.rs b/crates/fj-core/src/operations/build/half_edge.rs index 18c8c22b2..2bcef0da2 100644 --- a/crates/fj-core/src/operations/build/half_edge.rs +++ b/crates/fj-core/src/operations/build/half_edge.rs @@ -41,9 +41,7 @@ pub trait BuildHalfEdge { core.layers.geometry.define_half_edge( half_edge.clone(), - HalfEdgeGeometry { - path: core.layers.geometry.of_half_edge(sibling).path, - }, + core.layers.geometry.of_half_edge(sibling), ); half_edge From 346eb8b34403594a5af1b2a5fc07bf2bba614e98 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 22 Mar 2024 23:26:43 +0100 Subject: [PATCH 08/12] Refactor to simplify --- crates/fj-core/src/operations/build/half_edge.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/crates/fj-core/src/operations/build/half_edge.rs b/crates/fj-core/src/operations/build/half_edge.rs index 2bcef0da2..1b1d67189 100644 --- a/crates/fj-core/src/operations/build/half_edge.rs +++ b/crates/fj-core/src/operations/build/half_edge.rs @@ -32,19 +32,16 @@ pub trait BuildHalfEdge { start_vertex: Handle, core: &mut Core, ) -> Handle { - let half_edge = HalfEdge::new( + HalfEdge::new( sibling.boundary().reverse(), sibling.curve().clone(), start_vertex, ) - .insert(core); - - core.layers.geometry.define_half_edge( - half_edge.clone(), + .insert(core) + .set_geometry( core.layers.geometry.of_half_edge(sibling), - ); - - half_edge + &mut core.layers.geometry, + ) } /// Create an arc From 532af46a340ed59f4512aed5871bb90091d0759c Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 22 Mar 2024 23:30:56 +0100 Subject: [PATCH 09/12] Refactor to simplify --- crates/fj-core/src/operations/split/half_edge.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/crates/fj-core/src/operations/split/half_edge.rs b/crates/fj-core/src/operations/split/half_edge.rs index 34dacf019..cb0601f33 100644 --- a/crates/fj-core/src/operations/split/half_edge.rs +++ b/crates/fj-core/src/operations/split/half_edge.rs @@ -1,7 +1,6 @@ use fj_math::Point; use crate::{ - geometry::HalfEdgeGeometry, objects::{HalfEdge, Vertex}, operations::{derive::DeriveFrom, insert::Insert}, storage::Handle, @@ -60,15 +59,11 @@ impl SplitHalfEdge for Handle { core.layers.geometry.define_half_edge( a.clone(), - HalfEdgeGeometry { - path: core.layers.geometry.of_half_edge(self).path, - }, + core.layers.geometry.of_half_edge(self), ); core.layers.geometry.define_half_edge( b.clone(), - HalfEdgeGeometry { - path: core.layers.geometry.of_half_edge(self).path, - }, + core.layers.geometry.of_half_edge(self), ); [a, b] From b528430be3eee8665d14db69bc83e2690f8681ac Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 22 Mar 2024 23:31:34 +0100 Subject: [PATCH 10/12] Inline redundant variable --- crates/fj-core/src/operations/transform/edge.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/fj-core/src/operations/transform/edge.rs b/crates/fj-core/src/operations/transform/edge.rs index 0ba22b374..cb2c9da8f 100644 --- a/crates/fj-core/src/operations/transform/edge.rs +++ b/crates/fj-core/src/operations/transform/edge.rs @@ -16,7 +16,6 @@ impl TransformObject for Handle { ) -> Self { // Don't need to transform the path, as that's defined in surface // coordinates. - let path = core.layers.geometry.of_half_edge(self).path; let boundary = self.boundary(); let curve = self .curve() @@ -30,9 +29,12 @@ impl TransformObject for Handle { let half_edge = HalfEdge::new(boundary, curve, start_vertex).insert(core); - core.layers - .geometry - .define_half_edge(half_edge.clone(), HalfEdgeGeometry { path }); + core.layers.geometry.define_half_edge( + half_edge.clone(), + HalfEdgeGeometry { + path: core.layers.geometry.of_half_edge(self).path, + }, + ); half_edge } From 4b509d332418a4cff8646fce2a2a73c413234291 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 22 Mar 2024 23:32:08 +0100 Subject: [PATCH 11/12] Refactor to simplify --- crates/fj-core/src/operations/transform/edge.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/fj-core/src/operations/transform/edge.rs b/crates/fj-core/src/operations/transform/edge.rs index cb2c9da8f..da644ccb8 100644 --- a/crates/fj-core/src/operations/transform/edge.rs +++ b/crates/fj-core/src/operations/transform/edge.rs @@ -1,8 +1,7 @@ use fj_math::Transform; use crate::{ - geometry::HalfEdgeGeometry, objects::HalfEdge, operations::insert::Insert, - storage::Handle, Core, + objects::HalfEdge, operations::insert::Insert, storage::Handle, Core, }; use super::{TransformCache, TransformObject}; @@ -31,9 +30,7 @@ impl TransformObject for Handle { core.layers.geometry.define_half_edge( half_edge.clone(), - HalfEdgeGeometry { - path: core.layers.geometry.of_half_edge(self).path, - }, + core.layers.geometry.of_half_edge(self), ); half_edge From 75fb28027783c284909fbf0aa1be291783a6e6e0 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 22 Mar 2024 23:32:21 +0100 Subject: [PATCH 12/12] Remove obsolete comment --- crates/fj-core/src/operations/transform/edge.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/fj-core/src/operations/transform/edge.rs b/crates/fj-core/src/operations/transform/edge.rs index da644ccb8..9e1a708ad 100644 --- a/crates/fj-core/src/operations/transform/edge.rs +++ b/crates/fj-core/src/operations/transform/edge.rs @@ -13,8 +13,6 @@ impl TransformObject for Handle { core: &mut Core, cache: &mut TransformCache, ) -> Self { - // Don't need to transform the path, as that's defined in surface - // coordinates. let boundary = self.boundary(); let curve = self .curve()