Howto: stack objects onto each other without intersections

I’d like to stack about 10-12 different existing objects onto each other, as in the real world, as close as possible, but without intersections …

How’d I get there?

Kangaroo Mesh Collision.
However the solution may not be very tight. It’s a NP-hard (I believe it’s between NP-Hard and NPC) question after all.

1 Like

I actually wouldn’t recommend the kangaroo mesh collision for this.
What are the solids like? Do they need to rotate, or is the stacking just translation?

mostly, or all, tubes. They should all fall down on the ground (0) and on each other and keep its position (needs to have friction, I suppose).

possibility to re-arrange is a plus.

Ah, in that case, it might be possible with Kangaroo, not using meshes, but the ‘Collider’ goal which can take lines as input and treat them as solid cylinders.

1 Like

As it’s first-time use, does anyone have a newbie primer?

Here’s an example of stacking some cylinders:
cylinder_pile.gh (22.0 KB)
It’s without friction though, so might not be suitable for your application.