Fix #3583. BaseQuantity QTOs in IFC4 can now be set on types.

This commit is contained in:
Dion Moult
2023-08-20 20:50:32 +10:00
parent 861659c212
commit 6097d4415a
@@ -48,6 +48,12 @@ class PsetQto:
folder_path = pathlib.Path(__file__).parent.absolute()
path = str(folder_path.joinpath("schema", self.templates_path[schema]))
templates = [ifcopenshell.open(path)]
# See bug 3583. We backport this change from IFC4X3 because it just makes sense.
# Users aren't forced to use it.
if schema == "IFC4":
for element in templates[0].by_type("IfcPropertySetTemplate"):
if element.TemplateType == "QTO_OCCURRENCEDRIVEN":
element.TemplateType = "QTO_TYPEDRIVENOVERRIDE"
self.templates = templates
@lru_cache()