mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
remove_product to remove IfcRelConnectsElements
This commit is contained in:
@@ -125,7 +125,11 @@ class Usecase:
|
||||
elif inverse.is_a("IfcRelContainedInSpatialStructure"):
|
||||
if inverse.RelatingStructure == self.settings["product"] or len(inverse.RelatedElements) == 1:
|
||||
self.file.remove(inverse)
|
||||
elif inverse.is_a("IfcRelConnectsPathElements"):
|
||||
elif inverse.is_a() in ("IfcRelConnectsElements", "IfcRelConnectsPathElements"):
|
||||
if inverse.is_a("IfcRelConnectsWithRealizingElements"):
|
||||
connected_elements = (inverse.RelatingElement, inverse.RelatedElement)
|
||||
if any(el not in connected_elements for el in inverse.RealizingElements):
|
||||
continue
|
||||
self.file.remove(inverse)
|
||||
elif inverse.is_a("IfcRelAssignsToGroup"):
|
||||
if len(inverse.RelatedObjects) == 1:
|
||||
|
||||
Reference in New Issue
Block a user