CAD and CAM

Chapter 12
Simulation, Verification, Metrology and Quality Assurance

Bachelors Program in Machine Technology
CAD and CAM   •   Bachelor

Simulation, Verification, Metrology and Quality Assurance

Introduction and Context

Computer-aided manufacturing (CAM) does not end when a toolpath is generated. A toolpath is a prediction of machine motion, while a CNC machine executes physical motion subject to controller logic, machine limits, tool deflection, thermal effects, fixture variation, measurement uncertainty and operator intervention. Simulation, verification, metrology and quality assurance connect the digital model with the manufactured part.

Simulation predicts machine and tool motion before machining. Verification determines whether the programmed process is geometrically and kinematically safe. Metrology establishes whether the manufactured part conforms to its specification. Quality assurance uses this evidence to control and improve the process. Together, these activities form a closed loop:

CAD model → CAM toolpath → simulation and verification → post-processing → code validation → machining → probing and measurement → process correction → improved production.

The objective is not merely to identify errors after they occur. The objective is to prevent scrap, protect equipment, reduce setup time, and produce reliable evidence that the process is capable of meeting requirements.

Learning Objectives

After studying this chapter, a student should be able to:

  1. Explain the purposes and limits of CAM simulation and verification.
  2. Distinguish between gouging, collision, overcutting, undercutting and residual stock.
  3. Validate post-processed CNC code using simulation, syntax checks and controlled machine procedures.
  4. Explain the operation and application of touch probes, tool setters and coordinate-measuring machines.
  5. Calculate basic measurement statistics, process capability indices and measurement-system performance.
  6. Design a closed-loop workflow linking measurement results to tool and process correction.
  7. Evaluate quality, safety, traceability and governance issues in digital manufacturing.

1. Simulation as a Manufacturing Model

A simulation is a computational representation of a manufacturing process. It may model only the cutter and workpiece, or it may include the complete machine tool, fixtures, tool holders, axes, controller behavior and material-removal process. The level of detail should match the risk and purpose of the analysis.

1.1 Levels of simulation

LevelMain representationTypical purpose
Toolpath visualizationTool and stockCheck sequence, direction and accessibility
Material-removal simulationTool, stock and target modelDetect gouging and residual stock
Machine-tool simulationKinematics, fixtures and toolsDetect collisions and axis-limit problems
Controller simulationMachine model plus controller logicValidate post-processed NC code
Digital twinMachine, process, sensors and historical dataPredict, monitor and optimize production

Toolpath visualization is useful but insufficient for safety. A toolpath can appear correct while the holder collides with a fixture or while a five-axis rotary axis exceeds its travel. Material-removal simulation compares the simulated remaining stock with the nominal CAD model. Machine simulation additionally considers swept volumes: the three-dimensional space occupied by a moving tool, holder, spindle, table or machine component.

1.2 Coordinate systems and transformations

A CAM system normally uses several coordinate systems: model coordinates, setup coordinates, work coordinates and machine coordinates. A point expressed in one coordinate system must be transformed before it can be interpreted in another. In homogeneous coordinates, a rigid transformation may be written as:

pm = Tmw pw

Here, pw is a point in work coordinates, pm is the same point in machine coordinates, and Tmw is a 4 × 4 transformation matrix containing rotation and translation. The transformation assumes that the coordinate frames and machine kinematic model are correctly defined. An incorrect work offset, tool-length value, rotary-axis direction or post-processor convention can invalidate an otherwise correct simulation.

For a three-axis machine, the programmed point may be represented as:

p = [x y z 1]T

For a rotary machine, the relationship between linear and rotary axes depends on the machine architecture, pivot locations and controller conventions. Therefore, five-axis simulation must use the actual machine model rather than a generic visual representation.

2. Verification of Toolpaths and Material Removal

Verification asks whether the planned process produces the intended geometry without unacceptable risk. It has both geometric and process dimensions.

2.1 Geometric verification

