Commit Graph
637 Commits
Author SHA1 Message Date
ajandClaude Opus 5.5 3e361ffc5e fix(labels): draw the 5, 6 and 9 like handwritten digits
The first round glyphs looked odd: the 6 and 9 joined a semicircular
hook to their bowl with a straight side, and the 5 met its bowl with a
flat ledge. The 6 and 9 now sweep into the bowl on one long arc that
meets it tangentially, and the 5 drops a short stem straight into a
round bowl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 09:26:53 -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 781086215a docs(labels): bend groups share an angle correction, not a setup
A bend group letter says how the grain runs against a part's bends,
which changes springback. Parts with the same letter take the same
press brake angle correction and can be formed together; the letter
does not say which way a part bends or that it shares a brake setup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 08:58:11 -05:00
ajandClaude Opus 5.5 08edfd77c2 refactor(geometry): share the arc-sweep filter across arc intersections
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 05:48:42 -05:00
ajandClaude Opus 5.5 b999f4f76f refactor(geometry): share the entity walk between ToPolygon and ToPolygonWithTolerance
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 05:48:42 -05:00
ajandClaude Opus 5.5 e46812b71a refactor(geometry): delegate the list PositiveAreaPolygon to the span overload
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 05:48:42 -05:00
ajandClaude Opus 5.5 5fb52b1aaf refactor(cutoffs): split AutomaticCutOffPlanner.Create into planning phases
Move Create's state into a private Run class whose phases (measure the
parts, place the tail separator, choose and verify the horizontal
separator, bound the candidate count, place shifted or fixed strips, add
the tail and band, build the plan) Create calls in order. The former local
functions become methods with unchanged bodies; AddCandidate's detached
regeneration and definition bookkeeping move into two small helpers.
Expressions, predicates and the order of diagnostics are unchanged; the
characterization digests match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 05:48:42 -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 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 1972aa17c5 fix(geometry): give tangent circles their tangent point, never NaN
Circle-circle intersection passed its containment test for internally
tangent circles while roundoff left r^2 - a^2 a hair below zero, so the
tangent point came back NaN. Material capture refused such parts as
"nonfinite program coordinates" and Plan Cutting fell back to a
best-effort plan: N26-2JJ's crescents (an inner arc tangent to the outer
one) failed whenever they were rotated 180 degrees, but only on the live
DWG geometry, since saving rounds the program and hides it.

Clamp r^2 - a^2 at zero. The externally tangent lead in
NativeContactRegressionTests is now refused on its contact rather than as
an incomplete check. The problem-nest corpus is identical to master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:32:02 -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
ajandClaude Sonnet 5.5 b5069cca6f feat(bends): colour each bend line by its angle to the sheet grain
Add Core BendGrain (across / with / other, 5 degree tolerance, 15 degree
buckets mod 180) and draw each bend line in the plate view by kind: yellow
across the grain, orange with it, blue otherwise. Replaces the whole-part
orange outline warning, which only said that some bend was off.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 16:32:12 -05:00
ajandClaude Fable 5.2 6eec5bb63e perf(geometry): skip far entities when classifying a slide contact
GetMaterialSector measured the contact point against every entity of a
boundary, twice per contact, with trigonometry for each arc. Each entity
now has a box no point within the incidence tolerance of it lies outside,
built once when the boundary is prepared; entities whose box misses the
point are skipped unmeasured. They are farther than the tolerance, so the
nearest entity, the off-boundary verdict and the ambiguity check are
unchanged, and every slide distance is the same.

N26-2J9 Auto Nest: 724 s to 621 s, the same plans and result.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 14:52:50 -05:00
ajandClaude Opus 5.5 a6a823da0d feat(data): add 60x96 sheets to the generic laser config
Add 60x96 to the standard plate-size catalog and to every thickness of
the shipped Generic Laser machine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:49:26 -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
ajandClaude Opus 5.5 e011fe8290 refactor: fold duplicated helpers into one shared copy each
Roslyn Bridge's duplicate scan found helpers copied verbatim between
projects, so a fix to one copy could silently miss the other. Each copy
now calls a single implementation with the same body:

