feat: add Disable/Enable API to FillStrategyRegistry

Adds methods to permanently disable/enable strategies by name. Disabled
strategies remain registered but are excluded from the default pipeline.
SetEnabled (used for remnant fills) takes precedence over the disabled
set, so explicit overrides still work.

Pipeline test now checks against active strategy count dynamically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-21 15:19:27 -04:00
parent 00e7866506
commit 93a8981d0a
2 changed files with 34 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
using OpenNest.Engine.Strategies;
using OpenNest.Geometry;
namespace OpenNest.Tests.Strategies;
@@ -24,8 +25,8 @@ public class FillPipelineTests
engine.Fill(item, plate.WorkArea(), null, System.Threading.CancellationToken.None);
Assert.True(engine.PhaseResults.Count >= 6,
$"Expected phase results from all strategies, got {engine.PhaseResults.Count}");
Assert.True(engine.PhaseResults.Count >= FillStrategyRegistry.Strategies.Count,
$"Expected phase results from all active strategies, got {engine.PhaseResults.Count}");
}
[Fact]