FIFTY LINETurn G-code
Online generatorOnline calculatorsReference

Machining cycle

Boring on a CNC lathe

Boring internal diameters

A clickable cycle form: tap any field to see what it does.

The "Boring" cycle form with parameters and a live 2D path simulator

 

Форма цикла «Расточка»

The cycle form: bore diameter, final diameter and tool/holder diameter, with a live 2D path simulator on the right.

The boring cycle removes material along an internal diameter over one or several passes, mirroring outer-diameter turning but for the internal surface.

Who needs this cycle

Needed when an internal diameter must be enlarged to a precise size after drilling — for a shaft fit, a bearing seat, and similar.

Key form parameters

  • •Start and end internal diameter
  • •Length of the bore
  • •Finishing allowance
  • •Feed rate
  • •Spindle speed

G-code example

Real output of the boring cycle: a Ø22 mm blank with a Ø10 mm pilot hole is bored to Ø20 mm, 20 mm deep. Ø8 mm boring bar, depth per pass 0.5 mm per side, 0.2 mm allowance, plunge 40 mm/min, turning 80 mm/min; roughing at 300 rpm, finishing at 555 rpm. The code lines were not edited by hand.

The key feature of this cycle is stated right in the program header: X in the code is the tool centre, and the cutting edge is further from the axis by the tool radius (4 mm here). So the X1.5 pass cuts at Ø11: (1.5 + 4) × 2 = 11. Radius mode G8.

boring.ngc · 114 lines — Show the full program
%
(Turn G-code)
(Internal boring)
(X in the program = tool centre. Cutting edge in X = X + tool R.)
(Logic: centre at X0, move in Z, plunge X+, pass in Z, exit X-)
(Stock Ø: 22.0000)
(Bore Ø: 10.0000)
(Final Ø: 20.0000)
(Tool/bar Ø: 8.0000)
(Bore R: 5.0000)
(Tool R: 4.0000)
(Edge offset in X from tool centre: 4.0000)
(Bore touch, tool centre X: 1.0000)
(Part machining start Z: 0.0000)
(Part machining end Z: -20.0000)
(Direction: from the chuck into the depth)
(Safe X: 0.0000, Retract X: 25.0000)
(Allowance: 0.2000)
(Depth/pass: 0.5000)
(Turning feed F: 80.0000)
(Plunge feed F: 40.0000)

G21 G18 G90 G8 G40 G80 G94
G54

G97 S300 M3
G0 Z3.0000
G0 X0.0000
G0 X0.0000

(Roughing pass 1 of 10)
(Centre X1.5000; edge in X R5.5000 / Ø11.0000; part Z 0.0000 -> -20.0000; tool Z 0.0000 -> -20.0000)
G0 Z0.0000
G1 X1.5000 F40.0000
G1 Z-20.0000 F80.0000
G0 X0.0000

(Roughing pass 2 of 10)
(Centre X2.0000; edge in X R6.0000 / Ø12.0000; part Z 0.0000 -> -20.0000; tool Z 0.0000 -> -20.0000)
G0 Z0.0000
G1 X2.0000 F40.0000
G1 Z-20.0000 F80.0000
G0 X0.0000

(Roughing pass 3 of 10)
(Centre X2.5000; edge in X R6.5000 / Ø13.0000; part Z 0.0000 -> -20.0000; tool Z 0.0000 -> -20.0000)
G0 Z0.0000
G1 X2.5000 F40.0000
G1 Z-20.0000 F80.0000
G0 X0.0000

(Roughing pass 4 of 10)
(Centre X3.0000; edge in X R7.0000 / Ø14.0000; part Z 0.0000 -> -20.0000; tool Z 0.0000 -> -20.0000)
G0 Z0.0000
G1 X3.0000 F40.0000
G1 Z-20.0000 F80.0000
G0 X0.0000

(Roughing pass 5 of 10)
(Centre X3.5000; edge in X R7.5000 / Ø15.0000; part Z 0.0000 -> -20.0000; tool Z 0.0000 -> -20.0000)
G0 Z0.0000
G1 X3.5000 F40.0000
G1 Z-20.0000 F80.0000
G0 X0.0000

