Calculates the area centroid of a surface or polysurface object.
Rhino.SurfaceAreaCentroid (strObject [, intFaceIndex])
strObject |
Required. String. The object's identifier. |
intFaceIndex |
Optional. Number. If the object is a polysurface, then the index of the face to query. |
Array |
An array of area centroid information if successful. The array will contain the following information:
|
|||||||||
Null |
If not successful, or on error. |
Const rhObjectSurface = 8
Dim strObject, arrMP
strObject = Rhino.GetObject("Select a surface", rhObjectSurface)
If Not IsNull(strObject) Then
arrMP = Rhino.SurfaceAreaCentroid(strObject)
If IsArray(arrMP) Then
Rhino.AddPoint arrMP(0)
End If
End If