pyblenderSDIC.meshes.TriangleMesh3D.triangle_normals#

property TriangleMesh3D.triangle_normals: ndarray | None#

Get the normals of the triangles in the mesh.

The normals are computed as the cross product of the edges of each triangle. The normals are represented as a NumPy array of shape (M, 3), where M is the number of triangles.

See also

The method compute_triangle_normals can be used to compute the normals if they are not already computed.

Warning

This property uses numpy.asarray on the internal triangle_normals array. As a result, any modification to the returned or setted array directly affects the mesh data. To avoid unintentional updates, assign a copy instead.

Returns:

A NumPy array of shape (M, 3) representing the normals of the triangles in the mesh. If not computed, returns None.

Return type:

Optional[numpy.ndarray]