Rigid body mesh animation

Hi all.

I wonder if anyone had tried to animate compas objects (I’m interested in 3D meshes) and have general recommendation. My motivation is mainly for visualization of an assembly process.

I would like to animate rigid mesh object only, so I’m not getting into updating vertex location etc. I’m interested in rigid transformation only, such as translation and rotation and also tweeting between frames (for example between a number of path planned points).

I’m more familiar with Rhino and Rhino Python doing some redraw() in a cycle, but I wonder if there are other solutions that make more sense. Also if there are already data structures that are designed to deal with trajectory, tweeting, hierarchical parent child animation relationship etc.

Any experience is welcome.

What comes to my mind is to either use a callback function on top of one of the compas_plotters, or a compas conduit in Rhino. In this case, they would encompass the translations/rotations you are referring to.

It should be possible to save an image after each function call, which then would can be packed into a gif or video of your preference.

More information on callbacks and conduits here: https://compas-dev.github.io/main/tutorials/callbacks.html

Hi @arpastrana,

Thanks for your suggestion. Correct me if I’m wrong, you suggest using something like from compas_rhino.conduits import MeshConduit. Will that run faster or is there any other advantage than using MeshArtist.clear and do a redraw?

Victor

Another option is to use Grasshopper, if you create a Rhino mesh and keep a reference to it, you can modify it from other components and it will refresh on the Rhino viewport, so, you could have a component with a timer that updates your animation. (It’s essentially the same as a conduit, but more GH-ish)