KO
|
EN
gitlite — search
Search
#python
#java
#php
#javascript
#kubernetes
#deep-learning
#machine-learning
#docker
#r
#mqtt
#react
#c
box_packer
★ 50
Open GitHub ↗
3D bin packing algorithm
Download README (.md)
Explore Similar Repositories
3DeeCellTracker
:
A python algorithm for tracking cells in 3D deforming organs
BBearEditor-2.0
:
My own 3D engine & editor in order to learn graphics algorithms and game engine architecture.
Stereo-Camera-Path-Planning
:
Real-time path-planning from 3D reconstruction and depth estimation: an algorithm for calibrated stereo cameras.
rust-octree
:
rust implementation of octree algorithm for nearest neighbor search in 3D space
Opt-GO-3D-2D-Registration
:
Optimization-GradientOrientation based 3D/2D registration algorithm of medical imaging
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
box_packer
?
Download (.md)
# BoxPacker First fit heuristic algorithm for 3D bin-packing with weight limit. ## Version 2 For version 2 this entire solution has been rewritten with an emphasis on making a much simpler and easier to understand implementation. However, I haven't gone to the trouble of reproducing all the previous functionality, so if you still need that, it can be found here: [1.2.4](https://github.com/mushishi78/box_packer/tree/1.2.4) ## Installation Add to gemfile: ``` ruby gem 'box_packer' ``` ## Usage ``` ruby require 'box_packer' packings = BoxPacker.pack( container: { dimensions: [15, 20, 13], weight_limit: 50 }, items: [ { dimensions: [2, 3, 5], weight: 47 }, { dimensions: [2, 3, 5], weight: 47 }, { dimensions: [3, 3, 1], weight: 24 }, { dimensions: [1, 1, 4], weight: 7 }, ] ) packings.length # 3 packings[0][:weight] # 47 packings[0][:placements].length # 1 packings[0][:placements][0][:dimensions] # [5, 3, 2] packings[0][:placements][0][:position] # [0, 0, 0] packings[1][:weight] # 47 packings[1][:placements].length # 1 packings[1][:placements][0][:dimensions] # [5, 3, 2] packings[1][:placements][0][:position] # [0, 0, 0] packings[2][:weight] # 31 packings[2][:placements].length # 2 packings[2][:placements][0][:dimensions] # [3, 3, 1] packings[2][:placements][0][:position] # [0, 0, 0] packings[2][:placements][1][:dimensions] # [4, 1, 1] packings[2][:placements][1][:position] # [3, 0, 0] ```