Skip to content

Commit

Permalink
fix(units): ensure GEM file is generated in meters
Browse files Browse the repository at this point in the history
Turns out IES always expect the units to be in meters. This change will ensure the GEM files are generated in meters regardless of the units of the HBJSON model.
  • Loading branch information
mostaphaRoudsari committed Dec 22, 2021
1 parent 27d506e commit 6493cea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions honeybee_ies/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ def model_to_ies(
Returns:
Path to exported GEM file.
"""
# ensure model is in metrics
model.convert_to_units(units='Meters')

header = 'COM GEM data file exported by Pollination Rhino\n' \
'ANT\n'
rooms_data = [room_to_ies(room) for room in model.rooms]
Expand Down

0 comments on commit 6493cea

Please sign in to comment.