How would I go about creating new groups each time a connected primitive goes through the loop?
For example:
I have these tubes with smaller spheres scattered on them.

Each time I go through a connected primitive for loop I would like the smaller spheres to be grouped based on the overlapping tube. It cant be done from the points they were scatted from as the input geometry is going to only primitives in the real situation.
I've had quite a bit of struggle understanding where to even start.
I'm guessing it would probably go through a connected primitive loop but seeing as the group sop can only do volume or bounding box input to group points and verts it's not so useful here. Unless there is someway to find the rest of the connected primitive from just a single point?
The other thing is I don't know how to create new groups based on the for loop iteration. Would this be done with an attribute wrangle? “iteration” supposedly returns the integer value of which iteration it is on right?
Here is where I'm stuck:


