How to pick up specific items from a list

I have a list composed of 171 items,I want to pick up 3 of them

List item, I highly suggest too look at this manual before asking more questions (of course just a suggestion, you are free to ask whatever you like) These questions are very basic and easy to know with a little reading and maybe a video or two from here:

1 Like

ps: for beginners they are not basic mainly when I don’t know people around me who know about GH to discuss more and enlarge my skills … so this discourse is like to know more about GH… and I know also that it’s not a do-my-work forum
Anyway you are not wrong @Michael_Pryor

How do you want to pick them? At random? Manually? Through some logic, like maybe the three biggest ones? From the start? Equally spaced?

I want to pick up the open polylines, so I tried to test the closed polylines and dispatch them later.
the solution that I did is like in the image, is it right?

If you want to extract all the open curves from a list, I’d recommend using either the Sift or the Cull Pattern components.

Sift allows you to split apart your data into two (or more) sets, with empty placeholders for the data that isn’t included. For example imagine you have a list of the following curves \{A_c, B_c, C_o, D_o, E_c, F_o, G_c\} where the subscripts indicate whether the curve is closed or open.

Using the Closed component (as you are already), you can convert this list of curves into a list of boolean values, indicating closedness: \{true, true, false, false, true, false, true\}.

If you were to use the Cull Pattern component with those two lists, then the result would be a new list of curves which only contains those curves that are matched up with a true value; \{A_c, B_c,E_c,G_c\}. Of course you can invert your boolean values to get the other curves instead.

Using the Sift component on the other hand, the result would be two lists, one containing all curves associated with true values and the other containing only those curves associated with false values;

\{null, null, C_o, D_o, null, F_o, null\}
\{A_c, B_c, null, null, E_c, null, G_c\}

This is especially useful if you wish to perform some operations on only one of these lists, and then merge them again. The addition of the null placeholders allows Grasshopper to zip both lists back together in the same order as before. This would be difficult to accomplish if you’d used the culling components.


thank you