profile.copy_profile

Fixes issue duplicated profile missing it's psets.
This commit is contained in:
Andrej730
2024-09-07 11:09:47 +05:00
parent e224bfd19f
commit 33001e6c6d
5 changed files with 97 additions and 1 deletions
@@ -85,6 +85,8 @@ def unshare_pset(
pset_copies: list[ifcopenshell.entity_instance] = []
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)
pset_copies.append(pset_copy)
ifcopenshell.api.pset.assign_pset(file, [product], pset_copy)