Type representation maps are now shown in the IFC Representations UI panel

This commit is contained in:
Dion Moult
2021-02-07 11:44:14 +11:00
parent 27eb9d340a
commit 04aad216ba
@@ -17,9 +17,12 @@ class Data:
return
cls.products[product_id] = []
product = file.by_id(product_id)
if not hasattr(product, "Representation") or not product.Representation:
return
for representation in product.Representation.Representations:
representations = []
if product.is_a("IfcProduct"):
representations = product.Representation.Representations
elif product.is_a("IfcTypeProduct"):
representations = [rm.MappedRepresentation for rm in product.RepresentationMaps]
for representation in representations:
c = representation.ContextOfItems
rep_id = int(representation.id())
cls.representations[rep_id] = {