OD roughing — 0.8 mm nose
Outside turning
R0.8 mm nose
TOOLBOX · CNC & MACHINING · VISUAL TOOLPATH
See your turning tools move and watch the stock take shape. Load a demo or your own G-code, set the stock and assign your tools, then play or step through each cut. X values are diameters; Z0 is the front face.
No account needed. Programs run in your browser.
Rough and finish a three-diameter shaft, with shoulders and chamfers that grow towards the chuck.
Sample stock: Ø50 × 80 mm · 2 tools
Load this sample to apply its program, stock and temporary tool setup. These are simulation examples with expanded passes; check and adapt them for your machine before use.
Stock extends from Z0 to Z−80. Stock and tool dimensions are always in mm, including for G20 programs.
Tool edits here apply to this session. Your saved tool library stays unchanged.
Match each complete T code to a tool below. Dimensions are in mm, including for inch programs. The starting tool is used until the first T code.
Outside turning
R0.8 mm nose
Outside turning
R0.4 mm nose
The library sets preview geometry. It does not apply machine tool offsets or tool-nose compensation.
Sample tools are temporary. Switch to your saved library for your own programs. No G-code is uploaded.
✓ No basic parser warnings found.
G00 RAPIDG01 LINEARG02 CW ARCG03 CCW ARCG20 INCHG21 METRICG90 ABSOLUTEG91 INCREMENTALG94 PER MING95 PER REVG98 PER MING99 PER REVU/W INCREMENTALR + I/K ARCSCommon N, O, T, S, F and M words plus parenthetical and semicolon comments are handled without creating false motion. G18 is the assumed XZ plane.
G71 ROUGHINGG72 FACINGG74 PECKG75 GROOVINGG76 THREADINGThese blocks are skipped and reported by line instead of displaying a guessed toolpath. Expand cycles into explicit moves for a visual preview.
PRACTICAL PROGRAM CHECKING
This free browser-based tool turns common two-axis turning moves into an immediate visual check. It is designed to help machinists and CNC programmers understand programmed motion before moving to the control, not to replace the machine’s own graphics and prove-out process.
Paste a lathe program or open a G-code file. Assign turning, grooving, boring or drilling tools to the complete T codes in your program. Play the tool motion and approximate stock removal, or drag the timeline backwards to inspect an earlier cut.
The display treats X as the diameter or radial axis and Z as the spindle-length axis. The remaining stock, original outline and X0 Z0 reference make it easier to spot a move on the wrong side of the component, an unexpected retract or an incorrect sign.
G00 rapid moves appear as dashed grey lines. G01 linear feed moves are orange, while G02 and G03 arcs use a lighter orange path. This visual separation helps reveal where the tool approaches, cuts and retracts.
The current simulator handles G00, G01, G02 and G03 motion; G20 and G21 units; G90 and G91 positioning; G94/G95 and lathe G98/G99 feed modes; U/W incremental moves; and supported R or I/K arc definitions. N, O, T, S, F and common M words can remain in the program without creating false movement.
CHECKING WORKFLOW
Paste the program. Keep the original line numbers and comments so warnings are easy to trace.
Set the stock. Enter the stock diameter, length and any existing bore. Match every T code to a tool in the library before cutting.
Read the warnings. Review unsupported cycles, mixed units and incomplete or unusual blocks.
Step through motion. Check rapids, feed direction, approach moves, retracts, arcs and the final safe position.
Verify at the control. Confirm offsets, compensation, tooling and clearances, then use machine graphics, single block, feed override and a safe dry run.
EXAMPLE CNC LATHE PROGRAMS
Choose a sample above and select Load sample program to load its code, stock and tools. Explicit G00, G01, G02 and G03 moves are the clearest way to review motion online.
Rough and finish a three-diameter shaft, with shoulders and chamfers that grow towards the chuck.
Ø20 nose · Ø30 journal · Ø40 rear land · Front face Z−1 · rear shoulder Z−62 · Chamfered edges · rear bar retained for workholding
%
O1101 (EHQ STEPPED SHAFT)
(SIMULATION EXAMPLE - NOT MACHINE PROVED)
(METRIC - X DIAMETER - Z0 RAW FRONT FACE)
(SPEEDS AND FEEDS ARE ILLUSTRATIVE - VERIFY YOUR SETUP)
(STOCK DIA 50 X 80 - REAR BAR IS LEFT FOR WORKHOLDING)
N10 G21 G18 G40 G80 G99
N20 G50 S2500
(T05 OD ROUGHING - FACE AND TURN)
N30 G00 X60.0 Z10.0
N40 T0505
N50 G97 S900 M03
N60 M08
N70 G00 X52.0
N80 G00 Z1.0
N90 G01 Z-0.6 F0.18
N100 G01 X-1.0
N110 G00 Z2.0
N120 G00 X52.0
(ROUGH ODS +0.4 ON DIAMETER - SHOULDERS +0.2 AXIAL)
N130 G00 X46.4
N140 G00 Z2.0
N150 G01 Z-61.8 F0.22
N160 G00 X52.0
N170 G00 Z2.0
N180 G00 X42.4
N190 G00 Z2.0
N200 G01 Z-61.8 F0.22
N210 G00 X52.0
N220 G00 Z2.0
N230 G00 X40.4
N240 G00 Z2.0
N250 G01 Z-61.8 F0.22
N260 G00 X52.0
N270 G00 Z2.0
N280 G00 X36.4
N290 G00 Z2.0
N300 G01 Z-46.3 F0.22
N310 G00 X52.0
N320 G00 Z2.0
N330 G00 X32.4
N340 G00 Z2.0
N350 G01 Z-46.3 F0.22
N360 G00 X52.0
N370 G00 Z2.0
N380 G00 X30.4
N390 G00 Z2.0
N400 G01 Z-46.3 F0.22
N410 G00 X52.0
N420 G00 Z2.0
N430 G00 X26.4
N440 G00 Z2.0
N450 G01 Z-20.3 F0.22
N460 G00 X52.0
N470 G00 Z2.0
N480 G00 X22.4
N490 G00 Z2.0
N500 G01 Z-20.3 F0.22
N510 G00 X52.0
N520 G00 Z2.0
N530 G00 X20.4
N540 G00 Z2.0
N550 G01 Z-20.3 F0.22
N560 G00 X52.0
N570 G00 Z2.0
N580 G00 X60.0
N590 G00 Z10.0
N600 M09
N610 M05
N620 M01
(T01 FINISH FACE AND STEPPED PROFILE)
N630 G00 X60.0 Z10.0
N640 T0101
N650 G97 S1400 M03
N660 M08
N670 G00 X52.0
N680 G00 Z1.0
N690 G01 Z-1.0 F0.10
N700 G01 X-1.0
N710 G00 Z2.0
N720 G00 X18.0
N730 G01 Z-1.0 F0.12
N740 G01 X20.0 Z-2.0
N750 G01 Z-20.5
N760 G01 X21.0 Z-21.0
N770 G01 X28.0
N780 G01 X30.0 Z-22.0
N790 G01 Z-46.5
N800 G01 X31.0 Z-47.0
N810 G01 X38.0
N820 G01 X40.0 Z-48.0
N830 G01 Z-62.0
N840 G01 X50.0
N850 G00 X60.0
N860 G00 Z10.0
N870 M09
N880 M05
N890 M30
%A shoulder pin with sensible roughing cuts, a tangent R3 root radius and a separate finishing tool.
Ø20 nose · R3 shoulder · Ø28 shank · Ø36 rear land · rear shoulder Z−55 · Front face Z−1 · rear bar retained for workholding
%
O1102 (EHQ RADIUSED SHOULDER PIN)
(SIMULATION EXAMPLE - NOT MACHINE PROVED)
(METRIC - X DIAMETER - Z0 RAW FRONT FACE)
(SPEEDS AND FEEDS ARE ILLUSTRATIVE - VERIFY YOUR SETUP)
(STOCK DIA 40 X 70 - ALL SHOULDERS GROW TOWARDS CHUCK)
N10 G21 G18 G40 G80 G99
N20 G50 S2500
(T05 ROUGH FACE AND OUTSIDE DIAMETERS)
N30 G00 X50.0 Z10.0
N40 T0505
N50 G97 S1100 M03
N60 M08
N70 G00 X42.0
N80 G00 Z1.0
N90 G01 Z-0.6 F0.18
N100 G01 X-1.0
N110 G00 Z2.0
N120 G00 X42.0
(ROUGH ODS +0.4 ON DIAMETER - SHOULDERS +0.2 AXIAL)
N130 G00 X36.4
N140 G00 Z2.0
N150 G01 Z-54.8 F0.22
N160 G00 X42.0
N170 G00 Z2.0
N180 G00 X32.4
N190 G00 Z2.0
N200 G01 Z-42.3 F0.22
N210 G00 X42.0
N220 G00 Z2.0
N230 G00 X28.4
N240 G00 Z2.0
N250 G01 Z-42.3 F0.22
N260 G00 X42.0
N270 G00 Z2.0
(SHORTER PASSES LEAVE MATERIAL AROUND THE R3 ROOT)
N280 G00 X24.4
N290 G00 Z2.0
N300 G01 Z-22.6 F0.22
N310 G00 X42.0
N320 G00 Z2.0
N330 G00 X22.4
N340 G00 Z2.0
N350 G01 Z-22.0 F0.22
N360 G00 X42.0
N370 G00 Z2.0
N380 G00 X20.4
N390 G00 Z2.0
N400 G01 Z-19.8 F0.22
N410 G00 X42.0
N420 G00 Z2.0
N430 G00 X50.0
N440 G00 Z10.0
N450 M09
N460 M05
N470 M01
(T01 FINISH FACE AND RADIUSED PROFILE)
N480 G00 X50.0 Z10.0
N490 T0101
N500 G97 S1500 M03
N510 M08
N520 G00 X42.0
N530 G00 Z1.0
N540 G01 Z-1.0 F0.10
N550 G01 X-1.0
N560 G00 Z2.0
N570 G00 X18.0
N580 G01 Z-1.0 F0.12
N590 G01 X20.0 Z-2.0
N600 G01 Z-20.0
(R3 ROOT - I IS A RADIAL CENTRE OFFSET)
N610 G03 X26.0 Z-23.0 I3.0 K0.0
N620 G01 X28.0
N630 G01 Z-42.5
N640 G01 X29.0 Z-43.0
N650 G01 X34.0
N660 G01 X36.0 Z-44.0
N670 G01 Z-55.0
N680 G01 X40.0
N690 G00 X50.0
N700 G00 Z10.0
N710 M09
N720 M05
N730 M30
%A full sequence with OD roughing and finishing, explicit drill pecks, boring and a retaining groove.
Ø34 body · Ø46 flange · Ø20 bore · 3 mm groove at Z−12, down to Ø30 · Bore to Z−46 · pilot to Z−54 · part remains attached
%
O1103 (EHQ FLANGED BUSH)
(SIMULATION EXAMPLE - NOT MACHINE PROVED)
(METRIC - X DIAMETER - Z0 RAW FRONT FACE)
(SPEEDS AND FEEDS ARE ILLUSTRATIVE - VERIFY YOUR SETUP)
(STOCK DIA 50 X 65 - FIRST OP ONLY - NO PART OFF)
N10 G21 G18 G40 G80 G99
N20 G50 S2500
(T05 ROUGH FACE AND OUTSIDE DIAMETERS)
N30 G00 X60.0 Z10.0
N40 T0505
N50 G97 S900 M03
N60 M08
N70 G00 X52.0
N80 G00 Z1.0
N90 G01 Z-0.6 F0.18
N100 G01 X-1.0
N110 G00 Z2.0
N120 G00 X52.0
(ROUGH ODS +0.4 ON DIAMETER - SHOULDERS +0.2 AXIAL)
N130 G00 X46.4
N140 G00 Z2.0
N150 G01 Z-43.8 F0.22
N160 G00 X52.0
N170 G00 Z2.0
N180 G00 X42.4
N190 G00 Z2.0
N200 G01 Z-32.8 F0.22
N210 G00 X52.0
N220 G00 Z2.0
N230 G00 X38.4
N240 G00 Z2.0
N250 G01 Z-32.8 F0.22
N260 G00 X52.0
N270 G00 Z2.0
N280 G00 X34.4
N290 G00 Z2.0
N300 G01 Z-32.8 F0.22
N310 G00 X52.0
N320 G00 Z2.0
N330 G00 X60.0
N340 G00 Z10.0
N350 M09
N360 M05
N370 M01
(T01 FINISH FACE BODY AND FLANGE)
N380 G00 X60.0 Z10.0
N390 T0101
N400 G97 S1300 M03
N410 M08
N420 G00 X52.0
N430 G00 Z1.0
N440 G01 Z-1.0 F0.10
N450 G01 X-1.0
N460 G00 Z2.0
N470 G00 X32.0
N480 G01 Z-1.0 F0.12
N490 G01 X34.0 Z-2.0
N500 G01 Z-33.0
N510 G01 X35.0 Z-33.5
N520 G01 X44.0
N530 G01 X46.0 Z-34.5
N540 G01 Z-44.0
N550 G01 X50.0
N560 G00 X60.0
N570 G00 Z10.0
N580 M09
N590 M05
N600 M01
(T04 DIA 16 DRILL - EXPLICIT PECKS)
N610 G00 X60.0 Z10.0
N620 T0404
N630 G97 S750 M03
N640 M08
N650 G00 X0.0
N660 G00 Z2.0
N670 G01 Z-13.0 F0.14
N680 G00 Z2.0
N690 G00 Z-12.0
N700 G01 Z-25.0
N710 G00 Z2.0
N720 G00 Z-24.0
N730 G01 Z-37.0
N740 G00 Z2.0
N750 G00 Z-36.0
N760 G01 Z-49.0
N770 G00 Z2.0
N780 G00 Z-48.0
N790 G01 Z-54.0
N800 G00 Z10.0
N810 G00 X60.0
N820 M09
N830 M05
N840 M01
(T03 DIA 6 BORING BAR - DIA 16 PILOT ALREADY DRILLED)
N850 G00 X60.0 Z10.0
N860 T0303
N870 G97 S1200 M03
N880 M08
N890 G00 X18.0
N900 G00 Z2.0
N910 G01 Z-45.8 F0.12
N920 G00 X14.0
N930 G00 Z2.0
(ROUGH BORE DIA 19.6 - LEAVE 0.4 ON DIAMETER)
N940 G00 X19.6
N950 G01 Z-45.8 F0.12
N960 G00 X14.0
N970 G00 Z2.0
(FINISH BORE DIA 20 AND 1 X 45 DEG ENTRY CHAMFER)
N980 G00 X22.0
N990 G01 Z-1.0 F0.08
N1000 G01 X20.0 Z-2.0
N1010 G01 Z-46.0
N1020 G00 X14.0
N1030 G00 Z10.0
N1040 G00 X60.0
N1050 M09
N1060 M05
N1070 M01
(T02 RETAINING GROOVE - 3 MM WIDE - CENTRED ON Z-12)
N1080 G00 X60.0 Z10.0
N1090 T0202
N1100 G97 S700 M03
N1110 M08
N1120 G00 Z-12.0
N1130 G00 X36.0
N1140 G01 X32.0 F0.06
N1150 G00 X35.0
N1160 G01 X30.0 F0.06
N1170 G00 X60.0
N1180 G00 Z10.0
N1190 M09
N1200 M05
N1210 M30
%