from_trimesh#
- from_trimesh(mesh: trimesh.Trimesh, *, pass_data: _PassDataOptions = True) PolyData[source]#
Convert a Trimesh mesh to a PyVista mesh.
vertex_attributesare stored as point data.face_attributesare stored as cell data.metadatais stored as field data: NumPy arrays are stored directly as field data arrays, and any other metadata (for example, strings or lists) is stored in theuser_dict.
Note
No copies of point, cell, or data arrays are made. Use
copy()after converting to avoid any side effects.Added in version 0.47.
See Also#
Used In#
Gallery Examples