Forgot password?

Create an account!


« back

RhinoScript – Nested arrays


Please log in to write a message.

  • 2. Hanno (Aug 26, 2011 12.46):

    Hi ledisnomad,

    are you still struggling, or is this one solved?
    The script excerpt looks fine to me - are you sure you don't have any NULLs in your array? Maybe try an array_print to check for that...


  • 1. ledisnomad (Aug 17, 2011 20.39):

    I'm struggling with nested arrays. I'm creating a script that creates an eggcrate structure for laser cutting a surface. I know there are scripts out there I could download, but I'm doing it from scratch to learn.

    I have a function called CreateRibs, that ends like this:

                    arrLoft = Rhino.AddLoftSrf(Array(arrContourCrvsV(j),arrProjectedCrvV(0)))
                    ReDim Preserve arrRibsV(i)
                    arrRibsV(i) = arrLoft(0)
            Call Rhino.DeleteObject(strPlanarSrf)
            Ribs = Array(arrRibsU, arrRibsV)

    Then I'd like to intersect the objects in arrRibsU with those in arrRibsV. If I use the IntersectBreps method like this:

    Call Rhino.IntersectBreps(Ribs(0)(i),Ribs(1)(j))

    It gives me an error on the InstersectBreps line that a string is required. I thought Ribs(0)(i) would reference the lofted surface from above. What am I missing?


Why are these buttons gray?