- boundary nearest point: ClipperBridge.NearestBoundaryPoint (ErodedPierce,
  ScrapPierceSearch)
- nesting profile of a part: NestLayoutCheck.Profile (CommonLinePair)
- part label points: PartLabels in OpenNest.Desktop (WinForms LayoutPart)
- copied common-line groups: CommonLineGroup.AmongParts (ActionClone,
  PlaceTool)
- shared saved cutting parameters: CuttingParametersSerializer.SharedBy
  (MCP, Console)
- bounding box of boxes: generic BoundingBox.GetBoundingBox<T> (rectangle
  packing items)
- box proximity: Clearance.BoxesWithin (Expander)

Behavior is unchanged: every moved body is identical to the copies it
replaces, so the fill change in Expander and rectangle packing skips the
problem-nest corpus. Core, IO, Desktop and Engine suites and the label,
clone and common-line WinForms tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:50:53 -05:00
ajandClaude Opus 5.5 c48fbd87b8 fix(fill): thin dense spacing outlines and stop near-circle offset joints
A braze-casing angle whose 0.98" curve was exported as 199 lines of
0.005" made a single Fill of 33 copies take 8.6 minutes, and Auto Nest's
Irregular engine never finished its first plate in 15 minutes: it
proposes such fills as Lattice blocks.

Two causes. Shape.JoinOffsetLines tested convexity with an unnormalized
cross product, so shallow concave turns between tiny lines fell under
the epsilon, the nearly parallel offsets missed each other, and the
fallback arc swept the long way round: a near circle per joint, 414
entities in the spacing outline. A non-convex turn now gets a straight
bridge, as concave corners already do.

Spacing outlines with a dense run of tiny entities are also thinned to
Douglas-Peucker chords on an offset padded by 0.0015, so every chord
stays outside the true spacing outline: clearance can only grow, by at
most 0.003 beside the run, and validation still reads true geometry.
The angle's outline is now 21 entities; the Fill takes 69 s with no
overlaps, and Irregular finishes the whole job (24 sheets in under 5
minutes, 22 by a 15-minute limit, against 28).

Problem-nest corpus (auto-nest, fill): all layouts and counts unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 13:26:51 -05:00
ajandClaude Opus 5.5 18ab2f2cbb fix(cutting): rank every support-tabbed part's entries by the route
A part a single tab could hold level kept its outside entry to the points
where the tab steadied it, so the head detoured to them and often left the
part back over itself. Tabs hold most parts wherever they land, a part whose
tab does not is still tabbed and avoided once cut, and the detour costs
every part. Every support-tabbed perimeter now offers each entry clear of
inside corners (plus its best tab point), ranked toward the next cut like an
untabbed part's. Only when none of those fits a lead-in does the search fall
back to every entry, steadiest first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 11:41:50 -05:00
ajandClaude Opus 5.5 60f9f1cc56 fix(cutting): enter a holed part's outside on the way to the next cut
Long holed strips on a support grid were entered mid-length, and those
resting on a line of contacts beside their center of gravity on the far
side, so the head left back over the strip. Four causes:

- A support tab that cannot hold a part level still led its entries with
  the steadiest point. No such entry steadies the part enough to be worth
  a detour, so every entry clear of inside corners now ranks toward the
  next cut, as for an untabbed part. The part is still tabbed and still
  avoided once cut.
- A next part level with this one's center faced the bottom by rounding.
  A level target now faces neither side on that axis.
- The tab-retention check measured a lead-in against the start tangent,
  so a straight in-line corner lead-in on a tabbed outside, which runs
  back off the part while the gap lies along the other edge, was refused
  at every corner. A part's only open cut now measures toward its gap.
  Cutouts cut in pieces keep the old rule.
- Travel measured from before the part, not from its cutouts.

A holed part now tries first the outside entry where the straight line
from its cutouts to the next part's leaves it: the shortest way between
them. The search and contour recovery both lead with it; every check
still applies.

