(Script at the end!)
Hi everyone, I’m trying to take an arbitrary list of points, select any inside of a group of curves (the number of curves being dynamic) and then select the point with the lowest z value for each group of points within a curve.
I see that the point in curves node has an output so that each point has the index of the curve it used to select the points. My understanding of data structure in grasshopper is a little shaky, but I believe the best way to accomplish this is to somehow use that value to restructure the list of points into a tree where branch 0 has all the points enclosed by curve 0, branch 1 all the points eclosed by curve 1, etc etc… I could then find the lowest z value of each branch of the tree, and it would update dynamically as I add or remove selection curves. But previously every time I make a data tree it followed pretty intuitively from whatever group of commands I just ran, I’m struggling to figure out how to create one based on my own parameters.
In these screenshots, you can see the progress I’ve made so far:
Orange is the curve I select from the entire list, but I would also like to be able to select the blue point without manually having to adjust the script for each curve I use to select. Below is the output I imagine will be helpful from the InCurves node
Thank you in advance if anyone is able to assist!
Grasshopper Forum Export.gh (10.4 KB)






