From cd607122d386b18924429f333028e8737c922774 Mon Sep 17 00:00:00 2001 From: guille Date: Thu, 1 Apr 2021 10:35:22 -0400 Subject: [PATCH] Partial implementation energy ADE, till thermal zones --- city_model_structure/attributes/surface.py | 4 ++-- exports/formats/energy_ade.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/city_model_structure/attributes/surface.py b/city_model_structure/attributes/surface.py index a5b0578d..da44b94b 100644 --- a/city_model_structure/attributes/surface.py +++ b/city_model_structure/attributes/surface.py @@ -7,7 +7,7 @@ contributors Pilar Monsalvete Álvarez de Uribarri pilar.monsalvete@concordia.ca from __future__ import annotations import numpy as np - +import uuid from helpers.geometry_helper import GeometryHelper as gh from city_model_structure.attributes.polygon import Polygon @@ -62,7 +62,7 @@ class Surface: :return: str """ if self._name is None: - raise Exception('surface has no name') + self._name = uuid.uuid4() return self._name @property diff --git a/exports/formats/energy_ade.py b/exports/formats/energy_ade.py index af10a07f..2b927032 100644 --- a/exports/formats/energy_ade.py +++ b/exports/formats/energy_ade.py @@ -350,5 +350,9 @@ class EnergyAde: } } } + if thermal_boundary.layers is not None: + construction = uuid.uuid4() + if thermal_boundary.thermal_openings is not None: + construction = uuid.uuid4() thermal_boundaries.append(thermal_boundary_dic) return thermal_boundaries \ No newline at end of file