fix(cutoffs): keep automatic lines clear of nearby cut-offs

Automatic cut-offs matched existing cut-offs only on the exact same line,
so a grid line could land a hair beside a manual cut-off (or the planner's
own tail separator) and cut a sliver strip next to it. The planner now
keeps a cut clearance - the separator's part margin, the larger of part
spacing and cut-off part clearance - from every parallel cut-off:

- a full-span cut-off within it stands in for the proposed line (or the
  tail separator) and is certified at its own X;
- a shortened or gapped manual cut within it is a blocking conflict, as an
  exact same-line conflict already was, and the shift search avoids it;
- a strip line within it of a kept separator or full-span boundary is not
  cut, letting that strip run past the spacing by less than the clearance;
  the open sheet end keeps the bare tolerance, since oversize stock leaves
  its far edge unknown;
- a new horizontal separator beside an unhonored horizontal cut-off is not
  proposed.

With zero clearance and part spacing the guard falls back to the old
same-line tolerance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Opus 5.5 committed 2026-11-18 08:34:46 -05:00
1 parent 45e7d6f1c8
commit cacfdcf5dc
5 files changed
+188 -22

No files matched your search

+32 -10
View File
@@ -169,6 +169,9 @@ public static class AutomaticCutOffPlanner
occupied = System.Math.Min(occupied, length);
occupiedY = System.Math.Min(occupiedY, width);
var margin = System.Math.Max(plate.PartSpacing, settings.PartClearance) + GeometryTolerance;
// A new line keeps the separator's part margin from every other parallel cut-off, so it
// never cuts a sliver beside one. A cut-off already within it is treated as that line.
var cutClearance = margin;
var nominalSeparator = occupied + margin;
// A separator on a clamp moves just past it, away from the origin: the tail is a
// little shorter, but a clamp in the way no longer costs the whole remnant. Repeat
@@ -210,7 +213,7 @@ public static class AutomaticCutOffPlanner
if (horizontalDistance.HasValue && !horizontalExists)
{
var y = ySign * horizontalDistance.Value;
var limited = plate.CutOffs.Any(c => c?.Axis == CutOffAxis.Horizontal && Near(c.Position.Y, y));
var limited = plate.CutOffs.Any(c => c?.Axis == CutOffAxis.Horizontal && Beside(c.Position.Y, y, cutClearance));
var clamp = clamps.FirstOrDefault(zone =>
y >= zone.Bounds.Bottom - plate.ClampClearance && y <= zone.Bounds.Top + plate.ClampClearance);
if (limited || clamp != null)
@@ -218,7 +221,7 @@ public static class AutomaticCutOffPlanner
diagnostics.Add(new AutomaticCutOffDiagnostic(
AutomaticCutOffDiagnosticCode.NoSafeHorizontalSeparator,
(clamp != null ? $"A horizontal separator at Y = {y:G8} would cross clamp '{clamp.Id}'"
: $"A same-line manual cut at Y = {y:G8} has different limits")
: $"A manual cut on or within {cutClearance:G8} of Y = {y:G8} is not a usable separator")
+ "; vertical lines cross the full sheet width instead."));
horizontalDistance = null;
}
@@ -290,9 +293,10 @@ public static class AutomaticCutOffPlanner
foreach (var end in boundaries)
{
var count = 0;
var guard = EndGuard(end);
for (var index = 1; index <= (int)candidateCount; index++)
{
if (start + index * options.Spacing >= end - GeometryTolerance)
if (start + index * options.Spacing >= end - guard)
break;
count++;
}
@@ -313,10 +317,11 @@ public static class AutomaticCutOffPlanner
else
{
// Keep the legacy loop and certification unchanged when shifting is disabled.
var guard = EndGuard(usedSpan);
for (var index = 1; index <= (int)candidateCount; index++)
{
var distance = index * options.Spacing;
if (distance >= usedSpan - GeometryTolerance)
if (distance >= usedSpan - guard)
break;
AddCandidate(sign * distance, false);
}
@@ -427,13 +432,19 @@ public static class AutomaticCutOffPlanner
}
}
// A gap ending at a cut (an existing full-span line or the kept separator) needs no line
// within the cut clearance of it: that strip may exceed the spacing by less than the
// clearance instead of leaving a sliver. Only the open sheet end keeps the bare tolerance.
double EndGuard(double end) =>
!keepsTail && end >= usedSpan - GeometryTolerance ? GeometryTolerance : cutClearance;
bool Allowed(double distance)
{
RegisterCandidate(distance);
// Use the certification path's exact Near predicate, including its ULP
// allowance, so a selected line cannot rediscover a limited-cut conflict.
// Use the certification path's exact Beside predicate, including Near's ULP
// allowance, so a selected line cannot rediscover a nearby-cut match or conflict.
var x = sign * distance;
return !plate.CutOffs.Any(c => c.Axis == CutOffAxis.Vertical && Near(c.Position.X, x)) &&
return !plate.CutOffs.Any(c => c.Axis == CutOffAxis.Vertical && Beside(c.Position.X, x, cutClearance)) &&
!clamps.Any(zone => CrossesClamp(zone, x));
}
@@ -458,14 +469,18 @@ public static class AutomaticCutOffPlanner
void AddCandidate(double x, bool isSeparator)
{
// A cut-off within the clearance is this line: nearest first, so a full-span one
// is certified at its own X instead of a sliver being cut beside it.
var matches = plate.CutOffs.Where(c => c.Axis == CutOffAxis.Vertical &&
Near(c.Position.X, x)).ToList();
Beside(c.Position.X, x, cutClearance))
.OrderBy(c => System.Math.Abs(c.Position.X - x)).ToList();
if (matches.Any(c => !Spans(c)))
{
diagnostics.Add(new AutomaticCutOffDiagnostic(
AutomaticCutOffDiagnosticCode.LimitedCutOffConflict,
"A same-line manual cut has different limits. Manual review is required; no cuts may be applied.",
$"A manual cut with different limits lies on or within {cutClearance:G8} of this line. "
+ "Manual review is required; no cuts may be applied.",
true, x));
if (isSeparator)
WarnNoSeparator(x);
@@ -503,7 +518,10 @@ public static class AutomaticCutOffPlanner
if (existing != null)
diagnostics.Add(new AutomaticCutOffDiagnostic(
AutomaticCutOffDiagnosticCode.ExistingCutOff,
"An equivalent full-span cut-off already exists; no duplicate was added.", X: x));
Near(existing.Position.X, x)
? "An equivalent full-span cut-off already exists; no duplicate was added."
: $"A full-span cut-off at {existing.Position.X:G8} lies within {cutClearance:G8} of this line; "
+ "it is used instead of cutting a sliver beside it.", X: x));
if (!usable)
diagnostics.Add(new AutomaticCutOffDiagnostic(
AutomaticCutOffDiagnosticCode.EmptyCut,
@@ -747,6 +765,10 @@ public static class AutomaticCutOffPlanner
return System.Math.Abs(a - b) <= GeometryTolerance + (double.IsFinite(step) ? 2 * step : 0);
}
// On the same line, or closer than the clearance to it.
private static bool Beside(double a, double b, double clearance) =>
Near(a, b) || System.Math.Abs(a - b) < clearance;
private static void Require(bool valid, string message, string parameter)
{
if (!valid)
@@ -210,4 +210,19 @@ public class AutomaticCutOffHorizontalRemnantTests
Assert.Contains(plan.Diagnostics, d => d.Code == AutomaticCutOffDiagnosticCode.NoSafeHorizontalSeparator);
Assert.All(plan.Definitions, c => Assert.Equal(CutOffAxis.Vertical, c.Axis));
}
[Fact]
public void ManualCutBesideTheProposedLine_FallsBackToFullWidthStrips()
{
// The new separator would go at Y 21.3; a shortened manual line at 21.5 is inside the
// 0.3 cut clearance, so a second line is not cut beside it.
var plate = MakePlate(1);
plate.CutOffs.Add(new CutOff(new Vector(0, 21.5), CutOffAxis.Horizontal) { EndLimit = 30 });
var plan = Plan(plate);
Assert.Null(plan.HorizontalSeparatorY);
Assert.Contains(plan.Diagnostics, d => d.Code == AutomaticCutOffDiagnosticCode.NoSafeHorizontalSeparator);
Assert.All(plan.Definitions, c => Assert.Equal(CutOffAxis.Vertical, c.Axis));
}
}
@@ -742,12 +742,93 @@ public class AutomaticCutOffPlannerTests
}
[Fact]
public void DifferentAxisOrDifferentCoordinate_DoesNotSuppress()
public void DifferentAxisOrCoordinateBeyondClearance_DoesNotSuppress()
{
// The cut clearance is the 0.5 part spacing: a vertical line 0.6 away is a separate strip.
var plate = MakePlate();
plate.CutOffs.Add(new CutOff(new Vector(35, 35), CutOffAxis.Horizontal));
plate.CutOffs.Add(new CutOff(new Vector(35.01, 0), CutOffAxis.Vertical));
Assert.Equal(3, Plan(plate).Definitions.Count);
plate.CutOffs.Add(new CutOff(new Vector(35.6, 0), CutOffAxis.Vertical));
AssertPositions(new[] { 35, 70, 80.5 + Tolerance.Epsilon }, Plan(plate));
}
[Theory]
[InlineData(1, 35.01)]
[InlineData(1, 34.6)]
[InlineData(2, 35.01)]
[InlineData(3, 34.6)]
[InlineData(4, 35.01)]
public void FullSpanCutOffBesideGridLine_StandsInForIt_InsteadOfASliver(int quadrant, double distance)
{
var plate = MakePlate(quadrant);
var sign = quadrant is 2 or 3 ? -1 : 1;
var manual = new CutOff(new Vector(sign * distance, 0), CutOffAxis.Vertical);
plate.CutOffs.Add(manual);
var plan = Plan(plate);
Assert.False(plan.HasBlockingDiagnostics);
AssertPositions(new[] { sign * 70, sign * (80.5 + Tolerance.Epsilon) }, plan);
Assert.Contains(plan.Diagnostics, d => d.Code == AutomaticCutOffDiagnosticCode.ExistingCutOff && d.X == sign * 35);
Assert.Same(manual, Assert.Single(plate.CutOffs));
}
[Fact]
public void LimitedCutOffBesideGridLine_BlocksWholePlan()
{
var plate = MakePlate();
plate.CutOffs.Add(new CutOff(new Vector(35.3, 0), CutOffAxis.Vertical) { StartLimit = 10, EndLimit = 60 });
var plan = Plan(plate);
Assert.True(plan.HasBlockingDiagnostics);
Assert.Empty(plan.Definitions);
Assert.Contains(plan.Diagnostics, d => d.IsBlocking && d.X == 35 &&
d.Code == AutomaticCutOffDiagnosticCode.LimitedCutOffConflict);
}
[Theory]
[InlineData(1)]
[InlineData(2)]
public void GridLineBesideTheSeparator_IsNotCut(int quadrant)
{
// Parts through 69.7 put the separator at 70.2: the grid line at 70 would leave a 0.2
// sliver, so the last strip runs 35 to 70.2 instead.
var plate = MakePlate(quadrant, occupied: 69.7);
var sign = quadrant is 2 or 3 ? -1 : 1;
var plan = Plan(plate);
AssertPositions(new[] { sign * 35, sign * (70.2 + Tolerance.Epsilon) }, plan);
Assert.True(plan.HasSeparatedTail);
}
[Fact]
public void GridLineBesideTheOpenSheetEnd_IsStillCut()
{
// Without a kept tail the strips run to the uncut sheet edge, so no clearance applies there.
var plate = new Plate(81, 105.2) { PartSpacing = 0.5 };
plate.Parts.Add(Rectangle(90, 20, new Vector(10, 20)));
var plan = AutomaticCutOffPlanner.Create(plate,
new AutomaticCutOffOptions { Spacing = 35, MinimumTailLength = 12 }, new CutOffSettings());
AssertPositions(new[] { 35.0, 70, 105 }, plan);
Assert.False(plan.HasSeparatedTail);
}
[Fact]
public void FullSpanCutOffBesideTheSeparator_IsTheSeparator()
{
var plate = MakePlate();
plate.CutOffs.Add(new CutOff(new Vector(80.8, 0), CutOffAxis.Vertical));
var plan = Plan(plate);
AssertPositions(new[] { 35.0, 70 }, plan);
Assert.True(plan.HasSeparatedTail);
Assert.Equal(80.8, plan.TailSeparatorX);
Assert.Equal(120 - 80.8, plan.TailLength, 9);
Assert.Contains(plan.Diagnostics, d => d.Code == AutomaticCutOffDiagnosticCode.ExistingCutOff);
}
[Theory]
@@ -141,7 +141,7 @@ public class AutomaticCutOffShiftTests
Assert.Equal(first.Diagnostics, second.Diagnostics);
Assert.Equal(first.StripCutLength, second.StripCutLength);
Assert.Equal(first.PreviewParts.Take(first.PreviewParts.Count - 1).Sum(p => CutLength(p.Program)), first.StripCutLength, 8);
AssertLimits(first, 35, 17.5);
AssertLimits(first, 35, 17.5, plate.PartSpacing + AutomaticCutOffPlanner.GeometryTolerance);
}
}
@@ -212,6 +212,30 @@ public class AutomaticCutOffShiftTests
Assert.True(plan.StripCutLength < plan.FixedGridCutLength);
}
[Theory]
[InlineData(1)]
[InlineData(2)]
[InlineData(3)]
[InlineData(4)]
public void LimitedManualLine_BesideBestPosition_IsAvoidedByTheCutClearance(int quadrant)
{
var plate = UserCase(quadrant);
var best = AutomaticCutOffPlanner.Create(plate, Options(), new CutOffSettings());
var manualX = best.Definitions[0].Position.X + 0.2;
plate.CutOffs.Add(new CutOff(new Vector(manualX, 0), CutOffAxis.Vertical)
{
EndLimit = plate.BoundingBox(false).Bottom + 2,
});
var plan = AutomaticCutOffPlanner.Create(plate, Options(), new CutOffSettings());
Assert.False(plan.HasBlockingDiagnostics);
Assert.Equal(3, plan.Definitions.Count);
// The cut clearance is the 0.3 part spacing.
Assert.All(plan.Definitions, c => Assert.True(System.Math.Abs(c.Position.X - manualX) >= 0.3,
$"A line at {c.Position.X} sits beside the manual cut at {manualX}."));
}
[Theory]
[InlineData(1)]
[InlineData(2)]
@@ -345,7 +369,10 @@ public class AutomaticCutOffShiftTests
var settings = new CutOffSettings();
var fixedGrid = AutomaticCutOffPlanner.Create(plate,
new AutomaticCutOffOptions { Spacing = 0.1 }, settings);
Assert.Equal(1101, fixedGrid.Definitions.Count);
// 1,099 strip lines through 109.9 and the separator just past 110.00009: the grid line
// at 110 would sit 0.00009 from the separator, inside the 0.02 cut clearance, so it is
// not cut.
Assert.Equal(1100, fixedGrid.Definitions.Count);
var shifted = AutomaticCutOffPlanner.Create(plate,
new AutomaticCutOffOptions { Spacing = 0.1, MinimumStripLength = 0.05 }, settings);
@@ -354,7 +381,13 @@ public class AutomaticCutOffShiftTests
Assert.True(shifted.StripCutLength <= shifted.FixedGridCutLength + 0.000001);
}
internal static void AssertLimits(AutomaticCutOffPlan plan, double spacing, double minimum)
/// <param name="cutClearance">
/// The planner's cut clearance (the larger of part spacing and cut-off part clearance) when a
/// test relies on it: the strip up to a kept separator is then never a sliver narrower than it,
/// and may exceed the spacing by less than it instead.
/// </param>
internal static void AssertLimits(AutomaticCutOffPlan plan, double spacing, double minimum,
double cutClearance = 0)
{
var positions = plan.Definitions.Where(c => c.Position.X != plan.TailSeparatorX)
.Select(c => System.Math.Abs(c.Position.X)).ToArray();
@@ -365,6 +398,10 @@ public class AutomaticCutOffShiftTests
spacing + AutomaticCutOffPlanner.GeometryTolerance);
previous = position;
}
Assert.InRange(plan.UsedSpan - previous, 0, spacing + AutomaticCutOffPlanner.GeometryTolerance);
var allowance = System.Math.Max(cutClearance, AutomaticCutOffPlanner.GeometryTolerance);
Assert.InRange(plan.UsedSpan - previous, 0, spacing + allowance);
if (cutClearance > 0 && plan.HasSeparatedTail && positions.Length > 0)
Assert.True(plan.UsedSpan - previous >= cutClearance - AutomaticCutOffPlanner.GeometryTolerance,
$"A {plan.UsedSpan - previous}-wide sliver was left before the separator.");
}
}
+16 -5
View File
@@ -18,11 +18,22 @@ An empty sheet is left untouched. Invalid input or out-of-sheet part geometry pr
A proposed tail shorter than **Minimum tail to keep** is left attached to the scrap skeleton by omitting the final separator. The strip grid then continues to the sheet end exactly as it would with no room for a separator, so no strip exceeds the spacing, and no retained tail is claimed. For example, on a 144-inch sheet used through 139.75 inches, the 4-inch tail is too short to keep; the skeleton gets a fourth line near 140 inches instead of leaving a 39-inch final strip from 105 inches. Existing cutoff definitions—including an end cutoff from an earlier run—are never removed by this setting.
Only real parts contribute to the occupied envelope; existing cutoff parts do not. When there is room, the final separator is beyond the furthest occupied extent by the larger of plate part spacing and cutoff part clearance, plus numerical tolerance. Repeated skeleton cuts stop before that separator. The larger margin affects only the separator: repeated cuts keep the existing manual-cutoff clearance behavior.
Only real parts contribute to the occupied envelope; existing cutoff parts do not. When there is room, the final separator is beyond the furthest occupied extent by the larger of plate part spacing and cutoff part clearance, plus numerical tolerance. Repeated skeleton cuts stop before that separator. The larger margin sets where the separator goes and how far new lines stay from other cut-offs (below). Strip lines keep the ordinary cut-off part clearance where they are trimmed around parts.
### Clearance from other cut-offs
The same margin is the *cut clearance*: no new line is cut within it of a parallel cut-off, so automatic lines never leave a sliver beside an existing line or beside each other.
- A full-span existing vertical cut-off within the cut clearance of a proposed line stands in for it. It is regenerated and certified at its own X, nothing is added beside it, and the details list reports `ExistingCutOff`. A full-span existing line that close to the tail separator becomes the separator, and the tail is measured from it.
- A manual cut with other limits (shortened or gapped) on or within the cut clearance of a proposed line is a conflict that blocks the whole plan, as an exact same-line conflict always has. When shifting, the search avoids positions that close to a partial cut, so this happens only when a gap has no other place for its lines.
- A strip line that would fall within the cut clearance of the end of its span is not cut when that end is a cut: the kept tail separator or an existing full-span boundary. The strip before it may then run up to the spacing plus less than the cut clearance. For a 120-inch sheet with parts through 69.7 inches and 0.5-inch part spacing, the separator is at 70.2, so the 35-inch grid cuts at 35 and 70.2 rather than leaving a 0.2-inch strip from 70. The open sheet end is not a cut and the far edge of oversize stock is unknown, so a line near it is still cut.
- A new horizontal separator within the cut clearance of any existing horizontal cut-off it does not honor is not proposed (`NoSafeHorizontalSeparator`), and the vertical lines cross the full width.
At the default 0.02-inch cut-off clearance and zero part spacing the cut clearance is 0.02 inch; with no clearance and no part spacing it falls to the numerical tolerance, where only same-line cuts match.
Cutoff trimming measures clearance from the part contour, excluding tagged lead-in and lead-out moves when building the closed outline. Leads must not turn a recessed outline into a convex hull and leave oversized gaps elsewhere. Genuinely open contours (a tab gap, for example) still use the conservative hull/bounds fallback, but the hull is built from the material contour only: a cut-off may cross a lead, and hulling a lead's pierce point stopped cut-offs far short of the part. With a nonzero clearance, a line passing exactly through a corner of the clearance outline is trimmed to the outline like any other line. Automatic strip lines sit on a regular lattice and often land on such corners; they once fell back to the part's bounding box there, and the strip search preferred those lines because the box fallback measured as less cutting. The conservative curve/offset approximation can leave a small extra gap (about 0.0003 in on a straight edge at the default 0.02-in clearance), not an extra quarter inch.
If no safe separator fits inside the sheet, there is no retained-tail claim and the nominal cuts may cover the full sheet length. A proposed tail is not reported as separated unless its generated program spans the full sheet width. An active clamp blocks any proposed full-width line whose X coordinate falls in the clamp's whole footprint plus its clamp clearance, including a nominal grid line or an equivalent existing line. A tolerance-close existing line is tested at its own X as well as the proposed X, because that existing line is what would be certified. A same-line manual cut with different limits still blocks the whole plan, even on a clamp. Blocked strip lines are skipped with a clamp diagnostic. A tail separator that would cross a clamp moves just past it instead, away from the origin, to the far edge of the clamp's footprint plus its clearance (stepping past any clamp whose clearance it then meets), and reports `ClampMovedTailSeparator`. The tail it keeps is shorter by that distance and must still meet the minimum tail length. A separator pushed off the sheet, or blocked another way, reports `NoSafeTailSeparator` rather than claiming separation. On a 120-inch sheet with parts through 100 inches and rail clamps every 20 inches (1.5 wide, 0.25 clearance), the separator at 100.25 sits on the clamp spanning 99.25 to 100.75, so it moves to 101 and keeps a 19-inch tail. Removed clamps on a sheet are absent from its active zones and do not block cuts. Stored zones are relative to the sheet's lower-left corner; the planner maps them into the plate's quadrant frame (the same frame as part and cut-off coordinates) before comparing, so the rule holds in all four quadrants. Obstructed or minimum-length-filtered lines produce diagnostics; they are not proof of a completed partition.
If no safe separator fits inside the sheet, there is no retained-tail claim and the nominal cuts may cover the full sheet length. A proposed tail is not reported as separated unless its generated program spans the full sheet width. An active clamp blocks any proposed full-width line whose X coordinate falls in the clamp's whole footprint plus its clamp clearance, including a nominal grid line or an equivalent existing line. An existing line within the cut clearance is tested at its own X as well as the proposed X, because that existing line is what would be certified. A manual cut with different limits on or beside the line still blocks the whole plan, even on a clamp. Blocked strip lines are skipped with a clamp diagnostic. A tail separator that would cross a clamp moves just past it instead, away from the origin, to the far edge of the clamp's footprint plus its clearance (stepping past any clamp whose clearance it then meets), and reports `ClampMovedTailSeparator`. The tail it keeps is shorter by that distance and must still meet the minimum tail length. A separator pushed off the sheet, or blocked another way, reports `NoSafeTailSeparator` rather than claiming separation. On a 120-inch sheet with parts through 100 inches and rail clamps every 20 inches (1.5 wide, 0.25 clearance), the separator at 100.25 sits on the clamp spanning 99.25 to 100.75, so it moves to 101 and keeps a 19-inch tail. Removed clamps on a sheet are absent from its active zones and do not block cuts. Stored zones are relative to the sheet's lower-left corner; the planner maps them into the plate's quadrant frame (the same frame as part and cut-off coordinates) before comparing, so the rule holds in all four quadrants. Obstructed or minimum-length-filtered lines produce diagnostics; they are not proof of a completed partition.
For a 120-by-81-inch sheet whose parts extend through 80 inches, the fixed grid would put skeleton lines at 35 and 70 inches, followed by a separator beyond 80 inches at the required margin. With a 17.5-inch minimum strip, the planner can move those two lines toward the origin to shorten their trimmed cut segments. The separator does not move, and there is no line at 105 inches through the retained tail.
@@ -34,13 +45,13 @@ 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, 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.
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 lie on or within the cut clearance of a manual horizontal cut it does not honor, 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
The preview searches line positions together to minimize the total emitted strip-line cutting length after part clearance and minimum-segment filtering. Equal lengths favor fewer pierces, then less total movement from the fixed grid. The number of new lines in each span stays at the fixed-grid count; it never adds cuts to chase a shorter path. For example, a part edge at 34.75 inches can make a 35-inch line run beside much of the part, while a small shift toward the origin lets that line cross the part and skip its material. The preview reports the measured strip-cut length and the corresponding fixed-grid length, including when Minimum strip equals spacing; a `ShiftedCut` notice identifies moved lines. Because the lines are optimized together, an individual line can cut slightly more while the total falls; its notice reports that local increase rather than a negative saving.
Existing full-width vertical cut-offs inside the used span become fixed strip boundaries; the planner fills only gaps longer than the spacing, never moving or duplicating the manual cut. A partial manual cut is not a boundary and its position is avoided. Active clamps exclude candidate positions including their clamp clearance. If a gap cannot place all its lines outside clamps, it falls back to nominal lines and reports any blocked cuts under the existing guard. An unchanged rerun adds nothing. The desktop defaults to shifting; API callers that omit `MinimumStripLength` retain the fixed-grid behavior.
Existing full-width vertical cut-offs inside the used span become fixed strip boundaries; the planner fills only gaps longer than the spacing by at least the cut clearance, never moving or duplicating the manual cut or cutting beside it. A partial manual cut is not a boundary; positions on or within the cut clearance of it are avoided. Active clamps exclude candidate positions including their clamp clearance. If a gap cannot place all its lines outside clamps, it falls back to nominal lines and reports any blocked cuts under the existing guard. An unchanged rerun adds nothing. The desktop defaults to shifting; API callers that omit `MinimumStripLength` retain the fixed-grid behavior.
## Limits and operator review
@@ -95,7 +106,7 @@ The all-plates command uses `PlateSequencing.ApplyAll`, which snapshots the targ
The command is one-shot; spacing, minimum-strip and minimum-tail inputs start at their defaults each time the dialog opens. Generated lines are ordinary cutoffs and can subsequently be dragged, deleted, or sequenced with the existing tools; Manual Sequence places each segment on its own. Moving parts regenerates their trimmed segments but does not reposition the saved cut-off lines or recalculate the retained tail automatically. Each regenerated segment goes back to the place in the sequence of the saved segment of its cut-off that it overlaps most along the line; a segment with no saved counterpart (a part dropped onto a segment splits it) follows the segment before it, and a cut-off with no saved segments is added at the end. Parts and other cut-offs keep their places relative to it however many segments it now has, so new cut-off settings (fewer or more segments) never push a later part or a sheet separator out of order.
Rerunning unchanged suppresses equivalent existing full-span lines. A limited cutoff at a proposed line is a conflict requiring manual review, not permission to replace it or add overlapping NC moves. Existing definitions are never silently deleted or expanded.
Rerunning unchanged suppresses equivalent existing full-span lines. A limited cutoff at or within the cut clearance of a proposed line is a conflict requiring manual review, not permission to replace it or add overlapping NC moves. Existing definitions are never silently deleted or expanded.
In the plate view, a left-to-right selection window selects a cut-off only when it encloses every visible cut segment; a right-to-left window selects it when it crosses any visible segment (not an empty gap). Cut-offs and parts can be selected together and deleted together. Clicking a cut-off still starts its existing single-line drag.