pub struct Shell { /* private fields */ }Expand description
A topological shell: a connected set of faces.
A closed shell bounds a volume (solid). An open shell represents a sheet or partial boundary.
Implementations§
Source§impl Shell
impl Shell
Sourcepub fn new(faces: Vec<FaceId>) -> Result<Self, TopologyError>
pub fn new(faces: Vec<FaceId>) -> Result<Self, TopologyError>
Creates a new shell from a non-empty list of faces.
§Errors
Returns TopologyError::Empty if faces is empty.
Sourcepub const fn empty() -> Self
pub const fn empty() -> Self
Creates a faceless shell backing an empty-result sentinel.
A regular shell rejects an empty face list because an ordinary surface boundary must enclose something. The empty shell exists only so a boolean whose algebraic outcome is the empty set (e.g. the intersection of disjoint solids) can be represented as a valid, queryable solid handle reporting zero faces and zero volume — distinct from a malformed-input error.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true when this shell has no faces (the empty-result
sentinel — see Shell::empty).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Shell
impl RefUnwindSafe for Shell
impl Send for Shell
impl Sync for Shell
impl Unpin for Shell
impl UnsafeUnpin for Shell
impl UnwindSafe for Shell
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more