Remap deprecated entities in Brick 1.4 to new RealEstateCore URIs.

This commit is contained in:
Dion Moult
2025-10-26 20:38:58 +11:00
parent c40ecdd550
commit 05ff47fcff
2 changed files with 8 additions and 1 deletions
@@ -53,6 +53,8 @@ def get_brick_type(element: ifcopenshell.entity_instance) -> Union[str, None]:
if not result:
result = ifc4_to_brick_map.get(ifc_type_class, None)
if result:
if result.startswith("http"):
return result
return f"https://brickschema.org/schema/Brick#{result}"
# Generic fallback
if element.is_a("IfcDistributionElement"):
@@ -26,5 +26,10 @@
"IfcFlowMeter.GASMETER": "Gas_Meter",
"IfcFlowMeter.WATERMETER": "Water_Meter",
"IfcElectricMotor": "Motor",
"IfcSolarDevice.SOLARPANEL": "PV_Panel"
"IfcSolarDevice.SOLARPANEL": "PV_Panel",
"IfcBuilding": "https://w3id.org/rec#Building",
"IfcBuildingStorey": "https://w3id.org/rec#Level",
"IfcSpace": "https://w3id.org/rec#Room",
"IfcSpatialZone": "https://w3id.org/rec#Zone",
"IfcSpatialZone.THERMAL": "https://w3id.org/rec#HVACZone"
}