Files
OpenNest/OpenNest.Engine/Jobs/NestJobPart.cs
T
aj 451841401a refactor(engine): align namespaces with directory layout under OpenNest.Engine
All 132 OpenNest.Engine source files now declare namespaces matching
their nested directories: Jobs/, Jobs/Placement/, Jobs/Adapters/,
Fill/, RectanglePacking/, CirclePacking/, and engine-root types moved
from 'OpenNest' to 'OpenNest.Engine'. RootNamespace updated accordingly.
Consumers (Api, Console, Mcp, Benchmark, Training, desktop app, tests)
gained the explicit usings the move requires; CLAUDE.md updated.
2026-09-21 13:18:34 -04:00

35 lines
1.0 KiB
C#

using System;
namespace OpenNest.Engine.Jobs;
/// <summary>An immutable requirement, independent of drawing names, UI state, and drawing quantity counters.</summary>
public sealed class NestJobPart
{
public NestJobPart(
string id,
PartGeometrySnapshot geometry,
int quantity,
int priority = 0,
RotationPolicy rotation = null
)
{
ArgumentException.ThrowIfNullOrWhiteSpace(id);
ArgumentNullException.ThrowIfNull(geometry);
if (quantity <= 0)
throw new ArgumentOutOfRangeException(nameof(quantity));
Id = id;
Geometry = geometry;
Quantity = quantity;
Priority = priority;
Rotation = rotation ?? RotationPolicy.Automatic;
}
public string Id { get; }
public PartGeometrySnapshot Geometry { get; }
/// <summary>Positive number requested; never decremented by placement code.</summary>
public int Quantity { get; }
public int Priority { get; }
public RotationPolicy Rotation { get; }
}