Commit Graph
1665 Commits
Author SHA1 Message Date
aj 19adfbcfbd merge: drop the orange banner during part-order search 2026-10-16 11:21:34 -04:00
ajandClaude Opus 5.5 2ea201140b fix(desktop): drop the orange banner during part-order search
The saturated orange Busy tone broke the panel's single alert style and
read as a warning while planning was simply running. The part-order
search now shows the same neutral banner as the other planning phases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:21:33 -04:00
aj 6bf0658d68 merge: ask for a new nest name on database Save As 2026-10-16 11:18:28 -04:00
ajandClaude Opus 5.5 4e95a09706 feat(desktop): ask for a new nest name on database Save As
Database Save As uploaded the copy under the same name as the original,
so the saved nests list showed two indistinguishable entries. It now
prompts for the copy's name first (prefilled with the current one) and
cancelling aborts the save. The prompt is skipped while a lost upload
is being reconciled, since that click never writes. If the upload fails
outright the original name is restored, so a later Save cannot rename
the original nest; it is kept only while the copy may still be pending.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:18:28 -04:00
aj 37ddf1b7b2 merge: continue strip lines into a tail too short to keep 2026-10-16 10:40:05 -04:00
ajandClaude Opus 5.5 75195e8ba4 fix(cutoffs): continue strip lines into a tail too short to keep
When the end tail was shorter than the minimum tail to keep, the planner
dropped the separator but still stopped the strip grid at it, so the last
strip ran to the sheet end and could exceed the maximum spacing (e.g. a
39-inch strip from 105 to 144 with 35-inch spacing). The grid now spans the
whole sheet whenever the separator is skipped, keeping every strip within
the spacing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:40:04 -04:00
aj 274a1a1dea merge: show cut-plan status in a banner at the top of the panel 2026-10-16 10:12:10 -04:00
ajandClaude Opus 5.5 91b693be90 feat(desktop): show cut-plan status in a banner at the top of the panel
The outcome line sat mid-panel in coloured text and was easy to miss. It
now leads the panel in a tinted, outlined banner, and the existing
lead-in/cut-off alert uses the same style so the panel has one alert
look. The part-order search turns the banner bright orange because it is
the slow phase the operator waits on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:12:09 -04:00
aj 648c0f1efc merge: replay seams whose bridge lengthens the cut 2026-10-16 09:55:49 -04:00
ajandClaude Opus 5.5 017e06de2d fix(cutting): replay seams whose bridge lengthens the cut
A nominal ring may close within NominalContourClosure.Tolerance, and replay
already carried that admitted gap as slack when bridging it shortens the cut.
When the gap instead lies across the following edge, the emitted path starts
that edge at the ring's end point, so the cut is longer by the gap. Two checks
still compared at the exact epsilon and refused it as "invalid input":

- the retrace guard rejected any surplus length beyond 1e-8;
- Follows matched the edge's leftover sliver against the next nominal entity
  and failed its direction check.

Both now use the ring's admitted slack, the same bound the shortfall and the
nominal side of Follows already use. Exactly closed rings keep the epsilon, and
a second circuit still exceeds the slack by a whole ring.

A0227-08's sprocket outline misses its start by 1e-6 and refused planning in
both keep-order and reorder modes; it now plans Ready and applies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:55:49 -04:00
aj 21e1aee342 merge: mark cut-plan issues on the plate, simplify the inspection panel and draw planned cut-offs 2026-10-16 09:20:30 -04:00
ajandClaude Opus 5.5 571776716f chore(desktop): add AutomaticCutOffForm designer resource file
Visual Studio generated the standard empty .resx for the form; every other
designer form keeps its .resx in source control, so track this one too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:20:29 -04:00
ajandClaude Opus 5.5 405a867a77 fix(desktop): draw planned cut-offs and issue markers on the plan preview
The proposal preview skipped the cut-off overlay: it carries cut-off parts but no
cut-off definitions, so planner cut-offs looked like thin black part outlines
instead of the orange-red dashes used everywhere else. The preview now draws each
cut-off part's own cutting moves in that style.

