CNC – Hello, G-Code.

The scripting language that CNC machines use is called G Code.
There are lots of commands, said Google. But the first few are about moving the machine.

G0 – rapid move (linear)
G1 – controlled speed move (pass Feedrate in addition to coords
G2 – clockwise turn (pass point to rotate about)
G3 – counter-clockwise turn ( ” ” ” )
… and so on.

Draw any circle, A.
Draw any second circle with a center on the circle A. This is B.
(Note: circle A’s center is on B, also. Circles, yeah. πŸ™‚ )
You can only draw two circles that can cross these in the same way.

Or, sweep a circle from each point on an equilateral triangle to each of the other two.

In any case, it’s just 3 arcs, from one vertex to the next, centered at the third.

I wrote a helper script to calc sqrt(3) for me.


python reuleaux.py 20.0
G2 F100.0 X0.0 Y0.0 I 20.0 J 0.0
G2 F100.0 X10.0 Y17.3205 I-10.0 J-17.3205
G2 F100.0 X20.0 Y0.0 I-10.0 J 17.3205

< insert fiddling with CamBam imports and machine ops, reminder to self, update the machine parms in CamBam. 😐 >

But all’s well that ends well.

I made this.

The Z nut assembly is super janky.
The table is not flat. You would not believe how many spoilboards.

I had to set the machine to dig to 1″ in order to clear the 3/4″ MDF πŸ˜€

I have a feeling I will be seeing a lot of MDF. I bet it seals up pretty nice under spar varnish.

I love that I could just slam one of these out of a Sunday morning in the summer.

Here’s the machine just hobbling through the job. I was very surprised how little sawdust is around with the Dust Deputy on patrol. Yes, I went there.

It’s just running … a Lot. Better.

I had requested drill points for me to put in hold-down screws, far from anywhere the endmill was going to be.

Figured out how to edit in a machine pause. Aw, yeah. Notepad FTW.

I didn’t put in a pause between the center cut-out and the Reuleaux. I admit that I like all the vowels in that word. But, I digress.

I just waited for the machine to get to a safe part of the cut, and I reached in and unbolted the circular scrap piece, those are fun, but later. Jr. Astronomer was duly impressed with my circley roundness.

The cut was for an astronomy project, here’s one I cut by hand 9 years ago and the one from today.

They were pretty close. Like, sandably close.

And, result!

Trixie gets a new hairdo.

The machine has a backlog, but it performed beautifully today, nearly flawlessly.

Yeah, so 3 lines of G-code. It blooms to 3k bytes or so, with repeating at different depths &c.
That works.

This entry was posted in Computers, Knowledge, Making, Science, Technology, Woodworking and tagged , , , . Bookmark the permalink.

One Response to CNC – Hello, G-Code.

  1. Alicia DeGon says:

    Omg you’re so hot.

Leave a Reply

Your email address will not be published. Required fields are marked *