GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

CNC basics

How Does CNC Machine Works: 5 Steps From CAD to Finished Cut

A plain walkthrough of the chain that turns a 3D model into a metal part: CAM toolpaths, G-code, machine motion, workholding and inspection. Written for engineers and buyers who need to judge whether a feature is machinable before design freeze.

±0.005 mm tolerance127 CNC machines16 five-axis centersRa 0.2–0.8 μm finishes
how does cnc machine works
Key takeaways

Key takeaways

The part exists as code firstGeometry, stock size and tolerances are fixed in CAD and CAM before any tool touches metal.
G-code is just motionEach line moves an axis, changes a tool or sets a feed rate. Nothing more.
Accuracy comes from the loopEncoder or scale feedback corrects axis position thousands of times per second.
Setup decides the resultWorkholding and tool offsets cause more scrap than the cutting program itself.
Check before you runDry run, single block and first-article inspection catch most errors early.
Step 1

How does cnc machine works: what happens before the spindle turns

Every machined part starts as a 3D CAD model. The model carries the geometry only. Someone still has to decide stock size, datum faces and which surfaces will be cut in one setup. A part with a 4,000 mm envelope and a 0.5 mm wall cannot be treated like a 40 mm bracket.

CAM software then converts the model into toolpaths. The programmer picks cutter diameter, step-down, step-over and entry method. A Ø10 mm end mill running 2,000–4,000 rpm at 800–1,500 mm/min in 6061 aluminium cuts differently from the same tool in 316 stainless at 400–700 rpm.

Toolpath strategy matters more than most people expect. Trochoidal or high-efficiency paths keep radial engagement low, so heat leaves with the chip. Conventional slotting traps chips and dulls the tool. On deep pockets, a 4:1 depth-to-diameter limit keeps deflection predictable.

Nothing is cut at this stage. A wrong toolpath costs programming hours, not scrap. That is the cheap place to fix a problem.

Step 2

G-code, offsets and the machine motion chain

CAM output becomes G-code, a list of sequential instructions. G0 moves fast, G1 moves in a straight feed, G2 and G3 cut arcs. M-codes handle spindle start, coolant and tool changes. The controller reads the block, calculates the next position, and sends commands to the servo drives.

The work offset tells the machine where the part sits in its travel envelope. G54 through G59 hold that origin. Tool length offsets tell the controller how long each cutter is after it leaves the presetter. Get either number wrong and the first rapid move ends in the vise.

Feedback closes the loop. Linear scales or rotary encoders report actual axis position several thousand times per second, and the controller corrects the difference. That is how a machine holds ±0.005 mm across a long cut instead of drifting.

GreatLight runs 127 high-precision CNC machines, including 16 simultaneous 5-axis machining centers, 12 four-axis mills, 27 three-axis machines and 16 mill-turn centers. Travel ranges go from 500 × 310 × 200 mm up to 4,000 × 400 × 150 mm for long parts.

Step 3

Workholding, first cut and in-process checks

Setup is where most scrap is born. A vise with 0.02 mm jaw lift tilts a thin plate. Three-point support on a casting stops rocking. For five-axis work on a Ø400 mm rotary table, the fixture must clear the tool at every tilt angle, not just at zero.

The first cut is a test, not production. Run a dry pass with the tool 5–10 mm above the stock and watch each approach. Then cut air, then cut one roughing pass at reduced feed, usually 50–60% of programmed value, before letting the program run at full speed.

Roughing removes most of the volume. Leave 0.3–0.5 mm on walls and floors for finishing. Semi-finishing brings that to 0.05–0.1 mm. Finishing at Ra 0.8–1.6 μm is normal for milled aluminium; Ra 0.2–0.8 μm needs a finer step-over, a sharper insert or a finishing pass with a smaller tool.

Measure between operations. A quick check with calipers after roughing catches a wrong offset before the finishing tool repeats the error on every surface.

Workflow

Step by step: from model to first article

Use this order on a new part. Skipping a step moves the cost later.

  • 1
    1. Freeze the CAD modelLock geometry, datums and tolerances. Check that every internal corner has a radius at least 1.2 × the cutter radius, or the corner will be left sharp and slow to cut.
  • 2
    2. Choose stock and setup countAdd 1–2 mm per side for roughing. Plan the fewest setups that still reach every face. Each extra setup adds a re-datum and a new error source.
  • 3
    3. Program toolpaths in CAMSelect cutter sizes from the smallest internal radius. Set step-down to 0.5–1.0 × tool diameter in aluminium, 0.2–0.5 × in stainless and titanium.
  • 4
    4. Simulate and postRun full machine simulation including the holder. Check rapid moves, tool changes and fixture clearance before posting.
  • 5
    5. Set offsets and prove outLoad tool length and work offsets, then dry run. Cut one roughing pass at 50–60% feed. Verify a known dimension before continuing.
  • 6
    6. Measure the first articleUse the same instrument the drawing calls for. Record the readings. Adjust offsets, re-cut, then release the program to the run.
Machine choice

Which machine type fits which part

Match the feature to the machine before you quote.

Part featureMachine typeTypical limit
Prismatic bracket, one face3-axis mill500 × 500 × 450 mm
Four-sided housing4-axis millAdds indexed side access
Undercuts and compound angles5-axis simultaneousBest for deep pockets and ports
Shaft with turning and flatsMill-turnOne chucking, one datum
Large frame or rail3-axis, long travel4,000 × 400 × 150 mm
Round housing on a flange4-axis with rotary tableØ400 mm rotary table
FAQs

Questions engineers ask next

How does cnc machine works without a drawing?

It can, but only when the model carries enough information. The CAM programmer still needs datums, tolerance intent and a note on which surfaces are functional. A bare STEP file with no tolerance callouts is a guess waiting to happen.

Send the 2D drawing with the model when a feature is critical. The model gives geometry, the drawing gives acceptance criteria.

What tolerance can a normal CNC machine hold?

On a rigid machine with a proven setup, ±0.005 mm is realistic for a controlled feature. That number depends on material, tool stick-out and thermal stability, not on the machine spec sheet alone.

Long thin parts move when you cut them. Expect to hold looser tolerance on a 500 mm unsupported wall than on a 50 mm boss.

Why does the same program give different results on two machines?

Rigidity, spindle condition and thermal growth differ. So do the offsets. A tool set 0.03 mm differently gives a 0.03 mm different cut.

Re-prove the program on each machine. Do not assume the offsets transfer.

When is CNC the wrong process?

Very thin sheet with no flat datums, or a part that needs a hollow internal channel with no opening, will be cheaper as a casting or an extrusion.

If the annual volume is huge and the geometry is simple, die casting or stamping usually wins on piece price.

How many setups should a part have?

As few as the geometry allows. Two setups are common for a housing. Each additional setup adds a re-datum, a new fixture and a fresh chance of misalignment.

Five-axis work can collapse three setups into one, which is usually worth the higher hourly rate on complex parts.

What do you need to quote a part?

A 3D model and a 2D drawing with tolerances, material and finish. Tell us the function of critical features and the annual volume.

Quotation and free DFM analysis come back within 12 hours. Production can start within 24 hours, and parts ship in 3–5 days.

Send the model, get a DFM answer

Upload a STEP file and drawing. We return a quote and a free DFM analysis within 12 hours, with no minimum order quantity.

12-hour quoteNo MOQ100% inspection

Follow

More from the shop floor

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC