mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
You can now add and edit context dependent units including dimensional exponents
This commit is contained in:
@@ -7,4 +7,12 @@ class Usecase:
|
||||
|
||||
def execute(self):
|
||||
for name, value in self.settings["attributes"].items():
|
||||
if name == "Dimensions":
|
||||
dimensions = self.settings["unit"].Dimensions
|
||||
if len(self.file.get_inverse(dimensions)) > 1:
|
||||
self.settings["unit"].Dimensions = self.file.createIfcDimensionalExponents(*value)
|
||||
else:
|
||||
for i, exponent in enumerate(value):
|
||||
dimensions[i] = exponent
|
||||
continue
|
||||
setattr(self.settings["unit"], name, value)
|
||||
|
||||
Reference in New Issue
Block a user