Thursday, July 10, 2025

Writing GCode Subroutines

I am making a CFC part for the clock drive holder.  I need to cut some slots.  For all the precision you put into measuring dimensions,  it is good to have some literal wiggle room on assembly.   Even a fraction of an inch of play before tightening down the screw is good, along with slightly larger through holes for parts whose accuracy you trust.

While hand coding this code to cut four motor mounting holes and two slots, I suddenly realized that I have lots of slots to cut in other parts, and this was a surprisingly annoying set of commands to write.  Cut .36" long in one direction than another cut parallel about .01" next to the first cut.

The solution is obvious: write a gCode subroutine that takes mill radius and the four corner points adjusting for mill radius.

No comments:

Post a Comment