profile.add_parameterized_profile - add profile_type arg

To create more valid profiles by default. Noticed then Bonsai creates new profiles, it doesn't set ProfileType, leading to validation errors.
This commit is contained in:
Andrej730
2025-07-17 14:55:46 +05:00
parent 0b48120a66
commit 2edfe1e5d8
4 changed files with 51 additions and 3 deletions
+1
View File
@@ -223,6 +223,7 @@ class Profile(bonsai.core.tool.Profile):
"""Set default profile attributes to keep profile valid."""
class_match = False
si_conversion = ifcopenshell.util.unit.calculate_unit_scale(tool.Ifc.get())
# We're using for-loop as classes may not match exactly.
for ifc_class, params in cls.DEFAULT_PROFILE_ATTRS.items():
if profile.is_a(ifc_class):
class_match = True