mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Fix #4867. Accommmodate invalid IFC data from 12D.
This commit is contained in:
@@ -526,6 +526,8 @@ class IfcImporter:
|
||||
if representation_id is None:
|
||||
representation_id = rep.id()
|
||||
rep = rep.Items[0].MappingSource.MappedRepresentation
|
||||
if not rep: # Accommodate invalid files
|
||||
return False
|
||||
else:
|
||||
if representation_id is None:
|
||||
representation_id = rep.id()
|
||||
|
||||
@@ -255,6 +255,8 @@ class Spatial(blenderbim.core.tool.Spatial):
|
||||
|
||||
@classmethod
|
||||
def import_spatial_element(cls, element, level_index):
|
||||
if not element.is_a("IfcProject") and not tool.Root.is_spatial_element(element):
|
||||
return
|
||||
props = bpy.context.scene.BIMSpatialDecompositionProperties
|
||||
new = props.containers.add()
|
||||
new.ifc_class = element.is_a()
|
||||
|
||||
Reference in New Issue
Block a user