tetmesh¶
Support for tetrahedral meshes.
TetMesh¶
-
class
vedo.tetmesh.
TetMesh
(inputobj=None, c='r', 'y', 'lg', 'lb', 'b', alpha=0.5, 1, alphaUnit=1, mapper='tetra')[source]¶ Bases:
vtkRenderingCorePython.vtkVolume
,vedo.base.BaseGrid
The class describing tetrahedral meshes.
-
decimate
(scalarsName, fraction=0.5, N=None)[source]¶ Downsample the number of tets in a TetMesh to a specified fraction.
- Parameters
Note
Setting
fraction=0.1
leaves 10% of the original nr of tets.
-
slice
(origin=0, 0, 0, normal=1, 0, 0)[source]¶ Return a 2D slice of the mesh by a plane passing through origin and assigned normal.
-
delaunay3D¶
tetralize¶
-
vedo.tetmesh.
tetralize
(dataset, tetsOnly=True)[source]¶ Tetralize any type of dataset. If tetsOnly is True will cull all 1D and 2D cells from the output.
Return a TetMesh.
Example
from vedo import * ug = loadUnStructuredGrid(datadir+'ugrid.vtk') tmesh = tetralize(ug) tmesh.write('ugrid.vtu').show(axes=1)