Used lower value priority bins first.

This commit is contained in:
AJ
2022-02-09 11:22:56 -05:00
parent 4427cde20d
commit b65dd1ec7d
4 changed files with 108 additions and 105 deletions

View File

@@ -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;
}
}

View File

@@ -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();