honeybee.units module¶
Utility functions for converting and parsing units of length.
- honeybee.units.conversion_factor_to_meters(units)[source]¶
Get the conversion factor to meters based on input units.
- Parameters:
units –
Text for the units. Choose from the following:
Meters
Millimeters
Feet
Inches
Centimeters
- Returns:
A number for the conversion factor, which should be multiplied by all distance units taken from Rhino geometry in order to convert them to meters.
- honeybee.units.parse_distance_string(distance_string, destination_units='Meters')[source]¶
Parse a string of a distance value into a destination units system.
- Parameters:
distance_string – Text for a distance value to be parsed into the destination units. This can have the units at the end of it (eg. “3ft”). If no units are included, the number will be assumed to be in the destination units system.
destination_units – The destination units system to which the distance string will be computed. (Default: Meters).
- Returns:
A number for the distance in the destination_units.