mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-08 17:01:40 +00:00
Getting drawing group more precisely
Previously it was conflicting with other possible groups assigned to the object. It's now even more important since we're actively using groups to save search queries. Example error caused by this issue - during drawing activation if you had 2 IfcGroups on the drawing element: draiwng's IfcGroup RelatedObjects attribute was updated, then inverse attrtibute `drawing.HasAssignments` order was updated too (DRAWING IfcGroup now would be positioned second after IfcGroup for search query) and it was leading to errors during filtering current drawing annotations
This commit is contained in:
@@ -416,7 +416,7 @@ class Drawing(blenderbim.core.tool.Drawing):
|
||||
@classmethod
|
||||
def get_drawing_group(cls, drawing):
|
||||
for rel in drawing.HasAssignments or []:
|
||||
if rel.is_a("IfcRelAssignsToGroup"):
|
||||
if rel.is_a("IfcRelAssignsToGroup") and rel.RelatingGroup.ObjectType == "DRAWING":
|
||||
return rel.RelatingGroup
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user