mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Fix bug where you could add an opening twice to the same element.
This commit is contained in:
@@ -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",
|
||||
**{
|
||||
|
||||
Reference in New Issue
Block a user