View Single Post
  #6   Report Post  
Robert Bonomi
 
Posts: n/a
Default

In article ,
Rob V wrote:
Doh! Major brain fart - Tnx for the help.
Nothing like over thinking things.

(BTW - the reason for the brain fart is when I do poker tables - to get the
most use of 1 sheet of ply - I have to nest 2 archs together (think about
facing C's) so I can get the rail and the mounting peice from 1 piece of
ply.)
So for what ever reason I had the nesting thing on my mind.

But that still would be a kewl feature to have in cad.


"kewl feature", yes. "practical", no, unfortunately. That particular
problem has been studied _a_lot_. There aren't even any algorithms known
(short of try every thing in every possible arrangement), to find a best-fit
solution.

If you want to play with a 'trivial' illustration of the problem, there is
a game called "pentominos" twelve pieces, made by combining 5 1x1 squares.
thus, the total 'area' of those pieces is 60 square units. They *can* be
assembled into a rectangle that is 3x20. Care to guess how many possible
arrangements have to be checked to find the solutions (yes, there is _more_
than_one_solution_)?

And _that_ is with only four possible orientations of each piece allowed.

Add in 'irregular' shapes, and possible 'non-orthagonal' orientations, and
the 'magnitude' of the problem increases immeasurably.

A 'closely related' matter, in the realm of pure math, is known as the
'knapsack problem'. "big-money" commercial cryptography systems have been
built around the difficulty of finding a 'perfect' fit for a bunch of
pieces into a larger container, *given*that*you*know* that a perfect fit
_is_ possible. Trying to find a 'best' (not perfect) fit, when you don't
know *if* a perfect fit exists, is a much more time-consuming problem.
(If you find a perfect fit, you can stop searching, that is guaranteed to
be the 'best' fit. if you don't find that perfect fit, you have to check
_every_possible_ combination, to figure out which is 'best'.)