mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-15 07:51:55 -04:00
feat(desktop): apply and edit machine clamps on the plate
New and BOM import give a new nest the machine clamp rail from clamps.json when it is enabled, converted to the nest's units; with the default (off) settings nests are created exactly as before. An unreadable or partly invalid settings file warns once per session. Nest > Clamps... edits the current nest's rail: clamp width and depth and a sorted list of X centers with Add/Remove. OK applies the rail to every plate (Cancel discards the edits); Load Machine Defaults only fills the dialog; Save as Machine Defaults writes clamps.json at once and is labelled as not undone by Cancel. The dialog refuses to open while nesting or a plate action runs. Its decisions live in the Linux-tested ClampRailEditor; the form only renders and forwards input. PlateView draws clamp zones as translucent hatched amber rectangles over the sheet and parts and repaints when they change. They take part in no hit test, selection or sequencing.
This commit is contained in:
1 parent
99f64840b2
commit
7069f155f5
11 files changed
+769
-5
No files matched your search
@@ -40,6 +40,34 @@ maps to the engine that replaced it (see [nesting engines](nesting-engines.md)).
|
||||
If the saved engine is unavailable, Default is selected and the status bar
|
||||
reports the fallback; startup does not replace the saved missing-engine preference.
|
||||
|
||||
## Machine edge clamps
|
||||
|
||||
A nest can carry the machine's fixed clamp rail: identical rectangular clamps
|
||||
(width along the edge, depth into the sheet) at X centers measured from the
|
||||
plate origin along the origin-side edge. **Nest > Clamps...** edits the current
|
||||
nest's rail. **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` immediately, with the clamps, their units and
|
||||
whether new nests receive them; Cancel does not undo that write. 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.
|
||||
|
||||
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 is
|
||||
clipped to it, and resizing or rotating a plate re-resolves its clamps. Auto Nest
|
||||
offers each stock size with the rail resolved for that size, and every committed
|
||||
sheet keeps exactly the clamps its layout was validated against. Clamps are
|
||||
drawn as hatched amber rectangles over the sheet; they cannot be selected,
|
||||
moved or sequenced and never count as parts. Interactive fill/push, the overlap
|
||||
check and cutoffs do not yet avoid clamps.
|
||||
|
||||
## Integration constraints
|
||||
|
||||
Callers must hold drawings and target state stable from snapshot through attachment. Do not append whole-job placements to an occupied target or flatten multiple returned sheets onto one plate: that would commit a layout different from the one checked. Do not trust arbitrary engine fulfillment metadata as a substitute for counting returned placements.
|
||||
|
||||
@@ -90,8 +90,10 @@ grid can make layout validation (including Default's candidate scoring) throw. I
|
||||
static-obstacle preparation does not repair these separate paths. The ordinary clamp
|
||||
fixtures pass for both lanes and Default; this is not an all-input clamp-safety guarantee.
|
||||
|
||||
This is whole-job engine support, not interactive fill/push, desktop clamp editing or
|
||||
cutoff/post-verification support; those consumers are separate work. Other engines and
|
||||
This is whole-job engine support, not interactive fill/push or cutoff/post-verification
|
||||
support; those consumers are separate work. Desktop clamp editing and the stock-size
|
||||
resolution of a nest's clamp rail are described in
|
||||
[automatic nesting](automatic-nesting.md#machine-edge-clamps). Other engines and
|
||||
plug-ins have not gained clamp-aware placement from this change.
|
||||
|
||||
## Repeating completed layouts
|
||||
|
||||
Reference in new issue
Block a user