MACHINING PROCESS PLANNING

Machine First or Heat-Treat First? Distortion, Hardness, and the Sequencing Trade-off

Machine first or heat-treat first? Distortion, hardness, and the sequencing trade-off — article cover
TL;DR Heat treatment can change a material's hardness and toughness — but it is also the single most common source of machining distortion, as residual stress redistributes during heating and cooling, warping the part and throwing dimensions off. In practice, most shops follow the classic "rough → heat-treat → finish" sequence: rough out the stock first and leave a machining allowance, then finish-machine the distortion back within tolerance after heat treatment. But that is not the only answer: machining already-hardened material directly sidesteps distortion, at the cost of fast tool wear; aluminum parts often rely on aging and stress relief to stabilize dimensions instead. The drawing should spell out the heat-treatment method, hardness, and any local requirements. The knowledge behind the sequencing decision still lives in the veteran's experience — what AI is well suited to is simulation and dimensional verification before and after heat treatment.
Let's be clear about the product boundary up front: this product does not provide heat-treatment services. Heat treatment is a specialist process that belongs to "outsourced coordination." The purpose of this article is to help you get the machining sequence around heat treatment and the drawing callouts right, so that outsourced heat treatment and in-house CNC machining connect cleanly — it does not mean we take on heat-treatment work.

01Common heat treatments and what they are for

Heat treatment changes a metal's internal structure through controlled heating and cooling, adjusting hardness, strength, toughness, and machinability. It does not change the part's shape, yet it determines how easily the material cuts and how durable it will be. Manufacturing-engineering textbooks treat heat treatment as a key process for determining a part's mechanical properties — as important as material selection itself (Kalpakjian & Schmid, 2020)[1]. The ones you run into most on the shop floor are:

Each treatment's "purpose" dictates where it belongs in the sequence: treatments meant to soften and improve machinability tend to go before cutting, while treatments meant to raise hardness drive the core decision of "do we still need to machine after hardening or not."

02Why does heat treatment distort a part? The role of residual stress

What gives shops the most trouble about heat treatment isn't hardness — it's distortion. There are two main causes: one is the redistribution of residual stress, the other is the volume change from phase transformation.

By the time metal has been cast, rolled, forged, and cut, it has already accumulated invisible internal stress, held "locked in" at room temperature by the material's stiffness. Once it is heated and softens, that stress relaxes and warps the part toward its lowest-energy state. Quenching makes this even more pronounced: surface and core cool at different rates, hard phases transform out of sync, and different regions expand or contract at different times, producing new stress and even cracks. These are physical behaviors of the material — you can't eliminate them completely by "being more careful."

From a systems point of view, a part's final quality is the joint result of "material + process sequence," and every process step passes its state on to the next (Chryssolouris, 2006)[2]. This is exactly why heat treatment can't be treated as an isolated step — the stress it inherits from upstream and the distortion that must be corrected downstream both have to be considered together when planning the sequence. The practical countermeasure isn't to eliminate distortion but to manage it: leave ample machining stock, remove material as symmetrically as possible to balance the stress, and hand the responsibility for final dimensions to the finish-machining that comes after heat treatment.

03Rough → heat-treat → finish: the classic sequence and its exceptions

To deal with distortion, the industry has settled on one of the most robust rules of thumb: rough → heat-treat → finish.

  1. Roughing: remove most of the excess material and approach the final shape, but deliberately leave a finishing allowance on the critical dimensions. Sizes don't need to be exact here, because they are going to change later anyway.
  2. Heat treatment: bring the material to the required hardness and structure, and relieve the stress introduced by roughing at the same time. Distortion happens at this step — but because there is still stock, the distortion gets "absorbed" into the allowance.
  3. Finishing: using the actual post-heat-treatment state as the reference, correct the distortion and dimensional deviation into tolerance in one go.

Putting the heavy cutting before hardening has another practical benefit: soft material cuts easily, tools last longer, and throughput is higher — after hardening you only need light finishing or grinding. This sequence also echoes a basic principle of process planning: the arrangement of the process sequence is itself the lever that decides cost and quality, not something the machine tool decides on its own (Chryssolouris, 2006)[2].

But the classic sequence has its exceptions:

04Hard-machine directly, or machine first and then heat-treat?

When a part calls for high hardness, you hit that classic fork: harden the material and then find a way to machine it (hard machining), or machine it while it's still soft and then send it for heat treatment? Each route has its cost.

RouteAdvantagesWhat it costs you
Machine first → then heat-treatEasy cutting, long tool life, high throughputYou have to absorb heat-treatment distortion; usually you must leave a finishing allowance or plan follow-up grinding
Hard-machine directlySidesteps the heat-treatment distortion problem, steadier dimensions, can skip downstream correctionFast tool wear, high demands on tool grade and parameters, process monitoring matters more

The biggest pain point of hard machining is tool wear. When you cut already-hardened material, the cutting edge takes on higher temperature and mechanical load; wear is fast, its state changes quickly, and once the edge dulls it turns around and affects dimensions and surface finish. This is exactly why, on hard materials and high-value parts, tool-condition monitoring is especially critical — a CIRP review notes that monitoring tool wear and breakage through signals such as cutting force, vibration, acoustic emission, and power lets you step in early before problems grow, and is an important means of keeping machining stable (Teti et al., 2010)[3]. In other words, choosing the hard-machining route means investing more effort in tool management and process monitoring[3].

