Filtering or sorting list of curves based on Z value

Hello,
I have a rectangle in XZ plane and have four perimeter curves of it. I just want its bottom curve as ashown in picture.

h3

I have a list (with start point and end point ) of curves as seen. I tried if somehow i could get a curve that has least Z value for both Start point and end point and that means it is the bottom curve. A curve which has at a time least z value for both start and end point.

h1

What i want is the bottom curve of the rectangle. I tried alot by sorting and filtering via function and keys but could not do it. Any help is appreciated

extract the Z-value of each point by using the Point.Z node, now you can filter

You might put a point in the mid point of each curve and then get the minimum value of Z list, get it’s index and get the corresponding item from the curves list.

1 Like

Hey Marcel !!
I cant use this method though it is doing what i want. Firstly, i wanna complete the coding and then dont wanna make changes everytime just run it and do my task. Here, i have to manually input the value of Z. Most of times the min value of Z is not 0.

This seems promising and gonna try it. Thanks

1 Like