mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-23 08:57:40 -05:00
feat(machines): keep the clamp rail on each machine
Clamps are physical fixtures that differ between machines, but one global clamps.json served every machine, so a plasma table and a fiber laser could not have different rails. - MachineConfig.Clamps holds each machine's rail in the machine's units, edited on a new Clamps tab in Tools > Machine Configuration. - New and BOM import give a nest the rail of the machine they assign; Nest > Clamps loads and saves the nest's machine's clamps. Each nest keeps its own copy, so machine edits never move existing nests' clamps. - At startup, while no machine has clamps, the legacy clamps.json (or the server's shared copy) is copied once into the default or only machine; with several machines and no default the user picks one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3e767ca3b6
commit
3e1df45c7f
19 files changed
+770
-99
No files matched your search
+23
-10
@@ -66,18 +66,31 @@ the origin: the origin side and far side run along X, the origin end and far
|
||||
end along Y. **Nest > Clamps...** edits the current nest's rail as a list, and
|
||||
**Plate > Edit Clamps** edits it on the plate view (below). **OK** applies it to every plate of the nest (**Cancel** discards
|
||||
the edits); removing every center removes the clamps. **Load Machine Defaults**
|
||||
only fills the dialog. **Save as Machine Defaults** writes
|
||||
`%APPDATA%\OpenNest\clamps.json` (or, in Database mode once the server holds them, the
|
||||
[shared clamp settings](shared-settings.md)) immediately, with the clamps, their units and
|
||||
whether new nests receive them; Cancel does not undo that write. The dialog
|
||||
only fills the dialog with the clamps of the nest's machine (**Nest > Machine**).
|
||||
**Save as Machine Defaults** writes the clamps, and whether new nests receive them,
|
||||
into that machine's configuration immediately (in Database mode, the
|
||||
[shared machine](shared-settings.md) once the server holds it); Cancel does not undo
|
||||
that write. A nest without a machine on file cannot save its clamps. The dialog
|
||||
refuses to open while nesting or a plate action is running.
|
||||
|
||||
Clamps are off by default. Until `clamps.json` is saved with clamps enabled and
|
||||
at least one center, New and BOM import create nests without clamps exactly as
|
||||
before. When enabled, a new nest gets the rail converted to its units. A missing
|
||||
file keeps clamps off; an unreadable file, or one with ignored invalid values
|
||||
(a bad clamp center is dropped), warns once per session that new nests may not
|
||||
match the machine.
|
||||
Clamps are physical fixtures of a machine, so each machine keeps its own rail on the
|
||||
**Clamps** tab of **Tools > Machine Configuration**: whether new nests get it, the
|
||||
clamp width and depth, the minutes to remove one clamp, and the clamp centers, all in
|
||||
the machine's units. New and BOM import give a new nest the rail of the machine they
|
||||
assign it (the **Tools > Nest Defaults** machine, or the first by name), converted to
|
||||
the nest's units. A nest keeps its own copy: editing a machine's clamps, or assigning a
|
||||
nest another machine, never moves the clamps of an existing nest; use **Load Machine
|
||||
Defaults** for that. Clamps are off by default: a machine without clamps, or with them
|
||||
switched off or without a center, gives new nests none. A stored size or removal time
|
||||
that is not valid falls back to the default and an invalid center is dropped.
|
||||
|
||||
Before machines held clamps, one `%APPDATA%\OpenNest\clamps.json` (or the server's
|
||||
shared clamp settings) served every machine. At startup, while no machine has clamps of
|
||||
its own, OpenNest copies that rail once into the Nest Defaults machine, or the only
|
||||
machine, converted to the machine's units. With several machines and no default it asks
|
||||
which machine has those clamps (once per session; **Not Now** leaves new nests without
|
||||
clamps until a machine has some). Once any machine has clamps the old file is no longer
|
||||
read; it is left in place.
|
||||
|
||||
Every plate follows the nest's rail at its own size and quadrant: clamps wholly
|
||||
beyond a shorter sheet are left off it, one still reaching onto the sheet keeps
|
||||
|
||||
@@ -118,8 +118,9 @@ utilization, cut sequence or CNC output. Files without the key load with no
|
||||
zones, and an individually malformed entry (blank id, non-positive size) is
|
||||
dropped while the rest of the nest loads.
|
||||
|
||||
`plateDefaults.clampRail` optionally stores the nest's machine clamp rail:
|
||||
`width` (along the edge), `depth` (into the sheet) and `centers` (X positions
|
||||
`plateDefaults.clampRail` optionally stores the nest's machine clamp rail, the nest's
|
||||
own copy (a new nest copies it from its `machine`'s clamps; later machine edits do not
|
||||
change it): `width` (along the edge), `depth` (into the sheet) and `centers` (X positions
|
||||
measured from the plate origin along the origin-side edge). Clamps on the other
|
||||
edges are listed in optional `farSideCenters` (X, along the edge across the
|
||||
sheet's width from the origin), `originEndCenters` (Y, along the edge through
|
||||
|
||||
@@ -6,9 +6,9 @@ building nests and posts the same way:
|
||||
|
||||
| Kind | Key | What it holds | This PC's own copy |
|
||||
|---|---|---|---|
|
||||
| `machine` | machine id | A Tools > Machine Configuration entry: materials, grades, thicknesses, leads, kerf, cut-offs, motion limits, plate sizes, support grid | `%APPDATA%\OpenNest\Machines\<id>.json` |
|
||||
| `machine` | machine id | A Tools > Machine Configuration entry: materials, grades, thicknesses, leads, kerf, cut-offs, motion limits, plate sizes, support grid, clamps | `%APPDATA%\OpenNest\Machines\<id>.json` |
|
||||
| `post` | post type name, e.g. `OpenNest.Posts.CincinnatiCIFiber.CIFiberPostProcessor` | A post's settings, as its JSON file holds them | `<post>.json` beside the post DLL in `Posts\` |
|
||||
| `clamps` | `default` | Machine clamp defaults (Save as Machine Defaults) | `%APPDATA%\OpenNest\clamps.json` |
|
||||
| `clamps` | `default` | Legacy clamp settings, read only to copy them onto a machine once (machines now hold their clamps) | `%APPDATA%\OpenNest\clamps.json` |
|
||||
| `nest-defaults` | `default` | Tools > Nest Defaults: units, sheet size, quadrant, spacing, default machine | `%APPDATA%\OpenNest\defaults.json` |
|
||||
|
||||
File mode, the console, MCP and API front ends use only this PC's copies.
|
||||
@@ -21,7 +21,7 @@ one), posts per post, clamps and nest defaults as single documents. Saves go whe
|
||||
settings were read, so editing a kind the server does not hold yet changes only this PC.
|
||||
|
||||
When the desktop opens in Database mode and the server lacks any of this PC's machines (all
|
||||
of them, when it holds none), post settings, clamp settings or nest defaults, it lists them
|
||||
of them, when it holds none), post settings or nest defaults, it lists them
|
||||
and offers to upload them. The first workstation to answer Yes seeds the server; a document
|
||||
the server already holds is never replaced, so later workstations only add what is missing
|
||||
(a post installed on just one PC, for example). Declining keeps that PC on its own copies and
|
||||
@@ -45,7 +45,8 @@ saved first the server refuses it and the desktop takes their copy:
|
||||
even though the Cincinnati post records the material library the nest selected.
|
||||
- Machine Configuration: the unsaved machines stay pending; reopen the window to see the
|
||||
other changes.
|
||||
- Clamps, nest defaults, support grid: the save reports the conflict.
|
||||
- Nest > Clamps and Nest > Support Grid machine defaults, nest defaults: the save reports
|
||||
the conflict.
|
||||
|
||||
The window title of Tools > Machine Configuration says whether it edits the shared machines,
|
||||
this PC's (not shared yet), or a read-only copy. Tools > Nest Defaults says the same beside
|
||||
|
||||
Reference in new issue
Block a user