Multiple Stream Gate component

Hello folk. Today I was working on a grasshopper script and I noticed that it’s not possible to use stream gate component for multiple inputs as you can see in the error in my photo. is there any way for solving this problem? any suggestion for plugins etc…?

Try the Sift component. You can provide a destination output for each individual value.

3 Likes

Problem is solved. Thank you very much for your prompt answer.

Bests,

Which one is that component? I can´t find it out.

Sets → Lists → Sift Pattern

1 Like

Good afternoon dear All

I have a similar request but the “sift” component does not fulfill my needs.

i need to stream the whole input list to the choosen output but this is the result with sift

is there a component to do this ?

thanks in advance.

Entwine?


could you please elaborate on the problem you are trying to solve, which would require to stream the whole input list to several outputs?

I think there might be different ways to work around that, but I don’t fully get what you are trying to accomplish


sift.gh (7.8 KB)

I’m not sure, but maybe this can help you.

hello dear All

first of all let me apologize for late reply but internet was down for 2 days in my area .

@René_Corella : No entwine does not solve my problem because what i need it not to build a data tree , what i need is to stream a list (A) in more that 1 output at the same time depending on the output selected through index B

( A e B with reference to my above image)

HI @inno

the reason why i need to stream same list to several output is that i need to create a geometry using different logic but starting from the same input data.

I will afterward collect the output resulting from the different logics and mix them again by collecting portion of the output list here and there according to desired mix

hard to show since i haven’t arranged the definition yet but what i need is shown above…it is nothing but a stream component capable of streaming same list in more that one output at the time

nothing too complicate i guess , i just need a component that does that

HI @mahanmotamedi1991 and thanks for taking the time to give it a try

no this is not what i need

what i need is “only” to stream the list on above panel ( the whole list ) to more than 1 output at the same time…lets call it “multistream gate” component …as i said similar to the “stream gate” but capable of streaming same input list to more that one output at the same time

this is the most stupid and fastest thing I could think about, but requires Treesloth plugin and only handles text…

I think a good different way might be to create a data-tree where just the selected branches are populated by all the items in your list, and then Explode Tree to get separate branches

one important point is to create also the -empty- branches that will carry no data (I guess those paths are something like Serie with Count=max(B)+1 in Set Difference with B itself, but it’s pretty late here)

2 Likes

I know it’s a simple ask, so I am pretending I understood :slight_smile:
LoL

Pardon my ignorance: so by ‘multi-stream gate’ component you mean being able to grab the default outputs 0, 1, and 2 (BUT without clicking “+” buttons to add the outputs yourself like you do with the Explode Tree component) to then connect each one into an individual panel (that’s three panels as shown in your picture) where output 0 panel has your letters, output 1 panel has the < empty > mark, and output 2 panel has your letters again?

Pretty much what @inno shows but without an extra step between outputs and panels (in his example, the Split Text component?

Hi @inno and thanks , yes this is the concept i need to use

if your solution would work on list containing any sort of object ( crv, surfaces , Brep etc ) it would be solved, having it to work only with text does not fulfill my needs

yes it makes sense but i still wonder if there is a component that does this wo need to create a dedicated definition , this sort of data maging is something possible and i think that a component
like stream gate should have this option included because i am sure that others will need it.

HI @René_Corella

what i need is exaclty the same that the current stream gate component does

the only major difference is that while stream gate can send data to only 1 output my need is to send input data ( all input data ) to multiple output at the same time, if necessary

i think this should be imcluded to the current stream gate component

this is a VERY PAINFUL proof of concept that uses Trees as mentioned in my earlier post, no plugins

painfully_long_way.gh (15.7 KB)

and this is sort of the equivalent using my limited Python knowledge:

PyGate.gh (9.1 KB)

just notice that depending on the number of possible gates you might have, you’ll need to zoom-in on the Explode Tree component and manually add outputs :upside_down_face:

for instance, let’s say you max(gate) is like 6 or 7 then it’s still manageable

if max(gate) is like 20+ then… good luck :smiley:

1 Like

How is this different from the ‘entwine’ idea where {0} has the letters, {1} is empty, and {2} has the letters again then you output that to one panel or explode the tree to three panels? LoL I wish I were smarter :laughing:

Is the panel with the ‘gate indices’ 0 and 2 needed at all?

Well, now this sounds like any output should output the same input.

Instead of complaining that you didn’t answer the specifics of my question and make you repeat yourself again, I will repeat myself haha: do you want your output in one panel or three panels? Your reference image with desired outcome shows three separate panels…

thanks for you solution @inno , you are very skilled !!!
I want to thank you because both solution and especially the Python version are a great learning opportunity for me.

my python skills are much more limited by here was a solution that i casted tonight , not as elegant and dynamic as your but it works as well.

20240810 stream gate multiple.gh (13.8 KB)

thanks for your support :wink:

the difference is that you need to act on the definition connection and cannot change by using different index and yes , the panel is needed if you want to control the flow on the script by changing the indexes

one list as an input , multiple selectable outputs Renè , just like Inno did. panels were used just for simplicity.

cheers

1 Like