Mesh split and disassemble/assemble animation
See original GitHub issueHi @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()
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:
- Created 2 years ago
- Comments:35 (16 by maintainers)
Top GitHub Comments
This is cool.
Yes except of
tetgen
andpymeshfix
I also found thatpygalmesh
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 👍
It should - if it doesnt load in vedo you may use
meshio
package and then pass it to vedo, check outexamples/other/pygmsh_cut.py