🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Manufacturing & Marine › CNC Machining › G-Code Programming for CNC Mills and Lathes › Lesson 5
MFG-CNC14-04 · Lesson 5 · 16 clock hours · demo

Mill Toolpath Codes: Rapid, Linear Feed, and Circular Interpolation

Objective. Students write and simulate G00 rapid, G01 linear, G02/G03 circular interpolation blocks with correct I/J/K or R arc parameters to produce a defined 2D profile on a CNC mill simulator.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by a licensed engineer or certified journey-level tradesperson or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

Mill Toolpath Codes: Rapid, Linear Feed, and Circular Interpolation

Why These Three Codes Matter

Every CNC milling program you will ever write relies on three motion codes: G00 for rapid positioning, G01 for straight-line cutting, and G02/G03 for arc cutting. Master these and you can describe any 2D profile a drawing can specify. NIMS Machining Level 1 and 2 standards test your ability to write and verify exactly these blocks, so accuracy here pays off on the credential exam and on the shop floor.

Safety Before the Machine Moves

Before you run any program — even in simulation — build the habit of checking:

G00 — Rapid Positioning

G00 moves the tool from one point to another at the machine's maximum traverse rate. It is not a cutting move. Use it to position above the work before a cut and to retract after.

```

G00 G90 X1.500 Y0.750 Z0.100

```

G01 — Linear Interpolation (Straight-Line Feed)

G01 moves in a precise straight line at the feed rate you specify with the F-word (inches per minute for milling in the US).

```

G01 X3.000 Y0.750 F10.0

```

The control calculates how fast each axis must move so they all arrive at the endpoint together, producing a true straight line. Change the F-word to change cutting speed — the path geometry does not change.

G02 and G03 — Circular Interpolation

G02 cuts a clockwise arc; G03 cuts a counterclockwise arc, both viewed from above (positive Z looking down at the XY plane).

You define the arc endpoint and either:

Method 1 — I/J offsets (recommended for precision):

```

G02 X2.500 Y1.000 I0.000 J0.500 F8.0

```

I and J are the distance from the arc start point to the arc center, measured in X and Y respectively. They are signed values (positive or negative). K is used instead of J when the arc is in the XZ or YZ plane.

Method 2 — R word (radius):

```

G02 X2.500 Y1.000 R0.500 F8.0

```

R is convenient for arcs less than 180°, but controls may interpret R differently for arcs greater than 180°, which can cause unexpected toolpath errors. I/J is safer for complex profiles.

Calculating I and J Values

Given:

I = center X − start X = 2.000 − 2.000 = 0.000

J = center Y − start Y = 1.000 − 0.500 = +0.500

Always verify these values by hand before running a simulation. An incorrect I or J produces a spiral or alarm.

Building a Block Sequence

A complete motion sequence for a radiused corner looks like this:

```

N010 G00 G90 X1.000 Y0.000 Z0.100 (rapid to start position)

N020 G01 Z-0.250 F5.0 (plunge to depth)

N030 G01 X3.000 Y0.000 F10.0 (straight cut along X)

N040 G02 X3.500 Y0.500 I0.000 J0.500 F8.0 (CW arc, radius 0.500)

N050 G01 X3.500 Y2.000 F10.0 (straight cut up Y)

N060 G00 Z0.100 (retract)

```

Notice: the feed rate drops slightly for the arc (F8.0) — this is good practice to maintain surface finish on curves.

Verifying in CNCSimulator Pro

1. Enter your program and press Simulate.

2. Compare the on-screen toolpath against your printed 2D profile drawing.

3. Use the coordinate display to spot-check endpoint positions.

4. Overlay graph paper on the screen or print the simulation and trace it — this is exactly what the peer-review activity requires.

5. If a segment is wrong, go back to your I/J calculation before changing the code. Fix the math first, then fix the code.

Common Mistakes to Avoid

Key terms8

G00 (Rapid Positioning)A motion code that moves the tool at the machine's maximum traverse speed; not a cutting move and the path between axes may not be a true straight line.
G01 (Linear Interpolation)A motion code that moves all commanded axes simultaneously in a precise straight line at the programmed feed rate (F-word).
G02 (Clockwise Circular Interpolation)A motion code that cuts a clockwise arc in the active plane, as viewed from the positive Z axis looking down toward the workpiece.
G03 (Counterclockwise Circular Interpolation)A motion code that cuts a counterclockwise arc in the active plane, as viewed from the positive Z axis looking down toward the workpiece.
I/J/K Arc OffsetsSigned distances from the arc start point to the arc center, measured along the X (I), Y (J), and Z (K) axes; used to define arcs with G02 and G03.
F-word (Feed Rate)The programmed cutting speed, expressed in inches per minute (IPM) for US milling operations; required for all G01, G02, and G03 moves.
Clearance PlaneA Z height programmed above all workpiece and fixture features where the tool can rapid safely without collision.
Circular InterpolationThe control's ability to coordinate two or more axes simultaneously to produce a true arc path, defined by an endpoint and either I/J/K offsets or an R radius value.

Worked examples4

1. Find the I and J values for a G02 arc. Arc start point: (1.000, 2.000). Arc center: (1.500, 2.000). Arc end point: (1.500, 2.500).
  1. Identify the formula: I = Arc Center X − Arc Start X; J = Arc Center Y − Arc Start Y.
  2. Calculate I: 1.500 − 1.000 = +0.500.
  3. Calculate J: 2.000 − 2.000 = 0.000.
  4. Write the block: G02 X1.500 Y2.500 I0.500 J0.000 F8.0