Geometric verification compares the simulated result with the nominal part. Important conditions include:

  • Gouging: unintended removal of material by a cutting edge, tool shank, holder or another component.
  • Overcutting: removal of material that should remain.
  • Undercutting: failure to remove material that the toolpath was intended to remove.
  • Residual stock: material remaining above the permitted allowance.
  • Excessive scallop height: visible cusps left by adjacent passes.
  • Inaccessible geometry: regions that cannot be reached with the selected tool and orientation.

For a point on the manufactured or simulated surface, let ds denote the signed distance from the nominal surface. A consistent sign convention is required; for example, positive may represent excess material and negative may represent gouging. Verification software typically displays a color map rather than relying on a single scalar value.

Residual stock is not automatically an error. A roughing operation intentionally leaves an allowance for finishing. If the intended allowance is a and the actual local remaining stock is r, an acceptable condition may be expressed as:

|r − a| ≤ t

where t is the permitted tolerance on the allowance. This comparison is meaningful only when the stock model, cutter geometry, tool wear and simulation tolerance are properly defined.

2.2 Kinematic and collision verification

A collision occurs when two bodies that should remain separate occupy intersecting volumes. Typical pairs include tool–fixture, holder–workpiece, spindle–fixture, table–part and machine-component–machine-component. Collision detection must consider the complete swept volume, not merely the cutter tip.

Common causes of false confidence include:

  • omitting the actual holder or fixture;
  • using an incorrect tool gauge length;
  • defining a rotary axis with the wrong sign or pivot point;
  • ignoring rapid-motion paths;
  • failing to model clamps, vises or tombstones;
  • assuming that a controller interprets an unsupported code identically to the simulator.

A clearance check should specify a minimum separation. If dmin is the smallest simulated distance and dreq is the required safety clearance, the condition is:

dmin ≥ dreq

The inequality is valid only for the bodies and tolerances included in the model. It is not a substitute for a controlled prove-out on the machine.

2.3 Cutting conditions and process realism

Simulation may show that a tool reaches the surface while saying little about whether the cutting process is stable. Engineers must also examine cutting speed, feed per tooth, axial and radial depth of cut, chip evacuation, coolant access, tool engagement and machine power.

For a rotating cutter, cutting speed is commonly estimated by:

vc = π D n

where vc is cutting speed, D is cutter diameter, and n is spindle speed. If diameter is in metres and speed is in revolutions per second, the result is metres per second. With diameter in millimetres and speed in revolutions per minute, the practical conversion is:

vc = (π D n) / 1000

where vc is in metres per minute. The formula assumes a circular cutter and refers to the nominal cutter diameter; effective cutting speed can vary with radial engagement and tool geometry.

For a cutter with z teeth, feed rate may be estimated by:

vf = fz z n

where fz is feed per tooth, z is the number of teeth and n is spindle speed. Units must be consistent, such as millimetres per tooth and revolutions per minute producing millimetres per minute. These equations are planning relationships, not guarantees of tool life or surface quality.

3. Post-Processing and NC-Code Validation

The CAM toolpath is usually machine-independent. A post-processor translates it into the syntax and conventions of a particular controller. It determines coordinate formatting, plane selection, canned cycles, tool changes, rotary-axis output, feed modes, compensation commands and safe-start blocks.

3.1 Verification sequence

A disciplined validation sequence is:

  1. Confirm the correct part revision, setup, stock, tools and work coordinate system.
  2. Regenerate the toolpath after any model or parameter change.
  3. Post-process using the approved machine-specific post-processor.
  4. Run syntax and format checks.
  5. Compare tool numbers, offsets, spindle commands, coolant commands and feed modes with the setup sheet.
  6. Simulate the actual NC file in a controller-aware machine simulator.
  7. Inspect rapid moves, tool changes, approach and retract motions, rotary-axis movements and work-offset calls.
  8. Prove out the program using single block, reduced rapid override and verified tool and work offsets.
  9. Record revision, program number, post-processor version and approval status.

The actual NC file, rather than the CAM screen, is the authoritative object for code verification. A post-processor can introduce a problem not visible in the original CAM representation.

