mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
15 lines
498 B
Python
15 lines
498 B
Python
class Usecase:
|
|
def __init__(self, file, **settings):
|
|
self.file = file
|
|
self.settings = {
|
|
"product": None,
|
|
"constraint": None,
|
|
}
|
|
for key, value in settings.items():
|
|
self.settings[key] = value
|
|
|
|
def execute(self):
|
|
for rel in self.settings["product"].HasAssociations:
|
|
if rel.is_a("IfcRelAssociatesConstraint") and rel.RelatingConstraint == self.settings["constraint"]:
|
|
self.file.remove(rel)
|