mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
@@ -1647,13 +1647,15 @@ class Drawing(blenderbim.core.tool.Drawing):
|
|||||||
|
|
||||||
for element in filtered_elements:
|
for element in filtered_elements:
|
||||||
obj = tool.Ifc.get_object(element)
|
obj = tool.Ifc.get_object(element)
|
||||||
subcontext = tool.Geometry.get_active_representation(obj).ContextOfItems
|
current_representation = tool.Geometry.get_active_representation(obj)
|
||||||
current_representation_subcontext = tool.Geometry.get_subcontext_parameters(subcontext)
|
if current_representation:
|
||||||
|
subcontext = current_representation.ContextOfItems
|
||||||
|
current_representation_subcontext = tool.Geometry.get_subcontext_parameters(subcontext)
|
||||||
|
|
||||||
for subcontext in subcontexts:
|
for subcontext in subcontexts:
|
||||||
# prioritize already active representation if it matches the subcontext
|
# prioritize already active representation if it matches the subcontext
|
||||||
# (element could have multiple representations in the same subcontext)
|
# (element could have multiple representations in the same subcontext)
|
||||||
if subcontext == current_representation_subcontext:
|
if current_representation and subcontext == current_representation_subcontext:
|
||||||
break
|
break
|
||||||
priority_representation = ifcopenshell.util.representation.get_representation(element, *subcontext)
|
priority_representation = ifcopenshell.util.representation.get_representation(element, *subcontext)
|
||||||
if priority_representation:
|
if priority_representation:
|
||||||
|
|||||||
Reference in New Issue
Block a user