Sharp3DBinPacking icon indicating copy to clipboard operation
Sharp3DBinPacking copied to clipboard

List of cuts for guillotine

Open Fikri-coder opened this issue 5 years ago • 4 comments

Is there any way to get list of created cuts for guillotine, steps or similar?

Fikri-coder avatar Jan 23 '21 14:01 Fikri-coder

This library doesn't support creating cut paths, but you could calculate them from merge the borders of boxes (or areas). Or modify the algorithm to record cuts if you only use guillotine.

303248153 avatar Feb 04 '21 02:02 303248153

Yes. I already thought about. Also, there is no possibility to use different sizes of bins?

Fikri-coder avatar Feb 04 '21 06:02 Fikri-coder

Yes. I already thought about. Also, there is no possibility to use different sizes of bins?

For now this is unsupported, but you could modify BinPackParameter and BinPacker to make it possible, for example, change

public decimal BinWidth { get; private set; }
public decimal BinHeight { get; private set; }
public decimal BinDepth { get; private set; }
public decimal BinWeight { get; private set; }

to

class BinAttributes {
  public decimal BinWidth { get; set; }
  public decimal BinHeight { get; set; }
  public decimal BinDepth { get; set; }
  public decimal BinWeight { get; set; }
  public int MaxNumber { get; set; }
}

List<BinAttributes> Bins { get; private set; };

and make BinPacker respect the MaxNumber.

https://github.com/303248153/Sharp3DBinPacking/blob/master/Sharp3DBinPacking/BinPacker.cs#L27


If performance is not that important, you could also use result.BestResult.Take(x) to take the first x bins, and then pass result.BestResult.Skip(x).SelectMany(c => c) as remain cuboids with a new BinPackParameter.

303248153 avatar Feb 10 '21 03:02 303248153

After some time I am still interested in this project. I would like to use guillotine only. My only request is to record guillotine cuts and to use different sizes of bins as I wrote before. :)

Fikri-coder avatar Mar 03 '22 19:03 Fikri-coder