3.2 Safe prove-out

A first-run procedure should include a clean machine, verified fixtures, correct tool assembly, measured tool lengths, confirmed work offsets and an emergency-stop briefing. The operator should remain able to observe the machine and stop it. Dry running without the workpiece may reveal gross motion errors, but it cannot prove material removal or tool deflection. Likewise, graphics simulation cannot verify electrical, hydraulic or mechanical conditions.

4. In-Process Probing and Measurement

Metrology is the science of measurement. In machining, it supports setup, process control, acceptance inspection and diagnosis. Measurement results are meaningful only when the measuring system, reference frame, environmental conditions and uncertainty are understood.

4.1 Touch probes and tool setters

A spindle probe can locate a workpiece, identify a datum, measure a bore or boss, inspect a surface and update a work offset. A tool setter can measure tool length, estimate tool diameter, detect broken tools and monitor wear.

Typical probing operations include:

  • locating a planar face;
  • finding the centre of a bore;
  • measuring a boss diameter;
  • determining angular misalignment;
  • checking a feature after machining;
  • updating work offsets or tool wear registers.

A probe does not automatically create accurate data. Stylus qualification, trigger repeatability, probe calibration, machine thermal state, probe approach direction and contamination all affect results. A probing routine should include safe approach distances, appropriate feed rates, clearance checks and a defined response to out-of-limit results.

4.2 Coordinate-measuring machines

A coordinate-measuring machine (CMM) records points in a calibrated coordinate system using a tactile or optical sensor. Software fits geometric elements such as planes, circles, cylinders and lines to measured points, then evaluates dimensions, form, orientation and location according to the applicable drawing and standards.

A CMM inspection plan should identify:

  • datum reference frame;
  • features and characteristics to be inspected;
  • number and distribution of points;
  • stylus configuration;
  • temperature and environmental requirements;
  • filtering and fitting method;
  • reporting convention and decision rule.

A CMM result is not simply the distance between arbitrary points. It is the result of a measurement strategy tied to datums, feature definitions and specification language.

4.3 Measurement uncertainty

Every measurement has uncertainty. A simple combined standard uncertainty model for independent input quantities is:

uc = √(u1² + u2² + … + uk²)

where ui are standard uncertainty components and independence is assumed. If inputs are correlated, covariance terms must be included. An expanded uncertainty is often reported as:

U = k uc

where k is a coverage factor selected for the reporting convention. For approximately normal results, k ≈ 2 is commonly associated with a coverage probability near 95%, but the exact interpretation depends on the distribution and method.

Sources may include instrument resolution, calibration, repeatability, reproducibility, temperature, fixturing, datum construction, probe qualification and operator technique. A measurement should not be used to accept or reject a feature when uncertainty is large relative to the tolerance without applying an agreed decision rule.

5. Statistical Quality Assurance and Capability

Quality assurance is system-oriented: it controls processes, documentation, competence and improvement. Quality control is product- and process-oriented: it detects nonconformity through inspection and monitoring. Both are needed.

5.1 Descriptive statistics

For measurements x1, x2, …, xn, the sample mean is:

x̄ = (1/n) ∑i=1n xi

The sample standard deviation is:

s = √[∑i=1n(xi − x̄)²/(n − 1)]

The denominator n − 1 provides the usual unbiased estimate of population variance under independent random sampling from a stable population. These statistics describe the observed sample; they do not prove that the process is stable.

5.2 Process capability

For a stable, approximately normal process with lower specification limit LSL, upper specification limit USL, mean μ and standard deviation σ, potential capability is often summarized by:

Cp = (USL − LSL)/(6σ)

This index compares specification width with natural process spread but ignores centring. A centring-sensitive index is:

Cpk = min[(USL − μ)/(3σ), (μ − LSL)/(3σ)]

In practice, μ and σ are estimated from data. Capability indices are appropriate only when the process is statistically stable, the measurement system is adequate, the specification limits are correctly interpreted and the distributional assumption is reasonable. A high Cp with a low Cpk indicates a process with potentially narrow spread but poor centring.

