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>
impl<'s> EntityTolerances<'s>
Sourcepub fn for_solid(solid: &'s BrepSolid, policy: &KernelTolerances) -> Self
pub fn for_solid(solid: &'s BrepSolid, policy: &KernelTolerances) -> Self
A view over solid with policy’s spatial tolerance as the floor.
Sourcepub fn with_floor(solid: &'s BrepSolid, floor: f64) -> Self
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.
Sourcepub fn edge(&mut self, id: u64) -> f64
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.
Sourcepub fn vertex(&mut self, id: u64) -> f64
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.
Sourcepub fn worst_edge(&mut self, ids: impl IntoIterator<Item = u64>) -> f64
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.