This is just a theoretical question. I think it's very probably that someone is already faced this problem before, and should be plenty of known algorithms to solve it. More than a concrete answer to my problem, I would be grateful if someone could give me some general idea where to start investigating.
The problem is very simple. I need to implement a function which has to receive 6 parameters. These parameters represent the dimension (width, length and height) of 2 objects: a box and figure. The problem is simple to explain, the function has to return true if the figure could be packed inside that box.
It may seem simple but it's not. It's not enough to compare if width_box >= width_figure. You can rotate the figure, incline it a few degrees in some direction... Also if the box is too big, the figure could "fly" inside the box.
I thought to compare them using their areas but it's not a good solution. See this example, despite of area_box=area_figure, you can't put that figure on that box.
Box: {Width:1, Lenght:1, Height: 10}
Figure: {Width:2, Lenght:5: Height:1}
As i said before, i don't pretend to answer me with a sample code. I think it has to be a common problem in assembly lines. Do you know any library, module, function or algorithm to solve my problem?