pysdic.triangle_3_mesh_to_open3d#
- triangle_3_mesh_to_open3d(mesh, legacy=False, uvmap=True)[source]#
Convert the
Mesh(element_type= “triangle_3”) instance to an Open3D TriangleMesh object. (Only for 3D embedding dimension meshes \(E=3\))If
legacyisTrue, the method returns a legacy Open3D TriangleMesh object. Otherwise, it returns a T geometry TriangleMesh object.Warning
For now, the method only converts the vertices, triangles, and UV map (if available) to the Open3D mesh. The other properties stored in the
Triangle3Meshinstance are not transferred.- Parameters:
- Returns:
An Open3D TriangleMesh object containing the mesh data.
- Return type:
Union[
open3d.t.geometry.TriangleMesh,open3d.geometry.TriangleMesh]- Raises:
TypeError – If the input mesh is not of type “triangle_3”.
ValueError – If the mesh is empty or not 3D embedding dimension.
See also
pysdic.triangle_3_mesh_from_open3dFor converting an Open3D TriangleMesh object to a
Meshinstance.
Examples
Converting a
Meshinstance to an Open3D TriangleMesh object:1import open3d as o3d 2from pysdic import Mesh, to_open3d 3 4# Create a Mesh instance 5mesh = Mesh(vertices=..., connectivity=...) 6 7# Convert the mesh to an Open3D object 8o3dmesh = to_open3d(mesh)