Grasshopper

algorithmic modeling for Rhino

REQUEST: Multiple index on Stream Gate OR Additional outputs on Dispatch AND Create Tree Subsets

I can't tell you the number of times I have had to hack a workaround to allow a list to be split into multiple lists based on an index number.  

1) Imagine that the Stream Gate allows multiple index values.

OR

2) Imagine the Dispatch component allowing you to add more outputs and use a pattern of any number of index values (0-5, for instance, directing data to one of 6 outputs).  This is probably the better option, since the corrolary Weave component already functions this way.  It is unfair to the Dispatch component to only allow two inputs!!!

ALSO

As a companion, it would be very nice to have a similar component that creates new tree substructures instead of physically splitting the list into different outputs.  Example:

INPUTS

INPUT L

{0}

A

B

C

D

{1}

X

Y

Z

INPUT I

{0}

0

2

1

2

{1}

1

5

0

OUTPUT

INPUT L

{0;0}

A

{0;1}

C

{0;2}

B

D

{1;0}

Z

{1;1}

X

{1;5}

Y

Thanks,

Marc

Views: 3497

Replies to This Discussion

Haven't tested it on too many cases... But this seems to do the trick for your latter request. Naturally the input trees have to match in structure exactly. Let me know if you find a case where it breaks down. Will probably be including this in my upcoming set of utilities... I have a number of other path-manipulation tools that it might be nice to wrap up together. 

Attachments:

Also for the first problem, it's not a beautiful one-component solution and it won't respect your original data trees, but for simple cases it works. 

Attachments:

Thanks! This is exactly what I want.

"Will probably be including this in my upcoming set of utilities..."

Very much looking forward to see these, Andrew!

Best,

Phillip

 

Agree: currently I use this, but who knows how long it will last for. http://www.grasshopper3d.com/profiles/blogs/manual-of-tree8-list-ma...

Hi Marc,  Have any of the new path components in 0.9 helped with the path sorting problems you wrote about in the post above?  I haven't had enough time to explore 0.9 completely yet, but I hope to figure out a simple solution to a very similar problem of sorting list items into defined/ named categories.

Hi Tyler et. al.

As mentioned above, I'm working on a set of utilities, some of which extend GH's ability to deal with Paths. Here is a pre-release copy of "Treefrog" (hasn't been taken yet has it?) which includes 2 components for manipulating paths, along with a GH definition that demonstrates their capabilities. "Graft By Data" does much the same as the above script, adding an additional level of branching based on input data. The other component allows you to assign arbitrary path structures to a flat list of data.  As far as I know this does not replace functionality in tree8 although I'm not certain.

I know that these work with v9 and I think they also work with v8 but I'm not 100% sure.

Attachments:

Great and very useful for us pathpedants.

Thanks for sharing.

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