refactor(engine): extract AutoNester and reorganize NestEngine

Move NFP-based AutoNest logic (polygon extraction, rotation computation,
simulated annealing) into dedicated AutoNester class. Consolidate duplicate
FillWithPairs overloads, extract BuildCandidateAngles and BuildProgressSummary,
reorganize NestEngine into logical sections. Update callers in Console,
MCP tools, and MainForm to use AutoNester.Nest.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-14 22:51:57 -04:00
parent ce6b25c12a
commit ae010212ac
5 changed files with 553 additions and 653 deletions

View File

@@ -233,7 +233,7 @@ namespace OpenNest.Mcp.Tools
items.Add(new NestItem { Drawing = drawing, Quantity = qtys[i] });
}
var parts = NestEngine.AutoNest(items, plate);
var parts = AutoNester.Nest(items, plate);
plate.Parts.AddRange(parts);
var sb = new StringBuilder();