Select every 5n th curve

Hi all.

I have random rocated lines.
I have to sort these along the curve and choose every '5n’th lines, like 0, 5th, 10th…

Cause I couldn’t find the way to sort curves along curve, I was going to make intersecting points of the curve and lines >> use ‘sort (point) along curve’ >> pick every 5Nth points using ‘member index’ >> pick lines that intersecting with the 5Nth points.

But the problem is I cannot use MEMBER INDEX for the point list.
What I have is this kind ▼

and I don’t know how to use MEMBER INDEX for this kind of list.

I think I can use it only for this kind of list ▼ , if the items are 1,2,3…

  1. How can I change the list type (1) to (2)?
  2. Is there anyother better way to solve this problem?

Thank you so much!

Make a series, use the count of 5, use the resulting list of numbers as index in a list item component with your lines.

Thanks for your help.

I tried but couldn’t understand. Did you mean the lines >> S? And what should be in N? (I’m just a beginner of GH …)

Nope, I did not say to put any geometry into series. Series makes the numbers for your indices. Step size should be 5. Your lines should be in a list items component. The results of your series should be in in the list items index.

Thanks. I’m trying to, and it’s almost done!
The one problem is the selection doesn’t work for every lines.
I think it’s because the curves list doesn’t be ordered along the rail curve.
Do I need to sort the lines along crv, as I planned at first?

It looks like you just don’t have enough numbers, increase the value of the C input of the Series component.

For sorting the lines you can, get the start point of each line with the end points component. Use the Sort Along Curve component to sort the points. Use the index result of Sort Along Curve in a List Item component with your lines. Then your lines will be sorted along the curve.

wow finally it’s done. so amazing!!! I feel like I have been upgraded for 10 steps in one day with your help. Thank u so much and nice day!

1 Like