Answer: I = +0.500, J = 0.000; block reads: G02 X1.500 Y2.500 I0.500 J0.000 F8.0
2. Find the I and J values for a G03 arc in the lower-left corner of a rectangular pocket with radiused corners. Arc start point: (0.500, 0.000). Arc center: (0.500, 0.500). Arc end point: (0.000, 0.500). Verify the radius equals 0.500 in.
  1. Calculate I: Arc Center X − Arc Start X = 0.500 − 0.500 = 0.000.
  2. Calculate J: Arc Center Y − Arc Start Y = 0.500 − 0.000 = +0.500.
  3. Verify radius: distance from center (0.500, 0.500) to start (0.500, 0.000) = sqrt((0.500−0.500)² + (0.500−0.000)²) = sqrt(0 + 0.25) = 0.500 in. ✓
  4. Write the block: G03 X0.000 Y0.500 I0.000 J0.500 F8.0
Answer: I = 0.000, J = +0.500; radius confirmed at 0.500 in.; block reads: G03 X0.000 Y0.500 I0.000 J0.500 F8.0
3. A programmer writes: G02 X4.000 Y2.000 I-0.750 J0.000 F8.0. The arc start point is (4.000, 1.250). What are the arc center coordinates and the arc radius?
  1. Arc Center X = Start X + I = 4.000 + (−0.750) = 3.250.
  2. Arc Center Y = Start Y + J = 1.250 + 0.000 = 1.250.
  3. Arc Center = (3.250, 1.250).
  4. Radius = distance from center to start = sqrt((4.000−3.250)² + (1.250−1.250)²) = sqrt(0.5625 + 0) = 0.750 in.
  5. Verify using endpoint: distance from center (3.250, 1.250) to end (4.000, 2.000) = sqrt((4.000−3.250)² + (2.000−1.250)²) = sqrt(0.5625 + 0.5625) = sqrt(1.125) ≈ 1.061 in. This does NOT equal 0.750 in., indicating the endpoint is inconsistent with the I/J values — the program contains an error and would alarm on the control.
Answer: Arc center = (3.250, 1.250); radius from I/J = 0.750 in.; but the endpoint (4.000, 2.000) is not on that radius — program error exists and must be corrected before running.
4. Convert an R-word arc block to I/J format. Given block: G02 X3.000 Y1.500 R0.500 F8.0. Arc start point: (2.500, 1.500). The arc is less than 180° and curves to the right (center is above the start point).
  1. Identify geometry: start = (2.500, 1.500), end = (3.000, 1.500), radius = 0.500 in., CW arc curving upward.
  2. Find arc center: midpoint of chord in X = (2.500 + 3.000)/2 = 2.750. Since radius = 0.500 and half-chord = 0.250, height from chord midpoint to center = sqrt(0.500² − 0.250²) = sqrt(0.25 − 0.0625) = sqrt(0.1875) ≈ 0.433 in. For a CW arc curving upward, center Y = 1.500 + 0.433 = 1.933 in. Center = (2.750, 1.933).
  3. Calculate I: 2.750 − 2.500 = +0.250.
  4. Calculate J: 1.933 − 1.500 = +0.433.
  5. Write I/J block: G02 X3.000 Y1.500 I0.250 J0.433 F8.0
Answer: I = +0.250, J = +0.433; block reads: G02 X3.000 Y1.500 I0.250 J0.433 F8.0

The math in this lesson2

Learners subtract start-point coordinates from center coordinates using signed values.
7.NS.1G-GPE.1
In class: Watch instructor demonstrate G00 vs. G01 motion differences in CNCSimulator Pro with feed-rate override visible, then students replicate the demo program on their own workstation and adjust the F-word to observe speed changes. · Write a G-code program that machines a rectangular pocket with a radiused corner using G01 and G02/G03 arcs; verify I/J values against hand-calculated arc center coordinates before running the simulation. · Peer-review exchange: swap programs with a classmate, trace the simulated toolpath on graph paper overlay, and mark any segment that deviates from the print; return with written notes.
Materials: CNCSimulator Pro (PC lab); graph paper; arc-calculation worksheet; Smid CNC Programming Handbook Chapters 5–6; printed 2D profile drawing
Check: Simulated toolpath must match the 2D profile drawing within 0.005 in. on all features; arc center coordinates verified mathematically by instructor before simulation run; ≥80% of segments correct on peer-review overlay.

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

CNC Programming — Motion Codes
1. A G00 block commands the tool from (0.000, 0.000) to (3.000, 4.000). Which statement best describes the actual tool path on most CNC mills?
CNC Programming — Circular Interpolation
2. Which address letter defines the signed distance from the arc start point to the arc center along the Y axis?
CNC Programming — Arc Calculation
3. An arc start point is at (2.000, 3.000) and the arc center is at (2.000, 3.750). What are the correct I and J values?
CNC Programming — Safety and Program Validation
4. A student writes a G01 block but omits the F-word and no prior feed rate is active in the program. What is the most likely result on a real CNC mill control?
CNC Programming — Circular Interpolation
5. Viewed from above (positive Z axis looking down), G02 produces which direction of arc motion?
Workplace Safety — Hazardous Energy Control
6. Before physically loading a tool into a CNC mill to set up a job, what safety procedure is required under OSHA regulations?
CNC Programming — Arc Verification
7. A student's simulated toolpath for a 0.500 in. radius corner arc shows the corner undershooting the print by approximately 0.060 in. What is the most likely root cause?
CNC Programming — Modal Codes
8. In a G-code program, a G02 block is followed immediately by a G01 block with no new F-word. Which feed rate does the G01 move use?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.