pyblenderSDIC.meshes.TriangleMesh3D.vertices#
- property TriangleMesh3D.vertices: ndarray#
Get or set the positions of the mesh vertices.
The vertex coordinates are stored in the
vertices
attribute of the mesh and have shape (N, 3), where N is the number of vertices.# Get the vertices coordinates vertices = mesh.vertices # shape (N, 3) # Set the vertices coordinates mesh.vertices = new_vertices mesh.vertices[5, 0] = 42 # The 6-th vertex's x-coordinate is set to 42
Warning
This property uses
numpy.asarray
on the internalvertices
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.- Parameters:
value (numpy.ndarray) – A NumPy array of shape (N, 3) representing the coordinates of N mesh vertices.