mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Remap deprecated entities in Brick 1.4 to new RealEstateCore URIs.
This commit is contained in:
@@ -53,6 +53,8 @@ def get_brick_type(element: ifcopenshell.entity_instance) -> Union[str, None]:
|
|||||||
if not result:
|
if not result:
|
||||||
result = ifc4_to_brick_map.get(ifc_type_class, None)
|
result = ifc4_to_brick_map.get(ifc_type_class, None)
|
||||||
if result:
|
if result:
|
||||||
|
if result.startswith("http"):
|
||||||
|
return result
|
||||||
return f"https://brickschema.org/schema/Brick#{result}"
|
return f"https://brickschema.org/schema/Brick#{result}"
|
||||||
# Generic fallback
|
# Generic fallback
|
||||||
if element.is_a("IfcDistributionElement"):
|
if element.is_a("IfcDistributionElement"):
|
||||||
|
|||||||
@@ -26,5 +26,10 @@
|
|||||||
"IfcFlowMeter.GASMETER": "Gas_Meter",
|
"IfcFlowMeter.GASMETER": "Gas_Meter",
|
||||||
"IfcFlowMeter.WATERMETER": "Water_Meter",
|
"IfcFlowMeter.WATERMETER": "Water_Meter",
|
||||||
"IfcElectricMotor": "Motor",
|
"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"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user