Hi Vincent,
Check out this Distance Threshold CHOP that another guy named Vincent made:
[url]Distance Threshold Cplusplus CHOP (plexus-like effects) - #4 by vinz99]
There’s a second post if you scroll down a little that has an added feature for a value that limits the number of connections per point. I believe the source code is included as well if you would like to modify it.