Skip to content

A linear materials packing tool. Don't over buy, and never cut too short.

License

Notifications You must be signed in to change notification settings

ninowalker/linear-pack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linear-pack

A linear materials packing tool. Don't over buy materials, and never cut too short.

I wrote this to take the tedium out of calculating how much stock to buy when the materials were sold by the lineal foot.

This implements a naive packing algorithm to minimize waste. Bin packing is NP-complete, so I make no promises that you're absolutely optimal. But it'll do a quick and pretty damn good job, so that you don't need to worry when going to the lumber yard or metal shop.

Usage

python scripts/simplepack.py example.txt

This is currently hard-coded for 20' lengths with 1" of padding between cuts.

Credits

The original source was pulled from this stackoverflow answer. It has been modifed to fit my project needs.

License

MIT

About

A linear materials packing tool. Don't over buy, and never cut too short.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages