Commit Graph
773 Commits
Author SHA1 Message Date
ajandClaude Opus 5.5 9315d7394c feat(planner): heat start limit replaces the heat weight
Plan Cutting's heat-aware order is now one setting, "Don't start above (°C
rise)" (CuttingParameters.HeatStartLimit, 0 = off, saved per material and
thickness), with the same rule for single parts and for the lines of large
grids: before each next piece, estimate the temperature where it starts when
the tool gets there; cut the plain order's next piece when it is at or under
the limit, else the nearest piece under it, else the coolest. A move across
parts already cut is a heat jump, reached with the head raised and counted in
HeatRaises; parts that cannot take a raise are reached head-down only when
nothing else is ready. The weighted block layouts and the grid prototype's
static switch and Alternate mode are gone; every-other-line on the washer
grid falls out of the rule.

The rule counts the heat of the part just cut: leaving it out halved the
raises on a 0.06 in sheet but left the starts' P90 at 32-36 C instead of
about 3 C. Re-plans after a learned order rule replay the parts already cut
into the estimate and the crossing test, and an order the heat never moved
stays the plain one, so a limit the estimate never reaches changes nothing.

Measured (HeatOrderMeasurementTests, docs/plate-heat-map.md): washer grid
line starts 63 -> 6 C for +1.5% travel and 1-2 raises; 0.06 in sheet zone
P95 -25% for +10-15% travel, +2% cut time; 0.25 in sheet at 10 C zone P95
-18% for +15% travel (the old weight: -10% for +51%). No fallback raises.
Limit 0 is byte-identical (characterization digests, problem-nest
part-order and grid areas pass).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 23:42:47 -05:00
ajandClaude Sonnet 5.5 14461a2938 feat(planner): prototype heat-aware line order for grid plates
Large aligned grids take the serpentine and never reached the heat-aware
order, so a heat weight did nothing there. This prototype reorders the
serpentine's lines (every other line out and back, or the nearest line
whose start the heat estimate puts under a limit), keeping each line's
parts in order and marking the moves across cut parts as heat jumps.

It runs only with a heat weight and CuttingGridHeatOrder.Setting set by a
measurement harness; otherwise the serpentine stands, byte-identical.
GridHeatOrderMeasurementTests (opt-in, OPENNEST_GRID_HEAT_PLATE) compares
the orders on a plate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 22:54:29 -05:00
ajandClaude Opus 5.5 037d154a91 feat(planner): opt-in heat weight spreads the part order in blocks
Plan Cutting cut dense runs of small neighboring parts back to back, so thin
sheets built up heat in one area (N26-2F2 sheet 2). An opt-in
CuttingParameters.HeatWeight (s of travel per degree C, saved per material and
thickness; 0 = off) lets the tour compare the plain tour with two cutting
fronts and 2x2-6x6 blocks, scored by travel, 2 s per jump and the old
Gaussian heat estimate fed by the Cut Simulator's feeds.

A move to another block across parts already cut is a designed head raise:
the strict search raises that arrival and replay marks it HEAD RAISE, counted
in HeatRaises, not HeadRaises. Locked programs and cut-offs cannot carry the
mark, so they are reached head-down only as a last resort. The user approved
raising the head to jump between blocks, since these small parts can be tabbed.

At weight 0 nothing runs: fingerprint, serializer and plans are unchanged
(corpus part-order and characterization digests pass). On the 121-part 0.12 in
sheet, weight 0.1 lowers the hottest-zone P95 by 37% for 11% more cut time,
with 37 designed raises and no fallback raises.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 21:28:59 -05:00
ajandClaude Opus 5.5 ee09c8368e fix(planning): tour a head-locked separator from the end it is cut from
The free part order costed every cut-off from its origin-side start, though
a head-locked far-edge segment may be cut from either end. Beside a sheet
separator the tour therefore ended on the parts near the origin side, and on
N26-2EU (four flange rings beside a head-locked scrap separator) the search
learned rules from those orders until no order ended on the ring beside the
far-edge start. It ran out of budget and the batch fell back to the current
order, which was Ready only because the right ring happened to be last.

