Sorting tree to get topmost points from each branch

OK, so I have a group of points coming out from a component (11 groups with points) and I want to extract the topmost (z) point from each of the groups. The end goal is to run the 11 points through the FitLine component as to determine the “inclination” of the topmost points of the point groups.

I figured that I would sort the points group-wise based on their Z-values, but I don’t know how that is done properly on this dataset.

Fig 2. Eleven point groups grouped in “cylinder like columns”

Two different results is desired: 1. Single topmost points from each group, and 10 topmost points from each group.

Find Topmost Point In Each (38.7 KB)

// Rolf

Something like this?

Find Topmost Point In Each Branch_MG (78.8 KB)

Ps. if you just want the last point (hightest) you don’t need to reverse the list you can just put -1 in the item component. I only reversed the list because it made getting the top 10 easier.


Yes, this is exactly what I wanted.

Many thanks!

// Rolf