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.
Sourcepub fn floor(&self) -> f64
pub fn floor(&self) -> f64
The policy floor this view was built with — what every band degrades to.
Sourcepub fn measured_edge_deviation(&mut self, id: u64) -> Option<f64>
pub fn measured_edge_deviation(&mut self, id: u64) -> Option<f64>
The raw d_meas(E) for edge id: the largest 3D disagreement between
the edge’s curve and its pcurve images, over every coedge that
references it — UNCLAMPED, neither floored nor capped, so a defective
entity (measured above cap_E) reads as what it is rather than as the
cap. None for an unknown or degenerate edge, one no coedge
references, or one whose every measurement failed.
For REPORTING (the import’s stated-precision consistency check, a
census). It is never a band: the band is Self::edge, and nothing a
caller reads here may widen anything (I1/I2 in the module doc).
Sourcepub fn measured_vertex_gap(&mut self, id: u64) -> Option<f64>
pub fn measured_vertex_gap(&mut self, id: u64) -> Option<f64>
The raw g_meas(V) for vertex id: the largest gap between the
vertex’s point and the ends of the edge curves that claim it —
unclamped, as Self::measured_edge_deviation is for edges. None
for an unknown vertex or one no non-degenerate edge ends at.
On an imported solid this is the gap AFTER endpoint healing
(heal_imported_edge_endpoints), not the vendor’s raw miss.