CNC Circular Interpolation: G02 & G03 Explained with Real Milling and Turning Examples
Circular interpolation — G02 and G03 — controls arc and circular motion in CNC machining.
These commands allow precise tool movement along curved paths for contours, fillets, and holes without defining hundreds of straight lines.
📌 1. What Are G02 and G03?
| Code | Motion Direction | Description |
|---|---|---|
| G02 | Clockwise (CW) | Tool moves in a circular path clockwise |
| G03 | Counterclockwise (CCW) | Tool moves counterclockwise |
They can be programmed using radius (R) or center-point offsets (I, J, K).
📌 2. Plane Selection (G17 / G18 / G19)
Circular motion occurs in a defined plane:
| Code | Plane | Axes Used | Common Use |
|---|---|---|---|
| G17 | XY plane | I, J | Milling (top view) |
| G18 | XZ plane | I, K | Turning |
| G19 | YZ plane | J, K | Side milling |
Always ensure the correct plane (usually G17 for milling).
📌 3. G02/G03 Using Radius (R Method)
G02 X50. Y50. R25. F200
Moves from current point to (X50, Y50) along a 25 mm radius arc, clockwise.
📌 4. G02/G03 Using I, J (Center Offset Method)
G02 X50. Y50. I25. J0. F200
| Parameter | Meaning |
|---|---|
| I | X distance from start to arc center |
| J | Y distance from start to arc center |
CNC calculates arc geometry from these offsets.
📌 5. Full Example — Clockwise Circular Milling (G02)
%
O9001 (G02 CLOCKWISE ARC)
G90 G17 G21 G40 G80 G54
T01 M06
S2000 M03
G00 X0 Y0 Z5.
G01 Z-5. F100
G02 X50. Y0. I25. J0. F250
G00 Z100.
M30
%
Cuts a 180° clockwise arc from X0,Y0 to X50,Y0 around a center at X25,Y0.
📌 6. Counterclockwise Example — G03
G03 X50. Y0. I25. J0. F250
Same geometry, but tool moves counterclockwise around the arc.
📌 7. Arc Quadrant Rules
When using R value:
- R positive → arc < 180°
- R negative → arc > 180°
- R value = arc radius (not diameter)
📌 8. G02/G03 in Turning (G18 Plane)
Used to generate profiles and fillets on a lathe.
Example (Fanuc Lathe):
%
O9002 (LATHE ARC PROFILE)
G50 S2000
G97 S1200 M03
T0101
G00 X60. Z0.
G02 X40. Z-10. I-10. K0.
G03 X20. Z-20. I-10. K0.
G00 X100. Z100.
M30
%
| Code | Description |
|---|---|
| I, K | Arc center relative to start point |
| G02 | Clockwise profile |
| G03 | Counterclockwise profile |
📌 9. G03 for Corner Fillets (Example)
G03 X60. Y60. R10.
Generates a smooth 10 mm radius corner fillet between two linear moves.
📌 10. G02/G03 in Helical Interpolation (3D Arc)
Helical interpolation combines circular (G02/G03) and linear (Z) moves — ideal for thread milling and ramping.
Example:
%
O9003 (HELICAL INTERPOLATION)
G90 G17 G21 G40 G80 G54
T02 M06
S1500 M03
G00 X25. Y0. Z5.
G01 Z0. F100
G03 X25. Y0. I-25. J0. Z-10. F250
G00 Z100.
M30
%
Creates a spiral helix 10 mm deep while circling around a 25 mm radius.
📌 11. Siemens Example
G02 X50 Y50 CR=25 F200
Siemens uses CR instead of R for radius-based arcs.
📌 12. Heidenhain Example
CC X25 Y0
C X50 Y0 DR+
| Command | Description |
|---|---|
| CC | Define circle center |
| C | Execute circular motion |
| DR+ / DR− | Direction (CW / CCW) |
📌 13. Common G02/G03 Geometry Mistakes
| Mistake | Result |
|---|---|
| Wrong plane (G18 vs G17) | Arc goes in wrong direction |
| Missing I/J or R | Alarm: “No arc center defined” |
| Wrong R sign | Wrong sweep direction |
| Mixing I/J with R | Controller alarm |
| Inconsistent start/end geometry | “Non-tangent arc” error |
📌 14. Advanced Application — Circular Pocket Milling
%
O9010 (CIRCULAR POCKET)
G90 G17 G21 G40 G80 G54
T03 M06
S1800 M03
G00 X0 Y0 Z5.
G01 Z-2. F150
G03 X0 Y0 I25. J0. Z-10. F200
G00 Z100.
M30
%
Creates a 50 mm diameter circular pocket by spiraling downward using helical interpolation.
📌 15. Calculating I, J (Arc Center Offsets)
| Start | End | Center | I | J |
|---|---|---|---|---|
| (0,0) | (50,0) | (25,0) | +25 | 0 |
| (0,0) | (0,50) | (0,25) | 0 | +25 |
I and J define the center relative to start point — not absolute coordinates.
📌 16. Best Practices
- Always program G17 plane explicitly for milling.
- Use R for simple arcs, I/J for precise geometry.
- Ensure toolpath direction (CW vs CCW) matches contour.
- Keep feedrate constant across arc for uniform surface finish.
- Avoid over 180° arcs with R method — use I/J for reliability.
📌 17. Future Trends (2025–2030)
- AI-based contour learning — CNC automatically determines G02/G03 parameters from DXF geometry.
- High-precision interpolation (NURBS) — smoother surface generation beyond circular paths.
- CAM-generated hybrid arcs — combining G02/G03 with spline motion for aerospace-grade accuracy.
✅ Conclusion
Circular interpolation with G02 and G03 is the backbone of complex contour machining.
By understanding the geometry behind I, J, K and direction logic, CNC machinists can achieve perfect arcs, fillets, and helical paths — efficiently and precisely every time.
Leave a comment