Expand description
Unit labels and the scales they resolve to.
Two readers need the same answer to “what does this unit label mean in
metres”: crate::units, reading an IfcSIUnit/IfcConversionBasedUnit
declaration, and crate::georef, reading the free-text
ePSet_ProjectedCRS.MapUnit of the IFC2x3 georeferencing convention. Both
tables and the MapUnit label rules live here so the two cannot drift; the
units:: paths are preserved as re-exports.
Structs§
- SiPrefix
- One member of the
IfcSIPrefixEXPRESS enumeration.
Constants§
- SI_
PREFIXES - The one
IfcSIPrefixtable (CORE-26, XCUT-6): the multiplier readers (try_si_prefix_multiplier), the display symbols (crate::project_units::symbols::si_prefix_symbol) and the exporters’ prefix-name checks all derive from these sixteen rows. - US_
SURVEY_ FOOT_ M - 1200/3937 m, exactly: the US survey foot, distinct from the international
0.3048. The one definition (CORE-26, EXPORT-STEP-20): the former core copy
was truncated to
0.3048006096(4e-12 relative).
Functions§
- get_
conversion_ based_ unit_ factor - Known conversion factors for imperial/conversion-based units to meters These are the standard conversions defined in IFC specification
- get_
si_ prefix_ multiplier - SI Prefix multipliers as defined in IFC specification.
Maps IfcSIPrefix enum values to their numeric multipliers; an absent or
unrecognised prefix means the base unit (metres), i.e. 1.0. Callers that
must distinguish those two cases want
try_si_prefix_multiplier. - is_
us_ survey_ foot_ key - Is
key— an already-folded (alphanumeric, upper-cased) label — one of the glued US-survey-foot spellings? Shared with the exporters’ map-unit normaliser so the spelling list has one home. - is_
us_ survey_ foot_ tokens - Order-insensitive recogniser for the separated US-survey foot spellings —
foot (US survey),SURVEY FEET (US),US survey foot. The glued spellings (USSURVEYFOOT,FTUS, …) are matched exactly in [resolve_exact_unit_label]; once an exporter puts separators in, the word order varies and gluing alone cannot see it. - si_
prefix - The
SI_PREFIXESrow for a member of theIfcSIPrefixEXPRESS enumeration (exact token, no dots), orNone. - try_
si_ prefix_ multiplier - SI Prefix multiplier for a member of the
IfcSIPrefixEXPRESS enumeration, orNonewhen the string is not one of its sixteen members.