From 7a551c62d6c45e4df9561204c12a78bda224dd2c Mon Sep 17 00:00:00 2001 From: Maxim Babichev Date: Mon, 7 Aug 2023 21:42:21 +0300 Subject: [PATCH] Create README.md --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..3cd0c0d --- /dev/null +++ b/README.md @@ -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/)