Problem with selecting every other curve/list sorting

I’m trying to divide the curves I have into two lists, selecting every other curve in relation to the Z direction. The reason I don’t think I can use dispatch is because there are multiple curves with the same Z value, which I would like to be treated as one position in the list. For some reason that is not happening, and it seems the list positions are still jumbled up. I just cannot figure out what I am missing or doing wrong here…


every other curve_HELP.gh (36.4 KB)

Please internalise your curves.

Oh, sorry. Here:
every other curve_HELP.gh (1.8 MB)

how did you get those curves? :slight_smile:

I guess you had some kind of intersection with planes/XY surfaces? having also that part of the definition might make things very much easier

1 Like

That’s right, I intersected a mesh with multiple planes… Here’s it again with that part:
every other curve_HELP.gh (2.0 MB)

Maybe I should add, I baked the curves because I needed only some of the curves of the manual intersections, and deleted the unwanted ones once baked. So the curves I am working with are not entirely the same as the output of the intersections, if that makes sense.

I internalized the results of the Linear Array and Mesh | Plane intersection. which was already organized, making it easy to get every other branch.


every other curve_2021_Jun28a.gh (1.7 MB)

Now what’s this about “deleted the unwanted ones”?

P.S. Adding Prune cleans it up by ignoring the fragmented bottom row.


every other curve_2021_Jun28b.gh (1.7 MB)

Thank you so much.

In your solution, only the intersections created by the array are used — where the base geometry domes, the lines grow further apart from one another. Because of that, I manually added intersections that roughly maintain the same distance from one another. By doing so, the planes obviously cut the entire base geometry, but I only need the curves in certain areas. So I baked and deleted the curves that I do not need.
I also deleted the curves of the array intersections which were in place of the manual ones.


That manual process apparently has errors (duplicate curves?), leading to a GIGO situation.

In fact, I do have another question — since I baked the curves before using them again, do errors in the Grasshopper definition still matter?

Baking is unnecessary. This version combines and sorts all the values you created and uses CullPt (Cull Duplicates) before doing the mesh intersection. There is a tolerance slider…


every other curve_2021_Jun28c.gh (251.0 KB)

Version ‘D’: using Mesh | Plane intersection.


every other curve_2021_Jun28d.gh (251.6 KB)

Thank you so much for your help. I figured it out, and it was a really stupid overcomplication on my part — all it took was removing the list sorting.

Your words, not mine. :wink: Is your final solution as simple as my last post?
Don’t break your arm patting yourself on the back (“Solution”). :sunglasses: