ifcedit: include IfcSpace in default QTO element scope

IfcSpace is not a subtype of IfcElement, so quantify.run_quantify()'s
default selector silently skipped all spaces, reporting
elements_quantified: 0 with no error or warning.

Generated with the assistance of an AI coding tool.

(cherry picked from commit ab15750747)
This commit is contained in:
Bruno Postle
2026-07-12 23:16:12 +01:00
committed by Dion Moult
parent 8d9f027f3e
commit aef141505b
6 changed files with 24 additions and 5 deletions
+1 -1
View File
@@ -255,7 +255,7 @@ ifc_quantify(rule="IFC4QtoBaseQuantities", selector="IfcWall")
Available rules: `IFC4QtoBaseQuantities`, `IFC4X3QtoBaseQuantities`.
`selector` is an optional ifcopenshell selector to restrict which elements
are quantified (default: all `IfcElement`).
are quantified (default: all `IfcElement` and `IfcSpace`).
Returns `{"ok": true, "rule": "...", "elements_quantified": 42}`.
+1 -1
View File
@@ -703,7 +703,7 @@ class IfcSession:
"rule": {"type": "string", "description": "QTO rule name, e.g. IFC4QtoBaseQuantities"},
"selector": {
"type": "string",
"description": "ifcopenshell selector to restrict elements (default: all IfcElement)",
"description": "ifcopenshell selector to restrict elements (default: all IfcElement and IfcSpace)",
},
},
"required": ["rule"],