The same paint guard hid the validation overlay over a preview, so issue markers
for unverified plans were set but never drawn. The overlay now draws on proposals
too, with the marker's part numbers mapped to the preview's proposed order so the
right parts stay highlighted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:18:48 -04:00
ajandClaude Opus 5.5 c3fa8e79e0 feat(desktop): mark cut-plan issues on the plate and trim the inspection panel
Plan Cutting findings dropped the checker's geometry, so selecting one could only
zoom to part extents, and overlap-blocked plates (no preview) did nothing at all.
Findings now keep the check's world-coordinate witness (overlap regions, rapid,
contacts); selecting a row draws it with the Validate Nest overlay, on the proposal
or a blocked plate's live sheet. The witness is excluded from finding equality so
repeated search rejections still collapse to one finding.

The side panel's scrolling report was a wall of text operators skipped. It is now
a colored outcome line, one line for the shown plate, and one remedy or marker
hint above the issue grid, with secondary detail moved to tooltips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:11:13 -04:00
ajandClaude Opus 5.5 658c1c9ee3 style(desktop): give every data grid the nest browser's look
Grids across the desktop app each set their own borders, header styles
and selection colours, so tables looked different from form to form.
The database nest browser's grid style moves into a shared GridStyle
helper that the AutoNest, BOM import, options, nest history, cutting
inspection and post settings grids now apply too. The helper also fixes
row heights so users cannot resize rows; editing, selection and column
sizing stay with each grid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 08:53:23 -04:00
aj 697b6492c7 fix(browser): integrate metadata-safe nest information edits 2026-10-16 06:52:33 -04:00
ajandClaude Opus 5.5 f05533f69c merge: integrate inspection-view navigation lock with live header zoom
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 06:46:12 -04:00
ajandClaude Opus 5.5 7d254ce18d feat(desktop): remove or restore a clamp by right-click
Operators sometimes pull a clamp for a manual layout, but only Auto Nest's
last-resort search could take clamps off a sheet. Right-clicking a clamp in
Select mode now offers to remove it from that sheet or put it back, reusing
the existing per-sheet RemovedClamps, so the zones, cut-time charge, display
and .nest persistence all behave as they do for Auto Nest removals.

The change is refused while a nest run or fill may be reading the clamps,
sharing the guard the Clamps dialog already used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 06:20:30 -04:00
aj b305b56876 test(browser): run asynchronous edits with the UI dispatcher 2026-10-16 00:18:55 -04:00
aj f4dd8d2a85 fix(browser): preserve all current nest metadata during edits 2026-10-16 00:07:37 -04:00
aj 9f0d4f37ce feat(browser): edit nest information without opening the nest 2026-10-16 00:03:32 -04:00
aj d028d82f0a fix(ci): follow the material-marker overlay acceptance test 2026-10-15 23:41:57 -04:00
aj ee3bc3aabe docs(geometry): align collision guidance with overlap diagnostics 2026-10-15 23:32:20 -04:00
aj 12f2ce5deb fix(geometry): stop PolyLabel refinement when centres cannot advance 2026-10-15 23:31:14 -04:00
aj 1672b62717 docs(diagnostics): state the tiny-clamp and grid-threshold marker limits
The spec review found two places where the marker and threshold
contract does not hold.

A clamp narrower than the chord tolerance is still judged
tolerance-free against finely re-read material and reported as the
whole clamp rectangle. That existing safety policy is kept, so its
marker is the clamp's centre: within half the clamp's size (under
0.0005) of the material, though not necessarily on it. Document this
on PlateOverlapPair.Marker and in the overlap docs, and lock it in the
tiny-clamp region test.

