New Ifc5D utility for converting and generating analysis of IFC cost data

This commit is contained in:
Dion Moult
2021-08-09 16:56:30 +10:00
parent 6899f9fa8f
commit 09098c1bdc
10 changed files with 980 additions and 27 deletions
@@ -197,6 +197,22 @@ def get_property_unit(prop, ifc_file):
return units[0]
def get_symbol_quantity_class(symbol):
if not symbol:
return "IfcQuantityCount"
elif symbol[-1:] == "g":
return "IfcQuantityWeight"
elif symbol[-1:] == "s" or symbol == "hr":
return "IfcQuantityTime"
elif symbol[-1:] == "3":
return "IfcQuantityVolume"
elif symbol[-1:] == "2":
return "IfcQuantityArea"
elif symbol[-1:] == "m" or symbol in ["in", "ft", "yd"]:
return "IfcQuantityLength"
return "IfcQuantityCount"
def get_unit_symbol(unit):
if unit.is_a("IfcSIUnit"):
symbol = ""