mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
don't deep copy psets for optimization
Related to #5291 pset.edit_pset should cover it since it does support unsharing shared properties
This commit is contained in:
@@ -87,7 +87,8 @@ def unshare_pset(
|
||||
for product in products:
|
||||
# No need to consider about profile/material properties since
|
||||
# they are assigned to 1 element directly and therefore cannot be shared.
|
||||
pset_copy = ifcopenshell.util.element.copy_deep(file, pset)
|
||||
# Don't copy_deep to keep it light - edit_pset supports unsharing shared props.
|
||||
pset_copy = ifcopenshell.util.element.copy(file, pset)
|
||||
pset_copies.append(pset_copy)
|
||||
ifcopenshell.api.pset.assign_pset(file, [product], pset_copy)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user