Fix bug where you could add an opening twice to the same element.

This commit is contained in:
Dion Moult
2021-09-21 16:56:28 +10:00
parent a29d691944
commit 04d64de6d0
2 changed files with 34 additions and 0 deletions
@@ -10,6 +10,13 @@ class Usecase:
self.settings[key] = value
def execute(self):
voids_elements = self.settings["opening"].VoidsElements
if voids_elements:
if voids_elements[0].RelatingBuildingElement == self.settings["element"]:
return
self.file.remove(voids_elements[0])
self.file.create_entity(
"IfcRelVoidsElement",
**{