Also document that 1e-8 grid rounding can move an area within
rounding error of the 1e-5 threshold to either side of it.
2026-10-15 23:31:14 -04:00
aj 83b606c486 fix(geometry): end PolyLabel's starting grid where steps stop advancing
Far from the origin a grid step smaller than the coordinate's
precision leaves x (or y) unchanged: at 1e16, 1e16 + 1 == 1e16. The
starting grid loop then never ended and allocated cells without limit,
even with the new maxCells budget (a hang dump reached 4.3 GB). Stop a
row or column once its step no longer advances.

Grids that advance are untouched, so the bit-identical differential
against the former sorted-list implementation still passes. Found by
the independent quality review of the Clipper2 overlap branch.
2026-10-15 23:31:14 -04:00
aj 80d01839bd feat(diagnostics): place overlap markers on the shared material
The overlap crosshair sat on the pair's area centroid. For a split,
holed or concave overlap, that point can be off the red material:
between two patches, in a hole, or inside a curve.

PlateOverlapPair.Marker is a point inside the pair's largest island.
It is the island's pole of inaccessibility (PolyLabel), searched to a
tenth of the island's area/perimeter within a 4096-cell budget. If
that bounded search does not land inside (a long thin sliver), the
marker falls back to the midpoint of the widest interior run of a
horizontal scan line placed between vertex heights.

The overlay crosshair, marker hit testing, hover coordinates
("Marker:") and the cutting-inspection ring now use the marker.
Centroid stays the true area centroid. View > Overlap Check > Display
> Centroids is now labelled Markers.

Before the marker existed, its call sites used the centroid. Two
patches, a covered frame, a half annulus and a thin crescent then put
it off the material; now all four land on it. Disabling the scan-line
fallback fails its test. On the 389-plate corpus, markers add about
0.4 ms per overlapping pair; pair and area results are unchanged.
2026-10-15 23:31:14 -04:00
aj dc0aab06fc perf(geometry): heap queue and optional cell budget for PolyLabel
PolyLabel kept its candidate cells in a sorted List, which costs
O(n^2) through Insert and RemoveAt(0). A 48 x 0.002 sliver searched
to 1e-4 took about 27 s.

Use a PriorityQueue keyed by (MaxDist, insertion order). Equal bounds
still pop newest first, and initial cells in sorted order, so every
existing caller gets bit-identical poles. A frozen copy of the
sorted-list implementation checks this on 1800 random shapes and on
symmetric shapes with tied poles. Swapping the tie order fails 25 of
the differential rows.

A new Find(outer, holes, precision, maxCells) overload stops after
about maxCells distance evaluations and returns the best cell so far.
When the starting grid would exceed a quarter of the budget, it is
coarsened so the whole shape is sampled first. The unbounded overload
behaves as before.
2026-10-15 23:31:14 -04:00
aj f04d9f298b perf(diagnostics): compute overlap areas with Clipper2
The material-overlap diagnostic clipped every triangle of one part
against every triangle of the other, then carved each fragment by
every hole triangle. Curved overlaps produced thousands of fragments,
and a part sitting inside another part's cutout was slow even when
clear.

PlateOverlapAnalyzer now intersects each candidate pair's hole-aware
material once with Clipper2, in part-local coordinates on a 1e-8 grid.
Each operand is its outline minus the union of its holes (positive
fill rule). Regions become connected islands: a counterclockwise
outline plus clockwise Holes, including an island that both parts'
holes enclose together. PolygonAreaMoments.TrySubtract gives each
island's net moments. A pair is reported when its total shared area
exceeds Tolerance.Epsilon. Out-of-range or nonfinite coordinates make
the pair incomplete rather than clear. The overlay and the cutting
inspection highlight fill outlines with their holes.

On 389 real PEP-converted plates the pair, clamp-finding and issue
sets are identical to the previous kernel. Pair areas are equal or up
to 0.0002 larger: the kernel drops fragments below its area threshold.
With material prepared, the per-plate clipping maximum fell from
2.6 s to 52 ms (total 5.0 s to 0.5 s).

