Grasshopper

algorithmic modeling for Rhino

Hi guys,

 

I've got two "branching" lists and would like to place one below the other in a single list, how could I do that?

 

I hope it makes sense, below are my two lists. Merging the lists doesn't work...

 

regards,

 

Arthur

 

Views: 798

Replies to This Discussion

Arthur,

You should connect the A input of the Merge component directly to the T output of the Simplify component.  Let the Param Viewer float like the lower one.

 

Chris

Thanks Chris,

 

Still getting no separation between the lists though:

 

Hi Arthur,

I've been spinning my wheels here...I missed that you were trying to keep the lists in their own branch.  Apologies..

 

Chris

It works very simply, really. I wanted to keep the existing tree structure so I just changed the paths by adding a 0 or 1 at the beginning of each path. Thus when they are merged, they are in 2 different branches.

By example let say we have trees A and B ,

with paths list ({0,1},{0,2}, ... {0,A})  and ({0,1},{0,2}, ... {0,B})

which would decompose in lists: (0,1), (0,2), ... (0,A) and (0,1), (0,2), ... (0,B)

inserting 0 and 1 and recomposing gives path lists :

({0,0,1},{0,0,2}, ... {0,0,A})  and ({1,0,1},{1,0,2}, ... {1,0,B})

Finally, the Replace branch component just changes the old paths to the new created paths

(search mask=original path, replacement path=new path, so {X}-> {0,X} or {1,X}).

 

Thus when you merge the 2 trees, they now are each in its branch (0 or 1).

 

 

Thank you so much Systemiq ! Very very helpful.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service