From f99b165ce7821a332b7645feca6f64161a0c2727 Mon Sep 17 00:00:00 2001 From: Chris Mackey Date: Thu, 4 Aug 2022 18:56:07 -0400 Subject: [PATCH] fix(model): Address the case when holes are closest to upper-left vertex --- honeybee_energy/cli/simulate.py | 6 +++--- honeybee_energy/properties/model.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/honeybee_energy/cli/simulate.py b/honeybee_energy/cli/simulate.py index d577d1532..a09bf4d54 100644 --- a/honeybee_energy/cli/simulate.py +++ b/honeybee_energy/cli/simulate.py @@ -35,7 +35,7 @@ def simulate(): type=click.Path(exists=False, file_okay=True, dir_okay=False, resolve_path=True)) @click.option('--measures', '-m', help='Full path to a folder containing an OSW JSON ' - 'be used as the base for the execution of the OpenStuduo CLI. While this ' + 'be used as the base for the execution of the OpenStudio CLI. While this ' 'OSW can contain paths to measures that exist anywhere on the machine, ' 'the best practice is to copy the measures into this measures ' 'folder and use relative paths within the OSW. ' @@ -74,7 +74,7 @@ def simulate(): @click.option('--check-model/--bypass-check', ' /-bc', help='Flag to note whether ' 'the Model should be re-serialized to Python and checked before it ' 'is translated to .osm. The check is not needed if the model-file ' - 'was expored directly from the honeybee-energy Python library. ' + 'was exported directly from the honeybee-energy Python library. ' 'It will be automatically bypassed if the model-file is an OSM or IDF.', default=True, show_default=True) @click.option('--enforce-rooms/--skip-no-rooms', ' /-sr', help='Flag to note whether ' @@ -285,7 +285,7 @@ def simulate_osm(osm_file, epw_file, folder, log_file): osw_dict = { 'seed_file': osm_file, 'weather_file': epw_file - } + } osw = os.path.join(folder, 'workflow.osw') with open(osw, 'w') as fp: json.dump(osw_dict, fp, indent=4) diff --git a/honeybee_energy/properties/model.py b/honeybee_energy/properties/model.py index 7b8a671a6..fa4ca5f79 100644 --- a/honeybee_energy/properties/model.py +++ b/honeybee_energy/properties/model.py @@ -1020,7 +1020,7 @@ def add_autocal_properties_to_dict(self, data): self._add_shade_vertices(face, face_dict) if face.geometry.has_holes: face_dict['geometry']['vertices'] = \ - [pt.to_array() for pt in face.upper_left_vertices] + [[round(v, 3) for v in pt] for pt in face.upper_left_vertices] if len(face._apertures) != 0: for ap, ap_dict in zip(face._apertures, face_dict['apertures']): self._add_shade_vertices(ap, ap_dict)