Each reversible cut-off is now also costed from its far-edge end, and the
tour keeps that end when it is shorter. N26-2EU plans Ready with a new order
in under 1,000 expansions. Plates without head-locked cut-offs get the same
tour as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 13:04:59 -05:00
ajandClaude Opus 5.5 78372b3e05 perf(planner): skip far gaps in the part-order tour without changing it
The washers corpus plate 2 (1,258 parts) rebuilds its proposed part order
about 20 times, and each Or-opt pass tried every gap for every run of one
to three parts: 4.7 million leg measurements per pass. That was a third of
the plate's planning time.

Or-opt now indexes the parts' exit points in an ExtentGrid and tries only
gaps whose leg is longer than most, the start and end gaps, and gaps that
start close enough to the run to possibly shorten the route (by the
triangle inequality, insertion < removal needs |af| < |ab| + (removal +
|fl|) / 2). It still tries them in ascending order and takes the first
valid improvement, so the tour is the same. Both Or-opt and 2-opt now
measure each route leg once per order instead of once per candidate,
reusing the exact values they computed before.

Plate 2 plans in 21.4 s instead of 33.2 s, measured alone, with an identical
plan digest; plate 1 is unchanged. The corpus (part-order, entries) matches
the previous run's outcome and expansions on every plate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 12:58:28 -05:00
ajandClaude Opus 5.5 b97929a53d perf(planner): skip far parts on large plates without changing the plan
The 5k-washers corpus plate planned in about 90 s alone and timed out at the
corpus's 120 s limit whenever anything else ran, making the corpus fragile.
Profiling showed nearly all of it was linear scans over every part, repeated
per candidate: each lead check walked all 5,742 materials (and first re-tested
that all were complete), each rapid walked every completed contour, each
expansion rebuilt a HashSet of every cut part, each checker copy regrew its
obstacle list, and the nested-part search tested all 33 million part pairs.

A uniform grid over extents (ExtentGrid) now leaves out only parts whose
extents lie beyond the margin the existing skip tests use, and the rest are
visited in their original order, so every check returns exactly what the full
scan returned (same findings, same first obstacle, same budget charges):
- LeadPathValidator visits only materials not clear of the lead's queries or
  its midpoint's row, through a shared LeadMaterialSet built once per walk and
  replay; ContourEntryFeasibility reuses that set instead of copying it per part.
- ReleasedContourState keeps a read-only obstacle prefix with a grid, shared by
  copies, so copies stay cheap and rapids test only nearby contours.
- The search keeps one ordinal flag array per order instead of a HashSet per call.
- CuttingDependencyGraph tests each part only against hosts whose bounds can hold it.

