Commit Graph
702 Commits
Author SHA1 Message Date
ajandClaude Opus 5.5 7ae01978f5 perf(core): clip collision triangles without a polygon per triangle
Collision.HasOverlap, Check and PartOverlapChecker now triangulate into
CollisionTriangle values (each ear's open vertices and box sides) and clip
them in two reused stack buffers, instead of building a Polygon entity per
triangle and three lists per clip. Same ears, vertices, bounds, pairs and
arithmetic, so verdicts and regions are bit-identical.

On the N26-2GT job a 30-copy Lattice fill of an 80-vertex arc-cornered
bracket fell from 15 s to about 4 s with identical poses, and Irregular's
first plan from 66 s to about 26 s, inside Default's 60 s limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 01:36:19 -05:00
ajandClaude Opus 5.5 4f1779376b feat(drawing-library): confirm each add with a banner and list it at once
Adding from the Drawing Library now shows a slim green banner naming what
was added (or how many more, with the new required quantity). Each add or
In This Nest quantity edit raises NestChanged, so the main window lists the
drawing on its Drawings tab behind the dialog right away, brings that tab
forward and selects it, instead of waiting for the dialog to close.

The library form tests restore the WinForms synchronization context before
each add: DoEvents leaves a plain one behind, which sent the add's awaits to
the thread pool and created the banner's window there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 21:08:39 -05:00
aj 04c0e3bca3 fix(server-ci): recognize GitHub's real package-not-found response
The first v0.7.0 publish stopped at preflight because GitHub answers a
missing user package with 404 "Package not found." (documentation_url
.../rest/packages/packages#get-a-package-for-a-user), while the check
only accepted "Not Found", a shape the tests had assumed. Accept that
message too, require the packages documentation URL, and pin the real
body in the tests. Other 404 shapes still stop the job, and the registry
must still report the repository unknown.
2026-11-17 19:51:52 -05:00
aj 244f946912 ci(server): take the publication policy from master, not the tag
The publish job checks out the tag and ran that tree's release helper for
preflight and readback, so an older tag (v0.7.0 requires a private
package) could never publish under the current public policy. Copy
master's helper before checking out the tag and run preflight/readback
from it; the tag's tree is still what gets built, tested and smoked. The
helper is stdlib-only and its local identity stamp is unchanged since
v0.7.0, so the two copies agree on it.
2026-11-17 18:48:42 -05:00
aj 480efb2893 ci(server): let the first publication create the public package
The repository is public and the image carries its source label, so the
first GITHUB_TOKEN push creates a public package linked to the repo and
no manual bootstrap is needed. Preflight accepts GitHub's own package
Not Found only when the registry also reports the repository unknown (a
package hidden from the token still has one); every other error still
stops the job. Readback refuses a package still missing after upload,
and the anonymous pull proves it is public.
2026-11-17 18:47:21 -05:00
aj 6f7d8049a7 ci(server): publish the server image as a public package
The repository is public, so a private image only made every deployment
host log in to ghcr.io. Publication now requires the existing package to
be public and linked to ajisaacs/OpenNest (private or wrong association
stops before upload and is rechecked after it), and the clean-runner
verification pulls the returned digest without logging in, proving
anonymous pulls work. Docs describe the one-time package setup and drop
the deployment-host login; the server itself stays LAN-only.
2026-11-17 18:45:47 -05:00
ajandClaude Opus 5.5 16ba05afec docs: drop internal release-gate and job references from operator docs
Common-line cutting and the CI Fiber output docs called the machine check a release gate and named the shop's machine and coupon; they now say the single cut is not yet proven on a machine and how to check it. An engine example no longer names an internal job, support-tab settings name the Cutting Parameters dialog, the Avalonia colour doc mentions its Options scheme row, and the post doc says replan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 08:17:38 -05:00
ajandClaude Opus 5.5 d4103a3b9f feat(fill): shift a tiling to fit parts of the copy before it
A multi-part pattern tiles from the work area's leading edge, so the copy
before the first one never fits whole. When the tiling leaves room at its
far end, FillLinear now moves it forward by the smallest shift that fits
the most parts of that previous copy and adds them. On an arch/cup
herringbone this fits the cup row under the first arch row: 121 -> 132.

Comparisons against the frozen fillers turn the new step off through an
internal LeadingParts flag and check the default fill separately.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 03:08:10 -05:00
ajandClaude Fable 5.2 bb23024000 feat(fill): fill with a copied common-line group as whole joined groups
Ctrl+F while pasting one common-line group fills the area with the group's
single merged outline as one part, then turns each placed copy back into its
parts joined at the source kerf. The old pattern fill tiled the members as
loose parts, added lone parts and joined nothing.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 20:43:59 -05:00
ajandClaude Fable 5.2 92bf653c8f feat(cutting): route around tabbed parts before passing over them
A tabbed part stays in the sheet, so rapids were free to pass over it and
the planner never looked for a way around. Plan Cutting now searches first
with every tabbed outside as an obstacle once its part is cut. Where a pass
stalls at a part whose approach crosses a tabbed part, only the crossed
parts become crossable and the search goes on along the same order. A
capture that search cannot plan is planned as before. Plates without
tabbed outsides are searched once, unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 20:00:50 -05:00
ajandClaude Opus 5.5 e1ccd69291 fix(cutting): keep configured tab lead-outs and warn; count every tabbed part as steady
5776fa80 dropped a tabbed outside's lead-out when it would reach the lead-in,
which silently changed the user's cutting settings. The emitter now keeps the
lead-out as configured again. Plan Cutting plans strictly first, as before;
only when that is refused because such a lead-out may cut its tab free does it
plan again keeping the lead-outs. Each affected part gets a "Tab lead-out"
issue (new PostVerificationKind.TabLeadOut), is treated as cut free for later
rapids, and the plan is UNVERIFIED, so applying it needs explicit acceptance.
The short reorder pass never settles for such a plan, so a clean route still
wins. Locked, fixed and posted programs keep the incomplete-check finding.

The "no single tab can steady it" support warnings caused more trouble than
they solved, so a tabbed part now counts as steady wherever its tab is: Plan
Cutting and the pre-post review warn only about a part cut with no tab at
all, and a tabbed part stays crossable once cut instead of being avoided as
one that may tip. Entry choice still prefers the steadiest tab point.

The problem-nest corpus is unchanged except N26-2AM, whose baseline is now
BestEffort with 15 tab lead-out warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 12:34:34 -05:00
ajandClaude Opus 5.5 5776fa80c9 fix(cutting): leave out a tabbed outside's lead-out that would cut its tab free
A tab stops the outside cut short of its entry, and the lead-out leaves from
there. On a counterclockwise outside a line lead-out angles forward, toward
the tab: a 0.1 lead-out at 60 degrees runs 0.05 along the edge, past a 0.03
tab, and crosses the lead-in, so the two cuts sever the tab. The released-
contour check rightly refused every such part, so a plate of support-tabbed
strips found no cut plan at all.

The emitter now drops a tabbed outside's lead-out that touches the lead-in or
passes within a kerf of it, as tabbed cutouts and breakoffs already end at
their tabs. Lead-outs that stay clear and untabbed contours are unchanged.
The tests that expected the crossing leads now expect them left out, and a
new test keeps the check's refusal of a crossing lead-out covered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 09:41:17 -05:00
ajandClaude Fable 5.2 fcfb3e6c1b feat(auto-nest): offer each sheet size that finishes the job as its own layout
Irregular picks each sheet's stock on an estimate of what the leftovers
will cost, so a size that took every remaining part could lose the pick
to a plan that ended up dearer, and its trial sheet was thrown away.
Each pass now keeps those finished plans: one that beats the pass's own
plan replaces it, and the rest are reported as alternatives (at most six
a pass). No extra sheets are packed.

The progress window's layout families now include the sheet sizes, so a
one-sheet 60 x 120 layout is offered beside a one-sheet 48 x 144 best
instead of being dropped as a near copy.

With 48 x 96, 48 x 144 and 60 x 120 offered, the seven sample parts (130
copies) still take one 48 x 144 sheet and now end at 130.7" instead of
136.6"; the tutorial and synthetic nests are unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 22:50:50 -05:00
ajandClaude Fable 5.2 b96e0853b5 feat(auto-nest): offer the top layouts in the progress window with each sheet's free strip
The Auto Nest progress window lists up to three whole-job layouts as
cards, the engine's best first and then the best of each other family
(sheet count and free-strip direction). Every sheet shows the distance
from its parts to the right edge (vertical strips) or the top
(horizontal strips), dimensioned on the sheet. Any card can be used:
during the search it stops it, and a finished search with more than one
layout waits for the pick. The layout used is validated and bound like
the engine's own result.

Engines may report plans that lost to their best as
NestJobStage.PlanAlternative; Irregular, Default and the time-limited
solve do. Reporting never changes a layout.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 18:04:21 -05:00
ajandClaude Opus 5.5 bf734ea743 perf(engine): speed up Irregular's banded and strip pass without changing layouts
- Lattice band certification prepares each member's outline once instead of
  re-inflating both parts for every pair (about 40% of each pattern's cost).
- Strip packing builds each beam level's band searches ahead in parallel,
  each on its own drawing copy; prefetched patterns charge no work and bind
  no orientations until requested in strip order, so the work meter and
  results match building them in turn.
- FrontierPacker blocks seated parts in one parallel pass, not one per part.

Layouts and work counts are unchanged on the README, clamp-rail, 2x and
tutorial jobs and the synthetic nests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:34:19 -05:00
ajandClaude Opus 5.5 163c23e8bd feat(engine): place large parts first and keep small ones as filler in strips
A sheet that cannot take all the remaining parts now keeps whichever
places more part area: the ordinary fill or strips largest part first.
The ordinary fill spent skinny parts early because they cover the most
area per length, leaving awkward ones for a ragged last sheet.

Inside a strip, the strip's own part fills its column first and the
others fill around it; before, pairs of smaller parts (counted as twice
a part's area) took the strip and the large part lost it. Bands also try
largest part first as a third order.

At about twice the README sample quantities the second sheet ends at
99.9" instead of 106.2" on master (104.7" before this change), and the
help tutorial's parts at 33.6" instead of 34.9". Every other benchmark
job is unchanged or better; mixed jobs solve about two to three times
slower than master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:33:38 -05:00
ajandClaude Opus 5.5 81e70af5b6 feat(engine): pack mixed jobs in full-height strips in Irregular
Irregular decodes the job once more in full-height strips along X when
like parts group and every part shares one priority. A sheet that can
take all the remaining parts is packed two ways and the better kept:

- Bands: each type of three or more copies as its Lattice pattern in the
  narrowest strip that holds all its copies, bands side by side, the
  held-back copies and one-offs filling the gaps.
- Strips: each strip holds the largest remaining part, as its band or a
  column one to three copies wide, every other part filling its gaps; a
  beam of the four densest partial sheets carries strip to strip.

Band patterns are filled one grid unit wider than the spacing so a stack
of rings passes the strict certification, members on a clamp go to the
gap fill, and a short band moves flush to the far edge when that keeps
it off the clamps. The plan replaces the result only by beating it.

On seven sample parts (130 copies, 60 x 120) the layout ends at 102.9"
instead of 107.7", and at 104.6" instead of 108.6" with the desktop's
edge spacing and bottom clamp rail; at about twice the quantities the
second sheet ends at 104.7" instead of 106.2". Every other benchmark job
is unchanged. Solves of these jobs take about twice as long.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:33:38 -05:00
ajandClaude Fable 5.2 163a9c83d9 test(best-fit): pin crescent pair spacing on material-only outlines
The crescent reported as a slide defect (pairs inside the part spacing)
was a measurement artifact: the probe counted the program's opening
rapid as outline, a 0.2 spur outside the disc on the converted part.
Measured on material alone every candidate keeps the spacing, so the
slide solver is unchanged. Adds the rounded, origin-outside crescent
with its hooked first contact and documents the oracle rule.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-15 14:25:44 -05:00
ajandClaude Opus 5.5 3e2e9c842a feat(drawing-library): export drawings as DXF, SVG or .nest
Export... saves the selected drawing's listed revision; Export Listed
Drawings writes every drawing on the page to a folder, numbering
names the batch already used and asking once before replacing files.
Files are written beside the target and moved into place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:08:03 -05:00
ajandClaude Fable 5.2 c55187909d feat(storage): pick the nest server from a named saved list
Storage Mode and Tools > Options now share a server picker: a Saved
dropdown of every server this PC has used, shown as "Name — URL", with a
Name box for a note on what each one is for and a Forget button.

storage.json keeps the list as `servers`; setting a server adds or
renames its entry, and an existing install lists its current server
unnamed on first load.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 10:06:55 -05:00
ajandClaude Opus 5.5 5ead16bffe feat(avalonia): drop Export Nest Report to match WinForms
WinForms removed the direct-save command in ecd0bba4; the system PDF
viewer that Nest Report opens already saves and prints the report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 20:41:55 -05:00
aj aea5e9f617 Merge remote-tracking branch 'origin/master' into claude/avalonia-port-next-tasks-f1f6b6 2026-11-13 20:25:34 -05:00
aj d6a551fdea Merge branch 'worktree-agent-afafee97ace7d9df4' into claude/avalonia-port-next-tasks-f1f6b6 2026-11-13 20:22:37 -05:00
ajandClaude Opus 5.5 d0654d267c feat(avalonia): export plates, view in CAD and nest reports
File > Export Plate... and Export All Plates... write the shown plate (each
plate in turn, shown while its file is chosen; cancel or a failure stops
the rest) as DXF, the view's image, the placement list or SVG, chosen by
the picked file's extension, under the WinForms suggested names. The image
is the plate canvas drawn by its Skia painter at the screen's density, PNG
or JPEG. Plate > View in CAD writes <nest>-P<n>.dxf to the temp folder and
opens it in the system's CAD program. File > Nest Report... writes the PDF
to a private temp folder and opens it in the system's PDF viewer, which
saves and prints it (older viewed reports are removed); File > Export Nest
Report... saves it to a chosen file. Reports refuse while Auto Nest runs on
the nest and are written off the UI thread from a detached snapshot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 19:28:39 -05:00
ajandClaude Opus 5.5 ad6ffa1fda feat(avalonia): undo and redo nest edits from the Edit menu
Edit > Undo/Redo name the next step and follow the active tab's history;
Ctrl+Z, Ctrl+Y and Ctrl+Shift+Z undo the nest unless a text box has focus.
A restore keeps the plate, zoom, pan and selection. Auto Nest's commit is
one undo step and blocks Undo on its nest while it runs. DEBUG builds warn
about edits made outside a change scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 19:27:07 -05:00
ajandClaude Fable 5.2 07f30c1236 fix(engine): settle best-fit pairs sideways so they close to the part spacing
The pair search slid part 2 in from offsets on a 0.25 step grid, so a pair
that locks in a corner (two interlocking channels) stopped up to a step short
of the tightest fit. Each resting position is now also slid sideways, both
ways, and the new resting positions join the candidates.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-13 18:25:25 -05:00
ajandClaude Fable 5.2 9b7082e92f fix(clone): keep Shift+click copies at the part spacing
The coarse bounding-box pass only stopped at obstacles whose box lay in
the push path, so a copy could drop past a neighbor beside the path and
end inside its spacing. A box push now also stops at an obstacle nearer
than the spacing to the side of the path.

A push ignores a part the copy starts on, so a settle could slide out of
that part and stop clear of it yet inside its spacing. SettlePlacement
now prefers a push order that keeps the part spacing, and a named order
that ends too close falls back to the other order.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-13 15:43:47 -05:00
ajandClaude Fable 5.2 b77b3b7a33 refactor(core): swap an immutable part palette instead of mutating Drawing statics
Drawing.PartColors (a public array aliasing the active scheme's), Drawing.UseGoldenAngleColors and a non-atomic colour counter were process-global display state. PartPalette now holds a copy of the colours and the golden-angle flag; PartColorPalette.Current/Use swap it as a whole, Drawing.GetPartColor/GetNextColor read it, and the counter increments atomically. Colours shown are unchanged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 19:20:22 -05:00
ajandClaude Fable 5.2 e5d4337681 fix(core): report overlapping pairs through PartOverlapChecker
The console overlap check and the MCP check_overlaps tool counted
crossing points, so a part contained in or stacked on another reported
no overlap. Both now list pairs from PartOverlapChecker.FindOverlappingPairs,
which uses the Intersects verdict and skips cut-off parts.

Plate.HasOverlappingParts stays for now: two test files outside this
change still call it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 19:10:26 -05:00
ajandClaude Opus 5.5 e6d438629f feat(cutting): slice slugs the support grid can't hold level
On an enclosed machine a cutout slug that tips once cut free can stand up
above the sheet and catch the enclosure door when the pallet changes. The
head already keeps off cut cutouts, so this is about clearing the door, not
the head.

Cutting Settings > Cutouts > "Slice slugs the support grid can't hold
level" (CuttingParameters.SliceTippingSlugs, off by default, saved per
machine thickness and written only when on) makes Plan Cutting cut each
such slug along the bed's contact lines (grid rows and columns, slat center
lines) before the cutout, so no piece keeps a contact and the pieces drop
between the supports. Each slice stops a kerf short of the cutout, so the
pieces stay attached until the cutout's own kerf frees them together. A
slug the bed holds level, or one on no contact, is left whole; a cutout
holding another part or another of its part's cuts is never sliced.

Slices are break cuts emitted right after the drawing's own break cuts,
pierced on themselves and led straight back to their start. The
released-contour proof now leaves out straight break cuts lying wholly
inside one of the part's closed holes, since the grid cells they free are
scrap; break cuts in material still take part. The plan fingerprint only
changes when the setting is on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:04:27 -05:00
ajandClaude Opus 5.5 b9fc618a50 feat(library): filter the drawing library by thickness, size, holes, date and customer
Finding a part on the nest server meant scrolling 40k drawings: the library
could only match an exact thickness or customer and knew nothing about a
drawing's size or holes. The library browser gets a Filter dialog with
inclusive ranges, and the query API takes them.

The server never parses packages and stays off IO, so the server worker now
measures each package beside its nest jobs (bounding sides, net area, closed
cutouts inside the outline) and stores the summary keyed by package hash
(schema v19). Identical geometry is measured once, an unreadable package is
recorded once instead of retried forever, and size or hole limits match only
measured drawings. Thickness ranges compare in inches across units and keep
the library's rule that a drawing saved without a thickness suits any.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 16:47:51 -05:00
ajandClaude Opus 5.5 ecd0bba4eb refactor(file-menu): regroup the export and report commands
The File menu ran six output commands together with no separators, and
"Export" / "Export All" didn't say what they exported. Group them by what
they produce:

- Save Copy as .nest File... (was Export .nest...) moves next to Save As,
  since it writes the nest file rather than exporting a plate.
- Export Plate... / Export All Plates... (were Export / Export All) get their
  own group and the "..." their save dialogs call for.
- Nest Report... / Part Printouts... (were View ...) form a reports group.
- Storage Mode... gets its own separator above Exit.

Export Nest Report... is removed: the report viewer already has Save As
(available even without WebView2), so it was a second path to the same PDF.
Its guard and failure tests now drive the viewer path, and the atomic-write
test calls WriteNestReport directly. The Avalonia prototype's matching
command is renamed too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 08:41:12 -05:00
ajandClaude Opus 5.5 755f021092 feat(reporting): dimension part printouts like the Shape Library
A part printout showed the part but not its size on the drawing, so the
operator had to read the table to know which way was which. Each page now
draws the overall X extent below the part and the Y extent to its right,
as the Shape Library does: arrows, a boxed label and extension lines that
stop 6 pt short of the outline itself rather than its bounding box.

Each dimension line moves out far enough to keep its label 14 pt clear of
the part (a wide label centered on an 18 pt line nearly touched it), and
the part and its dimensions sit 28 pt inside the drawing border, double
the old padding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 08:02:09 -05:00
ajandClaude Opus 5.5 72e16139ae feat(reporting): name the thickness on part printouts
The nest report already leads its thickness with the machine config's
Name / Gauge; the part printout's THICKNESS cell now does the same
(16 ga - 0.0598"), from the same lookup in the desktop.

Thickness names are typed into the machine config, so both writers now check
them against the bundled font's Latin-1 limit like other free text, instead
of failing partway through rendering.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 07:51:40 -05:00
ajandClaude Opus 5.5 2f3f105a5e feat(machine-config): name blank standard thicknesses on open
Thicknesses saved before the auto-fill kept a blank Name / Gauge until someone
edited their value, so their nest reports showed only the decimal. Opening
Machine Configuration now names every blank thickness that matches a standard
gauge or plate fraction and marks the form changed, so closing offers to save
them. Thicknesses matching none stay blank, and once saved a reopen finds
nothing to fill and does not ask again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 07:25:41 -05:00
ajandClaude Opus 5.5 35d77239b9 feat(machine-config): fill a blank thickness name from the standard gauges
Reports now take a thickness's name from the machine config, so a blank
Name / Gauge leaves the report with just the decimal. Machine Configuration
now fills a blank name from the standard steel gauge or plate fraction table
when the thickness value changes, and keeps following the value while the
name is still the old value's standard one; a typed name is never replaced.
A new thickness starts named for its default 0.25 (1/4").

Existing blank names are not filled on open, so viewing a machine never marks
it dirty; editing the value fills them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 07:25:41 -05:00
ajandClaude Opus 5.5 76e1acbc51 fix(reports): take the thickness name from the machine config
Each machine thickness already has a Name / Gauge field the shop fills in, so
the report now shows that name instead of guessing one from the standard
gauge table. It is matched the way the machine cutting defaults match the
nest's material, grade and thickness; a thickness without a name shows just
the decimal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 07:25:40 -05:00
ajandClaude Opus 5.5 d2da7396ce feat(reports): move generated time to the footer and name standard thicknesses
The generated date sat among the summary's report details and printed a UTC
offset nobody on the shop floor reads. It now goes in every page's footer,
left of "Page X of Y", in the computer's own time zone without the offset.

The thickness now leads with its gauge or plate fraction ("16 ga - 0.0598 in")
when it matches one, as the thickness box lists it. Reporting references Core
only, so the desktop looks the name up in StandardThicknesses and passes it on
the snapshot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 07:25:40 -05:00
ajandClaude Opus 5.5 696e0bdac6 feat(reporting): print one-page part printouts from the nest
Shops used CutSend to get a part printout (the part drawn to fit a Letter
page over a details table) because OpenNest had no way to make one. File >
View Part Printouts prints every part drawing of the nest, and the drawing
list's View Part Printout prints one; both open the report viewer to save
or print.

Cut length and pierce count walk the program as it is cut, so etch marks,
tab spans and display-only moves add neither, a tabbed cutout counts one
pierce per piece, and breakoff and common-line cuts count. The drawing list
item reaches the main window directly so nests made by BOM import get it
too. Rendering shares the nest report's lock, fonts and Latin-1 limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 07:10:56 -05:00
ajandClaude Opus 5.5 8f0bd24534 docs: note the Avalonia canvas draws from the shared plate geometry
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 22:18:14 -05:00
ajandClaude Opus 5.5 476bed1a05 refactor(desktop): share machine, nest-default and shared-settings sources
The rules behind the WinForms MachineSettings and SharedSettings move into
OpenNest.Desktop as MachineSettingsSource and SharedSettingsSource, so the
Avalonia app reads machines, clamps and nest defaults the same way: in
Database mode the nest server's copy once it holds one (machines as a
whole, nest defaults and clamps as single documents), otherwise this PC's
files; the copy is re-read after two minutes (one while offline), and while
the server is unreachable the last copy read is used, read-only. Legacy
clamps still move onto the defaults' or the only machine once, asking at
most once per session, and cutting settings edited for a nest still save
onto the machine's thickness, or this PC (stamped for that job when the
machine cannot be saved).

Nothing in the shared code shows UI: it returns the warning texts, takes
the clamp-machine question as a delegate and reads the DefaultUnit and
CuttingParametersJson settings through IMachineUserSettings (with a
user-settings.json implementation under the WinForms names). Cut-off
defaults take CutOffSettings instead of a PlateView. MachineSettings and
SharedSettings stay in the WinForms project as thin wrappers with the same
members, showing the same dialogs and reading Properties.Settings and
NestStorage as before, so their callers are unchanged.

Tests cover File vs Database mode precedence, the offline read-only copy
and its once-per-session warning, staleness and retry timing, uploads,
post settings, legacy clamp migration, the cutting-settings save and the
user-settings file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 22:18:14 -05:00
ajandClaude Opus 5.5 641e07b766 feat(avalonia): draw plates in the saved colour scheme
The Avalonia app applies the colour scheme saved as ActiveColorScheme in
the shared user-settings file when the main window opens, and recolours a
nest's drawings from it when opening the nest, as WinForms does.

The plate canvas draws the background, sheet, edge spacing, etch, part
outlines and selection from the active scheme through SkiaSchemePalette,
a cache of Skia colours rebuilt when the scheme's colours change, instead
of hard-coded colours. Part outlines follow the scheme's outline colour
or the fill darkened as WinForms darkens it. There is no Options screen
to change the scheme yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 21:23:48 -05:00
ajandClaude Opus 5.5 5a627e5cc3 Merge branch 'claude/shared-post-contours'
Master added head-raise markers, common-line shared cuts and remainders to
the CI Fiber's own contour extractor, which this branch replaced with Core's
shared PostContours. Those now live in the shared model: PostContour carries
Raised, IsCommonLine and RemainderWinding, and Classify gives remainders the
perimeter macro on their perimeter's side and shared cuts no kerf side.
ContourWinding uses PortableMath for trig, as master's Core guard requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 19:10:16 -05:00
ajandClaude Opus 5.5 fa6f664296 fix(posts): pick Cincinnati CL kerf side from the shared contour winding
The CL post wrote the configured default side (G41) on every contour,
so a contour wound against OpenNest's convention was compensated into
the part. It now takes each feature's side from Core's shared
PostContours winding rule, as the CI Fiber post does: the perimeter is
picked across the part's cut features and hole sub-program contours
are always holes. Correctly wound drawings post unchanged.

Remove the "Default kerf side" post setting; saved configs that still
carry it load as before. Expose PostContours.Flatten and Classify so a
post can classify one part's features itself.

Add CL tests for a square with a hole: the exact inline program, cuts
that match the shared contours on the sheet, G41/G42 keeping the part
out of the kerf inline and through part sub-programs, and identical
output from absolute and incremental part and hole programs. The
replay now records the compensation in force on each cut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 15:52:10 -05:00
ajandClaude Opus 5.5 cd623ff1aa refactor(posts): share contour geometry between posts through Core
Move the CI Fiber post's contour extraction and winding into Core as
OpenNest.CNC.Posting.PostContours and ContourWinding, so every post can
take sheet- or part-frame contours with the perimeter and kerf side
already chosen instead of re-deriving them. CI Fiber now writes from
the shared model; its golden output is unchanged.

Scribe marks are never picked as the perimeter and get no kerf. A cut
that resumes after suppressed moves starts a new contour where they
end, so it is no longer cut as a chord across the gap.

Add tests for a square with a hole in sheet coordinates, identical
contours from absolute and incremental part/hole programs, rotation,
and the kerf side for both windings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 15:36:44 -05:00
ajandClaude Opus 5.5 fa6781d8b1 fix(options): name clone push orders by axis, not direction
The labels said left and down, but every push follows the plate quadrant:
on quadrant 4 "Push left, then down" pushed left, then up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:03:31 -05:00
ajandClaude Opus 5.5 cafb34b510 feat(clone): choose Shift+click push order and add box-only Ctrl+click
Shift+click in Clone Parts always kept whichever axis order landed the
copy nearest the origin, which can park it in a pocket the user didn't
want. Options > Clone push placement now picks Closest to origin (the old
behavior, still the default), Push left then down, or Push down then left.

Ctrl+click settles the copy on bounding boxes alone, so it stops square
to its neighbors' boxes instead of nesting into their shapes. Shift+click
keeps its box pass then geometry settle; both follow the chosen order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:53:24 -05:00
ajandClaude Opus 5.5 6867ae2ee4 feat(arrange): let Fix Spacing clear overlaps on packed plates and tilt as a last resort
On a plate packed edge to edge, an overlap left by hand-placing extra
parts could not be fixed: straight push chains ran into the edge and
the relaxation gave up on pairs that share material, which have no
contact normal. The relaxation now pushes such a pair along its
shortest straight way out and lets the rest settle, which cleared a
0.92 sq in overlap on a 38-part plate with every part kept square.

When moves alone still cannot settle, the relaxation runs again as a
rigid one: an off-center push also turns a part, up to 3 degrees, if
its drawing is free to rotate. Moves stay first because a tilt turns
every part the push reaches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:45:54 -05:00
ajandClaude Opus 5.5 821c97e8dc feat(arrange): add Fix Spacing to push apart only flagged parts
Expand Spacing opens up a whole selection; nests that are a hair short
of fitting need the opposite: move only the parts the overlap check
flags, by the shortfall, and leave everything else where it is.

Fix Spacing pushes one part of each flagged pair straight away from the
other and ripples the push into neighbors it crowds, so rows already
locked in at the spacing can make room. When a plate is packed edge to
edge and no straight push fits, a constraint relaxation shares each
shortfall between both parts along the closest-point normal. Every
result is confirmed by the overlap check before any part moves, and is
applied only when it has fewer findings and nothing new.

NativeContours gains a coarse-flattening overload, Translated, Nested
and a closest-points GapTo for the search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:29:10 -05:00
ajandClaude Opus 5.5 9273a44258 feat(engine): squeeze the Rectangles sheet that finishes the job
Auto Nest left N26-2A5 (14 door stops, 14 lock plates on a clamped 26x26
sheet) 8.0 high, while the shop's hand layout holds all 28 under 7.5 and
leaves a half-inch-deeper drop. Every MaxRects fit rule packs into the
whole sheet, so with room to spare it spreads the parts out and never
looks for the shortest strip.

When a rule places all the remaining demand, Rectangles now repacks it
into shorter and narrower bins, every rule and mode per probe, and offers
the tightest complete layout per axis to the stock loop, which still
picks by cost and offcut. Fit is not monotonic in bin size (7.5 packs,
7.62 and 7.74 do not), so probes walk down through stack heights (sums of
spaced part sides from the bin edge or a reached clamp) instead of
bisecting. A placement budget skips sheets finishing ~2000+ parts.

Benchmark, Rectangles on 80 recent production nests with salvage credit:
11 cheaper, 0 worse, all valid, total time 14.7 s -> 13.2 s.

The zero-clamp hash is re-captured (the squeezed layout is narrower);
the far-clamp test now compares poses, since the clamp can reorder an
identical layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 11:10:06 -05:00