Add contexts file for IFC2X3
This commit is contained in:
committed by
Bernd Hahnebach
parent
89961a33d4
commit
bdfdf77ffc
@@ -3,20 +3,9 @@ import FreeCAD, os, json
|
||||
ifcVersions = ["IFC4", "IFC2X3"]
|
||||
IfcVersion = ifcVersions[FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetInt("IfcVersion",0)]
|
||||
|
||||
# BEGIN FIXME
|
||||
# the file ifc_contexts_IFC2x3.json is missing at all in sources
|
||||
# All Arch module is broken if pref is set to IFC2x3
|
||||
# we will use the IFC4 one instead, to get back the Arch module
|
||||
# Still lots of stuff does not work, but at least the Arch loads
|
||||
'''
|
||||
with open(os.path.join(FreeCAD.getResourceDir(), "Mod", "Arch", "Presets",
|
||||
"ifc_contexts_" + IfcVersion + ".json")) as f:
|
||||
IfcContexts = json.load(f)
|
||||
'''
|
||||
with open(os.path.join(FreeCAD.getResourceDir(), "Mod", "Arch", "Presets",
|
||||
"ifc_contexts_" + "IFC4" + ".json")) as f:
|
||||
IfcContexts = json.load(f)
|
||||
# END FIXME
|
||||
|
||||
with open(os.path.join(FreeCAD.getResourceDir(), "Mod", "Arch", "Presets",
|
||||
"ifc_products_" + IfcVersion + ".json")) as f:
|
||||
|
||||
@@ -66,6 +66,7 @@ SET(Arch_presets
|
||||
Presets/ifc_products_IFC4.json
|
||||
Presets/ifc_types_IFC2X3.json
|
||||
Presets/ifc_types_IFC4.json
|
||||
Presets/ifc_contexts_IFC2X3.json
|
||||
Presets/ifc_contexts_IFC4.json
|
||||
)
|
||||
|
||||
|
||||
66
src/Mod/Arch/Presets/ifc_contexts_IFC2X3.json
Normal file
66
src/Mod/Arch/Presets/ifc_contexts_IFC2X3.json
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"IfcProject": {
|
||||
"is_abstract": false,
|
||||
"parent": "IfcObject",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "GlobalId",
|
||||
"type": "IfcGloballyUniqueId",
|
||||
"is_enum": false,
|
||||
"enum_values": []
|
||||
},
|
||||
{
|
||||
"name": "Name",
|
||||
"type": "IfcLabel",
|
||||
"is_enum": false,
|
||||
"enum_values": []
|
||||
},
|
||||
{
|
||||
"name": "Description",
|
||||
"type": "IfcText",
|
||||
"is_enum": false,
|
||||
"enum_values": []
|
||||
},
|
||||
{
|
||||
"name": "ObjectType",
|
||||
"type": "IfcLabel",
|
||||
"is_enum": false,
|
||||
"enum_values": []
|
||||
},
|
||||
{
|
||||
"name": "LongName",
|
||||
"type": "IfcLabel",
|
||||
"is_enum": false,
|
||||
"enum_values": []
|
||||
},
|
||||
{
|
||||
"name": "Phase",
|
||||
"type": "IfcLabel",
|
||||
"is_enum": false,
|
||||
"enum_values": []
|
||||
}
|
||||
],
|
||||
"complex_attributes": [
|
||||
{
|
||||
"name": "OwnerHistory",
|
||||
"type": "IfcOwnerHistory"
|
||||
},
|
||||
{
|
||||
"name": "IsDecomposedBy",
|
||||
"type": "IfcRelAggregates"
|
||||
},
|
||||
{
|
||||
"name": "RepresentationContexts",
|
||||
"type": "IfcRepresentationContext"
|
||||
},
|
||||
{
|
||||
"name": "UnitsInContext",
|
||||
"type": "IfcUnitAssignment"
|
||||
},
|
||||
{
|
||||
"name": "IsDefinedBy",
|
||||
"type": "IfcRelDefinesByProperties"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user