Branching structures in Grasshopper / help

Hey guys.

Quick question…

Does anyone know how to do branching structures without having to repeat and copy everything for every level of branches? I’ve been trying to find a way but no luck. There must be a solution where you can just by pulling a slider adjust the number of levels, while the proportions of one unit (four branches) stay the same… Would be much easier and faster to test how strong a structure with multiple levels is compared to one with only one or two…

Below are three pictures, first one shows the entire Grasshopper screen, second one just one component (piped line with set directions) and the third one the result.

Really hope someone can help me.

I hope your work is going great.

Thanks in advance,

Luka

 

1 comment
  1. arthurmani said:

    Hi Luka,

    Thanks for the question on the blog.
    Have you posted the question on the forum (grasshopper3d.com) ?
    It would be better than the blog as you would have access to 20,000 members 🙂

    Regarding the question, have a look at the Rhino Grasshopper Script Wiki:
    http://wiki.mcneel.com/labs/grasshoppergallery
    Scroll down to Rajaa Issa’s solution for trees.

    Grasshopper does not do Loops (unless using Scripting Component or Hoopsnake):
    A loop in programming is a way of repeating a function until a given limit:

    For example (link) a loop to create and rotate ellipses:

    Dim c_list As New list(Of Ellipse)
    Dim P_list As New list(Of Point3d)

    For i As Int32 = 0 To z
    Dim p As Plane = Plane.WorldXY
    p.Rotate(y * i, Vector3d.YAxis, New Point3d(x, 0, 0))

    c_list.Add(New Ellipse(p, i / 2, i))
    p_list.Add(p.Origin)
    Next

    A = c_list
    B = New polyline(p_list)

    Have a look at the GH script primer:
    http://community.nus.edu.sg/ddm/sites/default/files/Grasshopper_VB_Scripting.pdf
    and
    http://cast.ap.buffalo.edu/courses/s11/arc640/?p=789

    Hope this helps,
    Best,

    Arthur

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: