RULE / ROTATIONS

Rotations in 3D packing

Orientation is restricted per axis, not as a single on/off switch, and 'this side up' is expressible on the item that needs it.

EXPRESSED WITHallowed_rotations · keep_upright

Why it exists

Real goods have orientations they must not take. An engine that silently tries all six orientations answers a different question from the one that was asked.

What a useful refusal looks like

The engine returns the rule that refused, the item it refused, and the measured value against the configured threshold. It also states how strongly that is backed: proven, observed, inferred, or unknown because a search limit was reached first.

See the fixtures for this rule
THE SAME REQUEST, WITH AND WITHOUT THE RULE

What this rule changes

One request, run twice by @packvium/engine while this page was built: once as written, once with only this rule taken out. The request diff is the whole input change; everything in the result diff follows from it.

WITHOUT THE RULEEverything fitted1/1
2000×300×400 · 37.5% used
plank × 1
Open in the Playground →
WITH THE RULEBest packing found0/1
REFUSED · 1
plank#1Proven

No permitted rotation fits rotation_restricted

Open in the Playground →
REQUEST DIFF
  … unchanged lines: 9          "height": "1500"        },+       "keep_upright": true      }    ],  … unchanged lines: 11
RESULT DIFF
  • statusEverything fitted → Best packing found
  • items packed1 → 0
  • containers opened1 → 0
  • plank#1packed → rotation_restricted · proven