The problem-nest corpus ranks no plate below its baseline, and none at
80% of its budget; five ConstraintConflict plates now plan BestEffort.
Five planning fingerprints change, all still Ready: rapid travel drops
14-17% on four and rises 0.5% on mixed-irregular. A kept-order replan
after a cut-off segment may now find a shorter route than the plan, so
that test checks the route is no longer rather than identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 10:22:04 -05:00
ajandClaude Opus 5.5 be0fc8dfca feat(cad-converter): add Select Chain to the entity right-click menu
Picking every piece of a contour one click at a time is slow. Select
Chain grows the selection through every line and arc joined end to end
(at the shape-building chain tolerance), so a closed loop, and anything
branching off it, is selected whole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 08:26:30 -05:00
ajandClaude Opus 5.5 05afb23a5a fix(simplify): keep simplified contours closed and free of added corners
The mirror pass replaced an arc with its mirror image whenever the image
landed within the fit tolerance of the arc's endpoints, leaving gaps of up
to that tolerance; it now only lends its radius to a refit through the
arc's own endpoints, and only when that keeps the arc's end tangents.

Arc fitting fell back to tangent-free fits when the next arc could not
leave along the previous arc's end tangent, putting corners where the
drawing is smooth (two same-way arcs across an inflection). Chained arcs
now start exactly tangent, shortening the previous arc when that lets the
next one reach further, and an arc is kept only if it turns no more
sharply against its neighbors than the original polyline (plus 1 deg);
otherwise it is trimmed or its lines stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 21:46:53 -05:00
ajandClaude Opus 5.5 c8ba250adc feat(cad-converter): separate a file that draws several parts
A file such as a sheet of ornaments imported as one drawing, with every
part but the largest treated as a cutout. PartBodies (Core) now finds the
separate parts by contour nesting, and the CAD Converter offers a
Separate (N) button plus Separate This Part / Separate All Parts in the
entity menu. Each part keeps its entity IDs, so roles, exclusions,
breakoffs, tabbed cutouts and dimensions follow it; separation is refused
when a breakoff or tabbed cutout spans parts.

SVG import keeps element titles as labeled regions, which name the
separated parts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 20:53:08 -05:00
ajandClaude Fable 5.2 b137df8428 fix(review): a round part resting on an outlined sheet's edge is not flagged
On a sheet with a custom outline the plate edge review, Auto Nest's layout
check and the runner's candidate validation tested the part's spacing
outline against the usable area. That outline circumscribes arcs by up to
0.001, more than any of their slacks, so a disc whose true bounds rest on
the work-area edge read as inside the outline's edge spacing (or off the
plate at zero spacing) while the same disc on a rectangular sheet, judged
on its true bounds, was clean.

