Deforms objects toward or away from a specified axis.
Rhino.StretchObject (strObject, arrStartPoint, arrEndPoint, arrStretchPoint[, blnCopy]]])
Rhino.StretchObject (strObject, arrStartPoint, arrEndPoint, dblLength [, blnCopy]]])
Rhino.StretchObject (arrObjects, arrStartPoint, arrEndPoint, arrStretchPoint [, blnCopy]]])
Rhino.StretchObject (arrObjects, arrStartPoint, arrEndPoint, dblLength [, blnCopy]]])
strObject |
Required. String. The identifier of the object to deform. |
arrObjects |
Required. Array. An array of strings identifying the objects to deform. |
arrStartPoint |
Required. Array. The starting point of the stretch axis. |
arrEndPoint |
Required. Array. The ending point of of the stretch axis. |
arrStretchPoint |
Required. Array. The new ending point of of the stretch axis. |
dblEndRadius |
Required. Number. The new length of of the stretch axis. |
blnCopy |
Optional. Boolean. Copy the object. If omitted, the object(s) will not be copied (False). |
String |
The identifier of the deformed object if successful. |
Array |
An array of strings identifying the deformed objects if successful. |
Null |
If not successful, or on error. |
Dim strObject, arrStart, arrEnd, dblDistance
strObject = Rhino.GetObject("Select object to stretch")
If Not IsNull(strObject) Then
arrStart = Rhino.GetPoint("Start of stretch axis")
arrEnd = Rhino.GetPoint("End of stretch axis", arrStart)
dblDistance = Rhino.Distance(arrStart, arrEnd)
Rhino.StretchObject strObject, arrStart, arrEnd, dblDistance * 1.5, False
End If