(Roughing pass 6 of 10)
(Centre X4.0000; edge in X R8.0000 / Ø16.0000; part Z 0.0000 -> -20.0000; tool Z 0.0000 -> -20.0000)
G0 Z0.0000
G1 X4.0000 F40.0000
G1 Z-20.0000 F80.0000
G0 X0.0000

(Roughing pass 7 of 10)
(Centre X4.5000; edge in X R8.5000 / Ø17.0000; part Z 0.0000 -> -20.0000; tool Z 0.0000 -> -20.0000)
G0 Z0.0000
G1 X4.5000 F40.0000
G1 Z-20.0000 F80.0000
G0 X0.0000

(Roughing pass 8 of 10)
(Centre X5.0000; edge in X R9.0000 / Ø18.0000; part Z 0.0000 -> -20.0000; tool Z 0.0000 -> -20.0000)
G0 Z0.0000
G1 X5.0000 F40.0000
G1 Z-20.0000 F80.0000
G0 X0.0000

(Roughing pass 9 of 10)
(Centre X5.5000; edge in X R9.5000 / Ø19.0000; part Z 0.0000 -> -20.0000; tool Z 0.0000 -> -20.0000)
G0 Z0.0000
G1 X5.5000 F40.0000
G1 Z-20.0000 F80.0000
G0 X0.0000

(Roughing pass 10 of 10)
(Centre X5.8000; edge in X R9.8000 / Ø19.6000; part Z 0.0000 -> -20.0000; tool Z 0.0000 -> -20.0000)
G0 Z0.0000
G1 X5.8000 F40.0000
G1 Z-20.0000 F80.0000
G0 X0.0000

(Finishing spindle speed)
S555
(Finish pass 1 of 1)
(Centre X6.0000; edge in X R10.0000 / Ø20.0000; part Z 0.0000 -> -20.0000; tool Z 0.0000 -> -20.0000)
G0 Z0.0000
G1 X6.0000 F40.0000
G1 Z-20.0000 F80.0000
G0 X0.0000
G0 Z25.0000
G0 X25.0000
M5

M30
%

Line-by-line breakdown

G21 G18 G90 G8 G40 G80 G94
Start: millimetres, XZ plane, absolute coordinates, radius mode for X (G8), cancel compensation and canned cycles, feed in mm/min.
G97 S300 M3 / G0 Z3.0000 / G0 X0.0000
300 rpm and an approach to 3 mm in front of the face exactly on the part axis (X0): from here the Ø8 bar enters the Ø10 hole freely.
G0 Z0.0000 → G1 X1.5000 F40.0000 → G1 Z-20.0000 F80.0000
First roughing pass: move to the face, plunge in X at 40 mm/min to X1.5 (edge at Ø11) and feed to depth Z−20 at 80 mm/min.
G0 X0.0000
Move back to the axis at the bottom of the hole; the next pass starts with G0 Z0 — the bar exits along the centre without touching the walls.
(Roughing pass 2 of 10) … (Roughing pass 10 of 10)
Each pass is 0.5 mm per side larger: edge at Ø12, Ø13 … Ø19; the tenth pass — X5.8 (Ø19.6) — leaves 0.2 mm per side for finishing.
S555 / G1 X6.0000 F40.0000 / G1 Z-20.0000 F80.0000
Finishing pass at 555 rpm: tool centre X6.0, edge R10 — final Ø20.
G0 Z25.0000 / G0 X25.0000 / M5 / M30
Withdraw the tool from the hole to Z25, retract in X, spindle stop and program end.

Comments in this program were translated from Russian; the G-code itself is unchanged.

What the codes in this program mean (G0, G1, G8, G97, M3, M5) — G- and M-code reference for lathes.

Frequently asked questions

How is boring different from turning?

Same principle as turning — roughing and a finishing pass with an allowance — but applied to an internal diameter after drilling, instead of an outer surface.

Can I set multiple roughing passes?

Yes, just like in turning, the cycle distributes passes based on the given finishing allowance.

What is boring needed for?

To enlarge an internal diameter to a precise size after drilling — for example, for a shaft fit or a bearing seat.

Can I preview the toolpath before generating the G-code?

Yes, the cycle form shows a live 2D toolpath simulator for the internal machining.