#[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,
) -> Self
pub fn record( subject_triangles: usize, tool_triangles: usize, output_triangles: usize, output_components: usize, ) -> Self
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)>) -> Self
pub fn with_attribute_fates(self, fates: Vec<(String, AttributeFate)>) -> Self
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) -> Self
pub const fn with_relative_overlap(self, overlap: f64) -> Self
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) -> Self
pub const fn with_analytic_path(self, analytic: bool) -> Self
Record that an analytic closed-form path produced this result.
Sourcepub const fn with_disjoint_tools(self, count: usize) -> Self
pub const fn with_disjoint_tools(self, count: usize) -> Self
Set the count of tools that did not meet the subject.
Sourcepub const fn with_sub_operations(self, count: usize) -> Self
pub const fn with_sub_operations(self, count: usize) -> Self
Set how many sub-operations produced this result.
Sourcepub const fn with_coincident_faces(self, encountered: bool) -> Self
pub const fn with_coincident_faces(self, encountered: bool) -> Self
Record that coincident faces were encountered between operands.
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 more