I have a 3D grid of separate closed meshes (see attached file).
My goal is to scale them up uniformly from their centers to increase their volume, but they must stop growing when they touch neighboring meshes without intersecting.
Did you also post this same question under a different user name? Please avoid posting duplicates.
This isn’t really the sort of problem where you’d use Kangaroo. As it is a single parameter search you could set it up like this and just adjust the slider until there are no intersections: scaleup.gh (3.1 MB)
I internalised your geometry so people don’t need plugins to open it
Thank you for your reply and suggestion. I actually tried simple scaling as you mentioned, but as you can see in the attached picture, it doesn’t achieve what I’m aiming for. Some parts start intersecting, while many others don’t even get close to each other. That’s why I want to use Kangaroo — so that when two geometries touch, they stop growing, while the rest continue expanding until all parts just touch each other. I hope this clarifies what I’m trying to achieve.
@Daniel Piker also I’m sorry for posting the same question under two accounts — that wasn’t my intention. I appreciate you pointing it out, and I’ll make sure not to do it again.
Thank you for your file and explanation — I really appreciate the time you took to set it up.
However, I think there may be a small misunderstanding. My issue is not simply how to scale up the closed meshes — I can already do that. The problem is that with uniform scaling (even using Anemone + Clash), some meshes start intersecting while others are still far from touching.
What I’m trying to achieve is slightly different: I want each mesh to grow until it touches its neighbors, and once contact happens, that specific growth direction should stop, while the rest continue expanding until all parts are in contact — but without any intersections at any stage.
So it’s more like a controlled expansion with collision response, rather than just finding a global scale factor that minimizes clashes.
I hope this clarifies the goal a bit better. Thanks again for your help.
There is no misunderstanding there. My algorithm does exactly what you described, it scales each mesh until it collides with any other mesh in the list. Pay closer attention to the contents of gh files. Second script has intersections you are showing on the screenshot because it uses coarse mesh, i gave it as an example of a workaround to make algorithm work faster. If you need exact scaling you can use original mesh. Also it outputs steps of scaling for each mesh, in case you need to stop before the intersection. And it has input for steps, and scale factor, so you can regulate precision. Pay closer attention and you will find everything