Worked Example: Capability of a Diameter Process

A bore has specification 20.00 ± 0.05 mm. Thus, USL = 20.05 mm and LSL = 19.95 mm. A stable sample gives a mean of 20.02 mm and standard deviation 0.01 mm.

Cp = (20.05 − 19.95)/(6 × 0.01) = 0.10/0.06 = 1.67
Cpk = min[(20.05 − 20.02)/(3 × 0.01), (20.02 − 19.95)/(3 × 0.01)]
Cpk = min(1.00, 2.33) = 1.00

The spread is relatively narrow compared with the tolerance, but the process mean is displaced toward the upper limit. Corrective action should first address centring, while continued monitoring confirms stability. The numerical interpretation must follow the organization’s specified acceptance criteria; no universal threshold should be assumed.

5.3 Control charts and reaction plans

A control chart distinguishes common-cause variation from signals suggesting special causes. A basic individuals chart may use a centre line and statistically derived limits, but the correct chart depends on subgroup structure and data type. A chart does not make a stable process capable; it helps determine whether the process is predictable.

A reaction plan should state what happens when a signal occurs: stop or continue production, quarantine affected parts, inspect the last known-good interval, investigate tool wear or offset changes, document the cause, and verify corrective action. Automatic offset adjustment should be bounded and authorized. Uncontrolled compensation can conceal a mechanical fault or move a process into a different failure mode.

6. Closed-Loop Manufacturing

Closed-loop manufacturing connects measurement to action. A typical loop is:

  1. Machine a feature or inspection coupon.
  2. Probe or measure the feature.
  3. Compare the result with the nominal value and control limits.
  4. Diagnose systematic error, drift, tool wear or random variation.
  5. Apply a controlled tool-wear or work-offset correction.
  6. Machine the next feature or part.
  7. Verify the correction and retain the measurement record.

The distinction between systematic and random variation is essential. A consistent diameter shift may justify an offset correction. Irregular variation may indicate tool breakage, unstable fixturing, coolant problems, thermal movement or a measurement-system issue; offset correction alone is inappropriate.

Digital records should link part revision, NC program, machine, tool identification, offset values, probe results, inspection results, operator or system identity and time. Traceability supports containment and root-cause analysis.

7. Applied Case: Illustrative Aerospace Housing Cell

Background

A fictional aerospace-component cell machines an aluminium housing on a five-axis machining centre. The housing contains deep pockets, thin walls, precision bores and several datum surfaces. Initial production experiences include occasional fixture contact, excess stock in a pocket corner and bore diameters drifting larger during long batches.

Problem

The CAM simulation verifies cutter-tip motion but does not include the actual shrink-fit holder or fixture clamps. The NC program also uses an outdated post-processor revision. Final inspection identifies acceptable average dimensions but a high proportion of parts near the upper bore limit.

Analysis

The manufacturing team performs a structured review. Machine simulation with the actual holder identifies a near-collision during a five-axis reorientation. Stock comparison shows that a large corner radius in the roughing tool leaves excessive material for finishing. Trend analysis of bore measurements shows gradual growth associated with tool wear. A gauge study further shows that the in-process probe has acceptable repeatability but a biased calibration value.

Approach and solution

The team models the fixture and holder, corrects the tool gauge lengths, and re-post-processes the program using the approved machine configuration. The roughing strategy is changed to maintain a controlled finishing allowance. The probe is requalified against a calibrated reference artifact. Bore measurements are collected after fixed production intervals, and a bounded wear-offset reaction plan is introduced. Parts are quarantined whenever the measurement system or control chart indicates an unresolved special cause.

Outcome

The revised simulation detects the previous near-collision before release. The controlled finishing allowance reduces variation in machining time and wall thickness. Probe qualification removes the systematic measurement bias. The bore process is recentered using a documented offset adjustment, and subsequent capability analysis shows improved centring and fewer out-of-specification results.

Learning points

