buildings are still needed

This commit is contained in:
Laura Klünder 2018-12-22 02:11:53 +01:00
parent ab4a5407d2
commit 32bb463003

View file

@ -197,11 +197,12 @@ class EditorViewSet(EditorViewSetMixin, ViewSet):
space.bounds = True
# deactivated for performance reasons
buildings = level.buildings.all()
buildings_geom = cascaded_union([building.geometry for building in buildings])
for other_space in other_spaces:
if other_space.outside:
other_space.geometry = other_space.geometry.difference(buildings_geom)
# buildings_geom = cascaded_union([building.geometry for building in buildings])
# for other_space in other_spaces:
# if other_space.outside:
# other_space.geometry = other_space.geometry.difference(buildings_geom)
for other_space in chain(other_spaces, other_spaces_lower, other_spaces_upper):
other_space.opacity = 0.4
other_space.color = '#ffffff'