Description
Changing the x-rotation angle of a LAYER3 slab crashes with an AttributeError when the element's swept area is an IfcCompositeProfileDef.
Steps to Reproduce
- Create or load a LAYER3 slab whose
SweptArea is an IfcCompositeProfileDef.
- Attempt to rotate it (change x-angle).
Error
File "...bonsai/bim/module/model/wall.py", line 471, in _execute
coord_list = builder.get_polyline_coords(extrusion.SweptArea.OuterCurve)
AttributeError: entity instance of type 'IFC4.IfcCompositeProfileDef' has no attribute 'OuterCurve'
Expected Behaviour
The rotation applies successfully. IfcCompositeProfileDef holds sub-profiles in its Profiles attribute; each sub-profile has OuterCurve.
Actual Behaviour
Crash — the code unconditionally accesses SweptArea.OuterCurve, which only exists on IfcArbitraryClosedProfileDef.
Python: Traceback (most recent call last):
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\.local\lib\python3.11\site-packages\bonsai\bim\ifc.py", line 523, in execute_ifc_operator
result = getattr(operator, "_execute")(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\.local\lib\python3.11\site-packages\bonsai\bim\module\model\wall.py", line 471, in _execute
coord_list = builder.get_polyline_coords(extrusion.SweptArea.OuterCurve)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\.local\lib\python3.11\site-packages\ifcopenshell\entity_instance.py", line 263, in __getattr__
raise AttributeError(
AttributeError: entity instance of type 'IFC4.IfcCompositeProfileDef' has no attribute 'OuterCurve'
Description
Changing the x-rotation angle of a LAYER3 slab crashes with an
AttributeErrorwhen the element's swept area is anIfcCompositeProfileDef.Steps to Reproduce
SweptAreais anIfcCompositeProfileDef.Error
Expected Behaviour
The rotation applies successfully.
IfcCompositeProfileDefholds sub-profiles in itsProfilesattribute; each sub-profile hasOuterCurve.Actual Behaviour
Crash — the code unconditionally accesses
SweptArea.OuterCurve, which only exists onIfcArbitraryClosedProfileDef.