Remove commented-out sanity check code in MultiBinEngine

This commit is contained in:
AJ
2025-10-01 23:26:30 -04:00
parent b8612f72d7
commit 2869daf4f7

View File

@@ -35,35 +35,6 @@ namespace SawCut.Nesting
result.ItemsNotUsed = remainingItems; result.ItemsNotUsed = remainingItems;
// sanity check
//var itemsNested = result.Bins.SelectMany(b => b.Items).ToList();
//var lengths = items.Select(i => i.Length).Distinct();
//foreach (var length in lengths)
//{
// var nameLengthGroups1 = items.Where(i => i.Length == length).GroupBy(i => i.Name).ToList();
// var nameLengthGroups2 = itemsNested.Where(i => i.Length == length).GroupBy(i => i.Name).ToList();
// foreach (var group in nameLengthGroups1)
// {
// var name = group.Key;
// var nestedWithSameName = nameLengthGroups2.FirstOrDefault(g => g.Key == group.Key);
// if (group.Count() != nestedWithSameName.Count())
// {
// throw new Exception("Failed sanity check.");
// }
// }
// if (nameLengthGroups1.Count() != nameLengthGroups2.Count())
// {
// throw new Exception("Failed sanity check.");
// }
//}
return result; return result;
} }
} }