Board Cutting Optimizer - A program to help you efficiently cut baseboard pieces from stock. Actually useful for all cases where you will be cutting pieces of given individual lengths from, say, standard size pieces of trim, baseboard, brick molding, etc. You will need to measure the needed lengths and specify the lengths of stock you have on hand, and the program will try all calculations and find the combination with the least waste.
The application is delivered as a java jar file, and to
run it you will need to open a Run->cmd console in Windows or use a
Terminal in Mac. The first step in trying it is to download it to a
location on your computer, then to run it.
- Download it using the link in the next section. You might download it to your desktop so it is easy to see / find.
- In the console window, cd to the directory where the jar file exists and run the command:
java -jar Trim.txt
Notes:
- Yes, this is really a 'jar' file, not a txt file, so you
will not be able to read it in Notepad. Even with the inappropriate
extension, it will still function as a file Java can use. Unfortunately
my web hosting service, in their infinite wisdom, has changed their
policy and my site is no longer able to serve .jar files. I
can still serve Microsoft documents capable of transmitting viruses,
but not useful applications. Go figure.
- You will need to have java installed on your computer.
- This is not a professional quality product - sorry. If there is widespread interest in its use, I (or you) could improve it. The jar file contains the source code so you can read or modify it if you like.
- If you try to use this and have any problems, email me and I will help fix them.
|
How to use the board cutting optimizer.
- First get the lengths of the pieces you want to end up with. If you are using mitered joints, consider the length of the piece to be the longest extent of the piece as if you were going to make a perpendicular cut.
- Get the lengths of stock you will be cutting from. If you haven't bought them yet, then you are free to try various combinations.
- Start the program as indicated above.
- When it starts it will expect you to enter the lengths of pieces to be cut. You can do these one at a time or you can enter several of them on the same line after the prompt, separating them with spaces. You can enter the lengths with decimals but not fractions. The program doesn't assume any particular unit of measure - we would recommend entering everything in terms of inches.
- After entering the final piece lengths, enter the lengths of stock you have to cut them from. Again, you can enter multiple on a single line with spaces separating them. The stock lengths allow you to multiple boards at once using a special notation. For example, if you have 6 trim pieces that are 96 inches (8 feet) long, you could enter 8x96 or 8x96.0 The number before the x is how many and the number after is the length.
- The program will then prompt to see what is desired. There are only a few commands and they can be invoked by typing the minimal characters. The commands are:
SOLVE - this command causes the program to try all combinations of cutting individual pieces from the available stock. If you have a large number of possibilities to try, a '#' will print every time 5000 combinations have been checked -- so you can tell it is still working. SAVE - this command saves all the data previously entered, and possibly solved. It is saved to a file on the computer and can be reloaded later. Only one configuration can be saved. If another configuration is entered and saved, it will over-write the prior configuration. LOAD - this command reloads a previously saved configuration DISPLAY - this commands shows the last solution found for optimally cutting pieces from stock QUIT - when you are finished, quit the program
How the Optimization is determined.If the program can find a way to arrange the cuts so that a piece of stock is not needed, that is considered more optimal than a combination where all the stock pieces are needed. If cutting a larger piece of stock can be avoided, that is considered more optimal than saving a smaller piece stock.
Assuming two combinations of cuts, the one that leaves the largest piece of waste is considered the better combination.
What if a final piece length is longer than the stock?If you have 8 foot baseboard stock and one of the walls is 14 feet wide, then that wall cannot be accommodated by one piece of stock. Don't worry - the optimizer program can come up with a cutting strategy so two pieces will cover the 14 feet. It will only do this is a finish piece is longer than the longest stock -- it will not use two sub-pieces to cover 6 feet when 8 foot stock is available.
When considering how to divide the needed length over two pieces of stock, the optimizer program will not allow either of the pieces to be less than 20.0 units; this is hard-coded in the program, but could easily be made adjustable. Also when dividing the length, it assumes that 1.0 unit extra is needed (to accommodate mitering).
Things you may need to consider.
- When entering stock pieces, enter enough that your pieces can be cut, but do not add lots of extra stock pieces - that might just slow down the checking.
- This program will not be able to find a solution if you have a finish piece that is so long it cannot be covered by two stock pieces put together. For example, if you have 8 foot baseboard stock and a room is 20 feet wide. If this situation should arise, you will need to -- outside the calculations -- set aside one piece of stock for the long piece and reduce that final piece length by that amount. In this example, set aside a piece of 8 foot stock for that 20 foot wall and tell the program you need a 12 foot piece. To allow for miter joints, you might request a 12.2 foot piece
|
An ExampleI was installing baseboards in our master bedroom and walkin closet. The
final piece measurements are shown at the right. Without this program,
I used 7x96 inch pieces of stock (also entered on the right). I got to
wondering how close I was to optimal use of the stock, so during a
trip, I wrote this program just to see.
The Cutting Optimizer
found a solution where there was a 6 foot piece of stock left, which is
far better than I did by the seat of the pants.
| |
|
|