pub struct BooleanReport { /* private fields */ }Expand description
What a boolean read within tolerance, as
ReferenceExactCompiler::compile_exact_with_report reports it (#236).
The within-tolerance decisions one boolean took (#236).
Empty means no such decision fired: the result is the exact boolean of
the operands as given, its new vertices and curves evaluated in f64
(see the crate docs). Otherwise it is the exact boolean of operands
moved by at most Self::linear and turned by at most
Self::angular, both within the caller’s tolerance.
Either way, constructed points closer than ROUNDING_FACTOR times
Self::extent were read as one point without a decision, and are not
reported (#244); Self::rounding_floor covers that residue and the
move of an unrecorded angular one.
A boolean the caller’s tolerance left refused is cut again at
FINER_FACTOR times it (#332); its readings then lie within that
finer tolerance, and Self::finer says so.
Implementations§
Source§impl BooleanReport
impl BooleanReport
Sourcepub fn decisions(&self) -> &[ToleranceDecision]
pub fn decisions(&self) -> &[ToleranceDecision]
One entry per kind of reading that fired, in ToleranceDecisionKind
order, each with its worst magnitude.
Sourcepub fn is_exact(&self) -> bool
pub fn is_exact(&self) -> bool
Whether no within-tolerance decision fired: the result is the exact boolean of the operands as given.
Sourcepub fn linear(&self) -> f64
pub fn linear(&self) -> f64
The largest distance any reading moved a feature (zero when exact).
Sourcepub fn angular(&self) -> f64
pub fn angular(&self) -> f64
The largest angle any reading turned a direction (zero when exact).
Sourcepub fn contains(&self, kind: ToleranceDecisionKind) -> bool
pub fn contains(&self, kind: ToleranceDecisionKind) -> bool
Whether a reading of kind fired.
Sourcepub fn rounding_floor(&self) -> f64
pub fn rounding_floor(&self) -> f64
The absolute rounding floor that applied to this result (#244), in
the operands’ length unit: ROUNDING_FACTOR times
Self::extent, plus what an angular residue of that factor
(radians, read without a decision) moves a point of the operands by,
at most 2 sqrt(3) times Self::extent (a turn about any point
of the operands’ box).
A residue between constructed points (cuts, vertices, a point on an
edge) up to ROUNDING_FACTOR times Self::extent was read as one
exact point evaluated twice, without the tolerance, and is in no
ToleranceDecision; only a larger one is a decision within
tolerance. This floor is the widening that covers those unrecorded
linear and angular residues, not the threshold between them and a
decision: a residue below it may still be a reported decision. So a
consumer widening
distances on the result widens them by this floor too, even when
Self::is_exact holds. Zero when no general boolean produced the
report (the default report).
Sourcepub fn extent(&self) -> f64
pub fn extent(&self) -> f64
The extent Self::rounding_floor was scaled from (#244): the
largest coordinate magnitude of the operands as given to the
boolean, the larger of the two operands’ readings, each the largest
of
max(|x|, |y|, |z|)over every topology vertex, and- per plane, cylinder, elliptical cylinder, cone, sphere or torus
surface,
max(|x|, |y|, |z|)of its frame origin plus its size: zero for a plane,|radius|for a cylinder, a cone (its radius at the frame origin) or a sphere, the larger semi-axis for an elliptical cylinder,|major + minor|for a torus; other surface families add nothing beyond their vertices.
Coordinates are read about the operands’ own origin, so the extent
grows with their distance from it. An operand whose reading is not
finite counts as zero. After Self::merged, the largest extent of the merged
reports.
Sourcepub fn merged(self, other: &BooleanReport) -> BooleanReport
pub fn merged(self, other: &BooleanReport) -> BooleanReport
This report and other together: what a chain of booleans read
(each kind once, with the worst magnitude of either).
The merged rounding floor is the larger of the two
(Self::extent is the larger extent), sound for every boolean of
the chain: each one’s floor is at most it. A rigid placement of a
result leaves distances between its points unchanged, so a report
carried through one keeps its floor as is (#244).
The merged report is Self::finer when either is.
Sourcepub fn finer(&self) -> bool
pub fn finer(&self) -> bool
Whether the boolean was cut at FINER_FACTOR times the caller’s
tolerance, its readings at the caller’s own having left it refused
(#332): features of the operands closer than the caller’s tolerance
but further apart than the finer one were then decided by the exact
predicates, and every reading in Self::decisions lies within
the finer tolerance. After Self::merged, whether any boolean of
the chain was.
Trait Implementations§
Source§impl Clone for BooleanReport
impl Clone for BooleanReport
Source§fn clone(&self) -> BooleanReport
fn clone(&self) -> BooleanReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more