Skip to content

Fix inflation preventing placement of items matching bin dimensions#67

Open
n41l wants to merge 2 commits intotamasmeszaros:masterfrom
n41l:master
Open

Fix inflation preventing placement of items matching bin dimensions#67
n41l wants to merge 2 commits intotamasmeszaros:masterfrom
n41l:master

Conversation

@n41l
Copy link
Copy Markdown

@n41l n41l commented Feb 15, 2026

Summary

  • When min_obj_distance > 0, items are inflated before packing but the bin was not, causing items whose dimensions match (or nearly match) the bin to fail placement
  • Now the bin is inflated/deflated by the same amount alongside items, so inflation only affects item-to-item spacing, not item-to-bin-edge spacing
  • Added inflateBin overloads for _Box, _Circle, and arbitrary polygon bin types

Test plan

  • Existing tests pass (1716 assertions in 19 test cases)
  • New test: single item matching bin dimensions packs with min_obj_distance > 0
  • New test: bin-width item + smaller item pack into one bin with min_obj_distance > 0

🤖 Generated with Claude Code

n41l and others added 2 commits February 15, 2026 16:30
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When min_obj_distance > 0, items are inflated before packing but the bin
was not, causing items whose dimensions match the bin to fail placement.
Now the bin is inflated/deflated alongside items so inflation only affects
item-to-item spacing, not item-to-bin-edge spacing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant