bim.reassign_class - fix issue in ifc2x3 when selected product class would be ignored

E.g. you select IfcSlab and change it to IfcRoof - since there is not IfcRoofType in IFC2X3 it would figure the matching product type is IfcBeamType (which is confusing too but that's another subject) and change this slab's type object to IfcBeamType which consequently change IfcSlab to IfcBeam instead of IfcRoof that was selected originally.

Noticed investigating #5918
This commit is contained in:
Andrej730
2025-03-11 18:35:34 +05:00
parent 5b95bb37e6
commit 977d814d39
3 changed files with 43 additions and 5 deletions
@@ -157,6 +157,9 @@ class ReassignClass(bpy.types.Operator, tool.Ifc.Operator):
product=element,
ifc_class=ifc_class_,
predefined_type=predefined_type,
# Provide occurrence class in all cases as it won't really matter
# for non-IfcTypeProducts.
occurrence_class=ifc_class,
)
reassigned_elements.add(element)