-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Describe your issue
I was not able to add new bends to an already created body that already had some bends added. I was able to edit the existing bends but not add a new ones. I tried with a blank file ant the error persists. Tried using old FreeCAD (0.21.2) - still no go.
To test and reproduce I renamed my FC user folder (as fresh start as possible), installed SheetMetal WB, created new file, switched to SheetMetal WB, added new base shape, selected a straight edge (right internal edge of the wider section) and tried to create new bend. This is the error I get:
16:42:24 pyException: Traceback (most recent call last): File "C:\Users\Wivern\AppData\Roaming\FreeCAD\Mod\sheetmetal\.\SheetMetalBend.py", line 138, in execute s = smSolidBend( ^^^^^^^^^^^^ File "C:\Users\Wivern\AppData\Roaming\FreeCAD\Mod\sheetmetal\.\SheetMetalBend.py", line 107, in smSolidBend return resultSolid ^^^^^^^^^^^ <class 'UnboundLocalError'>: cannot access local variable 'resultSolid' where it is not associated with a value 16:42:24 SolidBend: cannot access local variable 'resultSolid' where it is not associated with a value 16:42:40 pyException: Traceback (most recent call last): File "C:\Users\Wivern\AppData\Roaming\FreeCAD\Mod\sheetmetal\.\SheetMetalBend.py", line 138, in execute s = smSolidBend( ^^^^^^^^^^^^ File "C:\Users\Wivern\AppData\Roaming\FreeCAD\Mod\sheetmetal\.\SheetMetalBend.py", line 107, in smSolidBend return resultSolid ^^^^^^^^^^^ <class 'UnboundLocalError'>: cannot access local variable 'resultSolid' where it is not associated with a value 16:42:40 SolidBend: cannot access local variable 'resultSolid' where it is not associated with a value 16:42:49 pyException: Traceback (most recent call last): File "C:\Users\Wivern\AppData\Roaming\FreeCAD\Mod\sheetmetal\.\SheetMetalBend.py", line 138, in execute s = smSolidBend( ^^^^^^^^^^^^ File "C:\Users\Wivern\AppData\Roaming\FreeCAD\Mod\sheetmetal\.\SheetMetalBend.py", line 107, in smSolidBend return resultSolid ^^^^^^^^^^^ <class 'UnboundLocalError'>: cannot access local variable 'resultSolid' where it is not associated with a value 16:42:49 SolidBend: cannot access local variable 'resultSolid' where it is not associated with a value
Despite the error FC lets me confirm the dialog but there is no proper resulting solid and the feature is in error state.
FreeCAD version info + SheetMetal WB version
OS: Windows 11 build 22631
Architecture: x86_64
Version: 1.1.0dev.42885 (Git)
Build date: 2025/08/08 15:11:51
Build type: Release
Branch: main
Hash: 0cdf0af0c6f9f4c12ab7072064906626f86f6f98
Python 3.11.13, Qt 6.8.3, Coin 4.0.3, Vtk 9.3.1, boost 1_86, Eigen3 3.4.0, PySide 6.8.3
shiboken 6.8.3, xerces-c 3.2.5, IfcOpenShell 0.8.2, OCC 7.8.1
Locale: Bulgarian/Bulgaria (bg_BG)
Navigation Style/Orbit Style/Rotation Mode: CAD/Rounded Arcball/Window center
Stylesheet/Theme/QtStyle: FreeCAD.qss/FreeCAD Light/
Logical DPI/Physical DPI/Pixel Ratio: 96/113.268/1.25
Installed mods:
* sheetmetal 0.7.24
Put here any screenshots or videos (optional)
No response