Manufacturing a part is the culmination of product design. Numerical control is how a geometric model becomes controlled motion — and the design decisions that make that motion cheap were taken long before the program was written.
Engineering
Mechanical Engineering
Part 19 of 21
8 min read
Context
The process planner's judgement
A wide variety of manufacturing processes exists, and the manufacturing
engineer — the process planner — selects a suitable one based on the
part material and the design tolerances. That role carries deep knowledge of
manufacturing processes, and with it the standing to request design changes that
simplify manufacture and reduce cost.
The classic illustration is worth repeating because it is so easily missed at
the design stage: machining a flat-bottomed blind hole is harder and more
expensive than machining a conical-bottomed one. The first needs a milling
operation with a flat end mill; the second needs a single drilling operation
with a standard drill. On the model they differ by almost nothing.
Type of production matters too. Mass production makes hundreds or thousands
of identical parts, and its economic advantage comes from setting up an
operation once and amortising that setup across many units. Job-shop and
low-volume work carries setup cost per batch, which changes which design
decisions are expensive.
Hardware
Machine tool anatomy
Machining machines are known as machine tools, and one machine may perform
several operations — a milling machine can mill, drill, ream, bore, tap
and thread. The common structure is worth knowing because it explains most of
the constraints a programmer works within.
Machine tool structure
Frame A heavy, rigid structure, typically cast iron.
Rigidity is what allows accuracy under cutting load.
Bed and column The base and the member carrying the
head. Together they set the working envelope.
Head Carries the spindle and the cutting tool, or on a
lathe, the drive to the workpiece.
Table or saddle Positions and holds the workpiece,
providing one or more axes of motion.
Workholding Chuck, collets, centres, vices, jigs and
fixtures. Determines what is accessible and what is not.
Controller Reads and executes the NC program,
commanding both table and tool motion.
Fundamentals
Motion axes and cutting parameters
Controlling the position and motion of the cutting tool while it removes
material follows well-established concepts.
Motion axes
An axis is a degree of freedom along which a cutting tool can move, and the
number of axes determines what kind of surfaces a machine can cut. In
three-dimensional space there is a maximum of six degrees of freedom —
three translations and three rotations — but a machine tool may have more
than six in total. Two-axis, three-axis and multi-axis machines all exist, with
multi-axis machines sometimes reaching ten degrees of freedom.
Two-axis
The tool moves along two axes simultaneously. A lathe is the archetype: Z
along the workpiece length and X into the workpiece to remove material.
Three-axis and three-and-a-half
Three simultaneous translations of the tool. The half axis is an indexing
axis of the turret — the tool changer that holds several tools and swaps
them automatically, eliminating manual tool changes between
operations.
Multi-axis
Additional rotational degrees of freedom, and sometimes auxiliary
translations. Some vertical machining centres have flexible heads that tilt side
to side and front to back for machining access.
Other governing concepts
Cutting parameters
Cutting speed, feed rate and depth of cut, selected against the workpiece
material, the tool material and the rigidity of the setup.
Home position
The reference position from which all motion is measured and to which the
machine returns. Establishing it correctly is the first act of any
setup.
Toolpath
The geometric path the tool centre follows. The program defines this path
and then instructs the tool to move along it.
Coolant
Controlled from the program. Its state is part of the process
specification, not an operator preference.
Operations
Four processes a designer should understand
01
Turning
Performed on a lathe, and used to produce axisymmetric parts — the
revolves of the CAD world. The workpiece rotates while a single-point tool moves
parallel to the axis of rotation. A lathe also performs drilling, boring,
tapping, facing, threading, polishing, grooving, knurling and trepanning, each
with a differently shaped tool. Workpieces are held in three-, four- or six-jaw
chucks, in collets, or between centres.
02
Drilling
Produces cylindrical holes. Blind drilled holes have a conical end matching
the drill point. For through holes the drill must be fed far enough that the
conical point clears the far face, ensuring full diameter throughout the hole
length — which requires workholding that keeps the drill from striking a
fixture face. Spotting drills mark the centre before drilling; centre drills
produce a conical start for a larger drill.
03
Milling
The most common and versatile operation, performed on a milling machine or
machining centre, and capable of almost any shape. Machines may be horizontal or
vertical, with vertical the more common. Operations include slot, face, pocket
and side or contour milling; in slot milling the cutter is a flat end mill
cutting on its end and periphery.
04
Electrical discharge machining
Removes material by spark erosion between two conducting surfaces — an
electrode and the workpiece, which must be electrically conductive. Two types
exist. Sinker or plunge EDM uses a shaped electrode plunged into the work. Wire
EDM uses a travelling wire as the electrode, cutting a profile through the part.
Both run submerged in a dielectric fluid.
Why EDM matters to designers
EDM cuts geometry that a rotating tool cannot reach: sharp internal corners,
deep narrow slots, hardened material after heat treatment. It is slow and
therefore expensive, so a design that requires it should require it
deliberately. A generous internal corner radius that permits milling is often
worth more than the aesthetic gained by a sharp one.
Design for manufacture
Rules a design should already satisfy
Designers should consider not only functional requirements and force analysis
but the implications of their design across the whole product life cycle —
design, manufacture, assembly, disassembly and disposal. Several established
foci address this: design for assembly, design for manufacture, design for
anything, concurrent engineering, product data management and product lifecycle
management. All of them try to move change earlier, when a change is still only
a change on paper.
Automated manufacturability checking implements a subset of this as rules,
validating a part and flagging areas where manufacture may be difficult or
production cost excessive.
Turning rules
On stepped shafts, keep changeover diameters large enough to allow a tool
with a generous nose radius.
Provide tool relief at the bottom of blind bored holes.
Drilling rules
Avoid very small diameters and high length-to-diameter ratios — deep
holes make chip evacuation difficult, especially when blind.
Avoid flat-bottomed holes; use conical bottoms conforming to standard drill
points.
Watch hole entry and exit surfaces, holes breaking into cavities, and
partial holes at edges — all cause drill wander or breakage.
Milling rules
Internal corner radii must exceed the smallest available cutter
radius.
Avoid deep narrow pockets that require long, unsupported tools.
Keep wall thickness sufficient to resist deflection under cutting
load.
General
Use standard hole sizes wherever function permits.
Minimise the number of setups — each one adds cost and introduces a
new datum relationship.
Do not specify tighter tolerances or better finishes than function
requires.
Programming
NC programming with G-code and M-code
NC programming applies to machines fitted with an NC controller. The
controller reads a program, executes it, and uses it to control the motion of
both the machine table and the cutting tool. NC machining is more accurate and
faster than manual machining. Programs are written by machinists or designers
using CAD models and NC software, which may be a module within the CAD/CAM
system or entirely separate software.
Programs are written in G-code and M-code, an ANSI/EIA standard language,
although some post-processing is normally needed to accommodate proprietary
features and differing commercial interpretations. The benefit of a standard
language is that programs transfer readily between controllers.
Program structure
A program is a sequence of instructions, one per line, and each line is called
a block. A block begins with a block number, conventionally prefixed N, followed
by one or more code words. Each code word is a letter followed by digits, and is
followed by the data it requires. A controller executes one block at a
time.
Writing a program requires the context of how a machining operation is
actually performed: first define the toolpath geometry, then instruct the tool
to move along it, adding the auxiliary instructions the operation needs —
rapid positioning, coolant on and off, spindle control, tool changes.
Broadly, G-codes are preparatory functions governing motion and geometry
— rapid traverse, linear interpolation, circular interpolation, plane
selection, units, coordinate offsets, canned cycles — while M-codes are
miscellaneous machine functions such as spindle start and stop, coolant control,
tool change and program end.
Post-processing is not a formality
The standard defines the language; controllers interpret dialects of it.
A program that runs correctly on one machine may crash a tool on another because
a canned cycle, a coordinate offset convention or a tool-length compensation
behaves differently. Always post-process for the specific controller, and always
verify the result before cutting.
Toolchain
Generating toolpaths from the model
CAM software may run standalone or integrate with the CAD system as an
add-in; where integration is wanted, the integrating version must be installed
rather than the standalone one.
Step 1 Create the part in the CAD system.
Step 2 Define the machine and the controller.
Step 3 Define the stock — its shape and size.
Step 4 Define or extract the machinable features.
Step 5 Generate the operation plan and adjust machining
parameters.
Step 6 Generate the toolpath.
Step 7 Verify the toolpath by simulation.
Step 8 Post-process to produce the G-code and M-code for the target
controller.
Feature recognition is where CAD discipline pays
Automatic feature extraction works by recognising manufacturing features
— holes, pockets, slots, bosses — in the geometry. A model built
from clean, well-named features with standard hole sizes is recognised
accurately. A model of imported dumb geometry, or one where every hole was cut
with a general extrude, forces manual feature definition and loses most of the
automation benefit. This is one of the more direct returns on the modelling
discipline covered in Parts 04 to 07.
Key takeaways
The process planner selects the process and has standing to request design
changes; engage them before the design is frozen.
Machine capability is defined by axis count, and axis count determines which
surfaces can be reached at all.
Turning suits revolves, milling suits almost everything, drilling produces
conical-bottomed blind holes, and EDM reaches what rotating tools
cannot.
DFM rules are concrete: adequate internal radii, no flat-bottomed holes,
sensible depth-to-diameter ratios, standard sizes, fewer setups.
G-code and M-code programs are sequences of blocks; the language is standard
but controller dialects are not, so always post-process and verify.
Clean, feature-based models are recognised automatically by CAM; dumb
geometry is not.
Series
Continue the pathway
The SOLIDWORKS Design Approach series works through computer aided design as an engineering discipline, from first principles to manufacture.
CNC Machining
CAM
Manufacturing
Design for Manufacture
Machining
KEVOS®Precision to VisionEngineering · Mechanical EngineeringWritten by Kevin Jogin8 min read