pub struct GeometryClosure {
pub all_closed: bool,
pub all_orientable: bool,
pub all_single_component: bool,
pub segments: u32,
}Expand description
What an ENTITY’s produced geometry looked like topologically, folded over every segment the hasher was fed (#1891).
Four independent yes/no axes rather than one “is it good” bit, because a
consumer that gets no volume deserves to know why: an open SurfaceModel
sheet, a non-orientable shell, a two-piece body, and a many-item assembly
are four different modelling situations with four different fixes, and
collapsing them loses the diagnosis. They ride the wasm boundary as one
packed Self::bits byte per entity.
Fields§
§all_closed: boolEvery segment’s every component was closed (no boundary, no non-manifold edge).
all_orientable: boolEvery segment’s every component was orientable.
all_single_component: boolEvery segment was a SINGLE connected component.
segments: u32Segments (add_mesh* calls contributing at least one in-range triangle).
Implementations§
Source§impl GeometryClosure
impl GeometryClosure
Sourcepub const EMPTY: Self
pub const EMPTY: Self
Nothing seen yet. The all_* conjunctions start true and are only
meaningful once segments > 0, which every consumer checks first.
Sourcepub fn bits(&self) -> u8
pub fn bits(&self) -> u8
Pack into one byte for the FFI boundary: bit 0 closed, bit 1 orientable,
bit 2 single-component, bit 3 exactly-one-segment. 0x0F is the only
value that carries a volume, so a consumer can both read the volume’s
presence and, when it is absent, name the reason.
A CLEAR bit means NOT PROVED, never proved-false. Normally the two coincide — the orienter decided each clause outright — but a retracted verdict (above) clears bits 0-2 without having established anything about them.
Sourcepub fn is_trustworthy_solid(&self) -> bool
pub fn is_trustworthy_solid(&self) -> bool
Whether a divergence-theorem volume over this entity’s geometry is
trustworthy. See GeometryHasher::volume for the reasoning behind
each clause — every one of them is load-bearing.
Trait Implementations§
Source§impl Clone for GeometryClosure
impl Clone for GeometryClosure
Source§fn clone(&self) -> GeometryClosure
fn clone(&self) -> GeometryClosure
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GeometryClosure
Source§impl Debug for GeometryClosure
impl Debug for GeometryClosure
impl Eq for GeometryClosure
Source§impl PartialEq for GeometryClosure
impl PartialEq for GeometryClosure
impl StructuralPartialEq for GeometryClosure
Auto Trait Implementations§
impl Freeze for GeometryClosure
impl RefUnwindSafe for GeometryClosure
impl Send for GeometryClosure
impl Sync for GeometryClosure
impl Unpin for GeometryClosure
impl UnsafeUnpin for GeometryClosure
impl UnwindSafe for GeometryClosure
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.