#[non_exhaustive]pub struct SeamTolerance { /* private fields */ }Expand description
The tolerance a vertical profile’s seams are checked against.
Build it from the model with SeamTolerance::for_model, from a known
precision with SeamTolerance::from_precision, or use
SeamTolerance::strict for the floating-point rounding term alone.
Implementations§
Source§impl SeamTolerance
impl SeamTolerance
Sourcepub const MAX_PRECISION: f64 = 1e-3
pub const MAX_PRECISION: f64 = 1e-3
The coarsest precision honoured, in metres.
A file declaring a coarser Precision is checked at 1 mm instead: a
step a surveyor could see is never joined on the file’s say-so.
Sourcepub fn from_precision(precision_metres: f64) -> AlignmentResult<Self>
pub fn from_precision(precision_metres: f64) -> AlignmentResult<Self>
Accept length seams within precision_metres, capped at
Self::MAX_PRECISION.
§Errors
Refuses a negative or non-finite precision with
AlignmentError::InvalidUnits.
Sourcepub fn for_model(model: &Model, units: AlignmentUnits) -> AlignmentResult<Self>
pub fn for_model(model: &Model, units: AlignmentUnits) -> AlignmentResult<Self>
The tolerance the model itself declares.
Reads Precision from every IfcGeometricRepresentationContext
whose CoordinateSpaceDimension is 3 and takes the coarsest,
converted from the project length unit with
units.length_to_metres. No declared precision gives
Self::strict.
§Errors
Refuses invalid units, and a declared Precision that is not a
finite, positive number (InvalidAttribute naming the context).