Pressria Bridge Blog

Why We Obsess Over the Space Between Groups

Engineering Nesting

On grouped 2D nesting, the boundary problem, and what we've learned building Pressria Bridge.

The Easy Half of Nesting

If you've ever looked at a ganging software demo, you've seen the standard pitch: lots of jobs packed onto one sheet, no wasted space. True-shape nesting. Tetris with cow stickers.

That part — packing similar items densely — is well-understood. Decades of research, dozens of open-source libraries, plenty of commercial implementations. Pick a heuristic (NFP, MaxRects, bottom-left fill), feed it items, get a layout.

The problem is what happens next.

The Real Problem: Sorting

Once the sheet comes off the press and through the cutter, somebody has to sort the output. Same designs into the same bag. Different orders into different boxes. Reprints separated from new jobs.

True-shape nesting maximizes sheet utilization, but the result is a jumble. Cow stickers tucked between elephant heads, pigs rotated 90° to fill gaps. Beautiful for the press operator. A nightmare for whoever ships the order.

The industry's response has been isolated-section ganging — give each job its own rectangular zone on the sheet so post-cutting separation becomes trivial. Cut along the grid lines, and each zone is one job, ready to bag.

It works. It's also wasteful.

Flow Nesting With Group Continuity

Our current approach — call it flow-based grouped nesting — works like this:

  1. Group identical designs into super-items. A super-item is a row (or partial row) of the same design, sorted and oriented identically.
  2. Pack super-items in flow order. Largest groups first, flowing left-to-right, top-to-bottom across the sheet.
  3. Preserve group continuity across row boundaries. A group of 30 lighthouse stickers might span 2.5 rows.
  4. Fill negative space with singletons. After all super-items are placed, items without a group get NFP-packed into the gaps.
Pressria Bridge Nesting Example showing grouped continuity and singleton filling

The result: group continuity is preserved (sortable), boundaries between groups aren't straight rectangles (no zone dead space), and gaps within groups get filled by singletons (high utilization).

Captured from a live working session — not produced for this post. The five super-item groups (red/blue character figures, gray bears, brown-haired characters, pink characters) maintain continuity, while singletons in the lower-left and middle (text keyrings, small character keyrings, miscellaneous shapes) fill the negative space.

The Hard Part Isn't Inside the Groups

Here's what we've learned the hard way: packing within a group is the easy half. The hard half is the boundary between groups of different sizes and shapes.