fix(expand): open a packed selection one axis at a time

Expand Spacing moved nothing on a plate holding two groups of flat bars at
different rotations: they are no single repeating pattern, and the pair
search needs every pair to reach one spacing, which it could not do on the
packed layout.

When the pair search gains nothing on a packed selection, open X and then Y
on their own, keeping the parts' order, and report the gap of each axis.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Sonnet 5.5 committed 2026-12-03 21:30:43 -05:00
1 parent 2c9b458761
commit 207c9c8cf1
5 files changed
+333

No files matched your search

+4
View File
@@ -2,6 +2,10 @@
`Plate > Expand Spacing` moves selected parts by translation only. Any selected part may move: a pair of selected parts shares each push (the later part takes half, the earlier part the rest, and the later part whatever its partner has no room for), so the selection opens about its middle and a part on the edge leaves the push to its partner. A selected part pushes away from a nonselected part alone, and nonselected parts remain fixed. The search probes ever wider spacings (doubling, then bisecting between the last spacing that converged and the first that failed) and applies the widest one that converged. The command does not change `PartSpacing` or `EdgeSpacing`. To push apart only the parts the overlap check flags, use [Fix Spacing](fix-spacing.md).
## Opening one axis at a time
The pair search above asks every pair to reach one spacing, so one pinned direction, or a long stack it cannot ripple through, can leave the whole selection unmoved while the other direction has room. When it gains nothing on a packed selection (its smallest gap is at most twice the plate's part or widest edge spacing, and it did not start overlapping or outside the work area), the selection is opened along X, then along Y. This covers, for example, two groups of flat bars at different rotations, which are no single repeating pattern. Parts move only toward the high side of the axis and keep their order: each is pushed just far enough that its gap to every lower neighbor reaches the axis's spacing, which is the widest at which the longest chain of parts still fits with its edge strips. Wider gaps absorb the push first. As for a repeating pattern, no selected gap closes below the smallest selected gap at entry, gaps to nonselected parts close no further than that, no clamp is entered and no part passes through a fixed part. The status bar reads, for example, "Opened gaps: 0.55 along X, no room along Y". Selections with cut-offs or with parts whose bounding boxes overlap are left to the pair search.
## Edge strips
The strip of sheet between a part and the plate edge grows with the spacing: at a target spacing *s*, each selected part's box stays at least *s*/2 from every plate edge, and never inside that side's `EdgeSpacing`. A web between two parts takes heat from a cut on each side, while an edge strip takes it from one, so a strip half as wide holds about as much material per cut. Until *s* passes twice the edge spacing the strips are just the edge spacing, as before. Beyond that, a part closer to the edge than *s*/2 is pushed straight inward, as far as material and its pair floors allow. A probe converges only when every strip holds, so a part boxed in between the edge and a fixed part caps the spacing at the widest *s* its strip and gap can share. The strip never counts toward the reported spacing. When no wider spacing converges, the layout keeps its entry spacing, and edge parts move inward only as far as that spacing's floors allow. Cut-offs run to the edge by design and have no strip, and a part already outside the work area is reported as an edge violation instead. A clamp keep-out stays a hard boundary with no strip.