cargopack

v0.1.0
io.github.CloudCorpRecords/cargopack Checked 1 hour ago Published 6 days ago

3D container packing: pack cargo, estimate set capacity, generate packing reports.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

pack_containers

Pack a list of cargo SKUs into one or more shipping containers using the Kubova solver. Supports bulk loading (cartons straight into the container) and pallet loading (loadingMode:"pallet" + a pallet — cartons are stacked onto pallets first, then the pallets loaded). Per-SKU you can set allowed orientations, no-overstack/no-understack, and loading order. Returns per-container placements with x,y,z coordinates in cm, volume utilization, weight, a weightBalance object (centre of gravity + front/back & left/right weight split, flags an unbalanced load) for bulk loads, and any unplaced pieces.

ParameterTypeDescription
cargos *array
containerobject
containersarray
loadingModestring'bulk' (default) loads cartons straight into the container. 'pallet' first stacks cartons onto pallets, then loads the pallets — requires the `pallet` field.
optionsobject
palletobjectThe pallet to stack onto. Required when loadingMode is "pallet".

generate_report

Generate a CAD-style PDF + 3D PNG report for a packing job. IMPORTANT: to keep the report consistent with a plan you already produced, pass the `result` object from your previous pack_containers call — the report then renders that exact plan instead of recomputing. Returns base64-encoded PDF + PNG per container.

ParameterTypeDescription
cargos *array
containerobject
containersarray
loadingModestring'bulk' (default) loads cartons straight into the container. 'pallet' first stacks cartons onto pallets, then loads the pallets — requires the `pallet` field.
optionsobject
palletobjectThe pallet to stack onto. Required when loadingMode is "pallet".
resultobjectOPTIONAL but strongly recommended: the exact `result` object returned by a prior pack_containers call, so the report renders THAT plan instead of repacking.

estimate_capacity

How many complete SETS of one product fit in a single container? A product is 1+ carton types with qtyPerSet each (e.g. a table shipping as 2 cartons: top + legs). All cartons of a set ride in the SAME container. Uses real 3D packing (not just volume math) and reports the binding limit (dimension / weight / volume) per container. Omit `containers` to evaluate the standard 20' DC, 40' DC and 40' HC.

ParameterTypeDescription
product *object
containersarrayContainers to evaluate. Omit to use the standard catalogue (20' DC, 40' DC, 40' HC).

verify_key

Verify the connection. Returns the authenticated account identity and plan.