mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 05:17:58 +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:
|
if not element.Representation:
|
||||||
return
|
return
|
||||||
for r in element.Representation.Representations:
|
for r in element.Representation.Representations:
|
||||||
subcontexts.append('{}/{}/{}'.format(
|
if r.ContextOfItems.is_a('IfcGeometricRepresentationSubContext'):
|
||||||
r.ContextOfItems.ContextType,
|
subcontexts.append('{}/{}/{}'.format(
|
||||||
r.ContextOfItems.ContextIdentifier,
|
r.ContextOfItems.ContextType,
|
||||||
r.ContextOfItems.TargetView))
|
r.ContextOfItems.ContextIdentifier,
|
||||||
|
r.ContextOfItems.TargetView))
|
||||||
|
else:
|
||||||
|
subcontexts.append('{}/{}/{}'.format(
|
||||||
|
r.ContextOfItems.ContextType,
|
||||||
|
r.ContextOfItems.ContextIdentifier,
|
||||||
|
None))
|
||||||
elif element.is_a('IfcTypeProduct'):
|
elif element.is_a('IfcTypeProduct'):
|
||||||
if not element.RepresentationMaps:
|
if not element.RepresentationMaps:
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user