refactor(sequencing): remove the automatic part sequencers

The cut order comes from Plan Cutting or the user (Manual Sequence,
Sequence by Path). The PEP-era sequencers (Right/Left/Bottom Side, Edge
Start, Least Code, Advanced) and the parked heat-aware one predate the
cutting planner. Only Auto Sequence still ran one (Least Code), and its
order was replaced as soon as the plate was planned.

Removes Plate > Sequence Parts > Auto Sequence and Nest > Auto Sequence
All Plates, the sequencers and their factory, and the old PlateProcessor
with its rapid planners, which only tests used. The cutoff ordering
rules stay (OrderCutOffsFirst, PlaceCutOffs) and are now tested on
given routes. SequenceMethod and SequenceParameters stay so saved
cutting settings keep loading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Opus 5.5 committed 2026-12-02 10:43:46 -05:00
1 parent 0a2b1c64cf
commit 9ea495edca
43 files changed
+111 -2048

No files matched your search

+4 -6
View File
@@ -90,17 +90,15 @@ The program marks the locked stretch with `HEAD HEIGHT LOCK` and `HEAD HEIGHT UN
For **Plate > Sequence Parts > Manual Sequence**, choose the one-based sequence number and hover a part on the sheet; only the part under the pointer is outlined. Click it to place it at that exact position, then the number advances up to the last part. Clicking empty sheet space changes nothing. Use **Done**, the window close button, right-click on the sheet, or Escape to leave the tool. Manual reordering changes neither geometry nor quantities.
For **Plate > Sequence Parts > Sequence by Path**, drag lines over the sheet with the left button in the order you want the parts cut; clicking a part adds it as a one-point line that claims the parts whose bounding boxes hold the click. Lifting the button between lines is a rapid: the dashed jump to the next line's numbered start claims no parts. Each part belongs to the line crossing its bounding box that passes closest to its bounding-box center, and lines are cut in drawing order, each in the order its nearest points fall along it; where a line passes a part more than once, the closest pass decides. Parts no line crosses are cut after all the others, in the order they would follow their nearest line, and are drawn muted until a line or click reaches them. The numbers update as you drag, and the plate is reordered when you release. **Undo Line**, Backspace or Ctrl+Z removes the last line; **Clear** or right-click removes them all and restores the order the tool started with. Cut-first parts stay ahead of the rest, and cutoffs follow the same dependency rules as Part Sequencing below. Escape mid-drag drops only that line; otherwise Escape, **Done** or closing the window leaves the tool.
For **Plate > Sequence Parts > Sequence by Path**, drag lines over the sheet with the left button in the order you want the parts cut; clicking a part adds it as a one-point line that claims the parts whose bounding boxes hold the click. Lifting the button between lines is a rapid: the dashed jump to the next line's numbered start claims no parts. Each part belongs to the line crossing its bounding box that passes closest to its bounding-box center, and lines are cut in drawing order, each in the order its nearest points fall along it; where a line passes a part more than once, the closest pass decides. Parts no line crosses are cut after all the others, in the order they would follow their nearest line, and are drawn muted until a line or click reaches them. The numbers update as you drag, and the plate is reordered when you release. **Undo Line**, Backspace or Ctrl+Z removes the last line; **Clear** or right-click removes them all and restores the order the tool started with. Cut-first parts stay ahead of the rest, and cutoffs follow the cutoff ordering rules below. Escape mid-drag drops only that line; otherwise Escape, **Done** or closing the window leaves the tool.
After adding cutoffs, apply **Part Sequencing** to the current plate or all plates. Each trimmed segment of a cutoff is a part of its own in the sequence, and each is moved earlier as needed so it is cut before every part its nominal line passes through within the segment's span: the stretch of the line from the end of the segment before it to the start of the one after it (or the line's start or end). The parts a line passes through lie in the gaps between its segments, so each is cut after the segment on either side of it and no other; the segment below a row of parts is cut with that row, not before a row the line passes through farther on. Segments due before the same part keep the order they were regenerated in. Ordinary parts retain their relative order from the chosen sequencing route. A cutoff that splits the whole sheet — one continuous cut from sheet edge to sheet edge, such as a tail separator — goes after every part and every other cutoff, so the head never travels back across the separated edge. So does one continuous cut from a sheet edge or such a separator to another, such as the last strip line stopping at a horizontal remnant separator: it frees a remnant with the lines it stops on, and goes just before them, so the remnants' mass stays on the sheet to absorb heat until the parts are cut. Cutoffs that cross no part but leave gaps keep their normal route position. Cutoff geometry, clearance, part programs, placements, and quantities are unchanged.
The cut order comes from Plan Cutting or from the user (Manual Sequence, Sequence by Path); OpenNest has no automatic part sequencer of its own. Sequence by Path (`PlateSequencing.OrderCutOffsFirst`) and placing new or moved cutoffs (`PlateSequencing.PlaceCutOffs`) apply these ordering rules. Each trimmed segment of a cutoff is a part of its own in the sequence, and each is moved earlier as needed so it is cut before every part its nominal line passes through within the segment's span: the stretch of the line from the end of the segment before it to the start of the one after it (or the line's start or end). The parts a line passes through lie in the gaps between its segments, so each is cut after the segment on either side of it and no other; the segment below a row of parts is cut with that row, not before a row the line passes through farther on. Segments due before the same part keep the order they were regenerated in. Ordinary parts retain their relative order from the route. A cutoff that splits the whole sheet — one continuous cut from sheet edge to sheet edge, such as a tail separator — goes after every part and every other cutoff, so the head never travels back across the separated edge. So does one continuous cut from a sheet edge or such a separator to another, such as the last strip line stopping at a horizontal remnant separator: it frees a remnant with the lines it stops on, and goes just before them, so the remnants' mass stays on the sheet to absorb heat until the parts are cut. Cutoffs that cross no part but leave gaps keep their normal route position. Cutoff geometry, clearance, part programs, placements, and quantities are unchanged.
The dependency check uses the nominal horizontal/vertical line within the segment's span, not the trimmed cutting segment itself, which intentionally skips the parts (`CutOffSegments` measures the spans from the segment parts). It conservatively checks placed part bounds (including edge contacts), so a cutoff through a concave recess can also move ahead of that part. Definitions are matched by drawing identity, not their displayed names. A cutoff part with no matching definition is conservatively ordered before all ordinary parts, and a segment part whose cut cannot be measured stands for the whole line.
Drawings marked **Cut first** in the drawing editor (for example test squares) are sequenced ahead of every other part: their parts get their own route with the chosen method, then the remaining parts follow on theirs. A cutoff that crosses a cut-first part is still cut before it.
Drawings marked **Cut first** in the drawing editor (for example test squares) are sequenced ahead of every other part: Sequence by Path orders their parts first, then the remaining parts. A cutoff that crosses a cut-first part is still cut before it.
This rule runs when applying automatic sequencing, after reversing the exit-first sequencer route into cutting order. Manual sequence edits are still manual; adding or moving cutoffs does not automatically reapply this rule. Reapply Part Sequencing after layout changes and review the resulting rapids before posting. Regeneration and saving/reloading retain the applied mixed sequence.
The all-plates command uses `PlateSequencing.ApplyAll`, which snapshots the target plate references before sequencing. Reordering parts raises collection events that can replace the nest's trailing empty plate; those events must not invalidate the batch's iteration or skip any original plate. This snapshot is not a transaction or a concurrency guard: sequencing still runs synchronously on the owning thread, using the same per-plate cutoff rules.
Manual Sequence edits are still manual and are not corrected. Review the resulting rapids before posting. Regeneration and saving/reloading retain the applied mixed sequence.
## Rerunning, editing, and saving
+1 -1
View File
@@ -40,7 +40,7 @@ uses the Cincinnati machine-sample convention, not a generic TF5200 laser API:
- Motion endpoints are sheet-absolute XY. Arc `I`/`J` are offsets from the arc
start, matching the G162 convention; the post does not explicitly emit G162.
- Parts and sheet cut-offs post in the plate's cut sequence (`Plate.Parts`
order, as set by Set Sequence or a sequencer). A cut-off is not moved after
order, as set by Plan Cutting or Set Sequence). A cut-off is not moved after
the parts. Each segment is an open
line with no lead-in: rapid to its start, `/L "L4"`, `/L "L6"`, the `G1`,
and `/L "ZHSOFF"`. No `G41`/`G42` is selected, because the line is the beam
+1 -1
View File
@@ -906,7 +906,7 @@ one, exactly as before. Expanded sheets list each frame's inserts immediately be
at every level (innermost first), so the committed part order cuts every insert before the cutout
that would release its slug.
Leads are not changed: pre-post verification still warns when a host's hole lead or an insert's
lead meets the other part, or when a later reorder (by hand or Auto Sequence) puts the host
lead meets the other part, or when a later reorder (by hand) puts the host
first (see [pre-post verification](post-verification.md)); Plan Cutting cuts each insert before
its frame and refuses a kept order that does not. Engine benchmarks call engines directly and do
not run this pre-pass; internal `NestPipeline.RunWithoutCutouts` is the ordinary-solve baseline
+14 -14
View File
@@ -3,7 +3,7 @@
`OpenNest.Core/CNC/Thermal/PlateHeatSimulation.cs` estimates how heat builds up in the sheet
while a [cut simulation](cut-time-estimates.md) plays. The Cut Simulator shows it under the cut
trail (Heat: Now or Peak so far). It is a display and analysis aid and never changes the plate;
a parked [heat-aware sequencer](#sequencing) uses a cheaper estimate of the same physics.
a removed heat-aware sequencer used a cheaper estimate of the same physics ([Sequencing](#sequencing)).
## Model
@@ -77,26 +77,26 @@ bed, and its heat label says whether the sheet is cooled by air only or by air a
## Sequencing
`SequenceMethod.HeatAware` is a heat-aware part sequencer,
parked until FLIR thermal-camera readings calibrate the model. It is available to
`PlateSequencing.Apply(plate, parameters, thermal)` only: Plan Cutting does not use it, and no UI
offers it. The method and `SequenceParameters.HeatWeight` (seconds per °C, 0.15 by default) are
saved with the cutting settings.
A heat-aware part sequencer was tried and removed: the cut order comes from Plan Cutting or the
user, and OpenNest keeps no automatic part sequencers (the code is in git history before the
commit that removed them). A heat-aware order belongs in Plan Cutting's search once FLIR
thermal-camera readings calibrate the model. `SequenceMethod.HeatAware` and
`SequenceParameters.HeatWeight` are still read and written with the cutting settings, but nothing
orders parts by them. What was tried:
- Order (`OpenNest.Engine/Sequencing/HeatAwareOrder.cs`): a forward greedy from the plate's origin
corner. The next part is the one with the least travel seconds plus `HeatWeight` times the
estimated temperature at its center when the tool gets there. Cut-offs go last in its route, and
`OrderCutOffsFirst` places them as for every method. Without a thickness it is nearest neighbor.
- Estimate (`HeatSpreadEstimate`): each finished part leaves a Gaussian blob of its energy
- Order: a forward greedy from the plate's origin corner. The next part was the one with the least
travel seconds plus `HeatWeight` (seconds per °C, 0.15 by default) times the estimated
temperature at its center when the tool got there. Without a thickness it was nearest neighbor.
- Estimate: each finished part left a Gaussian blob of its energy
(`AbsorbedPower` times its torch-on time), as wide as the part to begin with (a quarter of its
squared diagonal), widening by 4αΔt and fading with the surface loss; only the latest 200 parts
count. Torch-on time comes from each part's cut length and pierces at stand-in feeds by
thickness: 400 in/min up to 0.135 in, 150 up to 0.26 in, 80 above, a 0.5 s pierce up to 0.26 in
and 1.5 s above, and 3000 in/min travel.
Why it is parked: Plan Cutting does not follow `SequenceMethod`. It plans its own shortest tour
(nearest neighbor, 2-opt, Or-opt), which already travels a fraction of the row-based `Advanced`
sequencer's distance, so the heat order's travel savings over `Advanced` do not carry over. And its
Why it did not help: Plan Cutting plans its own shortest tour (nearest neighbor, 2-opt, Or-opt),
which already traveled a fraction of the removed row-based `Advanced` sequencer's distance, so the
heat order's travel savings over `Advanced` did not carry over. And its
strict search refuses head-down rapids over parts already cut free. A heat-spreading order skips
neighbors and comes back to them across cut parts, so the search stalls, learns rules, and ends on
its shortest tour or the safest-route fallback; a heat order used only where it does not stall
+1 -1
View File
@@ -28,7 +28,7 @@ Everything stored in the nest:
list or its right-click menu), Move Plate (dragging a row in the Plates list or
Alt+Up/Alt+Down), Edit Plate (its sheet outline included), rotate,
resize, cutting parameters, clamps and clamp rail, the support grid, the nest's default plate;
- cutting: manual and automatic cut-offs and their drags, Auto Sequence, Set Sequence,
- cutting: manual and automatic cut-offs and their drags, Set Sequence,
Sequence by Path, placing and removing lead-ins, Plan Cutting's Apply, clearing lead-ins and
cut-offs;
- drawings: import, Shape Library, edit in the converter, drawing properties and quantities, delete, clean