Prevent Items From Being Rotated During Packing: Why It Matters
A carton labelled “this side up” is not a suggestion. It is a constraint — and the moment a packing plan tips that carton onto its side, the label has been ignored. If you have ever unpacked a shipment of leaked bottles or cracked monitors, you already know how expensive one ignored rotation rule can be.
This article is about the specific question of how to prevent items from being rotated during packing: what the constraint actually means in a 3D packing problem, when it is worth setting, and how to express it in RSJ 3D Packer without handcuffing the solver. We will stay on rotation. Stacking rules are a separate topic — see Stacking Constraints in Container Packing Explained if you want that side of the puzzle.
What Does It Mean to Prevent Rotation During Packing?
Every item in a 3D packing problem has three dimensions: width, height and depth. Those map to the x, y and z axes. In principle, an item can be turned around any of those axes, producing a set of possible orientations:
- Free rotation — any orientation is allowed. A plain cardboard box is usually this case: it can be laid down, stood up, or rolled over, and nothing bad happens.
- Vertical-only rotation — the item can be spun around the vertical (y) axis but must stay upright. A sealed canister that is fine facing any direction horizontally, but must never lie on its side, falls into this bucket.
- No rotation at all — the item is locked in one orientation.
“Preventing rotation” in the practical, logistics sense usually means the second or third case: the item may not be rotated out of its upright position. It can still be yawed on the pallet; it cannot be tipped.
In RSJ 3D Packer, this is controlled by a single per-item field called vertical. It defaults to allowing the item to be turned out of its upright position. When you set:
{ "width": 40, "height": 60, "depth": 40, "count": 8, "vertical": false }
you are telling the solver that this item must remain upright. That is the setting that prevents tipping — nothing else in the request controls it.
One clarification that trips people up: rotation constraints and stacking constraints are independent. vertical says nothing about what may be placed on top of an item. That is governed by itemClass, where an item is only ever placed on items of a lower or equal class. You can forbid rotation on an item that is perfectly happy being stacked on, and you can allow free rotation on an item that nothing may sit on.
A Real-World Analogy: Why Some Boxes Must Stay Upright
Think about moving house. You can toss paperbacks into a box in any orientation — spines up, spines down, sideways. Try the same with a box of wine glasses and you will hear the difference before you see it. The books tolerate arbitrary rotation; the glasses do not. Orientation is not a cosmetic preference, it is part of what the object is.
A packing solver treats rotation exactly like a rule in a physical puzzle. Some pieces can be flipped and turned to fill gaps; others have to go in the way they are drawn on the box. The solver’s job is to fill the space while respecting which pieces are which.
In logistics, those rules come from three places:
- Handling instructions — “this side up”, “do not lay flat”, arrows printed on the carton.
- Product design — a device with a compressor at the bottom, a bottle with a vented cap, a battery pack that must not be inverted.
- Safety requirements — anything where tipping creates a leak, a pressure problem, or an unstable load.
If none of those apply, rotating freely is usually the better choice, because it gives the solver more room to work with. We will come back to that.
How a Packing Solver Handles Rotation Constraints
The mechanics are refreshingly simple from the outside. Each item carries its own vertical flag; the solver searches for placements and discards any placement that violates a flag. Fill rate and container count are still optimised — but only across the placements that remain legal.
RSJ 3D Packer uses a neural network optimised through neuro-evolution to produce heuristically optimised plans for the static problem (items may be packed in any order). Each request runs within a 240-second time budget. That budget is the same on every plan, so the difference between plans is which constraint features you can use, not how long the solver is allowed to think.
Under the hood, the important consequence for you is this: a rotation constraint narrows the search space. The solver does not “give up” when it hits one — it rearranges the other items around the locked ones. But the more items you lock upright, the less freedom it has to close awkward gaps.
Rotation constraints are available on the Standard and Pro plans, and during the free 30-day test, which exposes the Pro feature set. They are not available on Basic.
Why Rotation Constraints Matter (and Common Misconceptions)
The case for using them is straightforward:
- Damage prevention. Liquids leak, fragile contents crack, and mechanisms shift when a box spends a week on its side.
- Safety. Tipping is not just a product problem. A heavy item that ends up inverted can make the load unstable.
- Compliance. Handling instructions on the packaging are instructions, not marketing copy. A plan that contradicts them is a plan someone has to override at the loading dock.
Now the three misconceptions we hear most often.
“If I pack carefully by hand, I don’t need to specify rotation.” Careful packing works — for one container, on one afternoon, by one experienced person. It does not scale to dozens of mixed SKUs across repeated shipments, and it quietly degrades when the person doing it changes. Specifying the constraint per item makes it a property of the product, not of the shift.
“Rotation constraints always destroy the fill rate.” They can reduce it, since the solver has fewer placement options. But in a mixed load, the solver usually compensates by reorienting the items that can rotate. A single locked SKU among twenty flexible ones typically costs far less than intuition suggests.
“All items can be rotated freely.” Plenty cannot — electronics, liquids, perishables, anything with a defined top and bottom. Assuming free rotation is the default is how loads that look dense on paper arrive damaged.
How to Set Up Rotation Constraints in RSJ 3D Packer
There are two paths: the browser application and the HTTP API. Both are the same constraint underneath.
In the web UI
- Open the packing application and sign in.
- Add your container: width, height, depth, and count. Optionally a maximum
weightandallowedRiskPoints. - Add each item with its dimensions and count.
- For every item that must stay upright, switch the vertical toggle off. Items you leave alone can be rotated.
- Solve. The result includes an interactive 3D view you can rotate, inspect and — if you want to share it — embed in an IFRAME. The plan can also be downloaded as a GLB 3D model.
The free test runs here, and because it exposes the Pro feature set, you can try rotation constraints on day one.
Via the API
Authenticate first. The API uses a Bearer session obtained from GET /user/{email}?hmac={hmac}, where the hmac is computed server-side by a logged-in client and copied once. Sessions last about a day, so fetch a fresh one rather than storing it.
curl -s https://3dpacker.rsj.de/solve \
-H "Authorization: Bearer session-1bc90169-1c83-443e-8ed7-b0328aaf78a5" \
-H "Content-Type: application/json" \
-d @problem.json
Where problem.json marks the upright items:
{
"containers": [
{ "width": 120, "height": 240, "depth": 100, "count": 2, "weight": 20000 }
],
"items": [
{ "id": "carton", "width": 60, "height": 40, "depth": 40, "count": 24 },
{ "id": "drum", "width": 58, "height": 88, "depth": 58, "count": 4, "vertical": false },
{ "id": "monitor", "width": 70, "height": 12, "depth": 50, "count": 10, "vertical": false, "itemClass": 1 }
]
}
The same request from Python, if you are scripting it:
import requests
HEADERS = {"Authorization": "Bearer session-1bc90169-1c83-443e-8ed7-b0328aaf78a5"}
problem = {
"containers": [{"width": 120, "height": 240, "depth": 100, "count": 2}],
"items": [
{"id": "carton", "width": 60, "height": 40, "depth": 40, "count": 24},
{"id": "drum", "width": 58, "height": 88, "depth": 58, "count": 4, "vertical": False},
],
}
r = requests.post("https://3dpacker.rsj.de/solve", json=problem, headers=HEADERS, timeout=300)
plan = r.json()
print(plan["containers"]) # per-container fill percentage, used count
print(plan["unpackedItems"]) # what did not fit, with counts
print(sorted({p["c"] for p in plan["packedItems"]})) # containers actually used
A few practical notes on the payload:
width,heightanddepthare required for both items and containers;countdefaults to one.- The
idyou set travels through topackedItems, so you can map placements back to your own SKUs. - Unknown keys in request objects are ignored, so client metadata can ride along — but a future field could collide with a key you invented. Keep metadata keys namespaced.
- The response contains packed items with container index and x/y/z position, fill percentage per container, container usage, unpacked items with counts, a viewer URL and an API sandbox URL.
The quickest way to sanity-check a single constraint without writing a client is the API sandbox, which renders a 3D preview of the response.
When to Use Rotation Constraints (and When Not To)
Set "vertical": false when tipping could plausibly cause damage, leakage, spoilage or danger:
- Bottles, cans and anything with a liquid seal.
- Perishables where orientation affects airflow or crushing.
- Electronics and appliances with a defined base.
- Heavy items whose inversion would destabilise the load.
Do not set it out of habit. Every item you lock upright removes orientation choices from the solver. A plain corrugated carton with no handling markings can rotate freely, and letting it do so gives the solver more ways to close the gaps left by the items that genuinely need to stay upright. The best-performing problems are usually the ones where the constraint list is short and each entry is justified.
Where rotation and stacking interact, combine vertical with itemClass: forbid rotation on the fragile SKU, and assign a higher class so it does not end up crushed under a heavier item. Remember that every packed item is supported by the item below it — the plan contains no floating items — so class and rotation together define the physical reality the solver is working with.
If you need a fixed packing order or a required unpacking order, that is a dynamic problem rather than a static one; the algorithm can be adapted for it, but it is a separate conversation from rotation.
FAQ
Can I prevent rotation for only some items in a mixed load?
Yes. The vertical flag is per item. Items with "vertical": false must stay upright, while everything else can be rotated freely. The solver respects each item’s constraint individually, so a mixed pallet with three locked SKUs and twenty flexible ones is a perfectly ordinary request.
Does preventing rotation reduce the number of items that fit in a container? It can, because the solver has fewer placement options per locked item. But it optimises within the constraints you give it, so the result is still a good plan for that problem. How much fill you lose depends on the mix of items and the container size — a single constrained item in a flexible load often costs very little.
How do I know if an item needs to be kept upright? Check the handling instructions, the packaging labels (“this side up”, arrows, “do not lay flat”), or the safety data sheet. The test is simple: if tipping could cause damage, leakage or danger, lock the item upright.
Is the rotation constraint available on all plans? No. Preventing vertical rotation is available on Standard and Pro, and during the free 30-day test, which exposes the Pro feature set. It is not available on Basic.
Conclusion
Preventing rotation is one field and one decision per item. The hard part is not the software — it is knowing which items in your catalogue actually care about orientation, and resisting the urge to lock everything “just to be safe.” Lock what the label says, free what it does not, and let the solver do the arranging.
RSJ 3D Packer handles the rest: a 240-second solving budget per request, per-item rotation flags, stacking classes, weight limits, and a 3D viewer to confirm the result looks the way the loading dock expects. The 30-day free test exposes the Pro feature set, so you can run your real SKU list through it today — start at 3dpacker.rsj.de, and when you are ready to commit, compare Standard and Pro on the plans page.
Related posts
- How to Calculate How Many Pallets You Need (Without Guessing)
- Google Sheets Packing Calculator: What the Add-On Does
- How to Check a Packing Plan Is Feasible