Closed zhang-qiang-github closed 2 years ago
There are many tools to create a tetmesh (eg TetGen), vedo can also do it:
from vedo import Tube, Sphere, show
surf = Sphere(quads=True, res=15)
# surf = Tube([(0,0,0), (1,1,1), (2,3,4)], res=15)
tmesh = surf.tetralize(side=0.025, debug=True)
#tmesh.write('mytetmesh.vtk') # save to disk!
show(tmesh.tomesh().alpha(1), axes=1)
check also https://github.com/marcomusy/vedo/blob/master/examples/volumetric/tetralize_surface.py
Thank you very much ~~~
For tmesh.tomesh()
, how to set alpha=0
for face, but alpha=1
for all lines? In this way, I want to see only the line.
use .wireframe()
instead.
thx~~~
Please have a look at following picture:
If I have a 3D vessel surface (the black), how to construct the inside tetrahedron just like the red color.