Skip to main content

add_conversion_based_unit_with_offset

Function add_conversion_based_unit_with_offset 

Source
pub fn add_conversion_based_unit_with_offset(
    tx: &mut Transaction,
    draft: ConversionBasedUnitDraft<'_>,
    conversion_offset: f64,
) -> PropertyResult<EntityId>
Expand description

Stage an IfcConversionBasedUnitWithOffset.

The offset form exists for scales whose zero is not the SI zero: degrees Celsius convert to kelvin by a factor of one and an offset of 273.15. Writing that as a plain conversion unit would place absolute zero at the freezing point of water, so the offset is a separate entity rather than an optional slot on the base form.

ยงErrors

Refuses a UnitType outside IfcUnitEnum, a blank name, and a non-finite offset.