MeshFaceCenters

Returns the center point of each face of a mesh object.  

Syntax

Rhino.MeshFaceCenters (strObject)

Parameters

strObject

Required.  String.  The identifier of a mesh object.

Returns

Array

An array of 3-D points that define the face center points of the mesh if successful.  The number of elements in the array will be equal to the value returned by MeshFaceCount. In which case, the array will identify the center points for each face return by MeshFaces.

Null

If not successful, or on error.

Example

Const rhObjectMesh = 32

Dim strObject, arrCenters, arrPoint

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

arrCenters = Rhino.MeshFaceCenters(strObject)

If IsArray(arrCenters) Then

For Each arrPoint in arrCenters

Rhino.AddPoint arrPoint

Next

End If

Also See

IsMesh

MeshFaceCount

MeshFaces