20060929
Species Diagram (Bronx Zoo)


Dim i Dim arrNumb, iStart, iFinish, iStep Dim IterationLayer, LayerCount Dim moveaxis, arrmovenum, arrmoveinc, moveob arrNumb = Rhino.GetInteger ("Number of Iterations", 10)
iStart = Rhino.GetReal ("Start Value?", 1)
iFinish = Rhino.GetReal ("End Value?", 10) moveaxis = Rhino.GetString ("Axis to move objects? (click on option)", "x", Array("x" , "y" , "z")) arrmoveinc = Rhino.GetReal ("Units to move objects", 20)
iStep = (iFinish / arrNumb) LayerCount = 0 arrmovenum = 0
For i = iStart To iFinish Step iStep LayerCount = LayerCount + 1 Rhino.AddLayer "IterationLayer " & CStr(LayerCount), RGB(255, 0, 0) CheckLayer("IterationLayer " & CStr(LayerCount))
Rhino.command "mathsurface", i moveob = ObjectsByLayer ("IterationLayer " & CStr(LayerCount)) 'Rhino.Print(CStr(moveob(0)))
If moveaxis = "x" Then Rhino.MoveObject moveob(0), Array(0,0,0), Array(arrmovenum,0,0) Else If moveaxis = "y" Then Rhino.MoveObject moveob(0), Array(0,0,0), Array(0,arrmovenum,0) Else If moveaxis = "z" Then Rhino.MoveObject moveob(0), Array(0,0,0), Array(0,0,arrmovenum) End If End If End If arrmovenum = arrmovenum + arrmoveinc Next Rhino.Print("Increment Count is " & CStr(iStep))
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Function CheckLayer(layername) If Rhino.IsLayer(layername) Then Rhino.CurrentLayer(layername) Else Rhino.AddLayer(layername) Rhino.CurrentLayer(layername) End If End Function
.: Jonas 8:01 PM
|