Engine and validation checks still use Collision.
2026-10-15 23:31:14 -04:00
aj 8663463945 fix(diagnostics): close the tiny-clamp finding rectangle
PlateOverlapRegion vertices repeat their closing vertex, and the
desktop overlay drops that last vertex when it builds the fill path.
The tolerance-free tiny-clamp finding returned four open corners, so
the overlay drew it as a triangle. Close the ring like every other
region.
2026-10-15 23:31:14 -04:00
aj 1c05f65571 docs(geometry): put the Collision GPU port on hold
The hand-written kernel was kept Clipper-free so it could be ported to
a GPU. That port is on hold in favour of Clipper2, starting with the
material-overlap diagnostic. Engine and validation callers stay on the
kernel until a Clipper2 near-contact differential and the layout gate
pass. The former port contract stays documented for reference.
2026-10-15 23:31:14 -04:00
aj fb92b75c06 fix(cutoff): give uncached CutOff.Regenerate the converted-material envelope
A direct CutOff.Regenerate(plate, settings) call with no perimeter
cache argument trusted Part.BoundingBox plus a sub-epsilon roundoff
allowance. A legitimately larger arc refit (ConvertProgram fitting
an imported arc's center to its chord) can protrude past that cached
box by more than the roundoff, so an uncached manual cutoff could
emit a segment crossing the part's true converted material.

Every production call site (Plate.RegenerateCutOffs,
AutomaticCutOffPlanner, the desktop cutoff tools) already builds and
passes a Plate.BuildPerimeterCache dictionary, so this only affects a
direct/uncached caller. Extract the per-part conversion out of
BuildPerimeterCache into Plate.BuildPartPerimeter and use it as a
lazy, on-the-fly fallback in CutOff.ComputeSegments whenever no cache
dictionary is supplied at all, so the uncached path gets the same
conservative envelope as the cached one instead of silently trusting
the bare bounding box. Cached behavior (including a cache's own
explicit null entries from a failed conversion) is unchanged.

OpenNest PM 13f7a685-0564-4cbf-8f46-a7805a0288a0.
2026-10-15 23:26:23 -04:00
aj 04c9f748f9 Merge remote-tracking branch 'github/master' into feat/inspection-view-navigation 2026-10-15 07:42:46 -04:00
aj 1db0ef04f0 fix(desktop): refuse Expand Spacing while a nest or fill is running
Expand now reads the plate on a worker while its Cancel window pumps
messages, so a still-running fill could commit parts into the plate the
search is enumerating (InvalidOperationException: collection modified).
Refuse the command while whole-job nesting, a NestProgressForm or a fill
on any view of the nest is active. The usual plate-action guard is not
reused: ActionSelect reports busy whenever parts are selected, which
Expand requires.
2026-10-14 20:52:52 -04:00
aj 855d686a6a docs(expand): describe cancelling a long Expand Spacing search 2026-10-14 20:39:58 -04:00
aj b7779904f6 feat(desktop): add Cancel to Expand Spacing
Expand Spacing ran its search on the UI thread, so a complex layout froze
the app for minutes with no way out. Run the search on a worker; when it
lasts past 0.3 s, show a small modal window with elapsed time and Cancel.
Cancel, Escape and the close box request cancellation through the
Expander token and the window stays open until the worker stops, so the
layout is never touched afterward. A cancelled run moves no part and
reports it in the status bar instead of the "select two parts" notice.
2026-10-14 20:39:58 -04:00
aj f9e3c361b4 fix(cutoffs): trim lines through clearance-outline vertices to the part
A cut-off line passing exactly through a vertex of the clearance outline
got duplicate intersection hits and fell back to the part's bounding box.
Automatic strip lines sit on a 0.05 lattice that often lands on such
vertices, and the strip search preferred them because the box fallback
measured as less cutting, so planned cut-offs looked box-trimmed while a
slightly moved manual line was trimmed correctly.

Slice the polygonal clearance outline exactly with half-open edges:
crossing vertices count once, touching vertices zero or twice, edges on
the line are excluded whole. Zero clearance and non-polygon outlines keep
the existing path and its conservative fallback.
2026-10-14 20:18:32 -04:00
aj 8834abc854 fix(desktop): pick up a drawing on mouse down in the parts list
Choosing a part from the editor's drawing list armed the pickup only in
Click. Moving the mouse more than 3 px before release started a
drag-and-drop, which takes mouse capture, so the list never raised Click
and nothing attached to the cursor on the plate.

The list now raises DrawingPickedUp on a single left press over a row
and the editor arms the pickup there. Dragging onto the plate still
drops a part at the release point; a completed drop clears the pickup so
a second copy does not follow the cursor. Presses below the last row,
right presses and the second press of a double-click do not pick up.
2026-10-14 16:11:23 -04:00
aj 720c3d9b7a fix(desktop): allow pixel rounding in cutoff drag test
The Windows run 38614147947 failed ActiveCutOffDragNeedsLeftMotionAndEndsAfterSelectionClears because a screen-space drag to world X=11 rounded to X=10.96. Assert bounded movement, then verify the released coordinate stays unchanged.
2026-10-14 14:23:52 -04:00
aj e8c0eea0b0 test(desktop): guard cutoff drag mouse lifecycle 2026-10-14 14:19:08 -04:00
aj bf8ca19ce5 fix(desktop): finish cutoff drag and regenerate after mixed delete 2026-10-14 14:10:39 -04:00
aj 21d38beb53 fix(desktop): select cut-offs with plate windows 2026-10-14 14:10:39 -04:00
aj 18be8a2c81 Match cutoff and remnants icons to cutting toolbar 2026-10-14 13:50:50 -04:00
aj efc2b73709 Add cutting action icons and toolbar shortcuts 2026-10-14 13:50:50 -04:00
aj 1d745d20ba feat(desktop): draw cut-off lines as a prominent orange-red dash
Cut-off scrap lines were a solid 1.5px near-black stroke that read like
another sheet/part outline. They now render as a 2px orange-red dash so
operators can spot scrap cuts at a glance, and the manual cut-off preview
is recolored to match the applied line. Selected cut-offs keep their solid
blue highlight.

Add bitmap regression tests (CutOffDisplayTests) that verify the dashed
orange style, the dashed gaps, and the unchanged selection highlight.
2026-10-14 12:01:11 -04:00
aj 29f48789dd Merge remote-tracking branch 'github/master' into feat/inspection-view-navigation 2026-10-14 10:21:03 -04:00
ajandClaude Opus 5.5 5180ce1506 feat(inspection): keep header zoom live while plate navigation is locked
Validation inspection disabled the whole plate header, so the zoom buttons
and Ctrl+Plus/Ctrl+Minus stopped working even though wheel zoom and fit stay
available. Group the plate navigation buttons into their own container so the
inspection scope can lock them while leaving the viewport-only zoom controls
and shortcuts live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 10:20:57 -04:00
aj 74f32f0516 fix(nests): keep etch marks when clearing lead-ins of PEP nests
PEP-converted nests stored etch marks only in each placed part's locked
cutting program; the drawing program held the contour cuts alone. Because
Remove Lead-ins rebuilds a part from its drawing, clearing lead-ins also
erased the marks from every part.

Recover the marks while reading the nest: when a drawing has no scribe
moves and every placement that kept its saved program carries the same
marks, add them to the drawing in its own frame and refresh that drawing's
clean placements. Saved programs are never rewritten, drawings that already
have marks are untouched, and drawings whose saved programs disagree are
left alone rather than guessed at.
2026-10-14 06:58:24 -04:00
aj 6424512e8c fix(expand): distinguish open-path material entry from bounds 2026-10-13 22:34:21 -04:00
aj 27f8c9799b fix(expand): measure open cutoff segments and refuse uncertain curved gaps 2026-10-13 22:11:12 -04:00