Forgot password?

Create an account!

Forum

« back

RhinoScript – how to store data and get them later?

Messages

Please log in to write a message.

  • 2. hare14 (Nov 11, 2009 13.29):

    Hi,

    are you sure you want to create 20*20*20 cones?

    Call Rhino.AddCone(Array(xPos,yPos,0),Array(xPos+xDistr,yPos+yDistr,10), cRad, True) ' will give tilted tips

    Call Rhino.AddCone(Array(xPos,yPos,0),Array(xPos,yPos,10), cRad, True) ' will give straight up tips

    good luck

  • 1. archloxx (Nov 11, 2009 12.46):

    hey all

    am new to programing, and new to this website :) and i thank you in advance for your help,

    so here is what i wanna do, i want to create a bunch of cones, where the base of these cones are distributed in a Grid fashion, while the tips are distributed in another way... i have every single equation i need

    but once i put them all together, the for loops are not creating the shape it should create...

    so i need to make a for loop for the tip,
    and two for loops for the base,
    and the ask rhino to add cones....

    but it seems i cant tell rhino to get the data "correctly from the first For loop" where all the tips are pointing to one point, while theoretically, they should point each one individually to somewhere else according to xDistr and yDistr

    Call ConeGrid()
    Sub ConeGrid
        Dim items
        items = 20
        Dim i,j,k,r
        Dim xPos, yPos
        Dim cRad
        Dim xDistr, yDistr
        cRad = 5
       
    'a loop for the tip
        For i = 0 To items
          r = i * Sin(i)
          xDistr = r * 1 * Cos(i)
          yDistr = r * 1 * Sin(i)
       
    'two loops for grid like base    
        For j = 0 To items
          For k = 0 To items
           
          xPos = cRad * 2 * j
          yPos = cRad * 2 * k

    'xDistr and yDistr are all pointing at one point only
          Call Rhino.AddCone(Array(xPos,yPos,0),Array(xDistr,yDistr,10), cRad, True)  
            Next
          Next
        Next
    End Sub
Recommend

Why are these buttons gray?