See #1806. Typed fillings now share the same representation for their openings.

This commit is contained in:
Dion Moult
2023-02-06 17:01:29 +11:00
parent 38c6378315
commit e40bbf2525
3 changed files with 124 additions and 48 deletions
@@ -59,3 +59,9 @@ def get_representation(element, context, subcontext=None, target_view=None):
for r in element.RepresentationMaps:
if is_representation_of_context(r.MappedRepresentation, context, subcontext, target_view):
return r.MappedRepresentation
def resolve_representation(representation):
if representation.Items and representation.Items[0].is_a("IfcMappedItem"):
return resolve_representation(representation.Items[0].MappingSource.MappedRepresentation)
return representation