Flip curves with midpoint to the left or right of some point?

I have a single list of curves. I need to flip half of them. I know that those curves all have a midpoint to the right of the total center (-y in my case).

How do I separate these curves out from the one list I have?

could curve side component be useful here?

lots of ways to do it in Grasshopper, files help in this case.

In Rhino you can grab the curves and type in Flip.

Yes, that’s a good hint. I guess I still need some hints on how selectors/conditionals work in Grasshopper.

I need to keep this in Grasshopper.

curve-flip.gh (89.5 KB)

1 Like

Thank you! I’m trying to understand this right now. The “first number” that you put at 0, really should be the midpoint of the diagonally projected curve that I shatter with, right?

(This makes me wonder if there’s a way to sort a list of curves in ascending z-location order, and then sort a list of points in the same order, and then compare the starting point of the curves with the point at the same index in the list, and if it differs flip it… since I shattered, I have twice as many curves as points, but in this case I could just duplicate the points before I sort them… hmm… tall order for a beginner, but I want to attempt this…) :slight_smile:

So I did it. Once you had introduced me to the larger than and dispatch nodes (really weird name, btw), I managed to solve it pretty quickly:

It’s slightly simplified compared to what I said I was going to do, as I just compare to one point.

Thank you so much for the help!

Do you mean like that

curve-flip_2.gh (89.8 KB)


Wow. That was amazing. Sorry @Rickson, but I have to switch the correct answer to this one. Yours helped me, but this one is so slick! :star_struck:

@anon39580149 how do you draw the white arrows which indicate the direction?

I baked them and use Rhino to show the direction but you can use Grasshopper

1 Like

Fantastic, thanks again!