pub struct ZoneSplit {
pub pieces: Vec<ZonePiece>,
pub whole_volume: f64,
pub remainder_failed: bool,
}Expand description
The whole split of one element.
Fields§
§pieces: Vec<ZonePiece>Non-empty pieces only, in zone order, remainder last.
whole_volume: f64Enclosed volume of the input, so a caller can check the pieces against it without re-deriving it from a different producer.
remainder_failed: boolThe remainder could not be built: the arrangement was left
non-conforming and difference_all refused rather than risk an
over- or under-cut.
Reported SEPARATELY from ZoneSplit::sum_error_rel because the two
have opposite fixes. A raised sum means the zones overlap and the user
should redraw them; this means the part of the element inside NO zone is
missing from the result, which a caller must refuse outright – publishing
the zone pieces alone silently deletes real volume from the model.
Implementations§
Source§impl ZoneSplit
impl ZoneSplit
Sourcepub fn sum_error_rel(&self) -> f64
pub fn sum_error_rel(&self) -> f64
How far the pieces are from summing to the whole, RELATIVE to the whole.
The invariant #2508 puts above every other for this feature. Exposed rather than asserted here: a caller that wants to refuse an untrustworthy split needs the number, and a caller displaying a warning needs it too.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ZoneSplit
impl RefUnwindSafe for ZoneSplit
impl Send for ZoneSplit
impl Sync for ZoneSplit
impl Unpin for ZoneSplit
impl UnsafeUnpin for ZoneSplit
impl UnwindSafe for ZoneSplit
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
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.