Forgot password?

Create an account!

Forum

« back

RhinoScript – Flow control

Messages

Please log in to write a message.

  • 3. arazace (Jun 16, 2011 17.34):

    aaaah
    sorry,..
    u know i'm an absolute beginner!!

    ThnxX a lot for your help,

    Araz

  • 2. Johannes (Jun 16, 2011 09.09):

    hi,
    sorry... but there is total disorder.
    1. start declaring your variables (dim x,....)
    2. define a 1-dimensional array (redim arrPoints(Ubound(arrCurves)))
    3. go through the first loop an divide each curve (arrPoints(i) = Rhino.Div...)
    4. go through the second nested loop

    For i = 0 to Ubound(arrCurves)
    For j = 0 to Ubound(arrCurves(i))
     'code
    Next
    Next

    johannes

  • 1. arazace (Jun 16, 2011 00.52):

    hi;
    i wanted to know how i can manage these nested array, .. i wanna
    join the division points of one curve to anther , (just as a test), but the code
    doesn't work i don' know why,.. actually the 2-dimensional array doesn't work..
    (please select 2 open curves as the code asks!)
    Thnx


    [ DivideforPoly
    Sub DivideforPoly
    Dim arrCurves : arrCurves = Rhino.GetObjects ("pick curve",6, True, True)
    Dim i, j
    For i=0 To UBound(arrCurves)
    Dim arrpoints : arrpoints = Rhino.DivideCurve(arrCurves(i),5)
    Next

    For j=0 To UBound(arrpoints)

    Call Rhino.AddLine (arrpoints (i)(j),arrpoints (i+1)(j))
    Next


    End Sub ]

Recommend

Why are these buttons gray?