How to Program Fillet in CNC: Syntax and Example
To program a fillet in CNC, use the
G02 or G03 commands for circular interpolation with the radius specified by R. This creates a smooth rounded corner between two lines by defining the arc's endpoint and radius.Syntax
The fillet in CNC is programmed using circular interpolation commands:
G02for clockwise arcsG03for counterclockwise arcs
The key parts are:
XandY: coordinates of the arc end pointR: radius of the fillet (arc)F: feed rate (optional, controls speed)
Example syntax:
G02 Xx Yy Rr Ff
This moves the tool in a circular arc from the current position to (Xx, Yy) with radius r.
gcode
G02 X10 Y10 R5 F100
Example
This example shows how to program a fillet with a radius of 5 units between two straight lines:
gcode
G00 X0 Y0 G01 X10 Y0 F150 G02 X10 Y10 R5 F150 G01 X0 Y10 F150
Output
Moves from (0,0) to (10,0) in a straight line, then arcs clockwise with radius 5 to (10,10), then moves straight to (0,10).
Common Pitfalls
Common mistakes when programming fillets include:
- Using
Rradius with the wrong sign or value, causing the arc to be too large or small. - Confusing
G02(clockwise) andG03(counterclockwise), which changes arc direction. - Not setting the correct start point before the arc command, leading to unexpected tool paths.
- Omitting feed rate
F, which may cause the machine to use a default speed that is too fast or slow.
Example of wrong and right usage:
// Wrong: radius too large G02 X10 Y10 R20 // Right: correct radius G02 X10 Y10 R5
Quick Reference
| Command | Description | Example |
|---|---|---|
| G02 | Clockwise arc (fillet) | G02 X10 Y10 R5 F100 |
| G03 | Counterclockwise arc (fillet) | G03 X10 Y10 R5 F100 |
| X, Y | Arc end coordinates | X10 Y10 |
| R | Radius of fillet arc | R5 |
| F | Feed rate (speed) | F150 |
Key Takeaways
Use G02 or G03 with R to program fillet arcs in CNC.
Set correct arc end coordinates (X, Y) and radius (R) for smooth corners.
Choose G02 for clockwise and G03 for counterclockwise arcs.
Always verify start position before arc commands to avoid errors.
Include feed rate (F) to control machining speed during fillet.