Create list of distinct distances between points and count

At the bottom of the attached definition, I’m trying to both count and measure the distinct distance between points in an irregular grid (minus a certain setback). I think I should have roughly 3n connections but I can’t seem to make that happen. I’m then sorting those distances, but that part I have figured out, though I’m sure there’s a cleaner solution.

Surface to ball placement.gh (50.2 KB)


I don’t understand what/where you want to do :slight_smile:

Fair enough. Near the bottom of the definition, I am trying to:

  1. measure the distance from all points to the nearest (maximum 6) surrounding points

  2. find and count the distinct distances

  3. take that set, including any duplicates, and sort it into the given lengths

Simplifying a Grasshopper network