Exploded assembly animation

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
JMG
Posts: 288
Joined: Wed Dec 25, 2013 9:32 am
Location: Spain
Contact:

Re: Exploded assembly animation

Post by JMG »

P.S. If you would provide an option to do a (by using a built in support for POV-Ray) render at each step that would be cool!
I have spent some hours with that but I do not find it motivating enough to continue.

But, hey, this is Open Source and I would be very happy to see (and merge) someone else code providing for this or any other functionality. :)
FreeCAD scripts, animations, experiments and more: http://linuxforanengineer.blogspot.com.es/
Open source CNC hot wire cutter project (NiCr): https://github.com/JMG1/NiCr
Exploded Assembly Workbench: https://github.com/JMG1/ExplodedAssembly
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Exploded assembly animation

Post by triplus »

JMG wrote:
P.S. If you would provide an option to do a (by using a built in support for POV-Ray) render at each step that would be cool!
I have spent some hours with that but I do not find it motivating enough to continue.

But, hey, this is Open Source and I would be very happy to see (and merge) someone else code providing for this or any other functionality. :)
Fair enough.

P.S. I get this if i set your WB as start-up module:

Code: Select all

'NoneType' object has no attribute 'addObject'
JMG
Posts: 288
Joined: Wed Dec 25, 2013 9:32 am
Location: Spain
Contact:

Re: Exploded assembly animation

Post by JMG »

triplus wrote: P.S. I get this if i set your WB as start-up module:

Code: Select all

'NoneType' object has no attribute 'addObject'
Fixed ;)
FreeCAD scripts, animations, experiments and more: http://linuxforanengineer.blogspot.com.es/
Open source CNC hot wire cutter project (NiCr): https://github.com/JMG1/NiCr
Exploded Assembly Workbench: https://github.com/JMG1/ExplodedAssembly
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Exploded assembly animation

Post by triplus »

JMG wrote:
triplus wrote: P.S. I get this if i set your WB as start-up module:

Code: Select all

'NoneType' object has no attribute 'addObject'
Fixed ;)
Can confirm the error is gone!
therman
Posts: 2
Joined: Fri Aug 26, 2016 8:12 am

Re: Exploded assembly animation

Post by therman »

Hi!

This is a great tool. I'm currently trying to create a video and I'd like to run only a part of the animation. How can I do this from script? I tried using

Code: Select all

ExplodedAssembly.runAnimation(start=0, end=2)
Unfortunately this didn't work, because the animation doesn't stop and plays to the last part. What is the correct function call for this?
JMG
Posts: 288
Joined: Wed Dec 25, 2013 9:32 am
Location: Spain
Contact:

Re: Exploded assembly animation

Post by JMG »

Hi. :)

The command needs a small modification:

Code: Select all

ExplodedAssembly.runAnimation( start=8, end=10, mode='toPoint' )
Start and end are the positions of the animation groups counting from the last element in the exploded assembly folder. If you have 10 animation groups and only want to run the first two, the configuration is start=8, end = 10.

Try the above command in the example file provided.

Javier.
FreeCAD scripts, animations, experiments and more: http://linuxforanengineer.blogspot.com.es/
Open source CNC hot wire cutter project (NiCr): https://github.com/JMG1/NiCr
Exploded Assembly Workbench: https://github.com/JMG1/ExplodedAssembly
therman
Posts: 2
Joined: Fri Aug 26, 2016 8:12 am

Re: Exploded assembly animation

Post by therman »

Thanks, in the meantime I figured that out However I'm not sure why it is counted from the end, rather than from the beginning. Anyways, I wrote a function that asks for the start index, end index and the number of animations, and calls your function with the correct parameters.

And to show my appreciation to you, I'd like to show you the video I was able to create with your workbench:
https://youtu.be/zMzEMR8Gdp8

I'm part of the team that develops the possible second Hungarian satellite, SMOG-1 and I created this demo video to show the build up of the device.
The animation was purely run by python script, including the Exploded Assembly functions.

Thanks!
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Exploded assembly animation

Post by microelly2 »

nice to see this.
JMG
Posts: 288
Joined: Wed Dec 25, 2013 9:32 am
Location: Spain
Contact:

Re: Exploded assembly animation

Post by JMG »

therman wrote: And to show my appreciation to you, I'd like to show you the video I was able to create with your workbench:
https://youtu.be/zMzEMR8Gdp8

I'm part of the team that develops the possible second Hungarian satellite, SMOG-1 and I created this demo video to show the build up of the device.
The animation was purely run by python script, including the Exploded Assembly functions.

Thanks!
That's big project! I am really happy to know that my workbench has been of some use for it :)

Big thanks for sharing.
You also gave me a idea for a future implementation: vanishing.

Regards.
Javier.
FreeCAD scripts, animations, experiments and more: http://linuxforanengineer.blogspot.com.es/
Open source CNC hot wire cutter project (NiCr): https://github.com/JMG1/NiCr
Exploded Assembly Workbench: https://github.com/JMG1/ExplodedAssembly
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Exploded assembly animation

Post by triplus »

therman wrote:And to show my appreciation to you, I'd like to show you the video I was able to create with your workbench:
https://youtu.be/zMzEMR8Gdp8
Looking good.
Post Reply