File: splitmesh.py

package info (click to toggle)
vedo 2025.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 10,404 kB
  • sloc: python: 64,792; javascript: 1,932; xml: 437; sh: 139; makefile: 6
file content (10 lines) | stat: -rw-r--r-- 316 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
"""Split a mesh by connectivity and
order the pieces by increasing surface area"""
from vedo import dataurl, Volume, show

em = Volume(dataurl+"embryo.tif").isosurface(80)

# return the list of the largest 10 connected meshes:
splitem = em.split(maxdepth=40)[0:9]

show(splitem, __doc__, axes=1, viewup='z').close()