mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
Fix #3583. BaseQuantity QTOs in IFC4 can now be set on types.
This commit is contained in:
@@ -48,6 +48,12 @@ class PsetQto:
|
|||||||
folder_path = pathlib.Path(__file__).parent.absolute()
|
folder_path = pathlib.Path(__file__).parent.absolute()
|
||||||
path = str(folder_path.joinpath("schema", self.templates_path[schema]))
|
path = str(folder_path.joinpath("schema", self.templates_path[schema]))
|
||||||
templates = [ifcopenshell.open(path)]
|
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
|
self.templates = templates
|
||||||
|
|
||||||
@lru_cache()
|
@lru_cache()
|
||||||
|
|||||||
Reference in New Issue
Block a user