Yes, lots of variables. I would expect that placing the biggest pieces first
would be a good start. The grain problem is an issue I hadn't thought about.
Most woodworkers want to have grain going a certain way for pieces and how
they fit together. I tend to buy wood that fits the largest pieces of a
project since that is what is most visible.

On Fri, Sep 10, 2010 at 2:16 PM, Mark Volkmann <[email protected]>wrote:

> I can't share the code I wrote since it was for a client, but I
> suppose I can talk in general terms about the approach. It may not
> interest most people on this list though, which is why I suggested
> that the OP email me privately.
>
> There are a lot of variables to consider such as:
>
> Can the pieces be rotated at any angle, only by 90 degrees or only by
> 180 degrees?
> Rotation restrictions are related to the stock material having a
> "grain" that is significant.
>
> Do you need to leave a gap between the pieces to allow for a cutter
> that will consume some of the material?
>
> Do you have a large number of identical pieces to be cut or do they
> mostly differ in their shape?
>
> When there are lots of identical, non-rectangular pieces, it is useful
> to find an efficient way to arrange a pair of them and then find an
> efficient way to arrange the pairs.
>
> When the pieces vary in their shape and they are not rectangles, it
> becomes an NP-complete problem that I addressed with a set of tunable
> heuristics. My code created multiple candidate layouts using various
> tuning values and keep the smallest layout. Each layout can be created
> in parallel with the others.
>
> It seems to work best to place the largest pieces first and then fill
> in the gaps with smaller pieces.
>
> On Fri, Sep 10, 2010 at 12:59 PM, Robert Casto <[email protected]>
> wrote:
> > Are these proprietary algorithms or can they be shared with the group?
> I'm
> > interested in learning how you would go about it. I'm guessing others
> might
> > be too. Solving problems is the fun part of programming.
> >
> > On Fri, Sep 10, 2010 at 1:56 PM, Mark Volkmann <
> [email protected]>
> > wrote:
> >>
> >> I wrote software like this many years ago. Email me privately to discuss
> >> it.
> >>
> >> Are the pieces rectangular or are they arbitrary shapes?
> >>
> >> On Fri, Sep 10, 2010 at 7:48 AM, TC <[email protected]> wrote:
> >> > I'm re-writing an application that takes x amount of pieces and tries
> >> > to fit them best to the right number and size of stock material. So
> >> > given 2 pieces at one size 1 at a larger size and 3 at a larger size
> >> > find the most efficient cuts from the stock material.
> >> >
> >> > My Problem:
> >> > The way we currently handle this is to calculate linear footage and
> >> > then step through a piece array, twice. Attempting to match the
> >> > footage of the piece to the smallest core we can, along with as many
> >> > other pieces possibly. I would like to optimize this as much as
> >> > possible, and I'm wondering if there is some sort of equation to
> >> > figure this out. I did a few searches but its hard to know what to
> >> > search for.
> >> >
> >> > I apologize for not being able to post code, but its long and messy
> >> > anyways. Any help is appreciated.(Using Java)
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups "The Java Posse" group.
> >> > To post to this group, send email to [email protected].
> >> > To unsubscribe from this group, send email to
> >> > [email protected]<javaposse%[email protected]>
> .
> >> > For more options, visit this group at
> >> > http://groups.google.com/group/javaposse?hl=en.
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> R. Mark Volkmann
> >> Object Computing, Inc.
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "The Java Posse" group.
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to
> >> [email protected]<javaposse%[email protected]>
> .
> >> For more options, visit this group at
> >> http://groups.google.com/group/javaposse?hl=en.
> >>
> >
> >
> >
> > --
> > Robert Casto
> > www.robertcasto.com
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "The Java Posse" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<javaposse%[email protected]>
> .
> > For more options, visit this group at
> > http://groups.google.com/group/javaposse?hl=en.
> >
>
>
>
> --
> R. Mark Volkmann
> Object Computing, Inc.
>
> --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<javaposse%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>
>


-- 
Robert Casto
www.robertcasto.com

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to