From 48ed0ace4bcee15044936ff9b4f3b5675831e2b2 Mon Sep 17 00:00:00 2001 From: Pilar Date: Wed, 7 Apr 2021 14:31:16 -0400 Subject: [PATCH] fixed bug when merging --- city_model_structure/building.py | 4 ++-- imports/geometry_feeders/obj.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/city_model_structure/building.py b/city_model_structure/building.py index c41c9d04..e9722b77 100644 --- a/city_model_structure/building.py +++ b/city_model_structure/building.py @@ -24,8 +24,8 @@ class Building(CityObject): """ Building(CityObject) class """ - def __init__(self, name, lod, surfaces, terrains, year_of_construction, function, - city_lower_corner, zones_surfaces_ids=[]): + def __init__(self, name, lod, surfaces, year_of_construction, function, + city_lower_corner, terrains=None, zones_surfaces_ids=[]): super().__init__(lod, surfaces, name, city_lower_corner) self._basement_heated = None self._attic_heated = None diff --git a/imports/geometry_feeders/obj.py b/imports/geometry_feeders/obj.py index 31b6b5c0..f5019a6d 100644 --- a/imports/geometry_feeders/obj.py +++ b/imports/geometry_feeders/obj.py @@ -70,6 +70,6 @@ class Obj: perimeter_polygon = solid_polygon surface = Surface(solid_polygon, perimeter_polygon) surfaces.append(surface) - self._city.add_city_object(Building(name, lod, surfaces, year_of_construction, function, - self._lower_corner)) + building = Building(name, lod, surfaces, year_of_construction, function, self._lower_corner) + self._city.add_city_object(building) return self._city