mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +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
|
||||
|
||||
def get_geometry_type(self, element):
|
||||
tree = []
|
||||
if hasattr(element, 'Representation'):
|
||||
tree = self.file.traverse(element.Representation)
|
||||
elif hasattr(element, 'RepresentationMaps'):
|
||||
tree = []
|
||||
for representation_map in element.RepresentationMaps:
|
||||
tree.extend(self.file.traverse(representation_map))
|
||||
representations = [e for e in tree if e.is_a('IfcRepresentation') \
|
||||
|
||||
Reference in New Issue
Block a user