Merge branch 'v0.6.0' of github.com:IfcOpenShell/IfcOpenShell into v0.6.0

This commit is contained in:
Dion Moult
2019-10-19 10:47:15 +11:00
2 changed files with 18 additions and 3 deletions
@@ -110,7 +110,11 @@ class IfcImporter():
if element.is_a('IfcOpeningElement'):
return
shape = ifcopenshell.geom.create_shape(self.settings, element)
try:
shape = ifcopenshell.geom.create_shape(self.settings, element)
except:
print('Failed to generate shape for {}'.format(element))
return
mesh_name = 'mesh-{}'.format(shape.geometry.id)
mesh = self.meshes.get(mesh_name)
@@ -135,7 +139,8 @@ class IfcImporter():
matrix.transpose()
object.matrix_world = matrix
if element.ContainedInStructure \
if hasattr(element, 'ContainedInStructure') \
and element.ContainedInStructure \
and element.ContainedInStructure[0].RelatingStructure:
structure_name = self.get_name(element.ContainedInStructure[0].RelatingStructure)
if structure_name in self.spatial_structure_elements: