Fix #2564. Bug where profiles were not reused across copies.

This commit is contained in:
Dion Moult
2022-11-07 22:37:53 +11:00
parent ff90728a22
commit 62e5c3684b
+4 -2
View File
@@ -54,13 +54,15 @@ class Root(blenderbim.core.tool.Root):
if not source.Representation:
return
dest.Representation = ifcopenshell.util.element.copy_deep(
tool.Ifc.get(), source.Representation, exclude=["IfcGeometricRepresentationContext"]
tool.Ifc.get(), source.Representation, exclude=["IfcGeometricRepresentationContext", "IfcProfileDef"]
)
elif dest.is_a("IfcTypeProduct"):
if not source.RepresentationMaps:
return
dest.RepresentationMaps = [
ifcopenshell.util.element.copy_deep(tool.Ifc.get(), m, exclude=["IfcGeometricRepresentationContext"])
ifcopenshell.util.element.copy_deep(
tool.Ifc.get(), m, exclude=["IfcGeometricRepresentationContext", "IfcProfileDef"]
)
for m in source.RepresentationMaps
]