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:
@@ -8,6 +8,13 @@ namespace OpenNest.Mcp
|
||||
public List<Plate> Plates { get; } = new();
|
||||
public List<Drawing> Drawings { get; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Session-default engine/strategy name used by nesting tools when a call does not pass
|
||||
/// an explicit <c>engine</c> argument. Instance state only — the process-global legacy
|
||||
/// registry is never read or written.
|
||||
/// </summary>
|
||||
public string DefaultEngineName { get; set; } = "Default";
|
||||
|
||||
public Plate GetPlate(int index)
|
||||
{
|
||||
if (Nest != null && index < Nest.Plates.Count)
|
||||
|
||||
Reference in New Issue
Block a user