Fix potential instability when assigning types and synchronising Blender geometry

This commit is contained in:
Dion Moult
2021-05-18 14:36:12 +10:00
parent 30c31d694a
commit e6bf32b832
7 changed files with 69 additions and 78 deletions
@@ -14,11 +14,8 @@ class Data:
cls.products[product_id] = []
product = file.by_id(product_id)
representations = []
if product.is_a("IfcProduct"):
if product.Representation:
representations = product.Representation.Representations
else:
representations = []
if product.is_a("IfcProduct") and product.Representation:
representations = product.Representation.Representations
elif product.is_a("IfcTypeProduct"):
representations = [rm.MappedRepresentation for rm in product.RepresentationMaps or []]
for representation in representations: