Skip to content

Instantly share code, notes, and snippets.

@mountiealpha
mountiealpha / xtrochoid.js
Created October 22, 2019 16:00
Generate G-code for trochoid toolpath on X-axis
// usage: cscript xtrochoid.js //Nologo > myFile.nc
// alter the below variables to taste!
// based on code from https://gist.github.com/r24y/48285ef648803d195740
//
// program will output trochoidal cut in +X direction
// creating D shapes from -120 to 105 degrees
// feed to MAXFEED outside of arc
var TOOLDIA = 0.375; // Tool diameter
var STEPOVER = 0.0375; // Stepover (try 10% of tool diameter)