PDA

Click to See Complete Forum and Search --> : Stacking boxes


Dean_Southgate
Sep 18th, 2000, 03:15 PM
Hi,

I'm not a good programmer but a good beginner, I have VB version 4.

I would like to draw an unditermind number of rectangles onto the form and be able to turn them one at a time, to stack them.
Basically the program is to demonstrate the way stock is stacked onto a pallet in the warehouse. I would then like to put the dimensions of the box into the program and have it work out the cube, Ti * Hi etc....

I have recently done one program where the user enters the dimensions but is unable to turn any of the boxes so it's no different to how we are working at the moment.

Any one help ??

Thanks
Dean

[Edited by Dean_Southgate on 09-18-2000 at 04:17 PM]

PaulLewis
Sep 19th, 2000, 10:22 PM
I have heard of programmes to do this in the commercial world as it is very important (as you know) when dealing with limited space and seemingly unlimited cargo or goods.

There are alot of complexities in doing this if you're needing the computer to optimise the positions for you. If it is just the user on the mouse changing things, then it is not hard at all.

Assumptions:
- All boxes can be turned (rotated) through the vertical axis only. In other words, you can't tip boxes upside down.

- Boxes may not be stacked on one another

If these assumptions are OK then you only need worry about the 2D view as you have stated.

If nobody else answers in a day or so, email me and I can see what I can do to help. This sounds like a classic problem solving scenario that almost any University Graduate would have tackled at some point. Unfortunately, I didn't bother with Uni so I wouldn't know..hehe ;)

Regards

PaulLewis
Sep 20th, 2000, 08:10 PM
Just to see if it will work for you.

I suspect having gone through the mental process of modelling the problem, that the real life situation is that the boxes CAN be stacked, and that weight is also a factor. That is, heavy boxes should not go on top of light boxes ... Of course, then you would start thinking about construction material of the boxes and it all gets very complex.

I hope the sample I sent you is useful.

Regards