From f6ba7ac91158924bdca5ab03d4ad7dab2f7776ad Mon Sep 17 00:00:00 2001 From: Guille Date: Thu, 22 Oct 2020 12:04:04 -0400 Subject: [PATCH] Correct idf_helper class --- helpers/idf_helper.py | 5 +++-- tests/test_idf.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/helpers/idf_helper.py b/helpers/idf_helper.py index 0aa17619..b7251a95 100644 --- a/helpers/idf_helper.py +++ b/helpers/idf_helper.py @@ -38,12 +38,13 @@ class IdfHelper: self._matrix_to_list(surface.points) wall.setcoords(IdfHelper._matrix_to_list(surface.points)) - def run(self, window_ratio=0.35): + def run(self, window_ratio=0.35, display_render=False): self._idf.set_default_constructions() self._idf.intersect_match() self._idf.set_wwr(window_ratio) self._idf.translate_to_origin() - self._idf.view_model() + if display_render: + self._idf.view_model() self._idf.newidfobject("HVACTEMPLATE:THERMOSTAT", Name="Zone Stat", Constant_Heating_Setpoint=20, Constant_Cooling_Setpoint=24, ) for zone in self._idf.idfobjects["ZONE"]: diff --git a/tests/test_idf.py b/tests/test_idf.py index 0ba69b32..a7376baa 100644 --- a/tests/test_idf.py +++ b/tests/test_idf.py @@ -40,5 +40,5 @@ class TestIdf(TestCase): _idf.add_zone(building.name) for surface in building.surfaces: _idf.add_surface(surface, building.name) - print(_idf.run()) + _idf.run()