Files
OpenNest/OpenNest.Core/NestMachine.cs
T
ajandClaude Opus 5.5 9c78b4ebec feat(machines): assign each nest a machine and keep the support grid per machine
The support grid was one shared support-grid.json, off by default, and a nest
had no machine at all, so a plasma table and a fiber laser could not have
different grids, and nothing could pick machine-specific behavior later
(lead-ins differ between laser and plasma; tabbing depends on the grid).

- Nest.Machine (id + name) persists as top-level `machine` in nest.json;
  malformed values load as none.
- MachineConfig.SupportGrid holds each machine's grid; a machine without one
  still falls back to the legacy support-grid.json.
- New and BOM import assign the Tools > Nest Defaults machine (first by name
  when none is chosen) and give the nest that machine's grid.
- Nest > Machine reassigns a nest and swaps in the new machine's grid;
  Nest > Support Grid saves machine defaults to the nest's machine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 10:17:28 -04:00

22 lines
515 B
C#

using System;
namespace OpenNest
{
/// <summary>
/// The machine a nest is cut on: the id of its machine configuration plus the name it had,
/// so a nest still says which machine it was made for on a PC without that configuration.
/// </summary>
public sealed class NestMachine
{
public NestMachine(Guid id, string name)
{
Id = id;
Name = name ?? string.Empty;
}
public Guid Id { get; }
public string Name { get; }
}
}