refactor(engine): route console and MCP nesting through named job engines

Console --engine now names a jobs engine for --autonest (solved once
through NestingEngineRegistry.Create and committed onto the plate) or a
built-in fill strategy for single-plate fill through the public
PlateFillService; unknown names exit with the valid choices instead of
consulting the process-global legacy registry. MCP nesting tools take an
explicit engine argument per call with the session default, never read
process-global active-engine state, and reject whole-job engine names on
single-plate fill tools. NestingEngineRegistry gains an explicit Create
(name) resolution; PlateFillService gains a public ResolveStrategy and a
plate-number Nest overload used by interactive callers.
This commit is contained in:
aj
2026-09-22 00:30:03 -04:00
parent f36e124039
commit 88966d118c
8 changed files with 416 additions and 73 deletions
+2 -2
View File
@@ -193,7 +193,7 @@ dotnet run --project OpenNest.Console/OpenNest.Console.csproj -- project.zip ext
| Option | Description |
|--------|-------------|
| `--size <WxL>` | Plate size (e.g. `60x120`). Required for DXF-only mode. |
| `--autonest` | Use mixed-part nesting instead of linear fill (experimental) |
| `--autonest` | Whole-job nesting via the jobs engine named by `--engine` (default: Default) instead of single-plate fill |
| `--drawing <name>` | Select which drawing to fill with (default: first) |
| `--quantity <n>` | Max parts to place (default: unlimited) |
| `--spacing <value>` | Override part spacing |
@@ -201,7 +201,7 @@ dotnet run --project OpenNest.Console/OpenNest.Console.csproj -- project.zip ext
| `--output <path>` | Output file path (default: `<input>-result.zip`) |
| `--keep-parts` | Keep existing parts instead of clearing before fill |
| `--check-overlaps` | Run overlap detection after fill (exits with code 1 if found) |
| `--engine <name>` | Select a registered nesting engine |
| `--engine <name>` | With `--autonest`: jobs engine (`Default`, `Strip`, `Vertical Remnant`, `Horizontal Remnant`, `StockLadder`). Without: single-plate fill strategy (the four built-ins) |
| `--post <name>` | Post-process the result with the named post-processor plugin |
| `--no-save` | Skip saving the output file |
| `--no-log` | Skip writing the debug log |