Calculates the volume centroid of closed surface or polysurface objects.
Rhino.SurfaceVolumeCentroid (strObject)
strObject |
Required. String. The object's identifier. |
Array |
An array of volume centroid information if successful. The array will contain the following information:
|
|||||||||
Null |
If not successful, or on error. |
Const rhObjectPolySurface = 16
Dim strObject, arrMP
strObject = Rhino.GetObject("Select a surface", rhObjectPolySurface)
If Rhino.IsPolySurfaceClosed(strObject) Then
arrMP = Rhino.SurfaceVolumeCentroid(strObject)
If IsArray(arrMP) Then
Rhino.AddPoint arrMP(0)
End If
End If