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.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
OriginalContent
Posts: 9
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 1279 times
Report View Error Messages:
Screenshot_Report_view.png
Screenshot_Report_view.png (67.85 KiB) Viewed 1279 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 33 times
Last edited by OriginalContent on Wed Jun 29, 2022 5:11 pm, edited 4 times in total.
chrisb
Veteran
Posts: 53933
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: 2213
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 — tutorials here and here
OriginalContent
Posts: 9
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,
JustEnoughDucks
Posts: 3
Joined: Wed Aug 31, 2022 10:14 pm

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

Post by JustEnoughDucks »

Hello, I am at v0.21.30121(git) AppImage with Assembly4 v0.12.3 installed.

I am having the same problem where I cannot solve nor animate the assembly due to the same error:

Code: Select all

00:12:51  Running the Python command 'Asm4_updateAssembly' failed:
Traceback (most recent call last):
  File "/home/lagomankor/.local/share/FreeCAD/Mod/Assembly4/updateAssemblyCmd.py", line 43, in Activated
    obj.recompute(True)
I would think if it was fixed then this shouldn't be an issue anymore. Must be something different going wrong?
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

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

Post by Zolko »

JustEnoughDucks wrote: Wed Aug 31, 2022 10:24 pm I am having the same problem where I cannot solve nor animate the assembly due to the same error:
not enough information
try the Assembly4 workbench for FreCAD — tutorials here and here
Post Reply