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§
- SiUnit
Name - 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
IfcConversionBasedUnitname. 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
IfcSIUnitNameenum token to its symbol descriptor. - si_
unit_ symbol_ and_ scale - Symbol + SI scale for a prefixed
IfcSIUnit.