Switching construction type now has an option to map representations

This commit is contained in:
Dion Moult
2021-02-14 16:49:59 +11:00
parent 4e897a0c21
commit 6966da3bdf
9 changed files with 75 additions and 37 deletions
@@ -19,7 +19,10 @@ class Data:
product = file.by_id(product_id)
representations = []
if product.is_a("IfcProduct"):
representations = product.Representation.Representations
if product.Representation:
representations = product.Representation.Representations
else:
representations = []
elif product.is_a("IfcTypeProduct"):
representations = [rm.MappedRepresentation for rm in product.RepresentationMaps]
for representation in representations: