CenterPoint 3D

'
' Generates the centerpoint of a object with a bounding box
'
' IN: arrObject - Array of the Objects
' OUT: arrCenterPoint - Array of the Center Points
'
Function centerpoint (arrObject)

Dim arrCenterPoint, arrBBox, tempLn

arrBBox = Rhino.BoundingBox(arrObject)

tempLn=Rhino.AddLine(arrBBox(0),arrBBox(6))
arrCenterPoint=Rhino.CurveMidPoint(tempLn)

Call Rhino.AddPoint (arrCenterPoint)
Call Rhino.DeleteObject(tempLn)

End Function

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License