Grasshopper

algorithmic modeling for Rhino

Hello, 

I have a basic question about Grasshopper. How do you divide a list of data into different branches? I would like to divide the list of 7 items into groups of 2 items. 

Views: 8238

Attachments:

Replies to This Discussion

shown for Numbers. List data can be anything you want.

Attachments:

I see, but how would you divide it in groups of "n" items? Would it be with the Stream Gate command? I don't know what you have to input in the "G" input of that command. Thank you. 

Jesús

yes, stream gate lets you dispatch to more than two lists. The G is the pattern where to put the input list items to.

Default is two outputs and a pattern of 0,1. The pattern gets repeated. This is exactly what dispatch does by default.

If you have stream gate with three outputs, the stream gate needs a pattern of 0,1,2.

For larger groups better look into the PathMapper component. It can do all that in one single component but needs some more knowledge of the tree/path concept and the path syntax.

Thanks again Hannes. I'll do a search on the Internet to see if I can find a manual about Grasshopper's logic components.

Though from what I have found already I was wrong: Stream Gate actually works like a railway switch, i.e. input data is allowed to flow only to one output parameter. Maybe it's the PathMapper component you listed the one I'm looking for.

Jesús

StreamGate works the same way I have shown above. You get, say 4 different lists. You graft thos lists and put them back together. You end up with a 4th of the original list length branches and 4 list items in each branch...

This is how the same thing looks with a path mapper.

Wow cool. Now I can finally continue with my work. Thx

how can i control de N number of group with a Slider ?

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