Example #1
0
 public CuboidDiagonal(PackingPosition myPosition, PackingShape myShape)
 {
     x1 = myPosition.X;
     y1 = myPosition.Y;
     z1 = myPosition.Z;
     x2 = myPosition.X + (myPosition.Rotated ? myShape.Depth : myShape.Width) - 1;
     y2 = myPosition.Y + myShape.Height - 1;
     z2 = myPosition.Z + (myPosition.Rotated ? myShape.Width : myShape.Depth) - 1;
 }
 private static int GetResidualMerit(Tuple <int, int, int> rs, PackingItem item, PackingPosition ep)
 {
     return((rs.Item1 - item.Width) +
            (rs.Item2 - item.Height) +
            (rs.Item3 - item.Depth));
 }