refactor(engine): separate plate placement from job allocation
This commit is contained in:
@@ -2,9 +2,10 @@ using System;
|
||||
namespace OpenNest;
|
||||
|
||||
/// <summary>
|
||||
/// Instance-scoped strategy resolution for the whole-job runner. The built-in strategies map
|
||||
/// to private engine factories; the process-global NestEngineRegistry (including plugin
|
||||
/// registrations and ActiveEngineName) is neither read nor modified. Unknown keys reject.
|
||||
/// Instance-scoped strategy resolution for the whole-job runner. Default and Strip resolve to the
|
||||
/// migrated built-in plate nesters; the remnant strategies still use the legacy adapter during
|
||||
/// rollout. The process-global NestEngineRegistry (including plugin registrations and
|
||||
/// ActiveEngineName) is neither read nor modified. Unknown keys reject.
|
||||
/// </summary>
|
||||
public static class PlateNesterFactory
|
||||
{
|
||||
@@ -13,8 +14,8 @@ public static class PlateNesterFactory
|
||||
ArgumentNullException.ThrowIfNull(strategy);
|
||||
return strategy switch
|
||||
{
|
||||
"Default" => new LegacyPlateNesterAdapter(plate => new DefaultNestEngine(plate)),
|
||||
"Strip" => new LegacyPlateNesterAdapter(plate => new StripNestEngine(plate)),
|
||||
"Default" => new DefaultPlateNester(),
|
||||
"Strip" => new StripPlateNester(),
|
||||
"Vertical Remnant" => new LegacyPlateNesterAdapter(plate => new VerticalRemnantEngine(plate)),
|
||||
"Horizontal Remnant" => new LegacyPlateNesterAdapter(plate => new HorizontalRemnantEngine(plate)),
|
||||
_ => throw new NotSupportedException($"Unknown placement strategy: {strategy}.")
|
||||
|
||||
Reference in New Issue
Block a user