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!
User avatar
YCStone_
Posts: 26
Joined: Fri May 06, 2016 3:10 am
Location: Xiamen - CHINA
Contact:

Re: Exploded assembly animation

Post by YCStone_ »

therman wrote: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!
Hi Therman
can you share to us your animation code
much appreciated - thanks!
YC Stone Natural Stone Supplier
ikua
Posts: 159
Joined: Fri Apr 07, 2017 1:32 pm

Re: Exploded assembly animation

Post by ikua »

Awesome Workbench!

But i could not find a way to export a video file from the animation. Is there a known way?

Edit:
Found a good solution. Downloaded OBS screen record tool. Unlocked drawing window and put it on my second monitor. Started the recording and afterwards started and ended recording from my first monitor.
dajomu
Posts: 2
Joined: Mon Jan 13, 2020 12:15 pm

Re: Automatic Exploded assembly

Post by dajomu »

Hi,

I have posted another thread regarding automatic exploded view and I was told thatFreecad has Workbench.
I guess you already know about the Paper I refer to, nbit still I would like to mention it still. What do uou think about this and is it possible to implement in Workbench?
See link to thread below.

https://forum.freecadweb.org/viewtopic.php?f=8&t=42403
User avatar
funkysod
Posts: 26
Joined: Fri Sep 08, 2017 2:01 pm
Contact:

Re: Exploded assembly animation

Post by funkysod »

This workbench is just awesome.. thanks!
EDIT: Made a small demo of one of my models. https://youtu.be/tG0rRqtcxbg
Attachments
m8_608_pulley_exploded_assembly.fcstd
(124.96 KiB) Downloaded 71 times
Last edited by funkysod on Fri Jan 24, 2020 7:58 pm, edited 2 times in total.
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Exploded assembly animation

Post by chrisb »

Is there any written documentation beyond the examples?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
tolap
Posts: 1
Joined: Tue Apr 14, 2020 6:30 am

Re: Exploded assembly animation

Post by tolap »

Hi,
the AlignToEdge function does not work:
Running the Python command 'AlignToEdge' failed:
Traceback (most recent call last):
File "C: \ Users \ Administrator \ AppData \ Roaming \ FreeCAD \ Mod \ ExplodedAssembly \ EAInit.py", line 386, in Activated
va = (edgeA.Curve.EndPoint - edgeA.Curve.StartPoint) .normalize ()
'Part.Line' object has no attribute 'EndPoint'

Can you help me fix the code?

FreeCAD info:
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4 (GitTag)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
alexu
Posts: 30
Joined: Tue Nov 26, 2019 2:14 pm

Re: Exploded assembly animation

Post by alexu »

tolap wrote: Tue Apr 14, 2020 6:42 am Hi,
the AlignToEdge function does not work:
Running the Python command 'AlignToEdge' failed:
Traceback (most recent call last):
File "C: \ Users \ Administrator \ AppData \ Roaming \ FreeCAD \ Mod \ ExplodedAssembly \ EAInit.py", line 386, in Activated
va = (edgeA.Curve.EndPoint - edgeA.Curve.StartPoint) .normalize ()
'Part.Line' object has no attribute 'EndPoint'
I suspect the objects you picked were not the type of objects the developer was expecting. As you found out, the code does not trap exceptions and provide useful messages as to what went wrong.

Exploded Assembly (EA) was written back when FreeCAD had limited or no Assembly tools, so it included a few basic tools of its own. Today I would suggest using one of the assembly workbenches to create your assembly and forego the EA tools. Once you have your assembly, you can use EA to tear it apart in an animated way.

Also note that you should create your explosion on a copy of your assembly. EA creates its own internal list of the starting locations of the objects it moves. if you apply EA to your main assembly file and then subsequently make changes to the assembly that relocates the base position of some objects, EA will be unaware and the animation will probably break.
User avatar
Markymark
Posts: 228
Joined: Sun Nov 03, 2019 4:54 pm

Re: Exploded assembly animation

Post by Markymark »

'
Here: Modify Individual Object Trajectory

ksnip_20200416-093701.png
ksnip_20200416-093701.png (60.35 KiB) Viewed 2039 times

screenshot.png
screenshot.png (19.31 KiB) Viewed 2039 times

I was not able to figure out how this works ... or if this is just broken. I tired several (every) possible way to select object, edge, trajectory ... Find enclosed a very simple example. Trying to modify the trajectory I get the following message:

Code: Select all

Running the Python command 'ModifyIndividualObjectTrajectory' failed:
Traceback (most recent call last):
  File "C:\Users\ADMIN\AppData\Roaming\FreeCAD\Mod\ExplodedAssembly\EAInit.py", line 140, in Activated
    ea.modifyIndividualObjectTrajectory()
  File "C:\Users\ADMIN\AppData\Roaming\FreeCAD\Mod\ExplodedAssembly\ExplodedAssembly.py", line 588, in modifyIndividualObjectTrajectory
    for i in range(len(sel_traj.names)):

'Part.Feature' object has no attribute 'names'
Any hints?

Thanks in advance! Mark

_________________________________________________
OS: Windows 8.1 (6.3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20311 (Git)
Build type: Release
Branch: master
Hash: 915e551bbb7e3614bc804f1ae1f65027b5432b9f
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Attachments
Exploded_Assembly_Several_Directions.FCStd
(11.64 KiB) Downloaded 50 times
Last edited by Markymark on Thu Apr 16, 2020 11:54 am, edited 1 time in total.
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: Exploded assembly animation

Post by chrisb »

I tend to split this topic or move it completely to Help forum. What do you think?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
kisolre
Veteran
Posts: 4164
Joined: Wed Nov 21, 2018 1:13 pm

Re: Exploded assembly animation

Post by kisolre »

+1
Post Reply