#[non_exhaustive]pub struct BooleanEvidence {
pub subject_triangles: usize,
pub tool_triangles: usize,
pub output_triangles: usize,
pub output_components: usize,
pub disjoint_tools: usize,
pub sub_operations: usize,
pub attribute_fates: Vec<(String, AttributeFate)>,
pub coincident_faces_encountered: bool,
pub analytic_path: bool,
pub relative_overlap: Option<f64>,
}Expand description
Counters describing one boolean evaluation.
Every field is a fact about the computation, never a quality verdict. A caller decides whether a given count is acceptable for its domain.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.subject_triangles: usizeTriangles in the subject operand as supplied.
tool_triangles: usizeTriangles across all tool operands as supplied.
output_triangles: usizeTriangles in the result.
output_components: usizeConnected components in the result.
A difference that splits a wall into two pieces reports 2. Callers
that expect a single solid can detect the split instead of discovering
it downstream in a quantity takeoff.
disjoint_tools: usizeTool operands that did not intersect the subject at all.
A no-op cut is usually a placement bug upstream, but it is not an error here, so it is reported rather than rejected.
sub_operations: usizeSub-operations executed, for composed operands.
SymmetricDifference composed from union, intersection, and difference
reports 3; a native implementation reports 1. This is how a caller
tells a composed path from a primitive one.
attribute_fates: Vec<(String, AttributeFate)>What happened to each named attribute channel on the subject.
A boolean creates vertices along the cut that have no preimage in either operand, so a channel cannot always survive. Reporting the fate per channel is what turns a silent loss into an answer: the caller learns the data is gone AND why, instead of comparing the mesh before and after to find out.
coincident_faces_encountered: boolWhether the provider detected coincident faces between operands.
Coincident faces are the dominant source of cross-kernel disagreement. Reporting the encounter lets a caller treat those results with more care without Axiolid choosing a policy on its behalf.
analytic_path: boolWhether an analytic closed-form path produced this result instead of the general boolean solver.
An analytic path is exact only for the operand shapes it recognises, and
it produces a different (though equally valid) triangulation from the
general solver. A caller comparing results across runs, or reproducing a
result elsewhere, needs to know which machinery ran – the same reason
Self::sub_operations distinguishes a composed result from a
primitive one.
relative_overlap: Option<f64>Relative overlap between operands, when the provider measured it.
The smallest operand-overlap extent divided by the operand size, so it
is scale-free: two cubes overlapping by 1mm at metre scale and by 1um
at millimetre scale report the same number. None means the provider
did not measure conditioning, never that the input was well
conditioned.
Construction is f64 (ADR 0045), so accuracy degrades as this approaches zero: invisible above 1e-6, smooth between 1e-6 and 1e-12, severe below 1e-12. This is a fact about the computation, not a verdict – a caller decides what its domain tolerates.
Implementations§
Source§impl BooleanEvidence
impl BooleanEvidence
Sourcepub fn record(
subject_triangles: usize,
tool_triangles: usize,
output_triangles: usize,
output_components: usize,
) -> BooleanEvidence
pub fn record( subject_triangles: usize, tool_triangles: usize, output_triangles: usize, output_components: usize, ) -> BooleanEvidence
Record one completed operation.
A constructor rather than struct-literal syntax because the type is
#[non_exhaustive]: out-of-tree providers must be able to build
evidence without breaking when a counter is added.
Sourcepub fn with_attribute_fates(
self,
fates: Vec<(String, AttributeFate)>,
) -> BooleanEvidence
pub fn with_attribute_fates( self, fates: Vec<(String, AttributeFate)>, ) -> BooleanEvidence
Record what happened to the subject’s attribute channels.
A provider that carries no attributes still calls this, reporting every channel as dropped: an empty list would be indistinguishable from a subject that had no channels to begin with.
Sourcepub const fn with_relative_overlap(self, overlap: f64) -> BooleanEvidence
pub const fn with_relative_overlap(self, overlap: f64) -> BooleanEvidence
Record the measured relative overlap between operands.
Only a provider that actually measured conditioning may call this;
leaving the field None is the honest default for one that did not.
Sourcepub const fn with_analytic_path(self, analytic: bool) -> BooleanEvidence
pub const fn with_analytic_path(self, analytic: bool) -> BooleanEvidence
Record that an analytic closed-form path produced this result.
Sourcepub const fn with_disjoint_tools(self, count: usize) -> BooleanEvidence
pub const fn with_disjoint_tools(self, count: usize) -> BooleanEvidence
Set the count of tools that did not meet the subject.
Sourcepub const fn with_sub_operations(self, count: usize) -> BooleanEvidence
pub const fn with_sub_operations(self, count: usize) -> BooleanEvidence
Set how many sub-operations produced this result.
Sourcepub const fn with_coincident_faces(self, encountered: bool) -> BooleanEvidence
pub const fn with_coincident_faces(self, encountered: bool) -> BooleanEvidence
Record that coincident faces were encountered between operands.
Sourcepub fn absorb(&mut self, other: BooleanEvidence)
pub fn absorb(&mut self, other: BooleanEvidence)
Merge evidence from a sub-operation into a running total.
Input counts come from the outermost call, so they are kept rather than summed; output counts and flags come from the final sub-operation.
Trait Implementations§
Source§impl Clone for BooleanEvidence
impl Clone for BooleanEvidence
Source§fn clone(&self) -> BooleanEvidence
fn clone(&self) -> BooleanEvidence
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BooleanEvidence
impl Debug for BooleanEvidence
Source§impl Default for BooleanEvidence
impl Default for BooleanEvidence
Source§fn default() -> BooleanEvidence
fn default() -> BooleanEvidence
Source§impl PartialEq for BooleanEvidence
impl PartialEq for BooleanEvidence
impl StructuralPartialEq for BooleanEvidence
Auto Trait Implementations§
impl Freeze for BooleanEvidence
impl RefUnwindSafe for BooleanEvidence
impl Send for BooleanEvidence
impl Sync for BooleanEvidence
impl Unpin for BooleanEvidence
impl UnwindSafe for BooleanEvidence
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 more