refactor: extract responsibilities from NestEngine into focused classes
- Move BuildPairParts to BestFitResult.BuildParts() instance method - Extract BinConverter (RectanglePacking) for Part/NestItem/Bin conversions - Extract RotationAnalysis for FindBestRotation and FindHullEdgeAngles NestEngine reduced from 484 to 287 lines — now purely orchestration, strategy selection, and comparison logic. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -126,7 +126,7 @@ namespace OpenNest.Forms
|
||||
result.BoundingWidth,
|
||||
result.BoundingHeight);
|
||||
|
||||
var parts = NestEngine.BuildPairParts(result, drawing);
|
||||
var parts = result.BuildParts(drawing);
|
||||
|
||||
foreach (var part in parts)
|
||||
view.Plate.Parts.Add(part);
|
||||
|
||||
@@ -537,7 +537,7 @@ namespace OpenNest.Forms
|
||||
{
|
||||
if (form.ShowDialog(this) == DialogResult.OK && form.SelectedResult != null)
|
||||
{
|
||||
var parts = NestEngine.BuildPairParts(form.SelectedResult, drawing);
|
||||
var parts = form.SelectedResult.BuildParts(drawing);
|
||||
activeForm.PlateView.SetAction(typeof(ActionClone), parts);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user