Skip to main content

EntityTolerances

Struct EntityTolerances 

Source
pub struct EntityTolerances<'s> { /* private fields */ }
Expand description

Lazily-measured, capped per-entity tolerances for one solid.

Construct once per operation on the operand you are about to consume, ask for the entities you actually touch, and drop it with the operation. Each entity is measured at most once.

See the module documentation for the invariants; in particular a caller takes max(its own global band, this), never this alone.

Implementations§

Source§

impl<'s> EntityTolerances<'s>

Source

pub fn for_solid(solid: &'s BrepSolid, policy: &KernelTolerances) -> Self

A view over solid with policy’s spatial tolerance as the floor.

Source

pub fn with_floor(solid: &'s BrepSolid, floor: f64) -> Self

A view whose floor is given directly — for the several callers that carry a bare tolerance: f64 rather than a whole policy.

Source

pub fn edge(&mut self, id: u64) -> f64

The identity band for edge id: min(cap_E, max(floor, d_meas(E))).

Answers the floor for an unknown edge, an edge with no coedge, or a measurement that could not be taken — I2’s fail-safe direction. Never returns a non-finite or negative value.

Source

pub fn vertex(&mut self, id: u64) -> f64

The identity band for vertex id: min(cap_V, max(floor, g_meas(V))), where g_meas is the largest gap between the vertex’s point and the endpoints of the edges that claim it.

Source

pub fn worst_edge(&mut self, ids: impl IntoIterator<Item = u64>) -> f64

The largest edge band over ids — the band a decision that involves several edges at once (a junction sitting where two boundary edges meet) must respect, since it can be no more certain than its worst input.

Source

pub fn floor(&self) -> f64

The policy floor this view was built with — what every band degrades to.

Auto Trait Implementations§

§

impl<'s> !RefUnwindSafe for EntityTolerances<'s>

§

impl<'s> !Send for EntityTolerances<'s>

§

impl<'s> !Sync for EntityTolerances<'s>

§

impl<'s> !UnwindSafe for EntityTolerances<'s>

§

impl<'s> Freeze for EntityTolerances<'s>

§

impl<'s> Unpin for EntityTolerances<'s>

§

impl<'s> UnsafeUnpin for EntityTolerances<'s>

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> 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, 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