pyblenderSDIC.meshes.TriangleMesh3D.from_open3d#

classmethod TriangleMesh3D.from_open3d(mesh: TriangleMesh | TriangleMesh) TriangleMesh3D[source]#

Create a TriangleMesh3D instance from an Open3D TriangleMesh object.

import open3d as o3d
from pyblenderSDIC.mesh import TriangleMesh3D

# Read the mesh from a file
mesh = o3d.io.read_triangle_mesh("path/to/mesh.ply")
# Create a TriangleMesh3D instance from the Open3D object
mesh = TriangleMesh3D.from_open3d(mesh)

Warning

For now, the method only extracts the vertices, triangles, and UV map (if available) from the Open3D mesh. The other properties (normals, centroids, areas) are not extracted and must be computed separately.

Parameters:

mesh (Union[open3d.t.geometry.TriangleMesh, open3d.geometry.TriangleMesh]) – An Open3D TriangleMesh object containing the mesh data.

Returns:

A TriangleMesh3D instance created from the Open3D object.

Return type:

TriangleMesh3D