Calculators / NC cutting simulation

Calculators

NC cutting simulation

Cut the stock along a lathe or machining center program move by move, with the stock, chuck and tools, including G41 G42. Finds rapids into the material, tools or holders in the jaws or the part, and inserts that drag their back edge into the part, and downloads the result as DXF or STL. Everything runs in your browser; the program never leaves your computer.

Open in the backplot

Bar and chuck

in the program's units

Tools

The values are read from the program's comments, such as (T0101 CNMG R0.8 T3). Values the program does not give are assumed and marked *.

How tool comments are read

A comment that starts with the tool's T word, such as (T0101 …), anywhere in the program. A comment on the T line, or alone on the line above it, also counts.

KindOD TURNING, FACE, ROUGH, FINISH · ID BORING · GROOVING, PARTING, CUT OFF · THREADING · DRILL · ID or INTERNAL for an inside tool
InsertISO code: CNMG, DNMG, VBMT, TNMG, WNMG, RCMT
Nose radiusR0.8 (up to 3 mm, except a round insert)
Tip numberT3
Groovingwidth W3 · LEFT or RIGHT · OFFSET 03 LEFT, OFFSET 13 RIGHT
DrillD10 or Ø10 · 118DEG
Threading60DEG or 55°

(T0101 OD TURNING CNMG R0.8 T3) (T0303 OD GROOVING W3 R0.2 LEFT) (T0505 OD THREADING 60DEG)

 

Move the cursor in the program to see that line. Drag to turn, right-drag or Shift-drag to pan, use the wheel to zoom, double-click to fit. A turned part has a quarter cut away to show inside, except with live-tool work, which is shown whole. To read sizes, use Measure in the 2D view.Section along the axis; the two halves are the same. The orange blocks are the jaws and the chuck face; holders are grey. Drag to pan, use the wheel to zoom, double-click to fit.
Problems— 
Assumed values—Check them in the tool list
Finished part— 

Lathe

The program is read by the same reader as the NC backplot, so the simulation follows the moves the backplot draws, including its estimates of the G71 to G76 passes. The bar is a section through its axis: Z to the right, the radius up. Each cutting move takes away the tool's outline swept along the move. Rapids take nothing away; they are checked instead.

The tools

  • Turning and boring: a rhombus insert with a rounded nose, in its usual holder: C and W in a 95° holder, D, V and T in a 93° holder. R is a round insert.
  • Live tools (C axis): drilling with G83 to G89, milling with G12.1 and G07.1, and Y-axis work are cut as a solid in 3D. Each tool's kind and diameter come from its comment, such as (T09 D10 END MILL - AXIAL LIVE TOOL); AXIAL or RADIAL says which way it points, otherwise the blocks it works in do. A blank already turned to steps is written (BLANK D80 TO Z-14 D50 TO Z-42). The view keeps the part still and moves the tool round it, so a C move shows the tool going to that side, though on the machine the part turns. Peck drilling is cut in one go, and the shank and holder are not checked against the part.
  • Grooving and part-off: a square blade of the given width with small rounded corners. The offset is set to the left (−Z) or the right (+Z) corner. A grooving tool with a second offset row, such as T0313 in O2601, uses the other corner on that row.
  • Threading: a 60° or 55° point, in 3D a laydown triangular insert. A thread winds round the part, so a section through it is not turned away: the 2D view draws it as a zigzag between the root and the surface, and the 3D view as a helical 60° groove of the lead, as deep as the passes so far. Once it is finished, its crest and root are flat, as in the ISO thread profile.
  • Drill: on the centre line with its point angle.

Behind each tool is a holder of a usual size, drawn in grey: a 20 mm shank above an outside tool, its underside rising a little more steeply than the insert's trailing edge; a Ø10 bar along +Z behind a boring bar or inside threading tool; and a parting blade 26 mm deep, enough to part off Ø50, in a block. The holder is never cut with, but a holder that reaches the part or the jaws is reported. Your holders may be bigger or smaller, so treat a holder warning as a reason to check the real tool. The turret is not drawn.

Where the tool goes

Under G40 the control puts the imaginary tool tip on the programmed point, and the tip number (0 to 9) says where that tip is from the nose centre, as Fig. 5.2.2 (a) of the Fanuc 0i-F lathe manual shows: 3 for an outside tool cutting toward the chuck, 2 for a boring bar. A nose radius with the wrong tip number moves the whole cut by the radius.

Under G41 G42 the nose centre stays one nose radius to the left or right of the path, goes round each outside corner on an arc, and meets the next offset at an inside corner. The block that starts compensation runs straight to the offset point at its end, and the block that cancels it runs straight from the last offset point, as type A. A real control can differ a little at corners and in those two blocks.

