fix(planning): cut the remnant cut-offs last

The last strip line stops at the remnant's full-length horizontal
separator, so it never counted as separating the sheet and the planner
cut it wherever the route passed it, often first (N26-264). That frees
the X-tail remnant early and loses the mass that absorbs heat while the
parts are cut.

A continuous line from a sheet edge or separator to another now counts
as a separator too (CutOff.Separators, found in rounds), so Plan Cutting
and Part Sequencing cut it after every part, just before the separator
it stops on. The problem-nest harness now adds scrap cut-offs with
KeepHorizontalRemnant, as both desktop entry points do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Opus 5.5 committed 2026-11-03 12:50:33 -05:00
1 parent 5de628760f
commit 6c4ebe49b3
10 files changed
+212 -40

No files matched your search

+2 -2
View File
@@ -34,7 +34,7 @@ When the parts leave an unused band beyond them along Y (away from the origin),
- The desktop dialog and Plan Cutting's `Add scrap cut-offs` also propose a new full-length horizontal separator beyond the parts, at the same margin as the X tail separator, when the band is at least **Minimum tail to keep** wide and its area beats the X tail it competes with. The vertical lines then stop at it. API callers opt in with `AutomaticCutOffOptions.KeepHorizontalRemnant`; without it they get full-width lines unless a horizontal cut-off already exists.
- Beside a kept band, the X tail becomes a corner piece. Its separator stops at the band too, and it is kept only when both its length and the distance to the band are at least the minimum; otherwise the strip lines continue to the sheet end.
For a 96-by-48-inch sheet with parts through Y 23 and a horizontal cut-off at Y 23.57, the 35-inch strip lines (shifted as usual) cut from Y 0 to 23.57 and the 24.43-inch band stays whole. Rerunning recognizes the stopped lines as existing. A new separator is not proposed when it would cross an active clamp or a same-line manual cut with other limits, or when its program is not one uninterrupted cut; the details list reports `NoSafeHorizontalSeparator`, and the lines cross the full width. A `HorizontalRemnant` notice reports the separator's Y and the band width. The separator splits the sheet, so [Part sequencing](#part-sequencing) cuts it last.
For a 96-by-48-inch sheet with parts through Y 23 and a horizontal cut-off at Y 23.57, the 35-inch strip lines (shifted as usual) cut from Y 0 to 23.57 and the 24.43-inch band stays whole. Rerunning recognizes the stopped lines as existing. A new separator is not proposed when it would cross an active clamp or a same-line manual cut with other limits, or when its program is not one uninterrupted cut; the details list reports `NoSafeHorizontalSeparator`, and the lines cross the full width. A `HorizontalRemnant` notice reports the separator's Y and the band width. The separator splits the sheet, so [Part sequencing](#part-sequencing) cuts it last, and a strip line that reaches it without crossing a part (the one bounding the X tail) just before it, so both remnants keep their mass on the sheet until the parts are cut.
## Shifting strip lines
@@ -81,7 +81,7 @@ For **Plate > Sequence Parts > Manual Sequence**, choose the one-based sequence
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.
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. Cutoffs that cross no part but leave gaps keep their normal route position. Cutoff geometry, clearance, part programs, placements, and quantities are unchanged.
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 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.
+10 -5
View File
@@ -136,11 +136,16 @@ the final replay enforce them:
- A cutoff that splits the whole sheet is cut after every part and every other
cutoff, so the head never travels back across the separated edge. It qualifies
when its placed program is one continuous straight cut on its own line spanning
the sheet from edge to edge (`CutOff.SeparatesSheet`). A line trimmed around parts,
limited short of an edge, on the sheet edge, stale after a move or in an
unrecognized program form does not qualify and keeps the crossing rule above.
Being continuous, a separating line passes through no part. A kept order that cuts
it earlier is a constraint conflict naming the separating cutoff.
the sheet from edge to edge (`CutOff.SeparatesSheet`). A continuous line from a
sheet edge or separator to another, such as the last strip line stopping at a
remnant's horizontal separator, also qualifies (`CutOff.Separators`): it frees a
piece with the lines it stops on, so the remnants are cut last and their mass stays
on the sheet to absorb heat. It is cut just before the separators it stops on. A
line trimmed around parts, limited short of an edge or separator, on the sheet edge,
stale after a move or in an unrecognized program form does not qualify and keeps
the crossing rule above. Being continuous, a separating line passes through no
part. A kept order that cuts it earlier is a constraint conflict naming the
separating cutoff.
- A drawing's break cuts (`LayerType.Break`, see [breakoffs](breakoffs.md)) are open
cuts inside its material. Preparation keeps them apart from contours (no choices,
no material); every full and prefix emission cuts them after scribes and before any