G41 & G42: Cutter Compensation Explained – Left vs Right Tool Offsets
In contour milling or profiling, the center of the tool doesn’t always match the programmed path. That’s where G41 (left) and G42 (right) come in — they shift the toolpath to the left or right to account for the tool radius.
⚙️ What Is Cutter Compensation?
Tool compensation allows you to:
- Use the same G-code with different tool diameters
- Adjust for wear or new tool geometry
- Ensure dimensional accuracy without rewriting toolpaths
📐 G41 vs G42 Direction
| G-Code | Offset Direction | Viewed from Movement Direction |
|---|---|---|
| G41 | Left of path | Tool remains left of the programmed line |
| G42 | Right of path | Tool remains right of the programmed line |
Imagine walking forward on a path:
- G41: You walk on the left side of the line
- G42: You walk on the right side
🧠 Why Use Cutter Compensation?
Without cutter comp, you’d need to manually shift toolpaths by half the tool diameter. This is inefficient and error-prone.
With G41/G42:
- Use CAD/CAM software or controller to handle compensation
- Adjust tool offset in the control, not in the code
🧪 Example – G41 in Use
Assume:
- Tool radius = 5 mm
- Desired contour programmed at exact part geometry
%
O5001 (G41 Cutter Comp Left Example)
G21 G17 G90
T1 M6
G0 X0 Y0
G43 H1 Z100
S1500 M3
M8
G0 X10 Y10
G1 Z-5 F100
G41 D01 ; Activate left cutter comp using offset D01
G1 X100 Y10 ; Start of contour
X100 Y100
X10 Y100
X10 Y10
G40 ; Cancel compensation
G0 Z100
M30
%
Ensure you have a lead-in move before compensation starts (like X10 Y10), or the controller may alarm.
🚧 G40: Cancel Compensation
Always use G40 after your compensated moves are complete:
G40
G0 Z100
Never leave G41 or G42 active unintentionally — it can affect future moves.
🧮 Tool Offset Numbers (D01, D02, …)
- D-word in
G41 D01tells the machine which tool radius to apply - That offset value is stored in the tool table of your controller
- Example:
- D01 = 5.0 mm radius
- D02 = 3.175 mm (⅛”) radius
🔄 G42 – Right Compensation Example
Same profile, but tool runs right of the path:
G42 D01
G1 X100 Y10
X100 Y100
X10 Y100
X10 Y10
G40
❗ Common Mistakes
| Mistake | Result | Fix |
|---|---|---|
| No lead-in move before G41/G42 | Alarm or error | Add linear lead-in before comp |
| Using wrong direction (G41 vs G42) | Tool cuts on wrong side of part | Use simulator or visualize cut |
| Forgetting G40 after contour | Tool stays offset into next moves | Always cancel after contour |
| Wrong D-number (wrong offset) | Part cut oversized or undersized | Double-check tool offset table |
🔍 G41/G42 in CAM Software
- Most CAM software automatically adds lead-in/lead-out moves
- Cutter comp can be set to:
- Off (exact path) – no G41/G42
- Control (controller does offset) – adds G41/G42
- Computer (CAM does offset) – offsets baked into G-code
Control compensation = most flexible during production.
🧩 Visualizing Cutter Compensation
Part Edge:
----------------------
Toolpath (G41) → Tool Center Offset Left:
----------●---------- ← tool center path
Toolpath (G42) → Tool Center Offset Right:
●---------- ← tool center path
✅ Best Practices
| Tip | Benefit |
|---|---|
| Use lead-in arcs or lines | Ensures smooth cutter comp entry |
| Always cancel with G40 | Prevents downstream errors |
| Simulate cutter comp paths | Avoid surprise offsets |
| Match D-word to tool radius | Accurate part dimensions |
| Let controller handle offset | Easy tool change or adjustment |
📌 Summary Table
| G-Code | Direction | Used For |
|---|---|---|
| G41 | Left | Outside profiling (CW) |
| G42 | Right | Inside profiling (CCW) |
| G40 | Cancel | After contouring complete |
🔚 Final Thoughts
Using G41 and G42 for cutter compensation allows for precision, flexibility, and easier tool changes. It separates geometry from tool dimensions — a major boost for lean manufacturing and repeatability.
Don’t guess the cutter path — program for it.
Leave a comment