GopTimiZer is a small Tool for optimizing G-code prior to using it in a CNC router
In the following I will demonstrate how useful this software can be

This is the outer dimensions of the board we are going to make using the CNC Router

And this is what the router will remove to isolate the different parts of the board. The Black lines are movement in the air.

The total distance the CNC Router needs to cover is 380 mm

As you can see there is a lot of unneeded movement so trying to optimize the movement usinga simple algoritm, where the Next Black spot simply is chosen as the one closest to the actual position.

This reduces the movement with more than 50% and there by reducing the production time equally


The NeXT step is to drill all the holes in the board, and the actual software used for generating the code seems to have a left to right approach. The number of holes can't be reduced, but almost 1.6 meter to make 57 holes on a 60 mm * 60mm board is a lot 

So using the same algoritm as before will result in this. A reduction to almost 20% of the original and Thus making the movement 5 times faster.

For smaller number of boards this should be sufficient, but if used in mass production this can be optimized further using an algorith used for solving the Traveling Salesman problem.

After 500.000 iterations done in a minute or so it could be optimized like this - it might look nicer but the reduction in distance (from 347,5 mm to 344,3 mm) is marginal

But letting the optimization run for 5-10 minutes the following was the result. Much nicer, and a very clean movement, and a reduction with further 20%, so the time spent moving was reduced by almost 83%