Allow IfcStructural* elements to be exported. See #756.

This commit is contained in:
Dion Moult
2020-01-13 17:35:56 +11:00
parent 9ef9498c35
commit c4af52e8ee
10 changed files with 2112 additions and 472 deletions
+26 -35
View File
@@ -68,30 +68,6 @@ class QtoCalculator():
return volume
class IfcSchema():
def __init__(self, ifc_export_settings):
self.schema_dir = ifc_export_settings.schema_dir
self.property_file = ifcopenshell.open(self.schema_dir + 'IFC4_ADD2.ifc')
self.psets = {}
self.qtos = {}
self.load()
with open(self.schema_dir + 'ifc_types_IFC4.json') as f:
self.type_map = json.load(f)
with open(self.schema_dir + 'ifc_elements_IFC4.json') as f:
self.elements = json.load(f)
def load(self):
for property in self.property_file.by_type('IfcPropertySetTemplate'):
if property.Name[0:4] == 'Qto_':
# self.qtos.append({ })
pass
else:
self.psets[property.Name] = {
'HasPropertyTemplates': {p.Name: p for p in property.HasPropertyTemplates}}
class IfcParser():
def __init__(self, ifc_export_settings):
self.data_dir = ifc_export_settings.data_dir
@@ -699,13 +675,13 @@ class IfcParser():
for product in self.selected_products + self.type_products:
obj = product['raw']
if self.is_point_cloud(obj):
results['Model/Body/MODEL_VIEW/{}'.format(obj.name)] = self.get_representation(
obj.point_cloud_visualizer, obj, 'Model', 'Body', 'MODEL_VIEW')
self.append_point_cloud_representation(obj, results)
continue
elif obj.data is None or obj.data.name in results:
continue
self.append_default_representation(obj, results)
self.append_curve_axis_representation(obj, results)
self.append_representation_per_context(obj, results)
return results
@@ -718,6 +694,15 @@ class IfcParser():
results['Model/Body/MODEL_VIEW/{}'.format(obj.data.name)] = self.get_representation(
obj.data, obj, 'Model', 'Body', 'MODEL_VIEW')
def append_point_cloud_representation(self, obj, results):
results['Model/Body/MODEL_VIEW/{}'.format(obj.name)] = self.get_representation(
obj.point_cloud_visualizer, obj, 'Model', 'Body', 'MODEL_VIEW')
def append_curve_axis_representation(self, obj, results):
if obj.type == 'CURVE':
results['Model/Axis/GRAPH_VIEW/{}'.format(obj.data.name)] = self.get_representation(
obj.data, obj, 'Model', 'Axis', 'GRAPH_VIEW')
def append_representation_per_context(self, obj, results):
name = self.get_ifc_representation_name(obj.data.name)
for context in self.ifc_export_settings.context_tree:
@@ -890,6 +875,14 @@ class IfcParser():
for subcontext in context['subcontexts']:
for target_view in subcontext['target_views']:
mesh_name = '/'.join([context['name'], subcontext['name'], target_view, name])
if context['name'] == 'Model' \
and subcontext['name'] == 'Axis' \
and target_view == 'GRAPH_VIEW' \
and obj.type == 'CURVE':
names.append(mesh_name)
continue
try:
mesh = bpy.data.meshes[mesh_name]
except:
@@ -1650,6 +1643,12 @@ class IfcExporter():
elif representation['subcontext'] == 'CoG':
return self.file.createIfcRepresentationMap(self.origin,
self.create_cog_representation(representation))
elif representation['is_curve'] \
and representation['context'] == 'Model' \
and representation['subcontext'] == 'Axis' \
and representation['target_view'] == 'GRAPH_VIEW':
return self.file.createIfcRepresentationMap(
self.origin, self.create_axis_representation(representation))
elif representation['context'] == 'Plan' \
or representation['subcontext'] == 'Axis' \
or representation['is_wireframe']:
@@ -1659,16 +1658,8 @@ class IfcExporter():
return self.file.createIfcRepresentationMap(self.origin,
self.create_geometric_curve_set_representation(representation))
elif representation['is_curve']:
self.file.createIfcRepresentationMap(self.origin,
return self.file.createIfcRepresentationMap(self.origin,
self.create_curve_representation(representation))
if 'Model' in self.ifc_rep_context \
and 'Axis' in self.ifc_rep_context['Model'] \
and 'GRAPH_VIEW' in self.ifc_rep_context['Model']['Axis']:
representation['subcontext'] = 'Axis'
representation['target_view'] = 'GRAPH_VIEW'
self.file.createIfcRepresentationMap(
self.origin, self.create_axis_representation(representation))
return
elif representation['is_swept_solid']:
return self.file.createIfcRepresentationMap(self.origin,
self.create_swept_solid_representation(representation))
@@ -7,13 +7,7 @@ import time
import mathutils
import multiprocessing
from .helper import SIUnitHelper
cwd = os.path.dirname(os.path.realpath(__file__)) + os.path.sep
class IfcSchema():
def __init__(self):
with open('{}ifc_elements_IFC4.json'.format(cwd + 'schema/')) as f:
self.elements = json.load(f)
from .schema import IfcSchema
ifc_schema = IfcSchema()
+2 -1
View File
@@ -11,6 +11,7 @@ from . import sheeter
from bpy_extras.io_utils import ImportHelper
from itertools import cycle
from mathutils import Vector
from .schema import IfcSchema
class ExportIFC(bpy.types.Operator):
bl_idname = "export.ifc"
@@ -53,7 +54,7 @@ class ExportIFC(bpy.types.Operator):
]
})
ifc_parser = export_ifc.IfcParser(ifc_export_settings)
ifc_schema = export_ifc.IfcSchema(ifc_export_settings)
ifc_schema = IfcSchema()
qto_calculator = export_ifc.QtoCalculator()
ifc_exporter = export_ifc.IfcExporter(ifc_export_settings, ifc_schema, ifc_parser, qto_calculator)
ifc_exporter.export()
+18 -6
View File
@@ -3,6 +3,7 @@ import os
import csv
from pathlib import Path
from . import export_ifc
from .schema import IfcSchema
import bpy
from bpy.types import PropertyGroup
from bpy.app.handlers import persistent
@@ -17,14 +18,10 @@ from bpy.props import (
cwd = os.path.dirname(os.path.realpath(__file__))
class IfcSchema():
def __init__(self):
with open(os.path.join(cwd, 'schema', 'ifc_elements_IFC4.json')) as f:
self.elements = json.load(f)
ifc_schema = IfcSchema()
diagram_scales_enum = []
products_enum = []
classes_enum = []
types_enum = []
availablematerialpsets_enum = []
@@ -63,6 +60,12 @@ def getIfcPredefinedTypes(self, context):
return types_enum
def refreshClasses(self, context):
global classes_enum
classes_enum.clear()
getIfcClasses(self, context)
def refreshPredefinedTypes(self, context):
global types_enum
types_enum.clear()
@@ -89,10 +92,18 @@ def getDiagramScales(self, context):
return diagram_scales_enum
def getIfcProducts(self, context):
global products_enum
if len(products_enum) < 1:
products_enum.extend([(e, e, '') for e in
['IfcElement', 'IfcSpatialStructureElement', 'IfcStructural']])
return products_enum
def getIfcClasses(self, context):
global classes_enum
if len(classes_enum) < 1:
classes_enum.extend([(e, e, '') for e in ifc_schema.elements])
classes_enum.extend([(e, e, '') for e in getattr(ifc_schema, self.ifc_product)])
return classes_enum
@@ -253,6 +264,7 @@ class BIMProperties(PropertyGroup):
schema_dir: StringProperty(default=os.path.join(cwd ,'schema') + os.path.sep, name="Schema Directory")
data_dir: StringProperty(default=os.path.join(cwd, 'data') + os.path.sep, name="Data Directory")
audit_ifc_class: EnumProperty(items=getIfcClasses, name="Audit Class")
ifc_product: EnumProperty(items=getIfcProducts, name="Products", update=refreshClasses)
ifc_class: EnumProperty(items=getIfcClasses, name="Class", update=refreshPredefinedTypes)
ifc_predefined_type: EnumProperty(
items = getIfcPredefinedTypes,
+33
View File
@@ -0,0 +1,33 @@
import os
import json
import ifcopenshell
cwd = os.path.dirname(os.path.realpath(__file__))
class IfcSchema():
def __init__(self):
self.schema_dir = os.path.join(cwd, 'schema') # TODO: make configurable
self.products = ['IfcElement', 'IfcSpatialStructureElement', 'IfcStructural']
self.elements = {}
print(os.path.join(self.schema_dir, 'IFC4_ADD2.ifc'))
self.property_file = ifcopenshell.open(os.path.join(self.schema_dir, 'IFC4_ADD2.ifc'))
self.psets = {}
self.qtos = {}
self.load()
def load(self):
for product in self.products:
with open(os.path.join(self.schema_dir, f'{product}_IFC4.json')) as f:
setattr(self, product, json.load(f))
self.elements.update(getattr(self, product))
with open(os.path.join(self.schema_dir, 'ifc_types_IFC4.json')) as f:
self.type_map = json.load(f)
for property in self.property_file.by_type('IfcPropertySetTemplate'):
if property.Name[0:4] == 'Qto_':
# self.qtos.append({ })
pass
else:
self.psets[property.Name] = {
'HasPropertyTemplates': {p.Name: p for p in property.HasPropertyTemplates}}
@@ -834,110 +834,6 @@
],
"parent": "IfcEnergyConversionDevice"
},
"IfcBuilding": {
"attributes": [
{
"enum_values": [],
"type": "IfcGloballyUniqueId",
"name": "GlobalId",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "Name",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcText",
"name": "Description",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "ObjectType",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "LongName",
"is_enum": false
},
{
"enum_values": [
"COMPLEX",
"ELEMENT",
"PARTIAL"
],
"type": "IfcElementCompositionEnum",
"name": "CompositionType",
"is_enum": true
},
{
"enum_values": [],
"type": "IfcLengthMeasure",
"name": "ElevationOfRefHeight",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLengthMeasure",
"name": "ElevationOfTerrain",
"is_enum": false
}
],
"is_abstract": false,
"complex_attributes": [
{
"type": "IfcOwnerHistory",
"name": "OwnerHistory"
},
{
"type": "IfcRelNests",
"name": "IsNestedBy"
},
{
"type": "IfcRelAggregates",
"name": "IsDecomposedBy"
},
{
"type": "IfcRelDefinesByObject",
"name": "IsDeclaredBy"
},
{
"type": "IfcRelDefinesByType",
"name": "IsTypedBy"
},
{
"type": "IfcRelDefinesByProperties",
"name": "IsDefinedBy"
},
{
"type": "IfcObjectPlacement",
"name": "ObjectPlacement"
},
{
"type": "IfcProductRepresentation",
"name": "Representation"
},
{
"type": "IfcRelContainedInSpatialStructure",
"name": "ContainsElements"
},
{
"type": "IfcRelReferencedInSpatialStructure",
"name": "ReferencesElements"
},
{
"type": "IfcPostalAddress",
"name": "BuildingAddress"
}
],
"parent": "IfcSpatialStructureElement"
},
"IfcBuildingElement": {
"attributes": [
{
@@ -1197,100 +1093,6 @@
],
"parent": "IfcBuildingElement"
},
"IfcBuildingStorey": {
"attributes": [
{
"enum_values": [],
"type": "IfcGloballyUniqueId",
"name": "GlobalId",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "Name",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcText",
"name": "Description",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "ObjectType",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "LongName",
"is_enum": false
},
{
"enum_values": [
"COMPLEX",
"ELEMENT",
"PARTIAL"
],
"type": "IfcElementCompositionEnum",
"name": "CompositionType",
"is_enum": true
},
{
"enum_values": [],
"type": "IfcLengthMeasure",
"name": "Elevation",
"is_enum": false
}
],
"is_abstract": false,
"complex_attributes": [
{
"type": "IfcOwnerHistory",
"name": "OwnerHistory"
},
{
"type": "IfcRelNests",
"name": "IsNestedBy"
},
{
"type": "IfcRelAggregates",
"name": "IsDecomposedBy"
},
{
"type": "IfcRelDefinesByObject",
"name": "IsDeclaredBy"
},
{
"type": "IfcRelDefinesByType",
"name": "IsTypedBy"
},
{
"type": "IfcRelDefinesByProperties",
"name": "IsDefinedBy"
},
{
"type": "IfcObjectPlacement",
"name": "ObjectPlacement"
},
{
"type": "IfcProductRepresentation",
"name": "Representation"
},
{
"type": "IfcRelContainedInSpatialStructure",
"name": "ContainsElements"
},
{
"type": "IfcRelReferencedInSpatialStructure",
"name": "ReferencesElements"
}
],
"parent": "IfcSpatialStructureElement"
},
"IfcBurner": {
"attributes": [
{
@@ -10046,122 +9848,6 @@
],
"parent": "IfcBuildingElement"
},
"IfcSite": {
"attributes": [
{
"enum_values": [],
"type": "IfcGloballyUniqueId",
"name": "GlobalId",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "Name",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcText",
"name": "Description",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "ObjectType",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "LongName",
"is_enum": false
},
{
"enum_values": [
"COMPLEX",
"ELEMENT",
"PARTIAL"
],
"type": "IfcElementCompositionEnum",
"name": "CompositionType",
"is_enum": true
},
{
"enum_values": [],
"type": "List-IfcCompoundPlaneAngleMeasure",
"name": "RefLatitude",
"is_enum": false
},
{
"enum_values": [],
"type": "List-IfcCompoundPlaneAngleMeasure",
"name": "RefLongitude",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLengthMeasure",
"name": "RefElevation",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "LandTitleNumber",
"is_enum": false
}
],
"is_abstract": false,
"complex_attributes": [
{
"type": "IfcOwnerHistory",
"name": "OwnerHistory"
},
{
"type": "IfcRelNests",
"name": "IsNestedBy"
},
{
"type": "IfcRelAggregates",
"name": "IsDecomposedBy"
},
{
"type": "IfcRelDefinesByObject",
"name": "IsDeclaredBy"
},
{
"type": "IfcRelDefinesByType",
"name": "IsTypedBy"
},
{
"type": "IfcRelDefinesByProperties",
"name": "IsDefinedBy"
},
{
"type": "IfcObjectPlacement",
"name": "ObjectPlacement"
},
{
"type": "IfcProductRepresentation",
"name": "Representation"
},
{
"type": "IfcRelContainedInSpatialStructure",
"name": "ContainsElements"
},
{
"type": "IfcRelReferencedInSpatialStructure",
"name": "ReferencesElements"
},
{
"type": "IfcPostalAddress",
"name": "SiteAddress"
}
],
"parent": "IfcSpatialStructureElement"
},
"IfcSlab": {
"attributes": [
{
@@ -10524,114 +10210,6 @@
],
"parent": "IfcEnergyConversionDevice"
},
"IfcSpace": {
"attributes": [
{
"enum_values": [],
"type": "IfcGloballyUniqueId",
"name": "GlobalId",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "Name",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcText",
"name": "Description",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "ObjectType",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "LongName",
"is_enum": false
},
{
"enum_values": [
"COMPLEX",
"ELEMENT",
"PARTIAL"
],
"type": "IfcElementCompositionEnum",
"name": "CompositionType",
"is_enum": true
},
{
"enum_values": [
"SPACE",
"PARKING",
"GFA",
"INTERNAL",
"EXTERNAL",
"USERDEFINED",
"NOTDEFINED"
],
"type": "IfcSpaceTypeEnum",
"name": "PredefinedType",
"is_enum": true
},
{
"enum_values": [],
"type": "IfcLengthMeasure",
"name": "ElevationWithFlooring",
"is_enum": false
}
],
"is_abstract": false,
"complex_attributes": [
{
"type": "IfcOwnerHistory",
"name": "OwnerHistory"
},
{
"type": "IfcRelNests",
"name": "IsNestedBy"
},
{
"type": "IfcRelAggregates",
"name": "IsDecomposedBy"
},
{
"type": "IfcRelDefinesByObject",
"name": "IsDeclaredBy"
},
{
"type": "IfcRelDefinesByType",
"name": "IsTypedBy"
},
{
"type": "IfcRelDefinesByProperties",
"name": "IsDefinedBy"
},
{
"type": "IfcObjectPlacement",
"name": "ObjectPlacement"
},
{
"type": "IfcProductRepresentation",
"name": "Representation"
},
{
"type": "IfcRelContainedInSpatialStructure",
"name": "ContainsElements"
},
{
"type": "IfcRelReferencedInSpatialStructure",
"name": "ReferencesElements"
}
],
"parent": "IfcSpatialStructureElement"
},
"IfcSpaceHeater": {
"attributes": [
{
@@ -0,0 +1,424 @@
{
"IfcBuilding": {
"attributes": [
{
"enum_values": [],
"type": "IfcGloballyUniqueId",
"name": "GlobalId",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "Name",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcText",
"name": "Description",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "ObjectType",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "LongName",
"is_enum": false
},
{
"enum_values": [
"COMPLEX",
"ELEMENT",
"PARTIAL"
],
"type": "IfcElementCompositionEnum",
"name": "CompositionType",
"is_enum": true
},
{
"enum_values": [],
"type": "IfcLengthMeasure",
"name": "ElevationOfRefHeight",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLengthMeasure",
"name": "ElevationOfTerrain",
"is_enum": false
}
],
"is_abstract": false,
"complex_attributes": [
{
"type": "IfcOwnerHistory",
"name": "OwnerHistory"
},
{
"type": "IfcRelNests",
"name": "IsNestedBy"
},
{
"type": "IfcRelAggregates",
"name": "IsDecomposedBy"
},
{
"type": "IfcRelDefinesByObject",
"name": "IsDeclaredBy"
},
{
"type": "IfcRelDefinesByType",
"name": "IsTypedBy"
},
{
"type": "IfcRelDefinesByProperties",
"name": "IsDefinedBy"
},
{
"type": "IfcObjectPlacement",
"name": "ObjectPlacement"
},
{
"type": "IfcProductRepresentation",
"name": "Representation"
},
{
"type": "IfcRelContainedInSpatialStructure",
"name": "ContainsElements"
},
{
"type": "IfcRelReferencedInSpatialStructure",
"name": "ReferencesElements"
},
{
"type": "IfcPostalAddress",
"name": "BuildingAddress"
}
],
"parent": "IfcSpatialStructureElement"
},
"IfcBuildingStorey": {
"attributes": [
{
"enum_values": [],
"type": "IfcGloballyUniqueId",
"name": "GlobalId",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "Name",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcText",
"name": "Description",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "ObjectType",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "LongName",
"is_enum": false
},
{
"enum_values": [
"COMPLEX",
"ELEMENT",
"PARTIAL"
],
"type": "IfcElementCompositionEnum",
"name": "CompositionType",
"is_enum": true
},
{
"enum_values": [],
"type": "IfcLengthMeasure",
"name": "Elevation",
"is_enum": false
}
],
"is_abstract": false,
"complex_attributes": [
{
"type": "IfcOwnerHistory",
"name": "OwnerHistory"
},
{
"type": "IfcRelNests",
"name": "IsNestedBy"
},
{
"type": "IfcRelAggregates",
"name": "IsDecomposedBy"
},
{
"type": "IfcRelDefinesByObject",
"name": "IsDeclaredBy"
},
{
"type": "IfcRelDefinesByType",
"name": "IsTypedBy"
},
{
"type": "IfcRelDefinesByProperties",
"name": "IsDefinedBy"
},
{
"type": "IfcObjectPlacement",
"name": "ObjectPlacement"
},
{
"type": "IfcProductRepresentation",
"name": "Representation"
},
{
"type": "IfcRelContainedInSpatialStructure",
"name": "ContainsElements"
},
{
"type": "IfcRelReferencedInSpatialStructure",
"name": "ReferencesElements"
}
],
"parent": "IfcSpatialStructureElement"
},
"IfcSite": {
"attributes": [
{
"enum_values": [],
"type": "IfcGloballyUniqueId",
"name": "GlobalId",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "Name",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcText",
"name": "Description",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "ObjectType",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "LongName",
"is_enum": false
},
{
"enum_values": [
"COMPLEX",
"ELEMENT",
"PARTIAL"
],
"type": "IfcElementCompositionEnum",
"name": "CompositionType",
"is_enum": true
},
{
"enum_values": [],
"type": "List-IfcCompoundPlaneAngleMeasure",
"name": "RefLatitude",
"is_enum": false
},
{
"enum_values": [],
"type": "List-IfcCompoundPlaneAngleMeasure",
"name": "RefLongitude",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLengthMeasure",
"name": "RefElevation",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "LandTitleNumber",
"is_enum": false
}
],
"is_abstract": false,
"complex_attributes": [
{
"type": "IfcOwnerHistory",
"name": "OwnerHistory"
},
{
"type": "IfcRelNests",
"name": "IsNestedBy"
},
{
"type": "IfcRelAggregates",
"name": "IsDecomposedBy"
},
{
"type": "IfcRelDefinesByObject",
"name": "IsDeclaredBy"
},
{
"type": "IfcRelDefinesByType",
"name": "IsTypedBy"
},
{
"type": "IfcRelDefinesByProperties",
"name": "IsDefinedBy"
},
{
"type": "IfcObjectPlacement",
"name": "ObjectPlacement"
},
{
"type": "IfcProductRepresentation",
"name": "Representation"
},
{
"type": "IfcRelContainedInSpatialStructure",
"name": "ContainsElements"
},
{
"type": "IfcRelReferencedInSpatialStructure",
"name": "ReferencesElements"
},
{
"type": "IfcPostalAddress",
"name": "SiteAddress"
}
],
"parent": "IfcSpatialStructureElement"
},
"IfcSpace": {
"attributes": [
{
"enum_values": [],
"type": "IfcGloballyUniqueId",
"name": "GlobalId",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "Name",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcText",
"name": "Description",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "ObjectType",
"is_enum": false
},
{
"enum_values": [],
"type": "IfcLabel",
"name": "LongName",
"is_enum": false
},
{
"enum_values": [
"COMPLEX",
"ELEMENT",
"PARTIAL"
],
"type": "IfcElementCompositionEnum",
"name": "CompositionType",
"is_enum": true
},
{
"enum_values": [
"SPACE",
"PARKING",
"GFA",
"INTERNAL",
"EXTERNAL",
"USERDEFINED",
"NOTDEFINED"
],
"type": "IfcSpaceTypeEnum",
"name": "PredefinedType",
"is_enum": true
},
{
"enum_values": [],
"type": "IfcLengthMeasure",
"name": "ElevationWithFlooring",
"is_enum": false
}
],
"is_abstract": false,
"complex_attributes": [
{
"type": "IfcOwnerHistory",
"name": "OwnerHistory"
},
{
"type": "IfcRelNests",
"name": "IsNestedBy"
},
{
"type": "IfcRelAggregates",
"name": "IsDecomposedBy"
},
{
"type": "IfcRelDefinesByObject",
"name": "IsDeclaredBy"
},
{
"type": "IfcRelDefinesByType",
"name": "IsTypedBy"
},
{
"type": "IfcRelDefinesByProperties",
"name": "IsDefinedBy"
},
{
"type": "IfcObjectPlacement",
"name": "ObjectPlacement"
},
{
"type": "IfcProductRepresentation",
"name": "Representation"
},
{
"type": "IfcRelContainedInSpatialStructure",
"name": "ContainsElements"
},
{
"type": "IfcRelReferencedInSpatialStructure",
"name": "ReferencesElements"
}
],
"parent": "IfcSpatialStructureElement"
}
}
File diff suppressed because it is too large Load Diff
+2
View File
@@ -352,6 +352,8 @@ class BIM_PT_bim(Panel):
layout.label(text="IFC Categorisation:")
row = layout.row()
row.prop(bim_properties, "ifc_product")
row = layout.row()
row.prop(bim_properties, "ifc_class")
row = layout.row()
+3 -1
View File
@@ -12,7 +12,9 @@ class IFC4Extractor:
self.ns = {'xs': 'http://www.w3.org/2001/XMLSchema'}
self.elements = {}
#self.filters = ['IfcBuildingElement']
self.filters = ['IfcElement', 'IfcSpatialStructureElement']
#self.filters = ['IfcElement']
#self.filters = ['IfcSpatialStructureElement']
self.filters = ['IfcStructuralActivity', 'IfcStructuralItem']
self.filtered_elements = {}
def extract(self):