From ab112e985074f61dc45548fcbb311aa7e7a72ea6 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 11 Oct 2022 13:30:30 +0200 Subject: [PATCH] Remove unused code --- crates/fj-operations/src/lib.rs | 3 -- crates/fj-operations/src/planes.rs | 50 ------------------------------ 2 files changed, 53 deletions(-) delete mode 100644 crates/fj-operations/src/planes.rs diff --git a/crates/fj-operations/src/lib.rs b/crates/fj-operations/src/lib.rs index 4120169b8..a758dcc91 100644 --- a/crates/fj-operations/src/lib.rs +++ b/crates/fj-operations/src/lib.rs @@ -20,13 +20,10 @@ pub mod shape_processor; mod difference_2d; mod group; -mod planes; mod sketch; mod sweep; mod transform; -pub use self::planes::Planes; - use fj_interop::debug::DebugInfo; use fj_kernel::{ algorithms::validate::{ diff --git a/crates/fj-operations/src/planes.rs b/crates/fj-operations/src/planes.rs deleted file mode 100644 index b1fff09b5..000000000 --- a/crates/fj-operations/src/planes.rs +++ /dev/null @@ -1,50 +0,0 @@ -use fj_kernel::{ - objects::{Objects, Surface}, - storage::Handle, -}; - -/// The static planes -/// -/// Keeps [`Handle`]s to the xy-, xz- and yz-planes. The purpose of this struct -/// is to provide these handles to implementations of [`Shape`], so they don't -/// have to create a duplicate `Surface` whenever they need one of those. -/// -/// [`Shape`]: crate::Shape -pub struct Planes { - xy: Handle, - xz: Handle, - yz: Handle, -} - -impl Planes { - /// Create a new instance of `Planes` - /// - /// Please note that the whole point of this struct is to not duplicate the - /// standard planes, and creating multiple instances of it defeats that - /// point. - /// - /// Create one instance of this struct, then share it everywhere it's - /// needed. - pub fn new(objects: &Objects) -> Self { - let xy = objects.surfaces.xy_plane(); - let xz = objects.surfaces.xz_plane(); - let yz = objects.surfaces.yz_plane(); - - Self { xy, xz, yz } - } - - /// Access the xy-plane - pub fn xy(&self) -> Handle { - self.xy.clone() - } - - /// Access the xz-plane - pub fn xz(&self) -> Handle { - self.xz.clone() - } - - /// Access the yz-plane - pub fn yz(&self) -> Handle { - self.yz.clone() - } -}