https://github.com/bavix/boxpacker3
A 3D container packing library in golang.
https://github.com/bavix/boxpacker3
3d-bin-packing bin bin-packing binpack binpacking boxpacker container-packing packer packing packing-algorithm
Last synced: about 2 months ago
JSON representation
A 3D container packing library in golang.
- Host: GitHub
- URL: https://github.com/bavix/boxpacker3
- Owner: bavix
- License: mit
- Created: 2023-08-02T15:12:43.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-03-24T17:35:37.000Z (2 months ago)
- Last Synced: 2025-04-13T05:29:31.537Z (about 2 months ago)
- Topics: 3d-bin-packing, bin, bin-packing, binpack, binpacking, boxpacker, container-packing, packer, packing, packing-algorithm
- Language: Go
- Homepage:
- Size: 111 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# boxpacker3
A 3D bin packing library in golang.
### Usage
```golang
packer := boxpacker3.NewPacker()boxes := []*boxpacker3.Box{
boxpacker3.NewBox("box std", 530, 380, 265, 20000),
}
items := []*boxpacker3.Item{
boxpacker3.NewItem("product 1", 100, 100, 5, 2690),
boxpacker3.NewItem("product 2", 100, 5, 100, 2690),
boxpacker3.NewItem("product 3", 5, 100, 100, 2690),
}packResult := packer.Pack(boxes, items)
fmt.Println(packResult.Boxes) // boxes and items
fmt.Println(packResult.UnfitItems) // Items that didn't fit in boxes
```