The case demonstrates that simulation, code validation, metrology and capability analysis must be treated as one system. A visually correct toolpath is not enough. Reliable improvement depends on accurate models, calibrated measurement, disciplined reaction plans and traceable decisions.

8. Limitations, Safety and Governance

Simulation is an approximation. It may omit cutter runout, tool deflection, chatter, thermal growth, burr formation, coolant effects, material variability and controller-specific behavior. A collision-free simulation is evidence of modelled clearance, not a guarantee of physical safety.

Safety responsibilities remain with competent personnel and approved procedures. Programs should be controlled through revision management and access permissions. Machine simulation software, probing macros and automated offset updates should be validated before production use. Cybersecurity is also relevant: unauthorized changes to NC files, post-processors, tool libraries or inspection programs can create both quality and safety hazards.

Inspection data must be protected against accidental alteration and deliberate falsification. Automated systems should preserve an audit trail and identify the source, time and version of each result. Artificial intelligence may help classify tool-wear patterns or detect anomalous measurements, but its recommendations require validation, explainable acceptance criteria and human accountability. AI should not silently alter offsets or release product without an approved control strategy.

9. Best-Practice Workflow

A robust workflow includes the following controls:

  • use the current CAD revision and approved manufacturing plan;
  • model the complete tool, holder, fixture and machine kinematics;
  • define realistic stock and simulation tolerances;
  • verify material removal, gouging, residual stock and clearance;
  • validate the exact post-processed NC file;
  • use calibrated tools, probes and reference artifacts;
  • establish datums and measurement strategies before machining;
  • evaluate measurement-system capability before trusting trends;
  • separate common-cause improvement from special-cause containment;
  • use bounded, documented automatic compensation;
  • maintain revision control and traceability;
  • review simulation and inspection results after engineering changes;
  • combine digital evidence with safe physical prove-out.

Chapter Summary

Simulation represents planned machine motion and material removal; verification evaluates whether the process is geometrically correct, collision-free and capable of leaving the intended stock. Reliable verification requires correct coordinate systems, machine kinematics, tools, holders, fixtures and controller behavior. Post-processed NC code must be validated as the actual executable program, not assumed to match the CAM display.

Metrology connects the manufactured part to its specification. In-process probes support setup, tool monitoring and closed-loop correction, while CMMs provide detailed dimensional and geometric inspection. Measurement uncertainty, calibration and datum strategy determine whether inspection conclusions are trustworthy.

Statistical tools summarize variation and support decisions. Cp describes potential spread relative to specification width, whereas Cpk also considers process centring. These indices require a stable process and an adequate measurement system. Closed-loop manufacturing uses reliable measurements to distinguish drift, tool wear and special causes, then applies controlled corrective action. Safety, cybersecurity, traceability and human accountability remain essential when digital and automated systems are used.

Key Terms

Simulation: Computational representation of a manufacturing process.

Verification: Evaluation of whether a planned or executed process satisfies geometric and safety requirements.

Gouging: Unintended removal of material from a surface.

Residual stock: Material intentionally or unintentionally left after an operation.

Swept volume: Space occupied by a moving tool or machine component.

Kinematics: Motion relationships among machine axes and components.

Post-processor: Software that converts a CAM toolpath into controller-specific NC code.

Work offset: Coordinate transformation locating the part datum in machine coordinates.

Probing: Measurement using a contact or non-contact sensor, commonly within the machine.

Tool setter: Device used to measure tool length, diameter or tool condition.

CMM: Coordinate-measuring machine used to collect and evaluate three-dimensional feature data.

Datum: Reference element used to establish a measurement or machining coordinate system.

Measurement uncertainty: Quantified doubt associated with a measurement result.

Repeatability: Variation under the same measurement conditions.

Reproducibility: Variation caused by changed operators, equipment or conditions.

Common cause: Variation inherent in a stable process system.

Special cause: Assignable variation arising from an unusual event or condition.

Process capability: Quantitative comparison between process variation and specification limits.

Closed-loop control: Use of measured results to adjust and improve subsequent processing.