Plate 1 alone: 93.3 s -> 12.3 s (capture 2.7 -> 1.2 s, plan 90.6 -> 11.1 s),
with the identical plan digest and 86,245 expansions; plate 2 also plans
identically. The problem-nest corpus (part-order,entries) gives every plate the
same outcome and expansion count as master, and the Collision kernel and every
tolerance are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 12:58:28 -05:00
ajandClaude Opus 5.5 9ea495edca 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>
2026-12-02 10:43:46 -05:00
ajandClaude Opus 5.5 0a2b1c64cf fix(planning): face the end a head-locked cut-off is cut from
A head-locked far-edge cut-off may be cut from either end, and the search
tries the nearer end first. The part cut just before it still aimed its exit
at the origin-side start, so a ring beside the far edge left from its bottom
and the rapid back up to the far-edge start crossed the ring just cut. N26-2EU
(four flange rings beside a scrap cut-off) planned UNVERIFIED with two rapid
crossings. The part now faces whichever start is nearer to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 09:47:13 -05:00
ajandClaude Opus 5.5 096cf9d663 fix(fill): refill clamp gaps in multi-part group fills
A group fill dropped every copy that hit a clamp and left the room it
freed empty. The gaps are now filled with whole copies, through the
gap search the single-part fill already used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 15:57:57 -05:00
ajandClaude Opus 5.5 5bc39be8ca fix(fill): refill clamp gaps when Ctrl+F fills one part
The copy tool's Ctrl+F fills through FillGroup, which only dropped the
parts that hit a clamp. A single part now fills through FillItem, so it
also takes the gaps those drops leave (N26-2J7: 194 -> 195 parts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 15:31:25 -05:00
ajandClaude Opus 5.5 97055c98be feat(sequencing): add a parked heat-aware part sequencer
Add SequenceMethod.HeatAware (100, outside PEP's numbering) and
SequenceParameters.HeatWeight. HeatAwareSequencer orders parts forward
by travel seconds plus the weight times the heat estimated where each
part is cut, from HeatSpreadEstimate: a Gaussian blob per finished part
that widens with conduction and fades with surface loss. Without a
thickness it is nearest neighbor. PlateSequencing.Apply takes the
sheet's thermal parameters for it and still places cut-offs as before.

The method and weight persist in the cutting settings DTO. Plan Cutting
does not use the method and no UI offers it: its strict search refuses
rapids over parts cut free, so a heat-spreading order needs 53-78 head
raises per plate on the measured nests. docs/plate-heat-map.md records
the numbers; revisit once thermal readings calibrate the model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 22:47:18 -05:00
ajandClaude Opus 5.5 55e8ea6084 feat(engine): grow edge strips with Expand Spacing
Expand Spacing widened gaps between parts but left each part's strip to
the sheet edge at the plate's edge spacing, so past twice that spacing
the edge strip became the thinnest web on the plate. A strip takes heat
from one cut while a web between parts takes it from two, so each edge
strip now holds at least half the spacing (never less than EdgeSpacing).

The pair search pushes edge parts inward and only accepts a spacing
whose strips hold. The pattern stretch sizes each axis's strips from
the smallest gap that axis widens, so stretching along the rows before
the rows open does not use up the edge room.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 22:11:45 -05:00
ajandClaude Opus 5.5 347c0e98b8 refactor(engine): remove dead code flagged by Roslyn Bridge
Drop the unused Expander.BoxOverlap helper, an unused local in
JointCuttingPlanSearch.AutomaticEntries, PairFiller's unread plate field,
and parameters nothing reads (BuildStrategies' spacing, RepeatColumns'
token, RouteDistance's i/j). NestJobValidator keeps its job parameter:
it names the argument in the thrown exceptions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 18:52:12 -05:00
ajandClaude Fable 5.2 197a1ac760 perf(fill): fill past the clamps first and skip pair grids that cannot win
Interactive Fill on a plate with clamps took over five minutes on a
1240-part sheet. Every progress report certified all the parts again, and
the pair phase checked grids for overlaps whose count could not beat the
best so far.

- Fill the clamp-free strip first, then the whole work area with clamp
  hits dropped; a tie keeps the strip layout.
- Certify a preview only when its layout changed, and cache each part's
  material geometry for the certification.
- Resolve a whole-pair grid only when its outcome can change a decision,
  and drop a candidate without sorting when none of its grids can beat
  the count to beat. Layouts are unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-29 14:38:33 -05:00
ajandClaude Opus 5.5 aeef9b58cd refactor: remove unused OpenNest.Gpu project
OpenNest.Gpu never ran: the best-fit slide search passes native entities,
whose GpuDistanceComputer overload fell back to the CPU, and the GPU pair
evaluator was disabled earlier. Remove the project, its axis-only
ISlideComputer adapter (GpuDistanceComputer, BestFitCache.CreateSlideComputer,
BestFitFinder's slideComputer parameter), the Training tool's GPU wiring,
SpatialQuery.FlattenLines and the ILGPU tests. Best fit always uses
CpuDistanceComputer, as it already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 12:28:00 -05:00
ajandClaude Opus 5.5 47497f4153 refactor(engine): share the strip edge loops in IterativeShrinkFiller
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 12:24:45 -05:00
ajandClaude Opus 5.5 be4b04c7b5 refactor: share NestItem copies, support analysis cache and lead selection
- NestItem.WithQuantity replaces eight hand-written copies that changed only
  the quantity, so a new field is copied everywhere.
- The WinForms support overlay uses Desktop's SupportAnalysisCache and
  SupportClearance instead of its own copy.
- CuttingParameters.LeadInFor/LeadOutFor replace the contour-type switches in
  ContourCuttingStrategy and ActionLeadIn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:28:56 -05:00
ajandClaude Opus 5.5 d77693aaff refactor: share duplicated fill, cache, settings and toggle code
- fill_plate and fill_area share one MCP fill helper
- FillLinear uses FillHelpers.HasOverlappingParts
- BestFitCache and FillResultCache entries derive from DrawingCacheEntry
- NestDefaults and ClampSettings read through SettingsFile.TryReadText
- MainForm view toggles share one ToggleView handler

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 09:47:29 -05:00
ajandClaude Opus 5.5 4b61d249c0 fix(expand): let every selected part move and stop edges and clamps pinning parts
Expand Spacing kept the first selected part fixed and stalled on full plates.

- A pair of selected parts now shares each push (later part half, earlier
  part the rest, later part any remainder), so no selected part is an anchor.
  Both shares run to the full target, so a part between two short gaps no
  longer ping-pongs while its partners never move.
- Clamps act like the work-area edge: a part may close on the keep-out but
  never enter it, and the clamp gap neither chases the target spacing nor
  counts as the achieved spacing. Before, clamps held their full entry gap
  and a part resting just above one capped the whole search.
- A part flush on an edge can slide along it again. A push that leaned into
  the edge by rounding (parts turned a quarter or half) divided zero room by
  a tiny component and pinned every move.
- Faster search with identical layouts: per-part pair lists, clearances
  remembered at the positions measured, box-proven clamp pairs skipped,
  trial-move gaps measured only up to their threshold, the overlap clipping
  run only for outlines that touch, cross or nest, and ring distances
  measured at offsets without copying outlines. Clearance gains the bounded
  and offset distance used for this.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 08:45:31 -05:00
ajandClaude Opus 5.5 1f7fd248fe refactor: share duplicated snapshot, history and fetch helpers
- CuttingPlanSnapshot: one private Copy carries every value and init
  property for WithSearchLimits, WithTabLeadOuts, WithPreservedOrder and
  WithTabbedPartsAvoided, keeping the defensive CrossableTabbedParts copy.
- NestPhaseExtensions: DisplayName and ShortName share one attribute
  lookup and keep their own caches.
- NestDatabase: History, DrawingHistory and DrawingSetHistory share
  ReadRevisionPage (count, page query, read rows) under the same lock.
- NestServerClient.GetOrNullAsync: the GET, 404 check-then-null, ensure
  success and read flow used by the Remote* clients.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 18:39:56 -05:00
ajandClaude Opus 5.5 409d30d29e refactor(core): share duplicated geometry helpers
Route the four identical even-odd ray casts through RingContainment.Contains and share the arc-intersection, span-pairing, overlap-region, lead-in, plate-offset, leader-edge, entity-copy and path-perimeter duplicates. Expressions and loop order are unchanged, so results are bit-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 18:36:40 -05:00
ajandClaude Sonnet 5.5 20323fda37 fix(engine): keep Raster parts inside the work area
Raster took each rotation's extents from the spacing outline, whose
vertices Clipper rounds to a 0.0001 grid, while the layout check measures
the geometry itself with 0.00001 of slack. A turned part pushed to a
work-area edge could end up to 0.00005 past it, which rejected seven of
the 49 variants on the README mixed job.

Position selection is unchanged. A part whose geometry would end past the
work area is nudged inside it, and a rotation whose geometry does not fit
the sheet is not tried, so already valid layouts stay identical.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-28 15:41:08 -05:00
ajandClaude Sonnet 5.5 e54a9456f4 feat(engine): add an opt-in solve log to the Default nesting engine
Set OPENNEST_NEST_LOG to a directory to write one JSON Lines file of
events and a text summary per Default solve: each candidate engine's
result, time and passes, and why the winning layout was chosen. It only
observes, so layouts are the same with it on or off.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-28 14:44:05 -05:00
ajandClaude Opus 5.5 c29085c9d7 feat(cutting): repair safest-route head raises by local reorders
The safest-route fallback walks greedily and never revisits a part it
has cut, so a rapid that passes over a cut part gets a head raise even
where cutting two parts the other way round keeps the head down (N26-2DC
plate 2: 5 raises). After the walk, each raised rapid now tries cutting
its target before the earliest part crossed, and each crossed part just
before or after the target. Only the moved parts and their neighbors are
planned again; a change is kept only when the full replay breaks no more
checks and raises fewer times, so a route can only get safer. Kept part
orders are never changed. N26-2DC plate 2 drops to 1 raise and 2732.6 in
of rapids (was 2804.8).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 07:25:48 -05:00
aj 4259bd02f9 fix(planning): pull a later part ahead when taking back a swap
The free search learns order rules only between the parts a blocked
approach crossed. Where an uninvolved part is cut can decide the block:
the part cut before the crossed ones sets where the tool arrives from, and
so how they are entered and left. On a six-part plate of holed covers the
search swapped the crossed pair, learned rules under that swap, took it
back and then re-learned the same pair, running out of budget although
cutting the last part earlier plans Ready in under 300 expansions.

When a swap is taken back, each part still to be cut after the blocked one
is now tried in front of the earliest crossed part, nearest first, one
stall-bounded pass each, with the part before it planned again facing it.
That plate plans Ready again within its budget.
2026-11-26 13:07:08 -05:00
ajandClaude Opus 5.5 ce594814c6 feat(autonest): choose new plates, current plates or both
Auto Nest's Plates choice lets a run use only the nest's current plates
(the free space beside parts already placed, then the empty plates it was
given) or current plates first and then new sheets. New plates stays the
default and unchanged. The review draws parts already on a plate in one
gray, and the whole proposal is kept in one undo record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 19:56:58 -05:00
ajandClaude Opus 5.5 4280d568b4 feat(engine): run Raster as a Default candidate
Default now runs Rectangles, Raster, Circles, then Irregular, so a stopped
or time-limited search holds an irregular plan within seconds. Ranking is
unchanged; Raster is last in tie-break order and wins only with a strictly
better score. The cutout pipeline tests keep their "ordinary solve cannot
fit the insert" precondition for Irregular only, since Raster nests in holes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 19:55:33 -05:00
ajandClaude Opus 5.5 ca9e08b93d feat(engine): add the Raster nesting engine
Raster packs each part rotation as a bit mask of its material grown by
half the part spacing plus 0.75 cell, so masks that never share a cell
keep the spacing and every layout passes the layout check unrepaired.
Coarse raster no-fit maps propose positions and a grid four times finer
settles them; the job is decoded in 48 greedy variants through the
shared stock loop. It is selectable by name, not a Default candidate.

Benchmark, 7 real jobs, --parallel 1, 6" minimum salvage: all layouts
valid; Irregular's sheet count on 5 jobs in 0.6-2.3 s against 11-78 s,
at under 1 to 4% more salvage-credited cost; 3 sheets against 2 on 27K;
24 s on 2J9 (seven stock sizes). Packing tighter and opening the gaps
with Fix Spacing saved under 0.1% of cost for up to 25 times the time,
so it was left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 23:06:56 -05:00
ajandClaude Fable 5.2 ae14101554 feat(labels): etch each bend's group letter beside its bend line
A part bent two ways listed its bend groups in the label box, which did
not say which bend was which. Each bend now gets its own circled letter
beside its line, just past the band the bend rolls through, on either
side and at the largest of the label text sizes that fits. The letters
need no label box, so the box holds the part number only and the groups
are no longer etched in it.

The nest's units size the letters, so Plan Cutting callers pass them.
The CAD Converter previews the letters for any part with bends.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 20:36:24 -05:00
ajandClaude Fable 5.2 c5e378206d feat(support): slice slugs between grid points, directly before their cutout
Slug slices ran along the grid's rows and columns of points, so every
slice cut over the support points and into the grid. They now run midway
between the rows and between the columns, half a pitch from every point.
Slat beds still slice along slat center lines.

A part's slices were all cut before any of its contours, leaving a slug
sliced while the head cut other cutouts. Each cutout's slices are now
emitted directly before that cutout.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 20:16:04 -05:00
ajandClaude Fable 5.2 96e6a1e006 feat(irregular): band the last sheet of each best plan
The frontier packer is offered Lattice blocks only on an empty sheet, so
the like parts that end a job went down one copy at a time, and the
banded variant that lays them out as a person does runs minutes later.
Someone stopping Auto Nest on an early plan got that ragged sheet.

Each plan that becomes the best now has its last sheet packed again as
full-height Lattice bands, before and after its tail re-plan, on a work
meter and block catalog of its own. The banded plan is kept beside the
search, reported when it beats every plan reported and returned when the
search ends without beating it, so the search runs as before.

On N26-2J9 the nine-sheet plan's last sheet (139 parts on 48 x 144) ends
at 114.55 instead of 120.76, about 22 s after the plan is reported.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 19:58:05 -05:00
ajandClaude Fable 5.2 9e3f0d5558 feat(cutouts): let ring chains nest 32 deep instead of 4
Four levels left a set of rings in many sizes with stacks on the sheet beside
empty bores that would hold them. The depth only bounds the recursion that
expands a bundle, so chains now run as deep as the bores allow, up to 32.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 19:20:53 -05:00
ajandClaude Fable 5.2 5af42230c2 feat(cutouts): bundle every repeated ring and seat inserts against the bore wall
The 32-bundle limit now counts only bundles the lattice and NFP searches were
consulted for; round inserts in round holes are packed analytically and are
bundled up to 4,096. A round insert sits against the wall at the hole's lowest
point unless the centered layout seats more, so the room left is one crescent
that smaller round parts fill.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 18:17:54 -05:00
ajandClaude Fable 5.2 d37cc93371 feat(circles): place a smaller disc between two large ones when that shortens the sheet
Largest first sets the large discs side by side before any smaller one is
placed. Each sheet of 24 discs or fewer is now also packed with the order of
its discs searched for a shorter layout, and the room that frees is refilled
from the remaining demand.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 18:17:54 -05:00
ajandClaude Opus 5.5 95e933b1ea fix(fill): keep interlocked pairs that end within tolerance of an inner edge
With clamps on the sheet, Fill Area's clamp-clear check allowed only 1e-6
of overhang at an area edge that is not the sheet's, while the fillers
allow the geometry tolerance at every edge. An interlocked pair whose
partner ended a few millionths past the selected box lost both parts, so
a box that holds two pairs of triangles got two singles. Inner edges sit
at least the part spacing (or a clamp keep-out's spacing slack) from
material, so allow the tolerance there when the spacing covers it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:25:58 -05:00
ajandClaude Fable 5.2 d4ad7a6201 perf(bestfit): slide a batch on boundaries prepared once, with the same distances
Best-fit slide distances rebuilt their band indexes for every offset: over
half of a slide's time and nearly all of its allocation (5.8 GB for the
225,684 slides of 51 drawings). CpuDistanceComputer now slides a batch
through Core's SlideBatch, which packs the two boundaries and builds their
vertices, contact topology and one band index per boundary and push axis
once. The pair search prepares each pair once for its first slides and its
settling slides (IPreparedDistanceComputer).

For pushes along an axis a slide also passes over pairs that cannot change
its answer: a vertex or curve outside the other boundary's whole extent
across the push, which every band test rejects, and, while the nearest
contact is searched for, a pair whose gap along the push already reaches
the nearest distance found, which the search discards. Both keep margins
for the kernels' own tolerances; a ray hits a line up to epsilon of its
length past its ends.

Every distance is bit for bit what the per-slide query returns:
CpuDistanceComputerEquivalenceTests compares the batch with a frozen copy
of the old computer on hand-built boundaries, grazing and touching starts
and the pair search's own batches. The per-slide sources and
SlideResolver are unchanged and remain what every other caller uses.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 14:37:04 -05:00
ajandClaude Fable 5.2 6067d0c89e perf(bestfit): evaluate pair candidates without rebuilding the parts
PairEvaluator built two parts for every candidate and converted and
chained each one's program twice, about 140 KB of garbage per candidate.
Under the workstation GC that allocation, not the arithmetic, set the
pace.

It now builds the first part once and the second once per rotation, and
applies each candidate's offset to their hull vertices and bounds. The
overlap polygons are flattened straight from the perimeter program's
codes: turned, converted, chained, moved and flattened with the operands
and order of the long way, using the conversion's and Arc's own helpers.
The chain ShapeBuilder finds is recorded once and replayed, which is only
done when every pair of entity ends is clearly together or clearly apart;
otherwise, and for full circles, incremental moves and sub-programs, the
perimeter is built as before.

On 51 drawings from four production nests (68,521 candidates) the
evaluator goes from 5.9 s to 0.93 s and FindCandidates from 7.9 s to
3.3 s; allocation falls from 9.6 GB to 1.6 GB. Results, their order and
the overlap polygons are bit-identical to the previous evaluator, which
the tests keep as a frozen oracle.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 13:26:52 -05:00
ajandClaude Opus 5.5 db4b573e3b fix(cutting): keep planned leads on the sheet
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>
2026-11-23 17:41:23 -05:00
ajandClaude Opus 5.5 1bfa9622b7 fix(cutting): order locked and slender holed parts by where they are cut
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>
2026-11-23 11:25:51 -05:00
ajandClaude Opus 5.5 231d1264ab refactor(fill): share StartBeyond between end-row refill and grid-end insertion
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 05:48:42 -05:00
ajandClaude Opus 5.5 eaf99fba8b fix(irregular): cap Lattice block requests at the rectangle's capacity
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>
2026-11-23 00:49:14 -05:00
ajandClaude Opus 5.5 b6a9cea93f feat(cutting): group Plan Cutting's settings and keep the plan on Cancel
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>
2026-11-22 23:55:30 -05:00
ajandClaude Opus 5.5 83181570bd feat(cutting): lay Cutting Parameters out side by side; hold every tabbed part by its tab
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>
2026-11-22 23:19:50 -05:00
ajandClaude Opus 5.5 fbf155adf3 fix(labels): stale a plan when its label inputs change before Apply
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>
2026-11-22 18:28:16 -05:00
ajandClaude Sonnet 5.5 b227321aee feat(labels): etch the part number alone or with its bend groups
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>
2026-11-22 18:09:17 -05:00
ajandClaude Sonnet 5.5 2a59ffb951 feat(labels): etch the part number and bend groups in the label box
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>
2026-11-22 17:51:01 -05:00
ajandClaude Fable 5.2 3fccf6670f perf(irregular): remember outline overlap verdicts across a solve's fills
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>
2026-11-22 14:53:05 -05:00
ajandClaude Fable 5.2 295bda728e perf(fill): search a drawing's herringbone pairs once per spacing
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>
2026-11-22 14:52:50 -05:00
ajandClaude Opus 5.5 2df94372a3 feat(irregular): pack each sheet's large parts first in large-first variants
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>
2026-11-22 14:52:49 -05:00
ajandClaude Opus 5.5 aea032a24d fix(irregular): stop at the deadline while preparing Lattice blocks
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>
2026-11-21 19:21:09 -05:00