Mesh

class rhino3dm.Mesh
Mesh()

Mesh constructor

IsClosed

bool: Returns True if every mesh “edge” has two or more faces.

HasCachedTextureCoordinates

bool: Will return True if SetCachedTextureCoordinates has been called; otherwise will return false.

HasPrincipalCurvatures

bool: HasPrincipalCurvatures

Vertices

Collections.MeshVertexList: Gets access to the vertices set of this mesh.

TopologyEdges

Collections.MeshTopologyEdgeList: Gets the object associated with this mesh. This object stores edge connectivity.

Faces

Collections.MeshFaceList: Gets access to the mesh face list.

Normals

Collections.MeshVertexNormalList: Gets access to the vertex normal collection in this mesh.

VertexColors

Collections.MeshVertexColorList: Gets access to the (optional) vertex color collection in this mesh.

TextureCoordinates

Collections.MeshTextureCoordinateList: Gets access to the vertex texture coordinate collection in this mesh.

PartitionCount

int: Number of partition information chunks stored on this mesh based on the last call to CreatePartitions

static CreateFromSubDControlNet(subd, includeTextureCoordinates)

Create a mesh from a SubD control net

Returns:

mesh representing control net on success, None on failure

Return type:

rhino3dm.Mesh

IsManifold(topologicalTest)

Returns True if every mesh “edge” has at most two faces.

Returns:

True if the mesh is manifold, False otherwise.

Return type:

bool

ClearTextureData()

Removes all texture coordinate information from this mesh.

Return type:

void

ClearSurfaceData()

Removes surface parameters, curvature parameters and surface statistics from the mesh.

Return type:

void

DestroyTopology()

Removes topology data, forcing all topology information to be recomputed.

Return type:

void

DestroyTree()

Destroys the mesh vertex access tree.

Return type:

void

DestroyPartition()

Destroys mesh partition.

Return type:

void

SetTextureCoordinates(tm, xf, lazy)

Set texture coordinates using given mapping and applying given transform.

Set lazy to False to generate texture coordinates right away.

Parameters:
  • tm (TextureMapping) – Texture mapping

  • xf (Transform) – Transform to apply to the texture mapping

  • lazy (bool) – Whether to generate lazily (true) or right away (false)

Return type:

void

Compact()

Removes any unreferenced objects from arrays, re-indexes as needed and shrinks arrays to minimum required size.

Returns:

True on success, False on failure.

Return type:

bool

Append(other)

Appends a copy of another mesh to this one and updates indices of appended mesh parts.

Parameters:

other (rhino3dm.Mesh) – Mesh to append to this one.

Return type:

void

CreatePartitions(maximumVertexCount, maximumTriangleCount)

In ancient times (or modern smart phone times), some rendering engines were only able to process small batches of triangles and the CreatePartitions() function was provided to partition the mesh into subsets of vertices and faces that those rendering engines could handle.

Returns:

True on success

Return type:

bool