MeshVertexNormals

Returns the vertex unit normal for each vertex of a mesh object.  

Syntax

Rhino.MeshVertexNormals (strObject)

Parameters

strObject

Required.  String.  The identifier of a mesh object.

Returns

Array

An array of 3-D vectors that define the vertex unit normals of the mesh if successful.  The number of elements in the array will be equal to the value returned by MeshVertexCount. In which case, the array will identify the unit normals for each vertex return by MeshVertices.

Null

If the mesh does not contain vertex normals, if not successful, or on error.

Example

Const rhObjectMesh = 32

Dim strObject, arrNormals, arrVector

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

arrNormals = Rhino.MeshVertexNormals(strObject)

If IsArray(arrNormals) Then

  For Each arrVector in arrNormals

    Rhino.Print CStr(arrVector(0)) & "," & CStr(arrVector(1)) & "," & CStr(arrVector(2))

  Next

End If

Also See

MeshHasVertexNormals

MeshVertexCount

MeshVertices