Could you tell me how do I initialize triangular mesh based on np array with coordinates of vertices and np array with triangles (it contains triples of indices of vertices from first array)?
Could be done in VTK or any other Python library, the final goal is to do decimation on this mesh.
Thank you.
A solution using vedo
which is based on vtk:
https://github.com/marcomusy/vedo/blob/master/examples/basic/buildmesh.py
from vedo import Mesh, show
verts = [(50,50,50), (70,40,50), (50,40,80), (80,70,50)]
faces = [(0,1,2), (2,1,3), (1,0,3)]
# (the first triangle face is formed by vertex 0, 1 and 2)
# Build the polygonal Mesh object:
mesh = Mesh([verts, faces])
#mesh.decimate()
show(mesh)