What it checks

  • A rapid into the material. The passes worked out for G71 to G76 are estimates and are not checked.
  • Cutting with the spindle stopped: material taken off with no M03 or M04 in force.
  • The tool in the jaws: any move, rapid or cut, that brings the tool or its holder into the jaws or the chuck face.
  • The holder in the part: a holder that reaches material the tool has not taken off.
  • The back of the insert in the part: when the path goes down a slope steeper than the insert's trailing edge clears, the trailing edge cuts below the path. In the usual holders a C insert clears about 5°, T about 27°, D about 32° and V about 52°; the real limit is a few degrees less because of the insert's own clearance.
  • A part cut off: a piece that no longer reaches back to the chuck has come off; it is the finished part the downloads give.

The profile downloads as a DXF of lines in mm or inches, with both halves and the centre line, to lay over the drawing. With no part-off it is what is left in front of the jaws. The STL is the same profile turned a full turn about Z, a closed solid with enough facets round that none is more than 1 µm inside the true circle, with its threads cut in as the helical 60° groove.

3D and 2D

The 3D view turns like the backplot, with the same view cube. A turned part has a quarter cut away at the front and top, so bores, grooves and the part-off show. The 2D views are the exact section (lathe) or the view from above (machining center), with the coordinates under the pointer. Press Measure and click two points: on the lathe each click snaps to a corner of the part's outline nearby, or else onto the outline itself, and a ring under the pointer shows where it will land; it gives ΔZ, the diameter at each point and the straight distance (two points on opposite halves at one Z give the diameter across); on the machining center it gives ΔX, ΔY, the distance, and the depth Z under each point.

Machining center

The block is a height map: a grid of cells in X and Y over the stock, seen from above, up to 300,000 of them, each holding one Z value as it is, not rounded to steps. Each cutting move lowers every cell the tool's end passes over to the lowest point of the end above it. The end is a flat for an end mill, face mill or tap, a quarter circle at the edge of a bull nose, a half sphere for a ball end mill, and a cone for a drill or spot drill. Along each straight piece of a move the lowest point is found exactly, so a ball end mill leaves its true cusps. A drilling cycle cuts from its R level to the bottom.

A height map has one Z for each point, so it cannot show undercuts; a three-axis machine cannot cut them with these tools either. The tool's shank and holder are not modelled. Under G41 G42 the tool centre runs half the diameter given here to the side, rounding outside corners as on the lathe; the D value in the machine may be set differently.

The block's size comes from a comment such as (STOCK: 152mm x 102mm x 33mm), placed on the zero the program names, (X0 Y0 AT CENTER) or (X0 Y0 LOWER LEFT), with its top at (STOCK TOP Z0.5) if the program says so; otherwise it is the extent of the cuts. It checks rapids into the material, cutting with the spindle stopped (except rigid tapping, where the cycle drives the spindle), and cuts through the bottom of the block. The cut block downloads as an STL, a closed solid with a corner at every cell of the height map: as simulated uses the simulation's grid (about 30 MB), high detail simulates the program again on a grid of up to 1.2 million cells, none narrower than 0.01 mm in X and Y (about 120 MB). The finest detail it can hold across X and Y is one cell, so the high-detail file follows walls and small features more closely.

The A axis and tilted planes

A program that turns the A axis, or uses G68.2 with G53.1, is cut as a solid and shown in 3D. The part stays still in the program's X Y Z and the tool goes round it, so a turn of A shows the tool going to that side, though on the machine the part turns. The A axis is taken as running along X through Y0 Z0, with no roll-over, and +A carries the tool round the part by the right-hand rule about +X: check the real direction in the machine's manual.

The stock comes from a comment: (BAR D40 X 80) or (BAR 40 X 40 X 60) on the A axis, section first and then length, with X0 = LEFT END or RIGHT END; (BLOCK 60 X 50 X 40) for G68.2. A face already on the stock is written (30 DEG FACE ALONG THE -Y EDGE FROM Y-10. Z0). Rapids and cutting with the spindle stopped are checked. Only the tool's cutting part is checked against the workpiece: not the rotary table, the fixture, the holder or the spindle head. Under G41 G42 the view cuts along the path as written.

G43.4, G43.5, G68.3, G07.1, moving B or C, commanding rotary axes inside G68.2, and G68.2 with no G53.1 are not simulated, and the page says so instead of showing a part. Simultaneous 5-axis work has to be checked with a simulation of the whole machine.