MeshTextureCoordinates

Returns the normalized 2-D texture coordinates of a mesh object.  

Syntax

Rhino.MeshTextureCoordinates (strObject)

Parameters

strObject

Required.  String.  The identifier of a mesh object.

Returns

Array

An array of 2-D points that define the texture coordinates of the mesh if successful.  Each 2-D point is normalized, that is, each coordinate component ranges in value between 0 and 1.  The number of elements in the array will be equal to the value returned by MeshVertexCount. In which case, the array will identify the texture coordinate for each vertex return by MeshVertices.

Null

If the mesh does not contain texture coordinates, if not successful, or on error.

Example

Const rhObjectMesh = 32

Dim strObject, arrTextures, arrTexture

strObject = Rhino.GetObject("Select mesh", rhObjectMesh)

arrTextures = Rhino.MeshTextureCoordinates(strObject)

If IsArray(arrTextures) Then

For Each arrTexture in arrTextures

Rhino.Print CStr(arrTexture(0)) & "," & CStr(arrTexture(1))

Next

End If

Also See

MeshHasTextureCoordinates

MeshVertexCount

MeshVertices