Files
IfcOpenShell/src/ifcopenshell-python/ifcopenshell/api/constraint/unassign_constraint.py
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
521 B
Python
Raw Normal View History

2021-01-23 16:32:52 +11:00
import ifcopenshell
class Usecase:
2021-03-25 00:54:42 +01:00
def __init__(self, file, settings={}):
2021-01-23 16:32:52 +11:00
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)