When using the weave tool to order multiple lists together, Is there a way to stop the output as soon as one list runs out? currently the empty lists are just skipped, and my pastern gets messed up.
Thanks
-Ben
Hello
I don’t think there’s a component for that, here is a way calculating for each stream the last acceptable index, taking the minimum among all streams, and cutting the final list at that point.
C# would probably be a less component-expensive solution.
LastAcceptableItem.gh (10.1 KB)
If you right-click on the Weave component and check Insert nulls
it put nulls in the output at positions where the correcponding input stream has been depleted.
Then you just have to split the weave output list at the first null to get your desired result.
Edit: forgot to upload file.
weave_input_depleted_221128a.gh (9.5 KB)
@magicteddy I’m not sure why, but your solution skips the last 2 items in the list.
-Kevin
The request was to stop weaving as soon as one of the streams goes empty, which is what I did.
Your solution stops weaving as soon as a null item should be added, which allows for other non-depleted streams to be used a little more.
The Insert Nulls option is quite nice, I didn’t know that !
Yes you’re right, guess I didn’t read it closely enough.
-Kevin
Cool thanks for the ideas everyone!