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