Reversing curve point order in Grasshopper

Hi. I am new to scripting in Grasshopper and I am currently involved in an exercise to create a seemingly simple polygon-like shape, by drafting open curves in Rhino, adding them to curve containers in Grasshopper, and offsetting and lofting the original and the offset curves by joining them. The point order of some of the curves reverses and it cross lofts or the offset itself fails. I am a novice when it comes to Grasshopper, therefore, I have attached the script and a sample model of what I am trying to achieve. The sample model was a


relatively simple exercise and did not involve as many components.
0.1_DraftedSections.3dm (189.6 KB)
0.1_DraftedSections.gh (53.7 KB)

If I understand…
Could you use the Set/Reverse List component. You could obviously pic the offender out with a Set/List Item component.

Also there is a Flip Curve component, which I think flips a curve from end to end.

Also, they can also be sorted for say X, by using the Deconstruct Point component, and then the list could sorted using Set/Sort List.

1 Like

Not sure this is what you want, anyway check this…


0.1_DraftedSections_re.gh (76.9 KB)

1 Like

Thank you for the guidance and the script. It helped so much.
Just one more question, is there a way to add more curves to the entwine component? Because after adding a few more curves, the loft starts to fail. It says the Null profile curve was removed and the Solution exception: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index.
I tried adding various components but I am not able to figure it out. I have attached the rhino file and the
0.4_DraftedSections_re.gh (24.9 KB)
script.
0.4_DraftedSections.3dm (214.5 KB)


0.4_DraftedSections_reV2.gh (28.4 KB)

1 Like

The script came through. Thank you so much for the help.