mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-16 12:35:34 -05:00
The gap pass only fills around the parts a clamped fill keeps, so a row laid on the clamp-blind grid can still waste most of each space between two clamps. Also take the clamped edge's row out and refill it slot by slot, one slot between each pair of clamp keep-outs and one past each end, each reaching the next part at the part spacing, then fill any gaps left. Slots never overlap, so a wide rectangle above the clamps cannot take a slot's space first. The repacked row is kept only when it places more parts than gap-filling alone. On a 120 x 60 sheet of 3.8 x 11.8 parts with front clamps at 20/40/60/80, the clamped layout goes from 129 to 131 parts (the lifted layout's 134 still wins there). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>