Assembly 4 (v0.12.0) – Animate Assembly does not start when run button is clicked ( v0.21.29321 (Git) AppImage )

Discussion about the development of the Assembly workbench.
Post Reply
OriginalContent
Posts: 2
Joined: Thu Jun 09, 2022 11:11 am
Location: Virginia, USA

Assembly 4 (v0.12.0) – Animate Assembly does not start when run button is clicked ( v0.21.29321 (Git) AppImage )

Post by OriginalContent »

[[ EDIT 6/29/22 : Added Assembly 4 version to subject title ]]

Greetings all,

This is my first forum post. Many thanks to every contributor that has made FreeCAD what it is today.
I’ve been reading the forum and learning FreeCAD for about 2 months. It's a wonderful tool.

I believe I found a bug in the weekly ( v0.21.29321 (Git) AppImage ) while practicing Zolko’s Assembly 4 tutorial #2:
Steps to reproduce the bug:
1. Open FreeCAD
2. File -> Open -> asm_tuto2.FCStd
3. Switch to Assembly 4 WB
4. Click Animate Assembly icon in assembly toolbar
5. Select the variable Angle_disk
6. Choose 40 and 400 as Begin and End values
7. Choose 1 as Step and 0 for Sleep
8. Click Run button

Expected result:
Assembly animates at least one iteration

Actual result:
No animation at all. When Animate Assembly Variable field is populated with Angle_disk, error messages show in Report view. ( See below )

Screenshot_Animate_Assy.png
Screenshot_Animate_Assy.png (27.52 KiB) Viewed 322 times
Report View Error Messages:
Screenshot_Report_view.png
Screenshot_Report_view.png (67.85 KiB) Viewed 322 times

Error logs from terminal ( ./FreeCAD.appimage -l ):

Code: Select all

Traceback (most recent call last):
  File "/home/bob/.local/share/FreeCAD/Mod/Assembly4/./AnimationLib.py", line 387, in sliderMoved
    self.setVarValue(varName, varValue)
  File "/home/bob/.local/share/FreeCAD/Mod/Assembly4/./AnimationLib.py", line 350, in setVarValue
    self.rootAssembly.recompute('True')
TypeError: argument 1 must be bool, not str
Traceback (most recent call last):
  File "/home/bob/.local/share/FreeCAD/Mod/Assembly4/./AnimationLib.py", line 387, in sliderMoved
    self.setVarValue(varName, varValue)
  File "/home/bob/.local/share/FreeCAD/Mod/Assembly4/./AnimationLib.py", line 350, in setVarValue
    self.rootAssembly.recompute('True')
TypeError: argument 1 must be bool, not str

I was able to successfully animate the assembly in the latest official release ( v0.20.29177 (Git) AppImage ). And that is why I believe it's a bug.

If this turns out to be a bug, should I submit a bug report?

Cheers,

Code: Select all

OS: Ubuntu 20.04.4 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.29321 (Git) AppImage
Build type: Release
Branch: master
Hash: 8ee773362e08d703bce9cfdcefd8e4ad424a7d44
Python 3.10.5, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: English/United States (en_US)
Installed mods: 
  * Assembly4 0.12.0
  * DynamicData 2.46.0
  * dodo (Disabled)
asm_tuto2.FCStd
(58.32 KiB) Downloaded 5 times
Last edited by OriginalContent on Wed Jun 29, 2022 5:11 pm, edited 4 times in total.
chrisb
Veteran
Posts: 43570
Joined: Tue Mar 17, 2015 9:14 am

Re: Assembly 4 – Animate Assembly does not start when run button is clicked ( v0.21.29321 (Git) AppImage )

Post by chrisb »

Moved to Assemly forum.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Zolko
Veteran
Posts: 1794
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 – Animate Assembly does not start when run button is clicked ( v0.21.29321 (Git) AppImage )

Post by Zolko »

OriginalContent wrote: Tue Jun 28, 2022 7:18 pm

Code: Select all

  File "/home/bob/.local/share/FreeCAD/Mod/Assembly4/./AnimationLib.py", line 350, in setVarValue
    self.rootAssembly.recompute('True')
TypeError: argument 1 must be bool, not str
I was able to successfully animate the assembly in the latest official release ( v0.20.29177 (Git) AppImage ). And that is why I believe it's a bug.
good catch, yes, this is definitively a bug. FreeCAD v0.20 probably ignored that keyword and that's why it hadn't been triggered before. I think I fixed it in the new Asm4 v0.12.1 version. Can you please update the workbench and test again ? (should work in FreeCAD v0.19, 0.20 and 0.21)
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
OriginalContent
Posts: 2
Joined: Thu Jun 09, 2022 11:11 am
Location: Virginia, USA

Re: Assembly 4 – Animate Assembly does not start when run button is clicked ( v0.21.29321 (Git) AppImage )

Post by OriginalContent »

Zolko wrote: Wed Jun 29, 2022 6:49 am Can you please update the workbench and test again ? (should work in FreeCAD v0.19, 0.20 and 0.21)
I updated the Assembly 4 addon to the latest version, v0.12.1, and tested assembly, asm_tuto2.FCStd, on the following FreeCAD versions:

v0.19.24366 (Git) AppImage ( aka 0.19.3-Linux-Conda_glibc2.12-x86_64.AppImage )
v0.20.29177 (Git) AppImage ( latest official release )
v0.21.29321 (Git) AppImage ( latest weekly release )

I was able to successfully animate the assembly manually and with the Animate Assembly function in each version with no errors.

Thank you for your prompt reply and the excellent work you've done to create Assembly 4!

Cheers,
Post Reply