Which route to take depends on precision requirements, batch size, and part geometry: for small batches, high distortion risk, and expensive downstream grinding, hard machining may actually pay off; for large batches, simple geometry, and higher distortion tolerance, the traditional machine-first-then-heat-treat route is usually more economical. This is also directly tied to how difficult the material is to cut — for further reading, see machining tips for stainless steel and other difficult-to-cut materials.

05Aging and stress relief for aluminum parts

Aluminum alloys don't harden by quenching the way steel does; they gain strength through precipitation aging (like the common T6 condition). For a shop, the challenge with aluminum parts isn't hardness — it's dimensional stability: thick plate often carries considerable residual stress after rolling and rapid cooling, and once you remove a lot of material and the stress loses its balance, the part warps — especially noticeable on large thin plates and frame-type parts.

The countermeasure is usually to select plate that has been stress-relieved (for example, a stretch-relieved temper), and to machine using symmetric removal, staged removal, and flip-to-balance strategies so the stress releases evenly rather than erupting on one face; where necessary, insert a stabilizing step after roughing before moving to finishing. The core idea is the same as for steel: move the point where distortion occurs earlier, and leave stock for final machining to correct. For the relationship between precision and cost, see further reading in the trade-off between machining accuracy and tolerance grades.

06How to call out heat-treatment requirements on a drawing

Many disputes over machining sequence actually stem from a drawing that never spelled out heat treatment clearly. A drawing that lets upstream and downstream processes connect smoothly should include, at minimum, these heat-treatment requirements:

Spell these out, and the shop can work backward to "where in the sequence heat treatment should slot in, how much roughing allowance to leave, and whether to coordinate outside-vendor scheduling." The vaguer the callout, the more likely you end up in the bind of "only realizing after hardening that another milling pass is needed — but it can no longer be cut." The principles for annotating tolerances and hardness can also be reviewed alongside common machining defects and troubleshooting, so that distortion and defects don't surface only at delivery.

07Where AI can help in process planning

By this point it's clear that the sequencing trade-off touches material metallurgy, an instinct for distortion, fixturing experience, and an understanding of the customer's application — this sequencing knowledge still relies heavily on the veteran's experience, and isn't something AI can settle on its own. What AI can genuinely add is making the veteran's judgment less laborious and less error-prone:

But let's be clear about the line: the "heat-treat first or machine first" decision itself is still made by professionals based on material, precision, and workpiece condition; AI does simulation and dimensional verification — it does not decide the process sequence for the veteran, and it certainly does not touch the execution of heat treatment itself. This product does not provide heat-treatment services; its role is to make the connection between upstream and downstream processes, and the reading of drawings, more precise. To understand how AI plays this role in drawing recognition and G-code generation, see the pillar article the complete guide to CNC automatic programming.

08FAQ

Does heat treatment always have to sit between roughing and finishing?

"Rough → heat-treat → finish" is the most robust classic sequence: roughing leaves stock, heat treatment relieves stress, and finishing brings distortion back within tolerance. But it isn't the only answer; it shifts with the material, precision, and heat-treatment method — case-hardened parts are often only ground after hardening. The sequence should still rest with your process engineer, based on the drawing and the workpiece.

Why do parts distort after heat treatment?

Mainly from the redistribution of residual stress and the volume change from phase transformation. The material has already built up internal stress during rolling and cutting; heating releases it and warps the part; during quenching, different regions cool at different rates and transform out of sync, producing new stress. This is physical behavior of the material — it can only be managed by leaving stock, removing material symmetrically, and finishing afterward.

Is it better to hard-machine directly, or to machine first and then heat-treat?

Machining first and heat-treating afterward saves tooling and keeps cutting easy, but you take on distortion and usually have to leave stock or grind; hard-machining directly sidesteps distortion and gives steady dimensions, but tool wear is fast, the demands on tooling and parameters are high, and process monitoring matters more. The choice depends on precision, batch size, and geometry — there is no one-size-fits-all answer.

How should heat-treatment requirements be called out on a drawing?

State the heat-treatment method, target hardness range and measurement location, whether it is limited to a local area, the case depth, and any post-heat-treatment dimensional / geometric requirements. The clearer the callout, the better the shop can decide how much stock to leave and where in the sequence to slot it in, and the less friction there is between upstream and downstream processes and with outside vendors.

Subscribe to the Blog newsletter

Get notified when new articles and video walkthroughs go live — no inbox spam, one-click unsubscribe. (newsletter in Chinese)

GET THE PROCESS ORDER RIGHT

Let AI flag the heat-treatment and allowance planning points while it reads your drawing

This product doesn't do heat treatment, but it can help you get the machining sequence and allowance planning around heat treatment right — through drawing recognition, cutting simulation, and dimensional verification. Bring a real drawing and let's talk through your process.

Contact an onboarding advisor Training courses

← Back to the BestAI CAM product overview

09References

  1. Kalpakjian, S., & Schmid, S. R. (2020). Manufacturing Engineering and Technology (8th ed.). Pearson.
  2. Chryssolouris, G. (2006). Manufacturing Systems: Theory and Practice (2nd ed.). Springer.
  3. Teti, R., Jemielniak, K., O'Donnell, G., & Dornfeld, D. (2010). Advanced monitoring of machining operations. CIRP Annals, 59(2), 717–739.