# Optocut Optocut is a program for generating a cost-optimized cutlist for wood. Give it a list of lumber available at your local hardware store, as well as a list of lenghts you need, and it will tell you what to buy and how to cut it. It also accounts for the width of your sawblade. ## Installation `cargo install optocut` ## Example example.toml: ``` # Used to define the width of the saw blade [blade] inches = 0.125 [[available]] name = "2x4x8" feet = 8 cost = 6.98 [[available]] name = "2x4x104" feet = 8 inches = 8 cost = 9.15 [[available]] name = "2x4x10" feet = 10 cost = 9.55 [[available]] name = "2x4x12" feet = 12 cost = 11.45 [[available]] name = "2x4x16" feet = 16 cost = 15.36 [[required]] name = "2'" feet = 2 amount = 4 [[required]] name = "42in" inches = 42 amount = 4 [[required]] name = "1'" feet = 1 amount = 6 [[required]] name = "34in" inches = 34 amount = 8 [[required]] name = "10cm" cm = 10 amount = 1 ``` `optocut example.toml` ``` Best cost: $48.92 2x4x12 -> 10cm 34in 34in 34in 34in [Leftover: 8.73 cm] 2x4x8 -> 34in 34in 1' 1' [Leftover: 8.89 cm] 2x4x8 -> 34in 34in 1' 1' [Leftover: 8.89 cm] 2x4x8 -> 1' 1' 42in 2' [Leftover: 13.97 cm] 2x4x10 -> 42in 42in 2' [Leftover: 29.53 cm] 2x4x8 -> 42in 2' 2' [Leftover: 14.29 cm] ```