question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mesh split and disassemble/assemble animation

See original GitHub issue

Hi @marcomusy,

I have a mesh which I would like to split in a random number of sub-meshes as you do in this example but without discarding any parts. If you see in the image below at the current state some of the parts after the split are removed and only 40 pieces are kept.

import vedo as vd

em = vd.Volume(vd.dataurl + "embryo.tif").isosurface(80)
splitem = em.splitByConnectivity(maxdepth=40)#[0:9]

vd.show(em, "Before", at=0, N=2, axes=1)
vd.show(splitem, "After", at=1, interactive=True).close()

image

Is there a flag for the maxdepth= parameter to consider the complete initial mesh? Ideally I would like the complete mesh to be split in 40 (or whichever number is given each time) pieces.

Thereafter, I would like to create a kind of animation similar to this one where I move each part aside in the space (or as an inventory list on a side pane) and then put them again together giving this assemply/disassemply outlook. Is there any example which I could follow? If not how easy would that be to do it with vedo?

Thanks.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:35 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
ttsesmcommented, Mar 8, 2022

This is cool.

Yes except of tetgen and pymeshfix I also found that pygalmesh can be used as well. I do not know if Octree from vtk can also be used instead, I saw some people mentioning about it for such a task.

Now I need to figure out how to get smoother fragmentations, I will play a bit with the parameters to see if I can optimize the cutting part.

Thanks a lot 👍

1reaction
marcomusycommented, May 11, 2022

It should - if it doesnt load in vedo you may use meshio package and then pass it to vedo, check out examples/other/pygmsh_cut.py

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I make an animation of mesh pieces assembling ...
Place your tiles in their final position. Go to the last frame of the animation, select all the tiles, set a keyframe (...
Read more >
Deforming meshes that split and merge - ACM Digital Library
Highlights of our results include merging of viscoplastic materials with complex geometry, a taffy-pulling animation with many fold and merge events, and ...
Read more >
Assemble & Disassemble | IronCAD Tutorial
Create useful groups of parts to simplify and speed up design. General 3D Modelling Assembly. Disassemble.
Read more >
Approximate Convex Decomposition and Transfer for ...
Our algorithm splits animated meshes into temporally coherent parts with tight bounding hulls. Different levels of detail arise naturally from the formulation ...
Read more >
Origami - aescripts + aeplugins
Origami is the procedural mesh generation and animation tool for After Effects. Create stunning effects like unfold and organic growth in a few...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found