pyblenderSDIC.meshes.TriangleMesh3D.triangle_areas#

property TriangleMesh3D.triangle_areas: ndarray | None#

Get the areas of the triangles in the mesh.

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

See also

The method compute_triangle_areas can be used to compute the areas if they are not already computed.

Warning

This property uses numpy.asarray on the internal triangle_areas 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,) representing the areas of the triangles in the mesh. If not computed, returns None.

Return type:

Optional[numpy.ndarray]