Remove unused code

This commit is contained in:
Hanno Braun 2022-10-11 13:30:30 +02:00
parent 262b0f233f
commit ab112e9850
2 changed files with 0 additions and 53 deletions

View File

@ -20,13 +20,10 @@ pub mod shape_processor;
mod difference_2d; mod difference_2d;
mod group; mod group;
mod planes;
mod sketch; mod sketch;
mod sweep; mod sweep;
mod transform; mod transform;
pub use self::planes::Planes;
use fj_interop::debug::DebugInfo; use fj_interop::debug::DebugInfo;
use fj_kernel::{ use fj_kernel::{
algorithms::validate::{ algorithms::validate::{

View File

@ -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<Surface>,
xz: Handle<Surface>,
yz: Handle<Surface>,
}
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<Surface> {
self.xy.clone()
}
/// Access the xz-plane
pub fn xz(&self) -> Handle<Surface> {
self.xz.clone()
}
/// Access the yz-plane
pub fn yz(&self) -> Handle<Surface> {
self.yz.clone()
}
}