The outline test now works as the part-spacing check does: the spacing
outline finds the candidates and a failure is confirmed on the part's
native contour (NativeContours.Region: arcs circumscribed at 0.000025 and
clipped to the perimeter's true bounds). Both regions contain the material,
so a part past the usable edge by more than the slack still fails; no slack
changed. The runner now calls the layout check's own outline test
(NestLayoutCheck.InsideOutline): its separately flattened candidate could
accept a pose on a slanted edge that the layout check then rejected.

Pushes on an outlined sheet measured the same circumscribed perimeter so a
part would rest where the review passed, and box pushes stopped 0.0012
short of a wall for it. With the review confirming on native contours they
slide the material's own lines and arcs, so a round part rests on a wall
exactly as on the plate edge, and a box push rests the box on the wall.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 08:49:00 -05:00
ajandClaude Fable 5.2 3544e924c1 fix(compactor): a tabbed part pushes away from a neighbor at the spacing
A part whose planned outside carries a perimeter tab could not be pushed
away from a neighbor it rested against at the part spacing, and the
neighbor could not be pushed away from it: the push returned 0 with open
sheet ahead. It showed whenever the neighbor's bounds wrapped the part
(an eared or C-shaped neighbor), since otherwise the broad phase skips an
obstacle that is wholly behind.

The tab stops the cut short of its entry, so with the leads dropped the
outside is an open chain. Its spacing-offset contour does not close, the
slide kernel cannot tell which side of it is material, and it blocks
every contact against a boundary it cannot resolve. The parts were never
closer than the spacing.

PartGeometry now closes a tabbed contour across its tab before any
offset: the trimmed last cut is restored along its own line or arc
(exact), a round outside cut as one arc becomes its circle, and a tab
that swallowed whole entities is bridged by its chord, as flattening to
a polygon already closes it. Only a single gap is closed; closed
material is returned untouched, so untabbed parts and the fills see the
same geometry as before. No kernel code or tolerance changed, so a push
into a neighbor still returns 0 and a contour cut in several pieces
still blocks.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 08:30:56 -05:00
ajandClaude Fable 5.2 f5fae5c9e1 fix(plate): pushes stop at an outlined sheet's edge; outline import keeps straight edges exact
A plate with a custom outline was pushed against its bounding box only, so
a part pushed toward a missing corner ran through it to the box edge and
ended off the sheet. Compactor's plate pushes (Push, PushBoundingBox,
SettlePlacement, Settle) now also stop at the walls of the outline: the
part of the work area that is not usable material (a missing corner, an
obstacle, each grown by the largest edge spacing). A mover is measured as
the edge review measures it, by the circumscribed perimeter of its clean
material without leads, so it rests where that review still passes. A box
push stops 0.0012 short of a wall so the geometry push after it starts
clear. A rectangular sheet has no walls and pushes exactly as before.

SheetOutline.FromGeometry eroded the whole imported outline by the chord
tolerance, so a sheet drawn 60 x 27 was stored as 59.998 x 26.998 with a
chamfer at every inside corner. Each arc is now chorded on the side that
takes material away (ClipperBridge.FlattenOneSided) and straight edges are
kept exactly. The plate header, the plate list and Edit Plate's outline
size show the size rounded to four decimals instead of the raw double.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 07:49:11 -05:00
ajandClaude Opus 5.5 2be966187c fix(plate): turn the grain when the plate is rotated 90 degrees
Grain belongs to the physical sheet, so Rotate Plate CW/CCW must turn it
too: a 60x120 sheet with side-to-side grain becomes a 120x60 sheet whose
grain runs front to back. Rotate90 swapped the size and turned the parts
but left GrainAngle alone, so bend-vs-grain warnings were wrong after a
rotation. A 180-degree turn leaves the grain's line unchanged.

Grain angles are lines, so they are kept in [0, pi).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 11:01:57 -05:00
ajandClaude Opus 5.5 cacfdcf5dc fix(cutoffs): keep automatic lines clear of nearby cut-offs
Automatic cut-offs matched existing cut-offs only on the exact same line,
so a grid line could land a hair beside a manual cut-off (or the planner's
own tail separator) and cut a sliver strip next to it. The planner now
keeps a cut clearance - the separator's part margin, the larger of part
spacing and cut-off part clearance - from every parallel cut-off:

- a full-span cut-off within it stands in for the proposed line (or the
  tail separator) and is certified at its own X;
- a shortened or gapped manual cut within it is a blocking conflict, as an
  exact same-line conflict already was, and the shift search avoids it;
- a strip line within it of a kept separator or full-span boundary is not
  cut, letting that strip run past the spacing by less than the clearance;
  the open sheet end keeps the bare tolerance, since oversize stock leaves
  its far edge unknown;
- a new horizontal separator beside an unhonored horizontal cut-off is not
  proposed.

