Fix bug where you could add a filling twice or to multiple openings.

This commit is contained in:
Dion Moult
2021-09-21 17:29:28 +10:00
parent 04d64de6d0
commit ef8c82e1c9
2 changed files with 34 additions and 0 deletions
@@ -9,6 +9,13 @@ class Usecase:
self.settings[key] = value
def execute(self):
fills_voids = self.settings["element"].FillsVoids
if fills_voids:
if fills_voids[0].RelatingOpeningElement == self.settings["opening"]:
return
self.file.remove(fills_voids[0])
self.file.create_entity(
"IfcRelFillsElement",
**{