Implement metric constraints in the ifcopenshell.api

This commit is contained in:
bosonprojets
2021-08-16 01:35:14 +01:00
parent 745411ee47
commit b4256c504f
5 changed files with 90 additions and 0 deletions
@@ -0,0 +1,13 @@
class Usecase:
def __init__(self, file, **settings):
self.file = file
self.settings = {
"metric": None,
"attributes": {}
}
for key, value in settings.items():
self.settings[key] = value
def execute(self):
for name, value in self.settings["attributes"].items():
setattr(self.settings["metric"], name, value)