Grasshopper

algorithmic modeling for Rhino

Hi everyone,

I was thinking about how to make the Dispatch component even more useful.

I found myself in a particular situation where I had to use four of them in a row, and I was wondering if could be possible to change the component definition making possible to customize the number of outputs.

Now Dispatch moves "true" values to A and "False" values to B

INPUT:

L (List to work on) -> 1, 2, 3, 4, 5, 6, 7, 8

D (Dispatch Pattern) -> True, False

OUTPUT:

A (List) -> 1, 3, 5, 7

B (List) -> 2, 4, 6, 8

Could it be possible/useful to modify it so it could dispatch items to several outputs, like:

INPUT:

L (List to work on) -> 1, 2, 3, 4, 5, 6, 7, 8, 9, 0

D (Dispatch Pattern) -> A, B, C

OUTPUT:

A (List) -> 1, 4, 7, 0

B (List) -> 2, 5, 8

C (List) -> 3, 6, 9

maybe I'm missing something and there's already a component with this function... I have been searching on the forum for half afternoon, but can't find anything about it!

Thank you!

Views: 8762

Replies to This Discussion

[Sift Pattern]

I feel so stupid now... :)

Thanks Danny!

(spent half afternoon using something like 7 Cull pattern components to divide a list into 7 outputs... no words :) )

It happens to us all :)

Remember the only stupid question is the un-asked one.

Incidentally you could have done it with the Data Tree Components [Path Mapper] or [Replace Paths]

If it was a regular pattern:

an irregular Pattern:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service