Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 committed Aug 7, 2023
1 parent 681128f commit 7a551c6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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
```

---
Supported by

[![Supported by JetBrains](https://cdn.rawgit.com/bavix/development-through/46475b4b/jetbrains.svg)](https://www.jetbrains.com/)

0 comments on commit 7a551c6

Please sign in to comment.