fix(engine): default FillContext.Policy to avoid null-deref in ReportProgress
FillContext.ReportProgress dereferences Policy.Comparer, so any caller that forgot to set Policy hit a NullReferenceException. Default to FillPolicy(DefaultFillComparer) so tests and ad-hoc callers work without boilerplate. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,7 @@ namespace OpenNest.Engine.Strategies
|
|||||||
public int PlateNumber { get; init; }
|
public int PlateNumber { get; init; }
|
||||||
public CancellationToken Token { get; init; }
|
public CancellationToken Token { get; init; }
|
||||||
public IProgress<NestProgress> Progress { get; init; }
|
public IProgress<NestProgress> Progress { get; init; }
|
||||||
public FillPolicy Policy { get; init; }
|
public FillPolicy Policy { get; init; } = new FillPolicy(new DefaultFillComparer());
|
||||||
public int MaxQuantity { get; init; }
|
public int MaxQuantity { get; init; }
|
||||||
public PartType PartType { get; set; }
|
public PartType PartType { get; set; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user