shaise / FreeCAD_SheetMetal

A simple sheet metal workbench for FreeCAD
http://theseger.com/projects/2015/06/sheet-metal-addon-for-freecad/
GNU Lesser General Public License v2.1
205 stars 58 forks source link

Error when loading a file with extruded cutout features #402

Closed shaise closed 1 week ago

shaise commented 1 week ago

Describe your issue

Loading a file with extruded cutout features generates some errors, even though the file seems ok after it is loaded. I was able to remove some of the errors (missing loads() function) but others still exist To reproduce, just open the attached file.

FreeCAD version info + SheetMetal WB version

OS: Windows 11 build 22631
Architecture: x86_64
Version: 1.1.0dev.39100 (Git)
Build type: Release
Branch: main
Hash: 8865450a3e14220925e0e449c0f1f79056b4fb89
Python 3.11.10, Qt 5.15.15, Coin 4.0.3, Vtk 9.3.0, OCC 7.8.1
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: OpenLight.qss/OpenLight/Fusion
Installed mods: 
  * fasteners 0.5.31
  * OpenTheme 2024.9.1
  * sheetmetal 0.5.6
  * STEMFIE 0.2.4

Put here any screenshots or videos (optional)

test-cutout2.zip

shaise commented 1 week ago

@sheetmetalman , I'm still looking for the problem. Please update your code as I fixed some of it.

shaise commented 1 week ago

Ok I fixed it. Please update. What was the problem: there is a function "onChanged" in class ExtrudedCutout. This calls recompute each time a value is changed. Problem is during initialization when the fuction is called EACH time addProperty is called, causing the system to recompute even though other parameters do not exist yet... solution: Remove the recompute. it is done automatically anyway.

sheetmetalman commented 1 week ago

Thank you so much, @shaise!

Yes! I will update my code here same as yours updates! Tanks again!