fj_core/objects/kinds/shell.rs
1use crate::{
2 objects::{Face, ObjectSet},
3 storage::Handle,
4};
5
6/// A 3-dimensional closed shell
7#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
8pub struct Shell {
9 faces: ObjectSet<Face>,
10}
11
12impl Shell {
13 /// Construct an empty instance of `Shell`
14 pub fn new(faces: impl IntoIterator<Item = Handle<Face>>) -> Self {
15 Self {
16 faces: faces.into_iter().collect(),
17 }
18 }
19
20 /// Access the faces of the shell
21 pub fn faces(&self) -> &ObjectSet<Face> {
22 &self.faces
23 }
24}