Remove unused methods

This commit is contained in:
Hanno Braun 2023-05-22 12:45:37 +02:00
parent afa79e48f4
commit d9b6ac60dd
3 changed files with 1 additions and 31 deletions

View File

@ -109,17 +109,6 @@ impl FaceSet {
pub fn new() -> Self { pub fn new() -> Self {
Self::default() Self::default()
} }
/// Find the given face
pub fn find(&self, face: &Handle<Face>) -> Option<Handle<Face>> {
for f in self {
if f == face {
return Some(f.clone());
}
}
None
}
} }
impl Extend<Handle<Face>> for FaceSet { impl Extend<Handle<Face>> for FaceSet {

View File

@ -26,9 +26,4 @@ impl Shell {
pub fn faces(&self) -> &FaceSet { pub fn faces(&self) -> &FaceSet {
&self.faces &self.faces
} }
/// Find the given face in the shell
pub fn find_face(&self, face: &Handle<Face>) -> Option<Handle<Face>> {
self.faces().find(face)
}
} }

View File

@ -1,9 +1,6 @@
use std::collections::BTreeSet; use std::collections::BTreeSet;
use crate::{ use crate::{objects::Shell, storage::Handle};
objects::{Face, Shell},
storage::Handle,
};
/// A 3-dimensional shape, built from [`Shell`]s. Many Solids will contains only /// A 3-dimensional shape, built from [`Shell`]s. Many Solids will contains only
/// one shell, but if the Solid contains cavities they will be represented by a /// one shell, but if the Solid contains cavities they will be represented by a
@ -30,15 +27,4 @@ impl Solid {
pub fn shells(&self) -> impl Iterator<Item = &Handle<Shell>> { pub fn shells(&self) -> impl Iterator<Item = &Handle<Shell>> {
self.shells.iter() self.shells.iter()
} }
/// Find the given face in the solid
pub fn find_face(&self, face: &Handle<Face>) -> Option<Handle<Face>> {
for shell in self.shells() {
if let Some(face) = shell.find_face(face) {
return Some(face);
}
}
None
}
} }