pyblenderSDIC.meshes.TriangleMesh3D.from_vtk#

classmethod TriangleMesh3D.from_vtk(filename: str) TriangleMesh3D[source]#

Create a TriangleMesh3D instance from a VTK file.

This method reads the mesh data from a VTK file and creates a TriangleMesh3D instance. This method uses the meshio library to read the VTK file and extract the vertices and triangles.

from pyblenderSDIC.mesh import TriangleMesh3D

# Create a TriangleMesh3D instance from a VTK file
mesh = TriangleMesh3D.from_vtk("path/to/mesh.vtk")

See also

from_meshio() for creating a TriangleMesh3D instance from a meshio object and more details about the meshio structure.

Parameters:

filename (str) – The path to the VTK file.

Returns:

A TriangleMesh3D instance created from the VTK file.

Return type:

TriangleMesh3D