Correct bug in shadding object creation when no archetype available

This commit is contained in:
Guille Gutierrez 2024-07-01 18:48:37 +02:00
parent 1279dffff8
commit a81c0cfee3

View File

@ -513,7 +513,7 @@ class Idf:
self._lod = self._city.level_of_detail.geometry self._lod = self._city.level_of_detail.geometry
for building in self._city.buildings: for building in self._city.buildings:
for internal_zone in building.internal_zones: for internal_zone in building.internal_zones:
if internal_zone.thermal_zones_from_internal_zones is None or len(thermal_zone.thermal_boundaries) == 0: if internal_zone.thermal_zones_from_internal_zones is None or len(internal_zone.thermal_zones_from_internal_zones.thermal_boundaries) == 0:
self._add_shading(building) # if the building has not archetype use it as shadow object self._add_shading(building) # if the building has not archetype use it as shadow object
continue continue
for thermal_zone in internal_zone.thermal_zones_from_internal_zones: for thermal_zone in internal_zone.thermal_zones_from_internal_zones: