Flip Curve Direction in a Group of curve segments

I am trying to get all the curves to have the same direction.



I need for them to remain a group of separate curves.
I can’t use list item to manually select the curves going in opposite directions because the overall form will be interchangeable, and I do not want to have to change the list item every time.
2023.07.25_ForForum_SG.gh (6.7 KB)

give me some time here to try and figure this one out. :slightly_smiling_face:
I have a guess.


2023.07.25_ForForum_SG_r0.gh (9.7 KB)

1 Like

Just tried it and unfortunately no… the referenced curve’s vectors were all going the same direction unlike the directions of the curves I posted above. Thanks for the tip anyways.

Hmm Don’t have an answer… You could try finding the negative vector values. then flipping the corresponding curves. Thats the best I have with the time I have. Sorry.


2023.07.25_ForForum_SG_r0.gh (12.1 KB)

I hope you don’t expect anyone else to replicate your code from an image?

I’m not confident that this method is robust, but it works with the test geometry provided.


SG_2023_Jul25a.gh (14.4 KB)

2 Likes

This is a more serious effort to solve the problem as stated, though it would answer many questions if a series of test geometry were provided instead of just one example. This solution could quickly be shown as inadequate with different geometry.


SG_2023_Jul25b.gh (11.8 KB)

5 Likes

This works great with the interchangeable forms I am using, thanks.