prioritize qto base psets over other qto_ qsets after 70a4af2 #4740

1) e.g. in ifc4x3 previously for IfcWall it would prioritize Qto_BodyGeometryValidation over Qto_WallBaseQuantities

2) It would also prioritize general Qto_BodyGeometryValidation over Qto_BuildingElementProxyQuantities.

3) removed "Qto_" check as we do qto_only in get_applicable_names
This commit is contained in:
Andrej730
2024-05-28 12:42:53 +05:00
parent 8817a7e6d5
commit f27dbacd28
2 changed files with 24 additions and 2 deletions
+14 -1
View File
@@ -65,13 +65,26 @@ class TestGetApplicableBaseQuantityName(test.bim.bootstrap.NewFile):
wall = ifc.createIfcWall()
assert subject.get_applicable_base_quantity_name(wall) == "Qto_WallBaseQuantities"
def test_no_base_quantity(self):
def test_no_quantities(self):
ifc = ifcopenshell.file()
tool.Ifc.set(ifc)
ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcProject")
product = ifc.by_type("IfcProject")[0]
assert subject.get_applicable_base_quantity_name(product) == None
def test_anomaly_named_quantities(self):
ifc = ifcopenshell.file()
tool.Ifc.set(ifc)
product = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcBuildingElementProxy")
# Prioritized over Qto_BodyGeometryValidation.
assert subject.get_applicable_base_quantity_name(product) == "Qto_BuildingElementProxyQuantities"
def test_prioritize_base_over_other_qto(self):
ifc = ifcopenshell.file(schema="IFC4X3")
tool.Ifc.set(ifc)
product = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
assert subject.get_applicable_base_quantity_name(product) == "Qto_WallBaseQuantities"
class TestGetRoundedValue(test.bim.bootstrap.NewFile):
def test_run(self):