mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
Fix bug when copying objects, don't copy their decomposition to prevent invalid IFCs.
This commit is contained in:
@@ -24,6 +24,8 @@ class Usecase:
|
|||||||
inverse.RelatedObjects = [to_element]
|
inverse.RelatedObjects = [to_element]
|
||||||
pset = ifcopenshell.util.element.copy_deep(self.file, inverse.RelatingPropertyDefinition)
|
pset = ifcopenshell.util.element.copy_deep(self.file, inverse.RelatingPropertyDefinition)
|
||||||
inverse.RelatingPropertyDefinition = pset
|
inverse.RelatingPropertyDefinition = pset
|
||||||
|
if inverse.is_a("IfcRelAggregates") and inverse.RelatingObject == from_element:
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
# TODO: Consider whether this general approach is good or not. Maybe it isn't.
|
# TODO: Consider whether this general approach is good or not. Maybe it isn't.
|
||||||
for i, value in enumerate(inverse):
|
for i, value in enumerate(inverse):
|
||||||
|
|||||||
Reference in New Issue
Block a user