pub fn cached_position_tolerance(
model: &Model,
units: &UnitScale,
) -> GeometryResult<f64>Expand description
The tolerance a cached CartesianPosition is checked at, in metres
(#354).
IFC defines IfcGeometricRepresentationContext.Precision as “the
tolerance under which two given points are still assumed to be
identical”, so that is the tolerance: the coarsest Precision any 3D
root context declares (sub-contexts derive theirs from it), in the
project length unit and converted to metres. A model that declares none
gets IFC’s own default, 1.E-5 project units, which is what
IfcGeometricRepresentationSubContext.Precision derives to without a
parent value (NVL(ParentContext.Precision, 1.E-5), IFC4 ADD2 TC1).
§Errors
A declared Precision that is not a finite positive number is
GeometryError::Degenerate naming the context: a check against it
would accept or refuse everything.