Node in Code - Group Points by distance

Hi there,

I am trying to use the “Group Points by distance” command with ghpython.
The ghcomp.PointGroups manages to order the list of points I am feeding it, however it does not create sub-lists (branches) for each group.

In the image below, the panel on the left is from the ghcomp script, while on the right it is using standard gh components. I would like to do this within ghpython if possible. As the image displays, the script is working well, however I need to have nested lists in order to make any use of the command.

Any advice would be greatly appreciated!


Hi there,

I got exactly the same issue…
If this could be fixed it would be great!



This is fixed in WIP. You need to call the _tree version:

1 Like

Thanks Marcus!

Looks like the same problem surfaced in Rhino7! This time, the module ‘ghpythonlib’ does not have the attribute ‘PointGroups_tree’. Help?!

Same here, I tried to call PointGroups() from Rhino Python but couldn’t get correct result. And PointGroups_tree is not avaliable in Rhino 7 or 8.

Finally I figured out the solution: