Arch: handle ifcopenshell error when shape is not available
This commit is contained in:
parent
7886675faa
commit
7691e22c59
|
@ -444,8 +444,13 @@ def insert(filename,docname,skip=[],only=[],root=None):
|
||||||
# detect if this object is sharing its shape
|
# detect if this object is sharing its shape
|
||||||
clone = None
|
clone = None
|
||||||
store = None
|
store = None
|
||||||
if product.Representation and MERGE_MODE_ARCH == 0 and archobj:
|
prepr = None
|
||||||
for s in product.Representation.Representations:
|
try:
|
||||||
|
prepr = product.Representation
|
||||||
|
except:
|
||||||
|
if DEBUG: print " ERROR unable to get object representation",
|
||||||
|
if prepr and (MERGE_MODE_ARCH == 0) and archobj:
|
||||||
|
for s in prepr.Representations:
|
||||||
if s.RepresentationIdentifier.upper() == "BODY":
|
if s.RepresentationIdentifier.upper() == "BODY":
|
||||||
if s.Items[0].is_a("IfcMappedItem"):
|
if s.Items[0].is_a("IfcMappedItem"):
|
||||||
bid = s.Items[0].MappingSource.id()
|
bid = s.Items[0].MappingSource.id()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user