Thank you jorlan and Pilou.

As an illustration of the task I'm trying to optimize see attached image. Resulting image was made by manually placing copy of the circle on the rectangular face. I'm hoping there is a plugin/ruby script to calculate/place maximum possible number of shapes (in this case circles) on given face.

Thank you for your time.

shapes on face1.jpg