pub fn resolve_unit(
model: &Model,
unit: EntityId,
) -> Result<ConversionUnit, UnitConversionError>Expand description
A model’s unit entity reduced to a ConversionUnit (#469): an
IfcSIUnit with its prefix, an IfcConversionBasedUnit through its
ConversionFactor chain, or an IfcDerivedUnit by its elements’
exponents, resolved exactly against the release the header declares.
§Errors
UnitConversionError::MonetaryUnit,
UnitConversionError::ContextDependentUnit,
UnitConversionError::OffsetUnit for an
IfcConversionBasedUnitWithOffset (#110), and
UnitConversionError::Resolve for every other refusal of the exact
resolver (missing, malformed, cyclic or reader-damaged units, an unknown
prefix …).