With zero clearance and part spacing the guard falls back to the old
same-line tolerance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 08:34:46 -05:00
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 587613ff89 feat(shapes): add angle, channel and rolled plate to the Shape Library
Each makes the flat blank of a part bent or rolled along its length,
sized with the bend allowance at the K-factor. Angle and channel bends
are saved on the drawing as 90 degree up bends and etched as an
imported DXF's up bends are. The preview draws each part's section
beside the blank, dimensioned with the formed sizes; a long part's
section is enlarged so it stays readable. K-factor is a plain number,
not a length, in the form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 17:28:58 -05:00
ajandClaude Opus 5.5 cb3c2c7884 fix(ui): say replan in common-line findings and show & in the copy-tabs label
Common-line review findings said "plan cutting again" while the rest of the feature says replan, and one read as a statement instead of an action. The Copy Tabs & Pierce label rendered its ampersand as a mnemonic underline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 08:17:38 -05:00
ajandClaude Opus 5.5 6a2a4a9bc9 fix(posts): word refusal hints for the console as well as the desktop
Head raise, head-lock and single-pass common-line refusals also print from the console, which has no settings dialog or Plate menu. They now point at the post settings and at cutting common lines twice without naming desktop-only paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 08:17:38 -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 7894b74cb7 fix(shapes): cut shape library parts in the CAD Converter's directions
The CAD Converter winds every drawing's outside clockwise and its cutouts
counter-clockwise (ShapeProfile.NormalizeEntities) before building the
program, but the Shape Library built its programs straight from the
generated entities, which run counter-clockwise. A shape part therefore cut
its outside the opposite way from an imported part, and opening it in the
converter showed (and on save, wrote) the reverse of what was nested.

ShapeDefinition.CreateDrawing now normalizes the entities the same way, so
every shape cuts outside clockwise and cutouts counter-clockwise. Tests cover
each shape type, including the pipe flange's holes, and that rebuilding a
shape drawing through the converter's import path keeps its directions.
Drawings already made from shapes keep their stored direction until they are
recreated or saved from the converter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:45:40 -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 536f7f7fd7 feat(shapes): keep diameter and radius leaders aimed at the circle center
Dragging a Shape Library leader on a bolt circle, hole or corner arc now
moves its arrow round the curve so the line stays radial. The flange's
bolt circle is drawn dashed in teal instead of dotted orange, which read
as a solid dimension line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 09:59:10 -05:00
ajandClaude Fable 5.2 32fc3cad97 fix(core): color drawings from the classic palette when a scheme has no part colors
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 19:54:48 -05:00
ajandClaude Fable 5.2 bc0136e3f7 refactor(core): move cut-offs into OpenNest.CutOffs
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 19:42:45 -05:00
ajandClaude Fable 5.2 c8e899c493 refactor(core): move common lines into OpenNest.CommonLines
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 19:40:26 -05:00
ajandClaude Fable 5.2 cd5a400a22 refactor(core): move clamps into OpenNest.Clamps
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 19:38:20 -05:00
ajandClaude Fable 5.2 70ca4c4be6 refactor(core): split Plate into partial files by concern
Moves whole members verbatim into Plate.CommonLines.cs, Plate.Clamps.cs, Plate.CutOffs.cs, Plate.Transforms.cs and Plate.Sizing.cs. No behavior or API change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 19:32:51 -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 986167a411 refactor(core): refresh Drawing's derived state through ProgramChanged
Area and the canonical angle were refreshed together only by the Program setter; an in-place program edit needed two separate calls, and UpdateArea kept a stale Area when no material was left. ProgramChanged is now the single entry point (the setter calls it), a program with no material or a null program gives Area 0, and UpdateArea/RecomputeCanonicalAngle are private.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 19:20:22 -05:00
ajandClaude Fable 5.2 dec685361c refactor(core): make Math and Geometry Core's bottom layers
Move ContourSampler to OpenNest.CNC and DrawingAligner with its
AlignmentResult types to OpenNest.Converters: they were the only Geometry
files importing CNC and Converters. Their tests move with them.

CoreLayeringTests scans the Math and Geometry sources against the type
names reflection finds in Core, so neither can name a higher layer again.
Geometry keeps six root-namespace types on an explicit allowlist, and the
files declaring them may reference only Math and Geometry.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 19:12:13 -05:00
ajandClaude Fable 5.2 9b893c7a09 refactor(core): remove Plate.HasOverlappingParts
Its last callers were four strategy tests; they now use
PartOverlapChecker.FindOverlappingPairs, which also reports
contained and stacked parts.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-12 19:11:37 -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