No Login Data Private Local Save

2D Bin Packing Simulator – Fit Rectangles into a Sheet

15
0
0
0
Sheet Dimensions
px
px
Add Rectangle
Rectangle List 0
#SizeQty
No rectangles added yet
-- Utilized -- Placed -- Left

Add rectangles and click Pack to visualize

Frequently Asked Questions

2D Bin Packing is the problem of placing a set of rectangular items into a larger rectangular container (the "bin" or "sheet") without overlapping, minimizing wasted space. It's widely used in wood cutting, sheet metal fabrication, textile manufacturing, PCB design, and shipping container loading. Our simulator uses a Bottom-Left heuristic algorithm to find near-optimal arrangements quickly.

We use a Bottom-Left Fill (BLF) heuristic enhanced with rotation support. Rectangles are sorted by area (largest first), then placed one by one at the lowest feasible position. The algorithm scans candidate positions generated from corners of already-placed rectangles, checking for overlap and boundary constraints. When rotation is enabled, both orientations are evaluated, and the one yielding the lowest top-edge is chosen — maximizing space utilization.

Yes! Toggle the "Allow 90° Rotation" switch in the settings panel. When enabled, each rectangle can be rotated 90 degrees if it results in a better fit. This is especially useful for sheets with constrained dimensions — a tall narrow rectangle might fit perfectly when turned sideways. The algorithm automatically tests both orientations at each candidate position.

Unplaced rectangles occur when there is insufficient contiguous space remaining on the sheet. The BLF algorithm is a heuristic — it finds good solutions quickly but doesn't guarantee optimality. If rectangles are left out, try: (1) enabling rotation, (2) reducing some rectangle dimensions, (3) increasing the sheet size, or (4) adjusting the order of rectangle insertion. Even professional-grade nesting software sometimes leaves small gaps that can't fit remaining pieces.

This simulator directly models real-world cutting and packing scenarios: CNC wood panel cutting (fitting cabinet parts onto plywood sheets), laser cutting layouts for acrylic or metal, fabric pattern nesting in garment production, glass panel cutting for windows, and shipping pallet optimization. While our simulator doesn't account for kerf (blade width) or grain direction, it provides an excellent first-pass estimation of material utilization.

To maximize sheet utilization: (1) Enable rotation — it often boosts efficiency by 5-15%. (2) Group rectangles of similar dimensions together. (3) Place the largest rectangles first (our algorithm does this automatically). (4) Consider using multiple sheets if utilization is low. (5) Try slightly adjusting sheet dimensions — sometimes a small change creates a dramatically better fit. Industry benchmarks typically achieve 75-90% utilization with good nesting software.

No. 2D Bin Packing is NP-hard, meaning finding the absolute optimal arrangement becomes computationally infeasible as the number of rectangles grows. Our heuristic algorithm produces near-optimal results in milliseconds, which is the standard approach used in commercial software. For small sets (under 10 rectangles), the solution is often optimal or very close to it. The trade-off between speed and optimality is a well-studied challenge in operations research.