From 6c719f6ca50e082350fec1fec92fbe58db7a1dd7 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Mon, 9 Dec 2024 10:17:06 -0500 Subject: [PATCH] Sort items from largest to smallest after packing --- SawCut/Nesting/EnhancedBestFitEngine.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SawCut/Nesting/EnhancedBestFitEngine.cs b/SawCut/Nesting/EnhancedBestFitEngine.cs index 9a77a68..76fbf70 100644 --- a/SawCut/Nesting/EnhancedBestFitEngine.cs +++ b/SawCut/Nesting/EnhancedBestFitEngine.cs @@ -65,6 +65,8 @@ namespace SawCut.Nesting count++; } + bin.Items = bin.Items.OrderByDescending(i => i.Length).ToList(); + bins.Add(bin); }