Generate simple G-code for milling stuff, in TypeScript.
I created this project because I wanted a simple command-line program for generating bits of G-code to cut lines and holes. Existing programs for generating G-Code were hard for me to understand, too specific to an OS other than the one I’m using, or too crash-prone.
By convention, holes are traced counter-clockwise, resulting in ‘climb routing’ with a clockwise (as seen from behind)-spinning bit. By this convention, the ‘space side’ is always on the left. But because some path-generating functions (e.g. boxPath) always return a counter-clockwise path, space side should be ‘right’ when tracing counter-clockwise along the outside of an object.
As of [2021-07-01], space side is ignored for path-based cuts because adjusting abitrary paths will require a bit of math that I’m not ready to think about. It is defined purely in anticipation that the information will be useful in the future.