Mesh.from_vertices_and_faces

classmethod Mesh.from_vertices_and_faces(vertices, faces)

Construct a mesh object from a list of vertices and faces.

Parameters
  • vertices (list[list[float]] | dict[int, list[float]]) – A list of vertices, represented by their XYZ coordinates, or a dictionary of vertex keys pointing to their XYZ coordinates.

  • faces (list[list[int]] | dict[int, list[int]]) – A list of faces, represented by a list of indices referencing the list of vertex coordinates, or a dictionary of face keys pointing to a list of indices referencing the list of vertex coordinates.

Returns

Mesh – A mesh object.