Create mapping to IFC for all CityJSON object types & semantic surfaces

This commit is contained in:
Laurens Oostwegel
2021-05-16 18:55:00 +02:00
parent 411855495e
commit 13209b6d03
3 changed files with 29 additions and 22 deletions
+20 -13
View File
@@ -10,23 +10,33 @@ JSON_TO_IFC = {
"Road": ["IfcCivilElement"],
"TransportSquare": ["IfcSpace"],
"TINRelief": ["IfcGeographicElement"],
"WaterBody": ["IfcGeographicElement"],
"WaterBody": ["IfcGeographicElement"], # Update for IFC4.3
"LandUse": ["IfcGeographicElement"],
"PlantCover": ["IfcGeographicElement"],
"SolitaryVegetationObject": ["IfcGeographicElement"],
"CityFurniture": ["IfcFurnishingElement"],
"GenericCityObject": ["IfcCivilElement"],
"Bridge": ["IfcCivilElement"],
"BridgePart": ["IfcCivilElement"],
"BridgeInstallation": ["IfcCivilElement"],
"BridgeConstructionElement": ["IfcCivilElement"],
"Tunnel": ["IfcCivilElement"],
"TunnelPart": ["IfcCivilElement"],
"TunnelInstallation": ["IfcCivilElement"],
"Bridge": ["IfcCivilElement"], # Update for IFC4.3
"BridgePart": ["IfcCivilElement"], # Update for IFC4.3
"BridgeInstallation": ["IfcCivilElement"], # Update for IFC4.3
"BridgeConstructionElement": ["IfcCivilElement"], # Update for IFC4.3
"Tunnel": ["IfcCivilElement"], # Update for IFC4.3
"TunnelPart": ["IfcCivilElement"], # Update for IFC4.3
"TunnelInstallation": ["IfcCivilElement"], # Update for IFC4.3
"CityObjectGroup": ["IfcCivilElement"],
"GroundSurface": ["IfcSlab"],
"GroundSurface": ["IfcSlab", {"PredefinedType": "BASESLAB"}],
"RoofSurface": ["IfcRoof"],
"WallSurface": ["IfcWall"]
"WallSurface": ["IfcWall"],
"ClosureSurface": ["IfcSpace"],
"OuterCeilingSurface": ["IfcCovering", {"PredefinedType": "CEILING"}],
"OuterFloorSurface": ["IfcSlab", {"PredefinedType": "FLOOR"}],
"Window": ["IfcWindow"],
"Door": ["IfcDoor"],
"WaterSurface": ["IfcGeographicElement"], # Update for IFC4.3
"WaterGroundSurface": ["IfcGeographicElement"], # Update for IFC4.3
"WaterClosureSurface": ["IfcGeographicElement"], # Update for IFC4.3
"TrafficArea": ["IfcCivilElement"], # Update for IFC4.3
"AuxiliaryTrafficArea": ["IfcCivilElement"] # Update for IFC4.3
}
class Cityjson2ifc:
@@ -90,9 +100,6 @@ class Cityjson2ifc:
**{"ifc_class": "IfcSite",
"name": "My Site"})
# self.IFC_representation_sub_context = self.IFC_model.by_type("IFCGEOMETRICREPRESENTATIONSUBCONTEXT")[0]
# self.IFC_representation_context = self.IFC_model.by_type("IFCGEOMETRICREPRESENTATIONCONTEXT")[0]
def create_owner_history(self):
actor = self.IFC_model.createIfcActorRole("ENGINEER", None, None)
person = self.IFC_model.createIfcPerson("Oostwegel", None, "L.J.N.", None, None, None, (actor,))