After learning how to make computer programs that create patterns for laser cutting (see my maze puzzle box project), it’s been getting easier for me to quickly make parametric patterns for machine cutting. Parametric means that I can give the program a different command and the pattern it generates will be different.
So in the case of a Go board, one option I added was the size of the board. The classic number is 19, but 13 is a good size to learn on. I started off trying to make the pattern with openscad, but gave up after I couldn’t get it to just generate straight lines.
I’ve given up on DXFs altogether because the libraries I’ve used don’t generate DXFs that other programs can easily understand. So instead I moved to using SVG, with a library called svgwritefor python. To start with I had problems getting the units right, but I got some good tips from Manfred Moitzi (who wrote svgwrite). A great resource is O’Reilly’s SVG essentials. Chapter 2 is all about coordinates. The important bit I was missing was setting the viewbox:
dwg = svgwrite.Drawing(filename=name, debug=True, size=('100mm','100mm'), profile='full')
This code creates a 100mm square image and sets the units to mm. Then I can create lines and other shapes without specifying units and they’ll automatically be in mm.
After the drawing is saved, the SVG file can be converted to a machine compatible format (DXF or GCODE) by another program.
For example files and the parametric Go program, check the thingiverse page.