fix(cutoffs): hull open outlines from their arcs, not whole circles

A cut-off beside a part whose outline is open (a tab gap) is trimmed
against the part's convex hull. CollectPoints gave each arc its whole
circle's quadrant points, so a shallow arc stretched the hull far past
the part: a radius-15 lug bottom trimmed a full-height cut-off to the
top of the part (N26-2EV) and a concave arc split another in two
(N26-2F2). Loading a nest regenerates cut-offs from the tabbed
programs, so the cut-off looked broken after save and load.

The hull now takes points on each arc and circumscribed ones just
outside it (within 0.001), so it still holds every arc. CollectPoints
is unchanged because FindBestRotation relies on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Opus 5.5 committed 2026-12-02 13:33:22 -05:00
1 parent ee09c8368e
commit 4cacddc059
3 files changed
+97 -2

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ The same margin is the *cut clearance*: no new line is cut within it of a parall
At the default 0.02-inch cut-off clearance and zero part spacing the cut clearance is 0.02 inch; with no clearance and no part spacing it falls to the numerical tolerance, where only same-line cuts match.
Cutoff trimming measures clearance from the part contour, excluding tagged lead-in and lead-out moves when building the closed outline. Leads must not turn a recessed outline into a convex hull and leave oversized gaps elsewhere. Genuinely open contours (a tab gap, for example) still use the conservative hull/bounds fallback, but the hull is built from the material contour only: a cut-off may cross a lead, and hulling a lead's pierce point stopped cut-offs far short of the part. With a nonzero clearance, a line passing exactly through a corner of the clearance outline is trimmed to the outline like any other line. Automatic strip lines sit on a regular lattice and often land on such corners; they once fell back to the part's bounding box there, and the strip search preferred those lines because the box fallback measured as less cutting. The conservative curve/offset approximation can leave a small extra gap (about 0.0003 in on a straight edge at the default 0.02-in clearance), not an extra quarter inch.
Cutoff trimming measures clearance from the part contour, excluding tagged lead-in and lead-out moves when building the closed outline. Leads must not turn a recessed outline into a convex hull and leave oversized gaps elsewhere. Genuinely open contours (a tab gap, for example) still use the conservative hull/bounds fallback, but the hull is built from the material contour only: a cut-off may cross a lead, and hulling a lead's pierce point stopped cut-offs far short of the part. Its arcs are hulled from points on and just outside each arc (within 0.001), never from the arc's whole-circle quadrant points: a shallow arc's circle can reach far past the part, and those points once trimmed a cut-off beside a tabbed part to the top of its bounding box. With a nonzero clearance, a line passing exactly through a corner of the clearance outline is trimmed to the outline like any other line. Automatic strip lines sit on a regular lattice and often land on such corners; they once fell back to the part's bounding box there, and the strip search preferred those lines because the box fallback measured as less cutting. The conservative curve/offset approximation can leave a small extra gap (about 0.0003 in on a straight edge at the default 0.02-in clearance), not an extra quarter inch.
If no safe separator fits inside the sheet, there is no retained-tail claim and the nominal cuts may cover the full sheet length. A proposed tail is not reported as separated unless its generated program spans the full sheet width. An active clamp blocks any proposed full-width line whose X coordinate falls in the clamp's whole footprint plus its clamp clearance, including a nominal grid line or an equivalent existing line. An existing line within the cut clearance is tested at its own X as well as the proposed X, because that existing line is what would be certified. A manual cut with different limits on or beside the line still blocks the whole plan, even on a clamp. Blocked strip lines are skipped with a clamp diagnostic. A tail separator that would cross a clamp moves just past it instead, away from the origin, to the far edge of the clamp's footprint plus its clearance (stepping past any clamp whose clearance it then meets), and reports `ClampMovedTailSeparator`. The tail it keeps is shorter by that distance and must still meet the minimum tail length. A separator pushed off the sheet, or blocked another way, reports `NoSafeTailSeparator` rather than claiming separation. On a 120-inch sheet with parts through 100 inches and rail clamps every 20 inches (1.5 wide, 0.25 clearance), the separator at 100.25 sits on the clamp spanning 99.25 to 100.75, so it moves to 101 and keeps a 19-inch tail. Removed clamps on a sheet are absent from its active zones and do not block cuts. Stored zones are relative to the sheet's lower-left corner; the planner maps them into the plate's quadrant frame (the same frame as part and cut-off coordinates) before comparing, so the rule holds in all four quadrants. Obstructed or minimum-length-filtered lines produce diagnostics; they are not proof of a completed partition.