Used lower value priority bins first.
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
|
||||
public double Length { get; set; }
|
||||
|
||||
public int Priority { get; set; }
|
||||
/// <summary>
|
||||
/// Lower value priority with be used first. Default to 25
|
||||
/// </summary>
|
||||
public int Priority { get; set; } = 25;
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace SawCut.Nesting
|
||||
{
|
||||
var bins = Bins
|
||||
.Where(b => b.Length > 0)
|
||||
.OrderByDescending(b => b.Priority)
|
||||
.OrderBy(b => b.Priority)
|
||||
.ThenBy(b => b.Length)
|
||||
.ToList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user