Fix bug on Windows where sometimes, the body representation wouldn't be loaded by default. See #1290.

This commit is contained in:
Dion Moult
2021-03-14 19:33:55 +11:00
parent e618232e70
commit a1e34b0acb
@@ -699,7 +699,11 @@ class IfcImporter:
checkpoint = time.time()
shape = iterator.get()
if shape:
self.create_product(self.file.by_id(shape.guid), shape)
if shape.context != "Body" and shape.guid in IfcStore.guid_map:
# We only load a single context, and we prioritise the Body context. See #1290.
pass
else:
self.create_product(self.file.by_id(shape.guid), shape)
if not iterator.next():
break
print("Done creating geometry")