Today I am devoted a bit of time to object oriented laser cutter controls. Although the 3d printer is wildly useful, I find that the things that I can create with it are simply too small and too fragile. The laser cutter, on the other hand, allows me to create large and stable objects. By creating jigsaw pieces, large boxes can be made. The pathing is tricky because the width of the laser must to taken into account. Each segment must be moved slightly in various directions in order to create a tight fit.
Above is the finished product, ready to go to the Dallas Makerspace for test cutting. I will only cut the green line, because it takes into account the width of the laser. Below is a screen capture which shows how I work. I run with a 5 second page refresh so that I can keep my fingers working on the code instead of mousing over to my browser. Below is a snipped from the heat of the battle. I just hardcoded in my path, as you see that I wasn’t quite finished defining my polygon below. Next I will need a better separation of data and code, but I had to just get a prototype up and running first. This way I know what is possible and reasonable and can now refactor in more flexibility.
Now I see the next calculation that I need to make. The male and female pieces fit snugly together, but now I need to adjust the side lengths and how deep the joining sections go. One problem solved, and on to the next.