Parametric object gizmo scale follows scene unit (#1715)

* Add missing units in si-conversions

* Fix error when using Miles or Thou-inch units

* Parametric gizmo scales with scene units

* use "thou" instead of "thousandth of an inch"
This commit is contained in:
Gorgious56
2021-09-19 10:02:34 +02:00
committed by GitHub
parent 721fe4729a
commit 2dac81ee8d
3 changed files with 35 additions and 4 deletions
@@ -83,6 +83,10 @@ class Usecase:
name = "{}inch".format(name_prefix + " " if name_prefix else "")
elif data["raw"] == "FEET":
name = "{}foot".format(name_prefix + " " if name_prefix else "")
elif data["raw"] == "MILES":
name = "{}mile".format(name_prefix + " " if name_prefix else "")
elif data["raw"] == "THOU":
name = "{}thou".format(name_prefix + " " if name_prefix else "")
value_component = self.file.create_entity(
"IfcReal", **{"wrappedValue": ifcopenshell.util.unit.si_conversions[name]}
)