mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-27 07:11:06 -04:00
A set is only useful on the floor once it becomes nests. Release on the
Sets tab previews one row per material group with a kit multiplier, an
archived-drawing toggle and a tick per group, then builds each ticked
group's nest as File > New would, in the group's units, uploads it as a
Draft, opens it in its own tab bound to the server record and records the
release. Every group's outcome stays on screen, and a release whose
nests exist but whose record failed can be recorded again.
Releases shows each release's nests and how far they have got ("2 of 3
cut"), and Nest Info names the release a nest came from, so a kit run can
be followed across its nests. Plate defaults convert between inches and
millimeters so a group drawn in other units still gets sensible plates.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
namespace OpenNest
|
|
{
|
|
/// <summary>
|
|
/// Shop-floor workflow state of a saved nest, persisted as a string in
|
|
/// <c>nest.json</c> so unknown future values can fall back safely.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// New values go at the end: the nest server still accepts integer statuses from
|
|
/// existing callers, so existing values must keep their numbers. Lists shown to the
|
|
/// operator use <see cref="NestStatuses.WorkflowOrder"/>, not declaration order.
|
|
/// </remarks>
|
|
public enum NestStatus
|
|
{
|
|
Quote,
|
|
ToBeCut,
|
|
HasBeenCut,
|
|
|
|
/// <summary>
|
|
/// Created but not yet ready to quote or cut, such as a nest released from a
|
|
/// drawing set before it has been nested and checked. Comes before Quote.
|
|
/// </summary>
|
|
Draft,
|
|
}
|
|
|
|
public static class NestStatuses
|
|
{
|
|
/// <summary>Every status in the order a nest moves through them.</summary>
|
|
public static readonly NestStatus[] WorkflowOrder =
|
|
{
|
|
NestStatus.Draft,
|
|
NestStatus.Quote,
|
|
NestStatus.ToBeCut,
|
|
NestStatus.HasBeenCut,
|
|
};
|
|
|
|
/// <summary>The name shown to the operator, such as "To Be Cut".</summary>
|
|
public static string DisplayName(NestStatus status) => status switch
|
|
{
|
|
NestStatus.Draft => "Draft",
|
|
NestStatus.Quote => "Quote",
|
|
NestStatus.ToBeCut => "To Be Cut",
|
|
NestStatus.HasBeenCut => "Has Been Cut",
|
|
_ => status.ToString(),
|
|
};
|
|
}
|
|
}
|