diff --git a/crates/fj-kernel/src/objects/solid.rs b/crates/fj-kernel/src/objects/solid.rs index 18558937b..e5b2f0e86 100644 --- a/crates/fj-kernel/src/objects/solid.rs +++ b/crates/fj-kernel/src/objects/solid.rs @@ -2,7 +2,7 @@ use std::collections::BTreeSet; use crate::builder::SolidBuilder; -use super::Shell; +use super::{Face, Shell}; /// A 3-dimensional shape /// @@ -49,6 +49,17 @@ impl Solid { pub fn into_shells(self) -> impl Iterator { self.shells.into_iter() } + + /// Find the given face in this solid + pub fn find_face(&self, face: &Face) -> Option { + for shell in self.shells() { + if let Some(face) = shell.find_face(face) { + return Some(face); + } + } + + None + } } impl Default for Solid {