Skip to main content

VectorAreaReport

Struct VectorAreaReport 

Source
pub struct VectorAreaReport {
    pub shells: Vec<ShellVectorArea>,
    pub unreadable: Vec<String>,
}
Expand description

Outcome of shell_vector_areas.

Fields§

§shells: Vec<ShellVectorArea>§unreadable: Vec<String>

Shells or faces whose trims could not be read, shell/face: reason. A scan that could not read a face did not clear it, so an empty shells beside a non-empty this is not “every shell closes”.

Implementations§

Source§

impl VectorAreaReport

Source

pub fn is_flagged(&self) -> bool

The predicate: some CLOSED shell is over its bar.

Source

pub fn unmeasured(&self) -> Vec<(u64, ClosureReading)>

The shells this scan did NOT measure, with what each reached. A report with entries here has not cleared those shells, whatever the rest read.

Source

pub fn worst_shell(&self) -> Option<&ShellVectorArea>

The largest closed-shell residual, and the shell that carries it.

Source

pub fn residual(&self) -> f64

|trim_residual| of the worst CLOSED shell, and NaN when this solid has no closed shell at all.

Not 0.0. A residual of zero is what a perfectly sound shell reads, so a solid whose shells are all open — one that has LOST faces, say — must not be able to read like one through this accessor. The whole point of the check is that a number nothing compares against is how the defects it hunts stayed hidden; handing back a sound-looking zero for “there was nothing here to judge” would rebuild that trap inside the detector. Use Self::has_closed_shell to tell the two apart before reading this, or read the per-shell reports, where an open shell’s residual is its boundary’s own vector area and is reported.

Source

pub fn bar(&self) -> f64

That shell’s bar, NaN when there is no closed shell — see Self::residual for why this is not 0.0.

Source

pub fn has_closed_shell(&self) -> bool

Is there a closed shell here for Self::residual to be about?

Σ ∫ n dA = 0 is a statement about a CLOSED shell, so a solid with none is not “sound” and not “unsound” — it is unjudged, and every reader of this report has to decide what to do about that rather than inherit a zero.

Source

pub fn open_shells(&self) -> impl Iterator<Item = &ShellVectorArea>

The shells that are NOT closed, with the vector area their open boundary encloses — the reading that names a shell which has lost faces.

A closed shell’s every edge is used exactly twice. A shell that has dropped a face has that face’s edges used once, so it is open here and its residual is what the missing boundary encloses. That is a different question from Euler parity, and a strictly stronger one for this purpose: parity notices an ODD number of faces going and is silent when an even number does, while this counts the uses of every edge and does not care how many faces left.

Source

pub fn summary(&self) -> Option<String>

One line naming the worst shell and the faces that own its residual, or None when every closed shell is inside its bar.

Trait Implementations§

Source§

impl Clone for VectorAreaReport

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VectorAreaReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for VectorAreaReport

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more