mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-11 19:04:13 -04:00
feat(engine): make Default choose between Irregular and Rectangles per job
Default is the engine every front end uses when none is named. It now runs Irregular, then Rectangles, checks both layouts with NestLayoutCheck and keeps the best: valid first, then fewest unplaced parts, then lowest salvage-credited cost; ties keep Irregular. A candidate that throws or returns nothing is skipped, cancellation stops the search, and only the chosen layout's plate commits are reported. Neither engine wins every job in the lane benchmarks, and Rectangles adds little time while also covering Irregular's invalid layouts. The registry lists Default first and no longer maps the name to Fill; fill strategy callers still read Default as Fill. A future circle/ring engine joins as another candidate.
This commit is contained in:
1 parent
0a1d021bf7
commit
5af44b251c
9 files changed
+359
-19
No files matched your search
@@ -20,7 +20,7 @@ try
|
||||
var create = registry.GetMethod("Create")!;
|
||||
|
||||
// Every built-in engine the desktop offers must instantiate from the packaged assembly.
|
||||
string[] expected = ["Rectangles", "Irregular", "StockLadder", "Fill", "Strip", "Vertical Remnant", "Horizontal Remnant"];
|
||||
string[] expected = ["Default", "Rectangles", "Irregular", "StockLadder", "Fill", "Strip", "Vertical Remnant", "Horizontal Remnant"];
|
||||
foreach (var name in expected)
|
||||
{
|
||||
var engine = create.Invoke(null, [name])!;
|
||||
|
||||
Reference in new issue
Block a user