From 1c444f3667b0bc0b3a3f421d7ca11fd4d1f2c679 Mon Sep 17 00:00:00 2001 From: guille Date: Wed, 7 Apr 2021 13:07:57 -0400 Subject: [PATCH] Correct energy ade export to work with new surfaces --- exports/formats/energy_ade.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/exports/formats/energy_ade.py b/exports/formats/energy_ade.py index 9a92b8d9..10ee8ba7 100644 --- a/exports/formats/energy_ade.py +++ b/exports/formats/energy_ade.py @@ -262,11 +262,9 @@ class EnergyAde: def _thermal_zones(self, building, city): thermal_zones = [] for index, thermal_zone in enumerate(building.thermal_zones): - print('debug me2') usage_zones = [] for usage_zone in thermal_zone.usage_zones: usage_zones.append({'@xlink:href': f'#GML_{usage_zone.id}'}) - thermal_zone_dic = { 'energy:ThermalZone': { '@gml:id': f'GML_{thermal_zone.id}', @@ -310,6 +308,7 @@ class EnergyAde: } thermal_zone_dic['energy:ThermalZone']['energy:contains'] = usage_zones thermal_zones.append(thermal_zone_dic) + print('debug me') return thermal_zones def _thermal_boundaries(self, city, thermal_zone): @@ -344,9 +343,9 @@ class EnergyAde: '@gml:id': f'GML_{uuid.uuid4()}', 'gml:posList': { '@srsDimension': '3', - '@count': len(thermal_boundary.surface.points) + 1, + '@count': len(thermal_boundary.surface.solid_polygon.points) + 1, '#text': f'{" ".join(map(str, thermal_boundary.surface.solid_polygon.points_list))} ' - f'{" ".join(map(str, thermal_boundary.surface.points[0]))}' + f'{" ".join(map(str, thermal_boundary.surface.solid_polygon.points[0]))}' } } }