Module units

Module units 

Source
Expand description

Unit extraction and conversion for IFC files

Handles parsing of IFCSIUNIT and IFCCONVERSIONBASEDUNIT (imperial units) and applying appropriate multipliers to geometry coordinates.

Functions§

extract_length_unit_scale
Extract length unit scale factor from IFC file
extract_plane_angle_to_radians
Extract the multiplier that converts file plane-angle units to radians.
get_conversion_based_unit_factor
The unit-label tables live in [crate::unit_labels], shared with the georeferencing MapUnit reader; re-exported here so the units:: paths callers already use keep working. Known conversion factors for imperial/conversion-based units to meters These are the standard conversions defined in IFC specification
get_si_prefix_multiplier
The unit-label tables live in [crate::unit_labels], shared with the georeferencing MapUnit reader; re-exported here so the units:: paths callers already use keep working. 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.
try_extract_length_unit_scale
Resolve the length-unit scale ONLY when the full unit chain (IFCPROJECT → IFCUNITASSIGNMENT → IFCSIUNIT) is decodable from the decoder’s current index.
try_extract_plane_angle_to_radians
Partial-index-safe sibling of extract_plane_angle_to_radians.
try_si_prefix_multiplier
The unit-label tables live in [crate::unit_labels], shared with the georeferencing MapUnit reader; re-exported here so the units:: paths callers already use keep working. SI Prefix multiplier for a member of the IfcSIPrefix EXPRESS enumeration, or None when the string is not one of its sixteen members.