pysdic.triangle_3_mesh_from_open3d#
- triangle_3_mesh_from_open3d(mesh, internal_bypass=False)[source]#
Create a
Mesh(element_type= “triangle_3”) instance from an Open3D TriangleMesh object. (Only for 3D embedding dimension meshes \(E=3\))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:
- Returns:
A
Meshinstance containing the mesh data.- Return type:
- Raises:
TypeError – If the input mesh is not an Open3D TriangleMesh object.
ValueError – If the mesh is empty.
See also
pysdic.triangle_3_mesh_to_open3dFor converting a
Meshinstance to an Open3D TriangleMesh object.
Example
Reading a mesh using Open3D and converting it to a
Meshinstance:1import open3d as o3d 2from pysdic import Mesh, from_open3d 3 4# Read the mesh from a file 5o3dmesh = o3d.io.read_triangle_mesh("path/to/mesh.ply") 6 7# Create a Mesh instance from the Open3D object 8mesh = from_open3d(o3dmesh)