← Back to CNC Programming

Worked Project: Pocketed Mounting Plate

A 100×80×12 mm aluminum plate with a 40×30×4 mm pocket and four Ø6 through holes. This project ties together ramp entry, layer-by-layer roughing, corner geometry, and drill-tip breakthrough calculation.

Level: KScope: Haas mill examples; metric unless stated otherwisePrerequisite: Canned-Cycle State and Hole Patterns
After this lesson, you can:

Concept

The workpiece is an already-faced 100×80×12 mm aluminum plate. G54 work zero is at the lower-left corner on the finished top surface: X0–100, Y0–80, Z0 at top, Z−12 at bottom. This program does not face mill — that is a prior operation. We machine only the pocket and four holes.

The pocket boundary is X30–70, Y25–55 (40×30 mm), depth Z−4, internal corner radius R5. We use a Ø10 flat end mill (tool radius 5 mm) and program the tool center directly (G40 throughout — no cutter compensation). The tool center boundary is inset by one radius: X35–65, Y30–50. The four Ø6 through holes are at (10,10), (90,10), (90,70), (10,70).

Why It Matters

Several things go wrong if you only cut the pocket boundary: (1) the interior material is never removed, leaving an island; (2) plunging straight to Z−4 on a flat end mill is bad because the center of a flat end mill does not chip-load well — you need a ramp; (3) a through-hole is not done when the drill reaches Z−12 — the conical drill tip must also break through; (4) corner radius R5 means the Ø10 cutter naturally forms R5 corners without extra offset math.

Diagram accompanying the adjacent worked example. Read the accompanying explanation for assumptions and values.Diagram accompanying the adjacent worked example Plate 100 x 80 Pocket 40x30 R5 corners Ø6 G54 (0,0) 100 mm
Why It Matters — read the adjacent example for the stated conditions.

How It Works

Setup and Tooling

Setup assumptions (classroom geometry, not a production fixture design):

Setup and Tooling
ToolDescriptionH offsetSpeed/Feed (teaching)
T02Ø10 flat end mill, center-cuttingH02S2000, F200 planar, F60 ramp
T03Ø6 twist drill, 118° pointH03S1500, F80, Q3

Pocket Roughing: Two Layers

We take two axial cuts: Z−2 and Z−4. Entry is a 30 mm long ramp that drops 1 mm per segment (slope 1/30 ≈ 1.9°). This requires a center-cutting end mill capable of slotting at this ramp angle — a classroom assumption, not a manufacturer endorsement.

Layer 1 (Z−2): rapid to (35,40,Z5) with H02 active, then G00 to Z2 over the pocket center; feed to Z0, ramp to (65,40,Z−1), reverse ramp to (35,40,Z−2). Then run the 17-point raster at F200. The ramp starts at Z0 on already-clean air, not at the pocket floor.

Layer 2 (Z−4): G00 Z5, reposition to (35,40), feed down to Z−2 (already cleared), ramp to (65,40,Z−3), reverse ramp to (35,40,Z−4). Repeat the same 17-point raster.

The 17-point center path (stepover 4 mm, tool diameter 10 mm → 6 mm overlap between rows):

Pocket Roughing: Two Layers
#XYPurpose
13530start of first row
26530first row cut
36534step up 4 mm
43534second row
53538step
66538third row
76542step
83542fourth row
93546step
106546fifth row
116550step
123550sixth row
133530left wall cleanup
146530bottom wall cleanup
156550right wall cleanup
163550top wall cleanup
173530return to start

Corner geometry: The tool center stays on a rectangle [35,65]×[30,50]. The Ø10 tool sweeps a circle of radius 5 around each center point. The union traces the target rounded rectangle with R5 corners. The four center corners are the centers of the four R5 arcs — do not also round the center path corners or you will produce R10.

Coverage check: Stepover 4 mm is less than the 10 mm tool diameter, giving 6 mm overlap between adjacent rows. The four wall-cleanup passes ensure side edges and corners are fully swept. Target pocket area = 40×30 − (4−π)×5² ≈ 1178.5 mm². At 4 mm depth, theoretical volume ≈ 4714 mm³.

Diagram accompanying the adjacent worked example. Read the accompanying explanation for assumptions and values.Diagram accompanying the adjacent worked example 17-Point Raster Path (top view, 5px/mm) Start (35,30) Stepover 4mm = 20px; tool Ø10 → radius 5mm = 25px inset
Pocket Roughing: Two Layers — read the adjacent example for the stated conditions.

Drilling: Drill-Tip Breakthrough

A Ø6 drill with 118° point angle has a conical tip height:

h = (6/2) / tan(118°/2) = 3 / tan(59°) ≈ 1.8026 mm

Full-diameter breakthrough requires the drill tip to reach Z ≤ −(12 + 1.8026) = −13.8026. We choose a teaching target of Z−14.5, giving 0.697 mm extra breakthrough. The clearance channel below runs to Z−18, leaving 3.5 mm geometric gap. Drilling uses G98 (retract to initial Z50 between holes).

