Need help creating a reverse list order for points

Good day people,

I am seeking for help in reversing the point order of my component

As shown in the image below, when the slider is at 0, the left side of the line shows the highest point (middle) and at 1 it shows the lowest point (left)

However I would like to come up with a reversed order for the right side whereby when the slider is at 0, the right side of the line will show the highest point and vice versa at 1

Slider at 0: (Shows the highest point of the line)

Slider at 1: (Shows the lowest point of the line)

Thanks in advance!

H to L reversing point order.gh (11.0 KB)

Dear losthopper,

Please do not use plugins here. We (at least I :wink: ) do not have/want them installed, just for checking a file. Most of the time there are regular components to do the same.
Internalise the data what is needed to use the file.

Now I have to guess:
Output of Area; rightclick and check “Reverse”

regards, Eef

Dear Eef,

My apologies, however the geometry I am working with happens to be from the plugin and I can’t seem to internalise the required data for export..

I did your guess but got the points in the middle instead of the ends of the line.

The best you can do (then we do not need to install plugins):
rightclick on the brep and choose internalise data.
Save and send that file.

Thank you Eef!

H to L reversing point order.gh (436.1 KB)

Here is the latest file with internalised data

the index one is not the end of the list - so reversing the list does not bring it to the start
I am not sure what you want 0 does show the highest point.
how about sorting the list by the Z (or y?) values of the points?
sorting_by_zValue_jvs.gh (433.5 KB)

1 Like

Hi Jakob,

Well my end product ideally would be to sort the geometry in Y axis followed by X.

With the control of the highest and lowest points of each geometry.

Currently the Tree Branch component is set at 43, however I am figuring out how to make it 1 instead and when it slides to 2 it will be the geometry above it in the Y-axis.

And for the points of geometry 1, I would like to have it whereby the point identifier slider is at 0 it will be on the lowest point and when it’s at 1 it will be the highest (middle) and the other way round for the geometry 2 (above geometry 1 in the Y axis/right in the image uploaded)

Attached an example on how to select the two points you need for your slider.
This works on 1 branch.
Seeing what @Jakob_v_Schirmeister made, using the Z- height is better then what I did with distance.

H to L reversing point orderEW.gh (445.5 KB)

1 Like

check it out
the points will from higher to lower based on the slope
and i think u want the center line for the profile to match the criteria
if u u can look into the code


H to L reversing point order_RP00.gh (838.5 KB)

Wow thank you @Jakob_v_Schirmeister @Eef_Weenink @rajeev_pulari

I am still really new to GH and I am still trying my best to understand each of your solutions.

I will take the time looking into each of them and hopefully integrate into my canvas, once again thank you for your time!

sorting_by_x-y-z_jvs.gh (439.7 KB)

1 Like