mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 14:31:39 +00:00
Fix import bug getting geometry type of objects without a representation
E.g. an IfcGridAxis
This commit is contained in:
@@ -1778,10 +1778,10 @@ class IfcImporter():
|
|||||||
return representation.Items[0].MappingTarget
|
return representation.Items[0].MappingTarget
|
||||||
|
|
||||||
def get_geometry_type(self, element):
|
def get_geometry_type(self, element):
|
||||||
|
tree = []
|
||||||
if hasattr(element, 'Representation'):
|
if hasattr(element, 'Representation'):
|
||||||
tree = self.file.traverse(element.Representation)
|
tree = self.file.traverse(element.Representation)
|
||||||
elif hasattr(element, 'RepresentationMaps'):
|
elif hasattr(element, 'RepresentationMaps'):
|
||||||
tree = []
|
|
||||||
for representation_map in element.RepresentationMaps:
|
for representation_map in element.RepresentationMaps:
|
||||||
tree.extend(self.file.traverse(representation_map))
|
tree.extend(self.file.traverse(representation_map))
|
||||||
representations = [e for e in tree if e.is_a('IfcRepresentation') \
|
representations = [e for e in tree if e.is_a('IfcRepresentation') \
|
||||||
|
|||||||
Reference in New Issue
Block a user