Scale to centerpoint

'''
''' Scale to centerpoint of a boundingbox
''' —-

Function scaleAll (arrObject, xScale, yScale, zScale)

Dim strObject, dblDistance, strOffsetDirection, arrCenterPoint, arrBBox,tempLn

' loop through each curve and offset
For Each strObject In arrObject
' get centerPoint

arrBBox = Rhino.BoundingBox(arrObject)

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

Call Rhino.AddPoint (arrCenterPoint)
Call Rhino.DeleteObject(tempLn)
' scale object
Call Rhino.ScaleObject (strObject, arrCenterPoint, array(xScale,yScale,zScale))
Next

End Function

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