The corpus ranked plates by plan outcome alone, and before db4b573e the
planner called a plan with a lead-in pierced past the sheet edge Ready,
so N26-2D6 (added to the corpus for that bug) could not catch it coming
back. A Ready plate whose planned lead-in or lead-out runs past the
plate's box now scores LeadOffPlate, a blocked outcome. It is judged on
the plate, not on what the planner was told, so losing the planner's
sheet check fails here. With that check disabled N26-2D6 plate 2 scores
LeadOffPlate; with it every corpus plate keeps its outcome.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan Cutting checked each lead only against part material, so it could
pick an entry whose lead-in pierced past the plate's edge and still call
the plan Ready; only the pre-post plate edge check noticed (N26-2D6
plate 2: PT97 0.25 from the left edge, a 0.3125 lead at 60 degrees ran
0.062 off it).
The planner now stamps the plate's box on each part's lead material, and
LeadPathValidator refuses a lead-in or lead-out past it by more than the
plate edge check's slack, so the search enters from a side with room and
a contour with none fails naming the edge. A locked or pinned lead off
the sheet is a FixedLead warning. A part whose own material is already
off the sheet keeps the old checks: no lead can fix it, and the edge
check reports it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bend-group letters were described only in prose, which is hard to
picture; a diagram of each letter's direction against the grain makes
them easy to read. The doc also never said A and B allow 5° either way,
or that a bend just past that goes to the neighboring step. The diagram
is SVG so it diffs and renders on GitHub.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The box gave no hint of what Plan Cutting would etch in it: a box resized
tall and narrow silently etched nothing, because the text reads along the
box's width and is dropped once it shrinks below half the box height.
The CAD Converter now draws the label in the box, laid out by the same code
Plan Cutting uses (PartLabels.Layout, split out of Strokes). It previews the
full name-and-bend-groups text for the unrotated part, the longest form, and
turns the box red with "Too small to etch" when nothing would be etched.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A part too small for the label (such as a bent 2 x 1 tab) told the user to
place the box by hand, but nothing let them: the button only ever ran the
finder. Now it places a full-size box on the roomiest flat spot a smaller
label fits (or the part's middle) and says to adjust it.
The box could be moved and resized but never turned, so a slanted placement
was stuck. A round handle above the box now turns it (5 degree steps, free
with Shift), and the Label Box menu adds Rotate 90 and Make Horizontal. The
angle stays within a quarter turn of horizontal so text never reads upside
down.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Runners bill each job rounded up to the minute, and every job restored
and built the shared projects again. The small suites and the synthetic
nests now share one job that builds once; Engine.Tests, the longest,
runs beside it. A newer push cancels a stale run, and pushes that change
only docs or Markdown skip CI.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replan, Apply, Close, Previous and Next sat in two identical button rows mid-panel,
so moving between plates looked like acting on the plan. Apply and Close now sit in a
footer at the bottom-right (Apply bold, the accept-warnings checkbox beside it),
Previous/Next are arrow buttons on the plate result line they page through, and
Replan sits beside the scope selector whose plates it reruns.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan Cutting ordered whole parts by their centers. On N26-2DJ a 15.8"
terminal stands upright beside a stack of the same part, pierced at its
top end; its center sits halfway up the stack, so the tour cut it 7th
instead of 13th and added 11.3" of rapid (40.9" to 52.2").
A program kept as given (a locked part) now enters the tour at its first
cut and leaves from its departure, as cut-offs already did. A slender
regenerated part with holes (extent at least 3:1) is reached and left at
whichever hole center suits its neighbors, since its holes are cut first
and its outside entry leaves beside them; after the center tour it moves
to the gap where that detour is shortest. Hole-less parts keep their
centers: their entry faces whatever comes next.
N26-2DJ now plans to 40.8" locked and 39.6" unlocked. The
locked-among-regenerated digest changes only in expansions (268 to 55);
its order and rapids are unchanged. The part-order corpus meets every
baseline and no plate nears its budget.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The feature list mentioned automatic scrap cutoffs without saying why
they exist (strips sized for the scrap hopper, a reusable tail kept),
and never mentioned the support-bed check that tabs only the parts the
grid or slats cannot hold level.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Etched labels with grain-based bend group letters let the press brake
group parts that take the same angle correction, but the only place
that explained them was docs/label-box.md. Mention them in the CNC
output feature so readers can find it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first round glyphs looked odd: the 6 and 9 joined a semicircular
hook to their bowl with a straight side, and the 5 met its bowl with a
flat ledge. The 6 and 9 now sweep into the bowl on one long arc that
meets it tangentially, and the 5 drops a short stem straight into a
round bowl.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The label font drew every digit with straight segments (a boxed 0, a
squared 8), so etched part numbers looked crude. Strokes can now hold
arcs: 0, 2, 3, 5, 6, 8 and 9 are drawn on arcs and etch as arc moves
(incremental programs get their arc centers as steps too). The zero
keeps its slash so it never reads as the letter O.
A part's scribes were etched in the order they were drawn, so on PT56
in N26-2DC the head etched one bend's two edge marks, crossed the part,
etched the next bend's, and then crossed back again to start cutting
(162 in of rapids). Scribes are now ordered as a nearest-neighbor tour,
tried from every mark, with either end of an open mark allowed, and
ending near where the first cut starts. They are prepended after the
cuts are emitted so that start is known. PT56 now etches one edge, the
label, then the other edge, beside its first pierce (86 in).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A bend group letter says how the grain runs against a part's bends,
which changes springback. Parts with the same letter take the same
press brake angle correction and can be formed together; the letter
does not say which way a part bends or that it shares a brake setup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Undo is refused while any NestProgressForm is open in the process, and
Application.OpenForms is shared across xUnit's parallel test classes. A
fill-lifetime test opening a progress window could make
RemoveCodes_IsOneUndoableEditThatKeepsTheLayout fail on CI with "Undo was
refused." Join the "Fill operation lifetime" collection like the other
undo test classes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Loading an item re-adds the filter panel's checked lists, which posts a
FilterChanged that restarts the parts search. The tests waited on the task
captured before that restart, so they could read CurrentBodies while the
newer search was still running and see null (CI failure in
SeparateOne_LeavesTheRestTogether_UnderTheFileName). Wait until the current
search finishes and no newer one has started.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The saved-nests browser and Get Materials built their text columns with
near-identical helpers; GridStyle.AddTextColumn now holds the one copy.
Get Materials names its right-aligned numeric columns explicitly, so
every column keeps its name, width, alignment and format.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both commands guard plate work, offer the nest's machine defaults, show
their dialog and record applying it as one nest edit; one helper now
runs that flow, keeping the same captions, undo labels and order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move Create's state into a private Run class whose phases (measure the
parts, place the tail separator, choose and verify the horizontal
separator, bound the candidate count, place shifted or fixed strips, add
the tail and band, build the plan) Create calls in order. The former local
functions become methods with unchanged bodies; AddCandidate's detached
regeneration and definition bookkeeping move into two small helpers.
Expressions, predicates and the order of diagnostics are unchanged; the
characterization digests match.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin every field AutomaticCutOffPlanner.Create returns (definitions with
their programs, diagnostics, spans and cut lengths) for fixed-grid,
shifted, clamp, tail, horizontal-remnant, blocking, head-lock and empty
scenarios, so the planner can be restructured against identical output.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Block requests were keyed and charged by every copy still wanted, so a
high-demand part (140 copies) spent a large share of the work budget per
Fill and never reused a block from one sheet to the next. Later sheets
got no Lattice block for the strip beside their large parts: on N26-2J9
a 48 x 96 sheet held 25 small parts where a Fill of the strip holds 32.
Requests now ask for at most what the rectangle's area could hold of the
part's material. Fill stops at the copies asked only when it could place
more, so the patterns are unchanged; they cost less and are shared.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Using a layout in the progress window already chooses it, so the review
that followed only repeated the choice. The review still runs when the
layout was taken for the user (one layout, Make Nests' countdown, server
nests), and the validation review still runs for a layout that breaks
rules. Unplaced parts, which only the review named, are listed after the
commit instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A card whose sheet captions alone were wider than the strip shrank its
sheets to a third of full height and scrolled anyway, so cards with more
distinct sheets drew much smaller than the rest. They now keep full height
and scroll.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Cutting Settings and Cut-off Settings buttons looked alike and were
easy to mix up. Plan Cutting now shows two titled groups: Part cutting
(Leads & Tabs..., its summary and Keep current part order) and Scrap
cut-offs (the box, Strips... and the strip width). Planner messages
name the renamed button.
Canceling Leads & Tabs, or OK with nothing changed, keeps the current
plan. Canceling Strips keeps it too when no cut-offs were staged; with
the box ticked the staged cut-offs had to come off, so it still replans.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Cutting Parameters dialog had grown taller than many screens. It now
puts the leads in a column of their own beside Tabs, Cutouts, Marks and
Pierce (about 780 x 580 instead of 410 x 985). The Place Lead-in side
panel and Machine Configuration keep the single stacked column. The tab
size range is one "Narrow side from ... to ..." row, with its details in
tooltips.
Since e1ccd692 every tabbed part counts as steady, but "Tab alone holds
parts up to" (TabHeldMaxLength, default 6) still picked short parts' tab
points from the center-of-gravity line and treated every tab as equally
steady in the last-resort entry fallback. The setting is removed: every
part the support grid cannot hold level is tabbed and held by its tab,
however long it is. Settings and nests saved with the old value read
unchanged and ignore it.
The problem-nest corpus (entries, every nest) plans identically to master.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LabelBoxFinder scored a maximal rectangle by how many label heights fit across
it, so a long, thin strip (the gap between a hole and a slanted edge) beat a
roomier pocket, and centering put the box at the strip's narrowest point.
Each orientation now finds the widest margin the label can have on every side
beyond the clearance, by bisecting on the margin and asking only for
rectangles at least that thick, and centers the box in the rectangle that
gives it. A turn off the axes must give half again the margin plus half the
label height before it replaces horizontal or vertical text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CAD Converter view gets rulers along its left and bottom edges in drawing
units, with labeled ticks at 1, 2 or 5 times a power of ten and a cursor mark,
and grid lines on the ruler ticks. Zoom to fit keeps the part clear of the
rulers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Circle-circle intersection passed its containment test for internally
tangent circles while roundoff left r^2 - a^2 a hair below zero, so the
tangent point came back NaN. Material capture refused such parts as
"nonfinite program coordinates" and Plan Cutting fell back to a
best-effort plan: N26-2JJ's crescents (an inner arc tangent to the outer
one) failed whenever they were rotated 180 degrees, but only on the live
DWG geometry, since saving rounds the program and hides it.
Clamp r^2 - a^2 at zero. The externally tangent lead in
NativeContactRegressionTests is now refused on its contact rather than as
an incomplete check. The problem-nest corpus is identical to master.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Imported drawings are incremental programs, but PartLabels.AddTo appended
absolute points, so each stroke was read as a step from the last and the label
ran far off the sheet. It now writes steps from where the program stops
(ConvertMode.EndPosition).
On load, DrawingMarkRecovery took the etched label from applied part programs
back into the drawing as a lost mark, so it was etched again by every later
plan, labels off included. Drawings with a label box are now skipped.
Also load a labelMode number that names no mode as if it were absent, and show
such a mode as Off in the Cutting Parameters dropdown instead of throwing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The etched label text is made at capture from the drawing's name, label box,
bends and source offset and the plate's grain, but the freshness record did
not include them, so Apply could etch an outdated label. When the confirmed
settings etch labels, capture now records them and Apply returns Stale if any
changed; with labels off nothing new is compared.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the on/off CuttingParameters.EtchPartLabels with a PartLabelMode
(Off, PartNumber, PartNumberAndBendGroups), chosen from a dropdown in the
Cutting panel and kept per machine thickness. PartNumber etches only the
drawing name; the full mode keeps the 1234-AB label.
Settings saved with the old boolean still load: true reads as
PartNumberAndBendGroups and false or a missing key as Off, in the cutting
parameter DTO and the machine thickness config. The old key is never
written again. The plan fingerprint keeps the old full-label token and
adds one for the number-only mode.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Plan Cutting adds each part's label to the clean program it plans from
when CuttingParameters.EtchPartLabels is on (off by default, kept per
machine thickness like the other cutting options), so it is emitted as
scribe marks: shown, counted in cut time, posted through the etch path
and never part of nesting geometry.
The text is the drawing name plus its bend groups ("1234-AB"). A group
is the bend line's direction against the sheet grain in 15 degree steps
(BendGrain.Bucket), named by a fixed letter: A across the grain, B with
it, then C to L. A built-in single-stroke font (StrokeFont) draws it,
centered in the box and shrunk to fit down to half the box height.
Locked or unplanned parts, drawings without a box and common-line
members get no label. A plan-time warning for a label that cannot fit,
a letter beside each bend's etch dashes and a per-group list in the
reports are left for later.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add LabelBoxFinder (Core): erodes the cut material by an etch clearance,
cuts bands out around bend lines and breakoff scrap, then centers a
label-sized box in the roomiest empty rectangle over a few orientations
(axes, bend and edge directions). Placement is stored on
Drawing.LabelBox in the source frame, persisted in the .nest file and
carried through BuildDrawing/ApplyEdit; it never affects the program.
The CAD Converter gets a Label Box... button that finds the best spot,
draws it as a dashed rectangle, lets the user drag and resize it, and
warns when nothing fits. Etching the text is a later step.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add Core BendGrain (across / with / other, 5 degree tolerance, 15 degree
buckets mod 180) and draw each bend line in the plate view by kind: yellow
across the grain, orange with it, blue otherwise. Replaces the whole-part
orange outline warning, which only said that some bend was off.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The plate Export dialog gains "SVG for laser software, e.g. LightBurn":
only cut and mark geometry (no plate outline, rapids, display-only
geometry or uncut tabs), each kind stroked in its own LightBurn palette
color so it lands on its own layer. The plain SVG export is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Auto Nest's banded variant fills the same box with the same part once per
remaining quantity, and each fill's tilted-remnant step triangulated and
tested the same spacing outlines at the same places: 98 s of a 271 s
profile of N26-2J9.
OutlineOverlapMemo keeps the verdict of SpacingOutline.Overlaps by the
exact coordinates of both perimeters, so a remembered answer is the one
the test would give and no layout can change. The block catalog owns one
memo per solve and passes it to its private fills; interactive fills pass
none and test every pair as before. It holds coordinates and verdicts
only, in two bounded generations.
N26-2J9 Auto Nest: 244 s to 179 s, the same plans and result.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Every Lattice fill searched the drawing's herringbone pairs again: a slide
of the reversed part onto a row of copies at 48 offsets for each of up to
32 rotations and both row axes, on one thread. The pairs depend on the
drawing's geometry and the spacing alone, so the search's result (each
pair's start offset and slide) is now kept beside the drawing's best fits
for that spacing, shared and dropped with them, and each fill rebuilds
only the parts, by the steps the search placed them with.
N26-2J9 Auto Nest: 621 s to 244 s, N26-2ER 43 s to 31 s, the same plans
and results.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
GetMaterialSector measured the contact point against every entity of a
boundary, twice per contact, with trigonometry for each arc. Each entity
now has a box no point within the incidence tolerance of it lies outside,
built once when the boundary is prepared; entities whose box misses the
point are skipped unmeasured. They are farther than the tolerance, so the
nearest entity, the off-boundary verdict and the ambiguity check are
unchanged, and every slide distance is the same.
N26-2J9 Auto Nest: 724 s to 621 s, the same plans and result.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Some jobs get better with more sheets of less material, so a sheet count
alone would pass a regression. An "auto-nest:" line may now end with
"cost N" (the job cost, rounded up to a whole unit); with it the cost
decides: more than 0.5 over fails whatever the sheet count, less is
reported with the line to record. Every run prints each nest's cost.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Irregular picks each sheet's stock by look-ahead cost, which favors the
densest sheet, and a sheet of small parts packs densest. On a job mixing
long bars with small parts it spent the first sheets on the small parts
and left the bars six to a small sheet: 12 sheets on a real job, so
Default kept Rectangles' 7-sheet box layout (55,594 net).
Right after the strategy variants, Irregular now decodes them again with
the large types ranked first on every sheet (the frontier packer's group
ranks), so the small parts take the large parts' gaps. Types split as
Rectangles splits them, at drops in minimum box area to half or less,
the three widest tried; a split that priority already orders is skipped.
The pass runs on a work meter of its own and prepares no Lattice blocks
(the catalog is frozen), so the grouped and banded variants after it run
as without it and a job it does not improve keeps its layout. That job
now reports 8 sheets at 54,144 about 100 s into the solve and ends at
53,828.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add 60x96 to the standard plate-size catalog and to every thickness of
the shipped Generic Laser machine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Irregular overran DeadlineNestingEngine's 30 s limit by up to 50x in the
ML flag-sweep pilot (1,537 s on a 450-per-sheet part). Stack samples put
every second of the overrun in BlockCatalog.Rectangles: after a sheet fill
places a Lattice block of hundreds of detailed parts, the next block
preparation builds the free region one Clipper difference per part and
then sorts out every maximal rectangle with a quadratic dominance pass,
and neither checked the token. It shows only once best fits are cached
(a warm app, worker or sweep process), which is when the fill gets there
within the limit.
MaximalRectangles.InRegion now takes a token and a `largest` count: it
stops dominance checks past that rank, keeping every result tied in area
with the last, so its results are exactly the full search's down to that
area and Rectangles' top two are unchanged. The free region checks the
token per part. Layouts do not change; the reproducing job's whole solve
now takes 34 s instead of over 1,000.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The duplicate scan showed the CAD Converter's breakoff and tabbed-cutout
features, and several IO readers, as copy-and-paste pairs, so a fix to
one feature could miss its twin. Each pair now shares one helper with no
change in behavior:
- CAD Converter pick modes go through one toggle, turning the other modes
off in the same order as before (the view's cursor follows the last one
set); index guards, nearest-pick and keep-tabs tests are shared helpers.
- EntityView pick clicks, entity and tab-handle hit tests, and tab-handle
and entry-mark drawing are shared by both features.
- IO: both polyline converters build one line chain; NestFormat's lenient
converters share one TryNumber; NestReader reads breakoffs and tabbed
cutouts through one loop with the same warnings.
The edit and tab-drag handlers stay separate: their types share no
interface, and the tab-drag guard deliberately differs. The Server's own
TryNumber copy stays, since Server may not reference IO. The WinForms
suite (1062) and IO.Tests pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>