mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Fix bug where a subcontext is always assumed during import, causing a fail
This commit is contained in:
@@ -635,10 +635,16 @@ class IfcImporter():
|
||||
if not element.Representation:
|
||||
return
|
||||
for r in element.Representation.Representations:
|
||||
subcontexts.append('{}/{}/{}'.format(
|
||||
r.ContextOfItems.ContextType,
|
||||
r.ContextOfItems.ContextIdentifier,
|
||||
r.ContextOfItems.TargetView))
|
||||
if r.ContextOfItems.is_a('IfcGeometricRepresentationSubContext'):
|
||||
subcontexts.append('{}/{}/{}'.format(
|
||||
r.ContextOfItems.ContextType,
|
||||
r.ContextOfItems.ContextIdentifier,
|
||||
r.ContextOfItems.TargetView))
|
||||
else:
|
||||
subcontexts.append('{}/{}/{}'.format(
|
||||
r.ContextOfItems.ContextType,
|
||||
r.ContextOfItems.ContextIdentifier,
|
||||
None))
|
||||
elif element.is_a('IfcTypeProduct'):
|
||||
if not element.RepresentationMaps:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user