Grouping colliding objects

Is there a way to group colliding object? Let’s say a set of simple boxes. If some of the collide, then put them on a separate branch?

Can’t find the Divide Branches component

Set tab > Tree > Divide Branches

Nope… Is it part of the Treesloth plugin?

don’t think so, but you can also just dispatch?

or yes I guess haha

I know, I can but it is not doing the job. Also yes, Divide Branches is part of Treesloth. None of them do this.

DivideBranches.gh (17.8 KB)

The idea is we have any set of geometry, and if some objects collide with each other they go on separate branches.

got you, thought you were splitting colliding from non-colliding as in

as in any set however they’re placed or like what you have on your file:

I see three groups of objects all objects in each group colliding

I use a trick usually, creating bounding boxes, then projecting them on the XY plane, extracting the curve, use region union to create a boundary of a sort for each group, then if the center point of the object is within that boundary it sorts it on the corresponding branch. However if the geometry is more complex this method fails short. So I though there maybe is a way of doing this in a better way.

Yes in this example we should have 3 groups.

This is what I do, but it is a shitty trick and in certain conditions it fails.

Trick.gh (21.0 KB)

maybe this :slight_smile:


groupcolliding.gh (37.8 KB)

sorry no need for the bounding box

Nope…

I can kind of make it work, the only issue with my method is if there are objects which are on top of each other but not colliding.

this

different from this

so? aren’t they already separated from the ones colliding?

Here is an example of what I want to do. Any kind of geometry must be separated into groups of coliding objects. That’s all I want to do. If 2,3,5, 100 objects are colliding, or colliding in a chain for example, then put them on a separate branches.

With my method now, my only limitation is if the objects are on top of each other but not actually colliding. However my method is clumsy and heavy.

Example.gh (31.6 KB)

Like this