Diagram accompanying the adjacent worked example. Read the accompanying explanation for assumptions and values.Diagram accompanying the adjacent worked example Drill Tip Breakthrough (side view, 5px/mm) 12 mm plate Ø6 drill 12 mm Z-14.5 Clearance channel bottom (Z-18) Tip h=1.8mm cone height Tip below plate bottom: 2.5mm
Drilling: Drill-Tip Breakthrough — read the adjacent example for the stated conditions.

Example: Complete Program

O0028 (POCKETED PLATE PROJECT)
G21 G17 G90 G94 G40 G80 G49
G54
(T02 - 10mm FLAT END MILL)
T02 M06
S2000 M03
G43 H02 Z50. M08
(RAMP ENTRY LAYER 1 - Z-2)
G00 X35. Y40.
G00 Z2.
G01 Z0 F200.
G01 X65. Z-1. F60.
G01 X35. Z-2. F60.
G01 F200.
(17-POINT RASTER LAYER 1)
G01 Y30.
G01 X65.
G01 Y34.
G01 X35.
G01 Y38.
G01 X65.
G01 Y42.
G01 X35.
G01 Y46.
G01 X65.
G01 Y50.
G01 X35.
G01 Y30.
G01 X65.
G01 Y50.
G01 X35.
G01 Y30.
G00 Z5.
G00 X35. Y40.
G01 Z-2. F200.
(RAMP ENTRY LAYER 2 - Z-4)
G01 X65. Z-3. F60.
G01 X35. Z-4. F60.
G01 F200.
(17-POINT RASTER LAYER 2)
G01 Y30.
G01 X65.
G01 Y34.
G01 X35.
G01 Y38.
G01 X65.
G01 Y42.
G01 X35.
G01 Y46.
G01 X65.
G01 Y50.
G01 X35.
G01 Y30.
G01 X65.
G01 Y50.
G01 X35.
G01 Y30.
G00 Z50. M09
(T03 - 6mm DRILL, 118 DEG, PECK DRILL G83)
T03 M06
S1500 M03
G90 G00 G43 H03 Z50. M08
G00 X10. Y10.
G98 G83 X10. Y10. R2. Z-14.5 Q3. F80.
X90. Y10.
X90. Y70.
X10. Y70.
G80
G00 Z50. M09
M05
G91 G28 Z0
M30

Why This Project Is Not Just a Pocket

Three small mistakes on this plate cause most beginner scrap: (1) plunging a flat end mill straight down to depth instead of ramping — the center of a flat end mill is not a cutting edge, and forcing it down loads the spindle and dulls the corners; (2) ignoring the drill point angle when calling a through-hole done at Z−12 — the 118° conical tip of the Ø6 drill means the hole is not through until the drill tip reaches about Z−13.8, and this program uses Z−14.5 to leave 2.5 mm below the plate bottom; (3) setting G54 at the lower-left corner on the raw stock top instead of the faced top, which puts every Z depth off by the facing stock.

The two-layer step-down (Z−2 then Z−4) exists because a 4 mm axial depth on a Ø10 tool in aluminum is at the edge of what a typical classroom spindle can hold under full width of cut. Taking two layers also gives a cleaner floor: the first layer rough-cuts, the second layer cleans the bottom. Stepover 4 mm (40% of diameter) is a conservative classroom choice; real aluminum pocketing often uses 50–70% stepover, but only when the machine, toolholder, and coolant can support it.

After the first pocket, measure the opening X30–70 and Y25–55 with calipers and the depth Z−4 with a depth micrometer. If the pocket is uniformly oversized by 0.1 mm, diagnose the cause — tool deflection, a worn corner, or a wrong tool diameter — before changing any offset. This program runs G40 (no cutter compensation), so the D offset does not move the tool path. Do not change G54 to fix a wall width; G54 shifts the whole part, which moves the holes with it.

Workholding and Setup Detail

The plate is held in a precision milling vise. The fixture model on this page assumes support contacts the plate bottom at Z−12, with a clearance channel of at least 5 mm radius around each hole running to Z−18. The vise jaws are at X≤4 and X≥96, Y32–48, so they do not interfere with the pocket (X30–70, Y25–55) or the holes. Verify the actual clearance on your machine before running.

G54 is set at the lower-left corner on the faced top surface: X at the left edge, Y at the front edge, Z at the top. To set X, edge-find the left edge with a Ø10 edge finder, offset by 5 mm (the edge finder radius), and enter the resulting machine X. To set Y, edge-find the front edge the same way. To set Z with the absolute tool-length model used on this page: touch off the top surface with T02, read the gauge-line machine Z, and enter G54 Z = gauge-machine-Z − H02 (where H02 is the measured tool length). Verify G54 by touching the lower-left corner at low feed.

