G Code for Arc Cuts (G02, G03)

General MeshCAM Questions

Re: G Code for Arc Cuts (G02, G03)

Postby Doug » Sun Jan 07, 2018 12:18 pm

My goal is to be able to make a fully shaped, radiused, dotted and slotted guitar fretboard in one CNC session. I recently slotted a fretboard manually and unfortunately the slots I cut using StewMac fret slotting miter box and Japanese fret slotting saw were slightly offset (by about 0.5 mm) compared to the dots. I therefore revisited a previous attempt to cut fret slots using G02/G03 CW & CCW arcs in the XZ plane wth the G18 command. I also posted this information on the following thread "Milling Guitar Neck Fret Slots":


I bought a Kyocera 0.6 mm diameter solid carbide flat nose end mill with 1.8 mm flute length to try this. The GCode construct is given below for the zero fret only for the fret positions on a 24" scale Brian May Red Special guitar with a 7.25" radius/14.5" diameter curve fretboard. Zero position is the centre of the fretboard. To keep the code simple, the cutter describes arcs from X = -26.5 mm to +26.5 mm which is slightly beyond the widest part of the fretboard that I have previously cut to shape and fine radiused with a 6 mm ball nose end mill to 1/4" (6.35 mm) thick at the crown.

You can see this code in action 'milling air' in the short (2m 30s) YouTube video below:


I have not tried this yet but I have kept the feeds ultra conservative. In the video I run at an XY feed rate of 750 mm/min but I have reduced this to 600 mm/min in the code below. Z plunge rate is 120 mm/min. As you will see, I cut at -0.25 mm depth increments down to -1.75 mm. I might stop this at -1.5 mm in case there is any variation on the cut stock thickness to leave me a little more margin to the maximum flute length of 1.80 mm.

(Zero Fret)
G00 X-26.5000 Y230.9687 Z2.0000
G01 F120.0 Z-2.1667
G18 F600
G03 X26.5000 Y230.9687 Z-2.1667 I26.5000 J0.000 K-181.9833
G01 F120.0 X26.5000 Y230.9687 Z-2.4167
G18 F600
G02 X-26.5000 Y230.9687 Z-2.4167 I-26.5000 J0.000 K-181.7333
G01 F120.0 X-26.5000 Y230.9687 Z-2.6667
G18 F600
G03 X26.5000 Y230.9687 Z-2.6667 I26.5000 J0.000 K-181.4833
G01 F120.0 X26.5000 Y230.9687 Z-2.9167
G18 F600
G02 X-26.5000 Y230.9687 Z-2.9167 I-26.5000 J0.000 K-181.2333
G01 F120.0 X-26.5000 Y230.9687 Z-3.1667
G18 F600
G03 X26.5000 Y230.9687 Z-3.1667 I26.5000 J0.000 K-180.9833
G01 F120.0 X26.5000 Y230.9687 Z-3.4167
G18 F600
G02 X-26.5000 Y230.9687 Z-3.4167 I-26.5000 J0.000 K-180.7333
G01 F120.0 X-26.5000 Y230.9687 Z-3.6667
G18 F600
G03 X26.5000 Y230.9687 Z-3.6667 I26.5000 J0.000 K-180.4833
G00 Z2.0000

If anybody is interested, I came up with the following G Code to cut the holes for the 1/4" (6.35 mm) diameter circular mother-of-pearl fretboard marker dots. I cut at 6.45 mm diameter to allow a good fit and -0.5 mm Z depth increments in this case.

(3rd fret, centerline at Y = 149.2195 mm)
G00 X0.0000 Y148.9945 Z2.000

G01 F90.0 Z-0.5000
G02 F2000.0 X0.0000Y148.9945 Z0.000 I0.0000 J0.2250
G01 F90.0 Z-1.0000
G02 F2000.0 X0.0000Y148.9945 Z0.000 I0.0000 J0.2250
G01 F90.0 Z-1.5000
G02 F2000.0 X0.0000Y148.9945 Z0.000 I0.0000 J0.2250
G01 F90.0 Z-2.0000
G02 F2000.0 X0.0000 Y148.9945 Z0.000 I0.0000 J0.2250
G00 Z2.000
Stepcraft 2/840 CNC machine with 4th axis, TurboCAD V19.2 Pro Platinum, MeshCAM, GWizard feeds & speeds calculator, UCCNC. Hobby use: guitar building (luthiery). http://www.facebook.com/DougShortGuitarBlog/
Posts: 55
Joined: Thu Oct 13, 2016 9:56 am


Return to General