pyFM.viz.to_polydata¶
- pyFM.viz.to_polydata(mesh=None, vertices=None, faces=None, scalars=None)¶
Convert a mesh to a
pyvista.PolyData.The mesh is given either as an object exposing
.vertices(n,3) and.faces(m,3), such as aTriMesh.- Parameters:
mesh (object exposing
.verticesand.faces. Takes precedence over the) –vertices/facesarguments.vertices (np.ndarray - (n,3) vertex coordinates, used when
meshis None)faces (np.ndarray - (m,3) triangle indices, used when
meshis None. If None, a) – point cloud is built.scalars (np.ndarray - (n|m,) scalar values or (n|m,3) RGB values in [0,1].) – Stored under the name
"scalars".Output
------------------------------
pv_mesh (pyvista.PolyData)