Heat Treatment and CNC Machining: When to Rough, Harden and Finish

Conceptual steel bracket forms representing rough machining, intermediate heat-treatment condition, and finish machining
Share
Table of Contents

Should a CNC part be machined before or after heat treatment? There is no universal answer because “heat treatment” may mean stress relieving, through-hardening and tempering, case hardening, solution and aging, or another material-specific process. Each changes a different property and creates a different dimensional risk. The right route begins with the material supply condition and the condition in which the drawing dimensions must be accepted.

For a part that will be hardened after machining and then held to tight final dimensions, a common planning pattern is rough machining, any justified stress relief and semi-finishing, heat treatment, then finish machining or grinding of selected critical features. That pattern is well documented for particular tool steels by Uddeholm [1] and for stress relief by Bodycote [2]. It is not a recipe for every alloy or every part. Pre-hardened stock, precipitation-hardening alloys, case-hardened surfaces and features that cannot be re-cut may require a different route.

Start with the final acceptance state

Write down four things before scheduling operations: the exact material specification and incoming condition; the required final condition or property; the features that must meet dimensional tolerance after treatment; and the surface layer, scale or finish that must remain untouched. A drawing that says only “heat treat to hardness” can leave the shop uncertain about which process, depth, test location and point in the route are intended. Conversely, a precise heat-treatment specification without post-treatment dimensions can leave an acceptance gap.

Separate bulk hardness from surface hardness and case depth. A through-hardened tool-steel block, a case-hardened gear feature and an age-hardened stainless component do not share a single allowable stock allowance or verification plan. The authorized material and heat-treatment supplier should set temperatures, times and quench or aging conditions; an article cannot responsibly infer them from a generic part shape.

Engineering flow showing incoming material, rough machining, heat treatment and selected finish machining before final inspection
Conceptual engineering route: the exact treatment and finish operations are selected for the specified material and acceptance state.

The usual rough–relieve–harden–finish logic, and its limits

Rough machining removes most stock and establishes a practical reference for subsequent work. It also changes the stress balance of the starting material. On some asymmetrical or heavily cut tool-steel parts, Uddeholm recommends stress relief after roughing, then semi-finishing before hardening [1]. Bodycote describes stress relief as typically occurring after rough machining and before final finishing to reduce later dimensional change [2]. These sources support a sequence option, not an assertion that every CNC part must be stress relieved.

Semi-finishing after stress relief can restore usable datums and distribute the remaining stock. Hardening and tempering may then change shape through thermal gradients, phase transformation and residual-stress release. Final machining or grinding establishes the dimensions that must be accepted in the treated condition. The last operation needs enough accessible stock to clean up the expected movement, but not an arbitrary blanket allowance. Uddeholm's published stock allowances are grade-specific guidance for its own tool steels [1]; copying one number across different alloys and shapes would be misleading.

This route also has a real cost: machining hardened material may require different tools, slower cuts or grinding; a finished surface may be difficult to fixture without damage. If only a few datum faces and bores are critical, finish those after treatment and leave noncritical surfaces earlier. If a precision surface must retain a case-hardened layer, indiscriminate post-treatment removal can destroy the specified case. Plan the surface and the inspection together.

Compare three common route families

Route family Why it may fit What must be checked before committing
Machine from pre-hardened or already conditioned stock Avoids a whole-part hardening step after shape is made. Incoming condition and property certificate, machinability, whether subsequent processing alters the property, final inspection state.
Rough → optional stress relief/semi-finish → harden and temper → finish selected features Keeps most stock removal before hardening while allowing critical features to be corrected after treatment. Grade-specific process, distortion risk, fixture and datum recovery, remaining stock, post-treatment tool access.
Near-finish machine → surface or case treatment → limited or no re-cut Preserves a required surface layer and may suit selected functional surfaces. Case or layer specification, dimensional change, masking/stop-off, which surfaces may be ground, final hardness/case verification.

These are planning families, not interchangeable heat-treatment specifications. The metallurgist or treating supplier must approve the process for the grade, section size and service requirement.

Three side-by-side route diagrams comparing pre-hardened stock, through-hardening with finish machining, and surface treatment with limited re-cut
Conceptual engineering comparison: similar part views, different treatment points and finish access—not a universal ranking.

Distortion is a budget to manage, not a fixed percentage

