CenterPoint 2D
'
' Generates a Bounding Box and generates the CenterPoint of each of the objects in the ground surface
'
' IN: arrobject - Array of object
' OUT: arr CenterPoint - Center Points
'
Function centerpoint (arrobject)
Dim arrCenterPoint, arrBBox
Dim i
For i = 0 To UBound(arrObject)
arrBBox = Rhino.BoundingBox(arrObject(i))
arrCenterPoint = Array((((arrBBox(2)(0)) + (arrBBox(0)(0))) / 2), (((arrBBox(2)(1)) + (arrBBox(0)(1))) / 2), (((arrBBox(2)(2)) + (arrBBox(0)(2))) / 2))
Call Rhino.AddPoint (arrCenterPoint)
Next
End Function
page_revision: 2, last_edited: 1220440548|%e %b %Y, %H:%M %Z (%O ago)





