Grasshopper

algorithmic modeling for Rhino

Hi, 

I have 3 planes on their own branches "x".

I would like to duplicate each planes five times (so 3 branches of 5 items) but I always end up with a data structure of the 5 branches of 3 items...

Dim myTree As New DataTree (Of plane)
Dim i As Int32

For i = 0 To 4
Dim path As New GH_Path(i)
myTree.Add(x, path)
Next


A = myTree

Any help would be appreciated

Regards

Views: 342

Replies to This Discussion


Dim tree As New DataTree (Of Plane)
For i As Int32 = 0 To 2
  For j As Int32 = 0 To 4
    tree.Add(x, New GH_Path(i))
  Next
Next

The outer loop run 3 times and iterates over the branches, the inner loop runs 5 times and creates 5 planes in each branch.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

Thank you so much for helping!

I still try to figure out how to only have five items per branch (not 3x5) so it would match the input structure.

Or in this case one item per branch...

Regards

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service