fix: allow large parts to use remnant space on existing plates
Previously, parts classified as "Large" skipped all existing plates and always created new ones. This caused one-unique-part-per-plate behavior since most parts exceed half the plate dimension. Now large parts search viable remnants on existing plates before creating new ones, matching the intended part-first behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -259,10 +259,9 @@ namespace OpenNest
|
||||
var workArea = pr.Plate.WorkArea();
|
||||
var classification = Classify(partBounds, workArea);
|
||||
|
||||
if (classification == PartClass.Large)
|
||||
continue; // Large parts don't go on existing plates — they create new ones.
|
||||
|
||||
// Small parts only go into scrap zones; medium parts into viable remnants.
|
||||
// Small parts only go into scrap zones to preserve viable remnants.
|
||||
// Medium and Large parts go into viable remnants (large parts can
|
||||
// still fit in remnant space left by other large parts).
|
||||
var remnants = classification == PartClass.Small
|
||||
? FindScrapZones(pr.Plate, minRemnantSize)
|
||||
: FindViableRemnants(pr.Plate, minRemnantSize);
|
||||
|
||||
Reference in New Issue
Block a user