Join independent polygons simultaneously

Hi guys.
My question is, how can I join polygons
simultaneously without overlapping each other.
Any idea is appreciated.
Thank you!!

Hi, this can be solve by either collision or packing, Kangaroo2 has an example file that shows how 2d collision works and by using some forces for attraction to keep the geometries together. This, I believe is the only real way, because 2d packing of polygons in polygon is not possible, but for rectangles is “easier”(some painful nights).
The only plugin ready version is using Kangaroo but “Ratpack” has a 3d implementation for the boxes in box packing.