Part geometry, stock history, removed material, section thickness, support during treatment and the thermal process all affect movement. A thin asymmetric bracket can react differently from a compact symmetric block of the same grade. Uddeholm discusses both machining stress and quench-related shape change for tool steels [1]. A supplier should identify which dimensions are most vulnerable and whether fixturing, symmetric roughing, stress relief, sacrificial supports or altered sequence are justified.

Do not put a generic “leave 0.5 mm everywhere” note on a drawing without a trial or material-specific basis. Instead, define the critical features and allow a route-specific stock plan. For a first article or a high-value part, record the rough/semi-finish dimensions, measure the treated blank before finish cutting, and adjust the next route if actual movement differs. This is process development, not evidence of any JIZAO production result.

Final-stock planning also requires tool reach and datum recovery. If heat treatment changes the reference face, the shop may need to re-establish that datum before boring a critical hole. A tightly toleranced bore that becomes inaccessible after hardening, a thin wall with no grip surface, or a surface that cannot be ground may make an otherwise sensible sequence impossible. Review the workholding and measurement path while the drawing can still change.

Make the datum and measurement plan survive the treatment

Distinguish the design datum scheme from temporary manufacturing and inspection setups. The drawing datums describe how the part is functionally controlled; a roughing fixture or furnace support is not automatically a substitute. Before treatment, the machinist may use sacrificial pads or stock to hold the part. After treatment, the selected finish datums must still be findable, stable and accessible. If they are removed or distorted beyond recovery, a final CMM report cannot repair the process plan.

Specify the final inspection condition explicitly. Are size, flatness, position and surface finish accepted after hardening and final machining? Is hardness tested before or after a finish pass, and on which representative location? Does a coating or surface-treatment layer remain on the measured feature? A hardness certificate alone does not prove geometry; a dimensional report alone does not prove the required material condition. The inspection plan should link each requirement to its stage and method.

Sectional concept showing reference faces before treatment, possible movement after treatment and final re-established datum surfaces
Conceptual engineering diagram: keep enough accessible reference and stock to establish the final inspection state.

An RFQ handoff that avoids route ambiguity

Provide the grade and specification, incoming supply condition, final treatment description or controlling specification, required property and test method, dimensions and tolerances in the finished condition, surface/case requirements, permitted post-treatment stock removal, and quantity. Attach the model and drawing revision together. Flag long thin sections, asymmetric pockets, inaccessible bores and any finish or appearance surface that may not be marked by a fixture. If the treatment is outsourced, decide who owns transport protection, post-treatment measurement and final acceptance.

Ask the supplier to propose an operation sequence and to identify any unresolved material or inspection assumption before quoting. Where the risk justifies it, agree on a first-article route with checkpoints rather than presuming that heat treatment happens after all machining or that five-axis access eliminates distortion. Multi-axis machining can reduce some reorientation and reach problems; it cannot eliminate metallurgical movement or make inaccessible post-treatment stock removable.

For a narrower alloy-specific discussion, see the published 17-4 PH machining condition and inspection guide. A non-confidential drawing, material condition and final acceptance specification can be submitted through the CNC machining service page or contact form.

Frequently asked questions

Should all machining be completed before hardening?

Not when critical final dimensions may move during treatment and the route permits finishing afterward. Equally, finishing every feature after hardening is not automatically economical or compatible with a required surface layer. Select features by functional tolerance and accessible stock.

Does stress relieving replace hardening?

No. Stress relief is used to reduce residual-stress-related movement; hardening and tempering target a specified property and microstructure. The grade and process specification determine whether either is needed.

Can I specify one machining allowance for all heat-treated parts?

No reliable universal allowance exists. Shape, grade, incoming condition, process and critical geometry matter. Use material-specific supplier guidance and representative measurements to establish the route.

What should be inspected after heat treatment?

Inspect the specified property in its defined test condition and the dimensions that must be accepted after all permitted finishing. The exact sampling, location and method belong in the quality agreement or controlling specification.

References

  1. Uddeholm, Heat Treatment of Tool Steel, especially the discussion of roughing stress, stress relief, semi-finishing, distortion and grade-specific stock allowances. Its recommendations are for the relevant tool-steel grades and conditions.
  2. Bodycote, Stress Relieving, on the typical position of stress relief between rough machining and final finishing.
JIZAO CNC

Practical Engineering Support for Custom Parts

Ready to move from drawing to production?
  • DFM / feasibility review
  • Material and tolerance assessment
  • Prototyping to mass production
  • Initial response within 12 hours
Recent Blog Posts
Need a Reliable Manufacturing Partner?