Skip to main content

project_unit_for

Function project_unit_for 

Source
pub fn project_unit_for(
    model: &Model,
    unit_type_name: &str,
) -> Option<(EntityId, UnitKind)>
Expand description

The project default unit for a given IfcUnitEnum.

IfcCorrectUnitAssignment makes at most one named unit per type, so the first match is the only match in a well-formed file. In a malformed one this permissive view still returns the first; crate::exact_unit refuses the duplicate instead.