The four holes are at the positions listed in the drilling section of the program. Before drilling, a center drill or spot drill prevents walk. The drill itself is a Ø6 twist drill, 118° point. The program uses G83 (peck drilling) with Q3 for chip clearance; G81 does not accept a Q peck word. For a shallower hole you could drop to G81, but keep peck if chips pack.

Drill Break-Through and Coolant

The 118° drill point means the hole is not through when the tip reaches Z−12. For a Ø6 drill, the conical tip height is h = 3 / tan(59°) ≈ 1.80 mm below the full-diameter cylinder. Full-diameter breakthrough therefore requires the tip to reach about Z−13.8. This program uses Z−14.5, leaving 2.5 mm of tip below the plate bottom (and the full-diameter edge about 0.697 mm below the plate bottom). The clearance channel below runs to Z−18, so the drill does not hit the fixture.

Coolant on through-holes in 12 mm plate: flood through the spindle, aimed at the hole. At breakthrough, the coolant washes chips out the bottom; without it, chips pack in the flutes and snap the drill. Peck (G83 with Q3) retracts the chip out on each step. If chips still pack, reduce Q. Do not add peck to a shallow hole that already evaculates cleanly — it only adds time.

After drilling, inspect: hole positions with height gauge or CMM, hole diameter with a gauge pin, hole depth with a depth micrometer. If hole positions are uniformly shifted by +20 mm in X, G54 X is off. If holes are oversized, the drill walked (spot-drill was too shallow) or the drill is dull. Diagnose before re-drilling.

Why a Milling Project Is the First Real Mill Program

After isolated G01 and G81 examples, this milling project ties them together: a two-layer pocket raster, wall cleanup, drill breakthrough math, H offsets, and G54. It uses one raw plate and one setup, which is how real mill work flows. The pocket is 40×30 mm, 4 mm deep, with R5 internal corners; the four Ø6 through-holes are positioned from the lower-left corner. After running it, you will have a physical part with every feature you programmed, and you will have measured every dimension.

Pocket Path: Two Layers and the 17-Point Raster

The pocket target is X30–70 by Y25–55, 4 mm deep. The tool center path is inset by the 5 mm tool radius, so it runs X35–65 by Y30–50. Stepover 4 mm between rows gives 6 mm overlap. The 17-point table above lists every center position: six raster rows, then four wall-cleanup passes, then a return to start. Entry is a 30 mm ramp dropping 1 mm per layer (about 1.9°), not a straight plunge. The first layer reaches Z−2, the second reaches Z−4.

If the tool is not center-cutting, you must drill a start hole before ramping. The Ø10 end mill on this page is assumed center-cutting. The R5 internal corners of the pocket match the tool radius, so the tool sweeps them exactly; do not also round the center-path corners, or you will produce R10.

Why the Two Layers Are Z-2 and Z-4

The pocket in this classroom example is 4 mm deep and is roughed in two 2 mm axial layers, with the second raster reaching the specified floor and a separate wall-cleanup contour. Entry is by ramp rather than straight plunge: each 1 mm of vertical depth is spread over 30 mm horizontal run, which is an angle of arctan(1/30) ≈ 1.91°. Layer 1 ramps 0 → −1 → −2; layer 2 ramps −2 → −3 → −4. These numbers are a geometric classroom assumption — the actual axial depth and ramp angle that a specific Ø10 center-cutting end mill can take must be confirmed from the tool manufacturer's data and the machine's rigidity. Before any cut, review the full toolpath, fixture envelope, and holder reach; each programmed clearance level must be verified against the actual clamps and toolholder, including the initial approach and the moves between layers.

Check the layer transition as a sequence rather than comparing only final depths. At the end of the first layer, the swept region reaches Z−2. Retract to the documented clearance, reposition over the already cleared entry, and feed to that cleared level before beginning the next downward ramp. The second pair of ramp segments removes the next 2 mm, ending at Z−4. A depth display of Z−4 alone does not prove that the entire pocket floor was swept: verify every raster segment and the tool radius against the pocket boundary. For inspection, measure floor depth relative to the same original top used for G54 Z0, and check wall position separately from floor depth. A correct floor reading cannot demonstrate that a missed strip or an uncut island is absent.

Common Mistakes

Practice

1. Pocket depth target is 4.00 ± 0.05 mm. You measure 3.92 mm. Is it acceptable?

Show answer

No. 3.92 is below the lower limit of 3.95. The pocket is too shallow by 0.08 mm — you need an additional depth pass.

2. For a Ø8 drill with 118° point, what is tip height h? On a 10 mm plate, what Z target gives 0.5 mm breakthrough?

Show answer

h = 4/tan(59°) = 4/1.664 = 2.404 mm. Full breakthrough at Z = −(10 + 2.404) = −12.404. Add 0.5 mm: target Z = −12.904.

3. The tool center boundary is X35–65, Y30–50. What is the actual pocket corner radius, and why?

Show answer

R5. The Ø10 tool sweeps a 5 mm circle around each center point. The center path corners are the centers of the R5 arcs. If you also arc the center path, you produce R10.

Sources