Traceability: Ability to relate a result to its equipment, method, revision, time and responsible system.

Review Questions

Short Answer Questions

  1. Why is a machine-tool simulation more informative than simple cutter-tip visualization?
  2. Define gouging and residual stock.
  3. What is the role of a post-processor in CAM?
  4. Why must a probe be qualified before it is used for production decisions?
  5. What additional information does Cpk provide beyond Cp?

Long Answer Questions

  1. Explain a complete workflow for validating a five-axis NC program before first production use.
  2. Discuss the sources of measurement uncertainty in in-process probing and CMM inspection.
  3. Compare geometric verification, kinematic verification and physical prove-out.
  4. Explain how control charts and reaction plans support quality assurance.
  5. Describe the benefits and risks of closed-loop offset compensation.

Analytical / Application Questions

  1. A shaft diameter has limits 49.95–50.05 mm. A stable process has mean 50.03 mm and standard deviation 0.01 mm. Calculate Cp and Cpk, then interpret the difference.
  2. A simulated toolpath is collision-free with the cutter model but the holder approaches a fixture within 0.2 mm. Identify the modelling and process checks required before release.
  3. A bore measurement trend increases gradually, but the control chart shows no abrupt special-cause signal. Propose a diagnostic and closed-loop response that distinguishes tool wear from probe bias.

Multiple Choice Questions with Answers

Question 1

Which item is most important for detecting a holder–fixture collision?

A. The cutter-tip path alone

B. The complete tool-holder and fixture model

C. The part drawing title block

D. The coolant concentration only

Correct Answer: B. The complete tool-holder and fixture model

Question 2

In the expression Cp = (USL − LSL)/(6σ), what does σ represent?

A. The specification midpoint

B. The sample count

C. The process standard deviation

D. The measurement resolution

Correct Answer: C. The process standard deviation

Question 3

What is the primary function of a post-processor?

A. To calibrate a CMM

B. To convert a CAM path into controller-specific NC code

C. To measure tool wear directly

D. To determine material hardness

Correct Answer: B. To convert a CAM path into controller-specific NC code

Question 4

A process has USL = 10.10, LSL = 9.90 and σ = 0.02. What is Cp?

A. 0.83

B. 1.00

C. 1.67

D. 3.33

Correct Answer: C. 1.67

Question 5

Which condition is required before capability indices are interpreted confidently?

A. The process is statistically stable

B. The toolpath contains no arcs

C. The machine uses only manual offsets

D. The part has no datums

Correct Answer: A. The process is statistically stable

Question 6

What does a touch probe commonly measure in a CNC machine?

A. Workpiece location or feature geometry

B. Electrical resistance of the spindle motor

C. Coolant viscosity only

D. The hardness of the cutting edge

Correct Answer: A. Workpiece location or feature geometry

Question 7

Which situation most strongly suggests a systematic error rather than random variation?

A. Measurements fluctuate symmetrically around the target

B. Measurements show a consistent offset from the target

C. One isolated reading is lost

D. The inspection computer restarts

Correct Answer: B. Measurements show a consistent offset from the target

Question 8

Why is the exact post-processed NC file simulated?

A. The controller may interpret output conventions differently from the CAM display

B. The CAD model cannot contain dimensions

C. The machine never uses work offsets

D. Simulation automatically sharpens tools

Correct Answer: A. The controller may interpret output conventions differently from the CAM display

Question 9

If a minimum simulated clearance is 1.2 mm and the required clearance is 1.0 mm, the geometric clearance condition is:

A. Satisfied, subject to model assumptions

B. Always unsafe

C. Invalid because clearance cannot be measured

D. Satisfied only if residual stock is zero

Correct Answer: A. Satisfied, subject to model assumptions

Question 10

What is a suitable response to unexplained measurement variation?

A. Apply increasingly large offset corrections

B. Ignore the measurements until final inspection

C. Investigate the measurement system and process before compensation

D. Delete outlying records

Correct Answer: C. Investigate the measurement system and process before compensation

CAD and CAM
Chapter 12 of 15