Module symbols

Module symbols 

Source
Expand description

Display-symbol formatting for IFC units: IfcSIUnitName symbols, SI prefix symbols, IfcDerivedUnit composition (e.g. m\u{00B3}/s) and friendly symbols for common IfcConversionBasedUnit names (\u{00B0}, ft, in, …).

Mirrored by the TypeScript packages/parser/src/project-units.ts and pinned by the shared parity vectors.

Structs§

SiUnitName
Descriptor for an IfcSIUnitName.

Functions§

compose_derived
Compose a derived-unit display symbol from (element_symbol, exponent) pairs, e.g. [("m", 3), ("s", -1)] -> m\u{00B3}/s, [("J",1),("kg",-1),("K",-1)] -> J/(kg\u{00B7}K). Elements with exponent 0 are dropped. Returns an empty string only when there are no non-zero elements.
conversion_unit_symbol
A friendly symbol for a common IfcConversionBasedUnit name. Falls back to the cleaned name (quotes/whitespace trimmed) when unknown.
si_prefix_symbol
Symbol for an SI prefix as it prepends a unit symbol (k, m, \u{00B5}, …). Unknown / empty prefix yields the empty string.
si_unit_name
Resolve an IfcSIUnitName enum token to its symbol descriptor.
si_unit_symbol_and_scale
Symbol + SI scale for a prefixed IfcSIUnit.