Grouping Geometries based on proximity


I’m bringing in certain geometries as .3dm files that all follow a certain pattern. They all have a random number of geometries that are in distinct groups. I want a grasshopper script that can take all the geometries at once and sort them into a certain data structure I require.

The sorts of geometries will look like this:

In this example there a 4 distinct groups of geometries. I want these groups to be sorted into 4 distinct branches on a tree. There could be any number of distinct groups, but will always be more than 1 geom in a group.

I’ve manually shown what the output from the grasshopper script would need to be:

Here is the .3dm file and the GH script pictured.

Example geometries to be grouped.3dm (384.3 KB)
Grouping Geometries based on (14.0 KB)



Here is one option:
Grouping Geometries based on (6.5 KB)


Thanks! that works really well for what I need! I wasn’t aware of point groups - works great

1 Like