diff --git a/OpenNest.Engine/Jobs/Adapters/LegacyPlateNesterAdapter.cs b/OpenNest.Engine/Jobs/Adapters/LegacyPlateNesterAdapter.cs index 9aeb8a9..a01d7d7 100644 --- a/OpenNest.Engine/Jobs/Adapters/LegacyPlateNesterAdapter.cs +++ b/OpenNest.Engine/Jobs/Adapters/LegacyPlateNesterAdapter.cs @@ -18,10 +18,10 @@ public sealed class LegacyPlateNesterAdapter : IPlateNester this.engineFactory = engineFactory; } - /// Minimal built-in selection; never reads or changes NestEngineRegistry. - public static IPlateNester Create(string strategy) => strategy == "Default" - ? new LegacyPlateNesterAdapter(plate => new DefaultNestEngine(plate)) - : throw new NotSupportedException($"Unknown placement strategy: {strategy}."); + /// Convenience overload delegating to so strategy + /// resolution has a single source of truth; rejects unknown keys. Never reads or changes the + /// process-global NestEngineRegistry. + public static IPlateNester Create(string strategy) => PlateNesterFactory.Create(strategy); public PlateCandidate Place(PlatePlacementRequest request, IProgress progress = null, CancellationToken token = default)