Finding the corner points

Thank you.
But I have another question which is more important now, I have a set of points which are arranged in the X direction in a list and in the Y direction in another list and I want to collect each 4 points of these lists together to produce a surface between each 4 points. In Conclusion, Each 4 corners of each rectangle should have a surface between them. Any help will be appreciated.

Generally speaking questions which are as unrelated as this shown to be should be asked in new topics. I have split this topic accordingly. Be sure to mark any solutions you are given to both topics.

Ignore the Y ordered list which was created by the Transpose function - you only need the corner points once.

From the X ordered list, grab the first and Last sublist from the list of lists. You can use List.First and a List.Last node and then A List.Join node to join them together into a single list, or use a code block which is something like Lst[[0,DSCore.List.Count(Lst)-1]];.

From there you can get the first and last item from each sublist - that is use the same techniques noted above but use @L2 on the List.First and List.Last nodes. You’ll also likely need to use a List.Transpose node after the join node to keep things grouped. You may also want a List.Reverse node to produce a ordered sequence you can build a rectangle from.