Option Explicit 'Script written by Russell Loveridge 'Script copyrighted by Call Main() ' this script makes the box tower, but while copying the objects up, it also rotates them incrementally to create a twisting form. Sub Main() Dim strObject, StrObject2, dblSize, intDir, i, intCount, dblpos, dblRot strObject = Rhino.GetObject( "Select an object to move" ) If IsNull(strObject) Then Exit Sub dblSize = Rhino.GetReal("floor height?", 2) dblRot = Rhino.GetReal("What degree of rotation between levels?", 10) If (VarType(dblRot) = vbNull Or (dblRot <= 0)) Then Exit Sub intDir = Rhino.GetInteger("Twist???: No=0, CW=1, CCW=2", 1, 0, 2) ' this time the intDir value is used to determine the direction of rotation.... ClockWise:CW or CounterClockwisw :CCW ' The flip condition will rotate first in one direction, and then in the other... intCount = Rhino.GetInteger("how many copies?", 20) If (VarType(intCount) = vbNull Or (intCount <= 0)) Then Exit Sub ' we can use the user input value and multiply it by a random factor between 0 and 1. For i = 1 To intCount dblpos = (i*dblSize) If intDir = 0 Then Rhino.CopyObject strObject, Array(0,0,0), Array(0,0,(dblpos*1.1)) ElseIf intDir = 1 Then ' rotate in CW direction Rhino.CopyObject strObject, Array(0,0,0), Array(0,0,(dblpos*1.1)) strObject2=Rhino.LastObject Rhino.RotateObject strObject2, Array(0,0,0), (-1*(dblRot*i)) ' rotate uses the parameters of ROTATE - identifier, center of rotation point, angle of rotation in this case it is negative for the clockwise rotation direction. Else ' rotate in CCW direction Rhino.CopyObject strObject, Array(0,0,0), Array(0,0,(dblpos*1.1)) strObject2=Rhino.LastObject Rhino.RotateObject strObject2, Array(0,0,0), (dblRot*i) End If Next End Sub