Commit Graph
13 Commits
Author SHA1 Message Date
ajandClaude Fable 5.2 593757608c feat(labels): share one bend letter among parallel bends close together
Two parallel bends an inch apart each got their own group letter, though parallel bends are always in one group. A bend now gets none of its own when a letter is already placed for a parallel bend within 12 inches (300 mm) of its line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 21:18:00 -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 Opus 5.5 7634c95fc7 feat(labels): find the label box for half-inch text, stepping down to fit
Quarter-inch etching is hard for the shop to read, and most of the crew
would rather have half-inch text. Find Best Location now tries half-inch,
then three-eighths, then quarter-inch text (12, 9, 6 mm) and keeps the
largest that fits, so big parts get readable labels and small parts still
get one. Only when even the quarter-inch label fits nowhere is a box
placed for hand adjustment, at that smallest size. Boxes already placed
keep their size until found again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:53:24 -05:00
ajandClaude Opus 5.5 75f7444aab feat(labels): etch each bend group letter inside a circle
A dash and letter after the part number (4980A01PT09-A) reads like a
revision, and many part numbers already end that way, so the shop could
not tell where the number stops and the bend group starts. Each group
letter is now etched at 0.6 of the text height inside its own circle the
text height across, clear of the name: 1234 (A)(B). One shape for every
group keeps the shape itself from seeming to mean something.

The circles take more room than "-AB", so the default label box grows
from seven characters to eight to keep a four-digit number and two groups
at full height. The gusset finder test is pinned to the seven-character
size it was written for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:53:23 -05:00
ajandClaude Opus 5.5 2999507559 feat(labels): preview the etched label text inside the label box
The box gave no hint of what Plan Cutting would etch in it: a box resized
tall and narrow silently etched nothing, because the text reads along the
box's width and is dropped once it shrinks below half the box height.

The CAD Converter now draws the label in the box, laid out by the same code
Plan Cutting uses (PartLabels.Layout, split out of Strokes). It previews the
full name-and-bend-groups text for the unrotated part, the longest form, and
turns the box red with "Too small to etch" when nothing would be etched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:38:27 -05:00
ajandClaude Opus 5.5 d52388bc57 feat(labels): place the label box by hand when it fits nowhere and let it turn
A part too small for the label (such as a bent 2 x 1 tab) told the user to
place the box by hand, but nothing let them: the button only ever ran the
finder. Now it places a full-size box on the roomiest flat spot a smaller
label fits (or the part's middle) and says to adjust it.

The box could be moved and resized but never turned, so a slanted placement
was stuck. A round handle above the box now turns it (5 degree steps, free
with Shift), and the Label Box menu adds Rotate 90 and Make Horizontal. The
angle stays within a quarter turn of horizontal so text never reads upside
down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:38:27 -05:00
ajandClaude Opus 5.5 5c6f1f83ff feat(labels): round digits in the etch font and sequence a part's etches
The label font drew every digit with straight segments (a boxed 0, a
squared 8), so etched part numbers looked crude. Strokes can now hold
arcs: 0, 2, 3, 5, 6, 8 and 9 are drawn on arcs and etch as arc moves
(incremental programs get their arc centers as steps too). The zero
keeps its slash so it never reads as the letter O.

A part's scribes were etched in the order they were drawn, so on PT56
in N26-2DC the head etched one bend's two edge marks, crossed the part,
etched the next bend's, and then crossed back again to start cutting
(162 in of rapids). Scribes are now ordered as a nearest-neighbor tour,
tried from every mark, with either end of an open mark allowed, and
ending near where the first cut starts. They are prepended after the
cuts are emitted so that start is known. PT56 now etches one edge, the
label, then the other edge, beside its first pierce (86 in).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 09:26:52 -05:00
ajandClaude Opus 5.5 75570a9475 fix(labels): place the label box where it has the most room, favoring level text
LabelBoxFinder scored a maximal rectangle by how many label heights fit across
it, so a long, thin strip (the gap between a hole and a slanted edge) beat a
roomier pocket, and centering put the box at the strip's narrowest point.

Each orientation now finds the widest margin the label can have on every side
beyond the clearance, by bisecting on the margin and asking only for
rectangles at least that thick, and centers the box in the rectangle that
gives it. A turn off the axes must give half again the margin plus half the
label height before it replaces horizontal or vertical text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:55:11 -05:00
ajandClaude Opus 5.5 3108fdb64a fix(labels): etch labels in place on imported drawings and keep them out of drawings
Imported drawings are incremental programs, but PartLabels.AddTo appended
absolute points, so each stroke was read as a step from the last and the label
ran far off the sheet. It now writes steps from where the program stops
(ConvertMode.EndPosition).

On load, DrawingMarkRecovery took the etched label from applied part programs
back into the drawing as a lost mark, so it was etched again by every later
plan, labels off included. Drawings with a label box are now skipped.

Also load a labelMode number that names no mode as if it were absent, and show
such a mode as Off in the Cutting Parameters dropdown instead of throwing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:56:57 -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 Sonnet 5.5 6b37953be4 feat(cad-converter): find and show a part number label box
Add LabelBoxFinder (Core): erodes the cut material by an etch clearance,
cuts bands out around bend lines and breakoff scrap, then centers a
label-sized box in the roomiest empty rectangle over a few orientations
(axes, bend and edge directions). Placement is stored on
Drawing.LabelBox in the source frame, persisted in the .nest file and
carried through BuildDrawing/ApplyEdit; it never affects the program.

The CAD Converter gets a Label Box... button that finds the best spot,
draws it as a dashed rectangle, lets the user drag and resize it, and
warns when nothing fits. Etching the text is a later step.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 17:30:24 -05:00