Correct idf_helper class
This commit is contained in:
parent
11fcd27926
commit
f6ba7ac911
|
@ -38,12 +38,13 @@ class IdfHelper:
|
||||||
self._matrix_to_list(surface.points)
|
self._matrix_to_list(surface.points)
|
||||||
wall.setcoords(IdfHelper._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.set_default_constructions()
|
||||||
self._idf.intersect_match()
|
self._idf.intersect_match()
|
||||||
self._idf.set_wwr(window_ratio)
|
self._idf.set_wwr(window_ratio)
|
||||||
self._idf.translate_to_origin()
|
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,
|
self._idf.newidfobject("HVACTEMPLATE:THERMOSTAT", Name="Zone Stat", Constant_Heating_Setpoint=20,
|
||||||
Constant_Cooling_Setpoint=24, )
|
Constant_Cooling_Setpoint=24, )
|
||||||
for zone in self._idf.idfobjects["ZONE"]:
|
for zone in self._idf.idfobjects["ZONE"]:
|
||||||
|
|
|
@ -40,5 +40,5 @@ class TestIdf(TestCase):
|
||||||
_idf.add_zone(building.name)
|
_idf.add_zone(building.name)
|
||||||
for surface in building.surfaces:
|
for surface in building.surfaces:
|
||||||
_idf.add_surface(surface, building.name)
|
_idf.add_surface(surface, building.name)
|
||||||
print(_idf.run())
|
_idf.run()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user