Bird
0
0
CNC Programmingscripting~10 mins

Pocket milling (rectangular) in CNC Programming - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - Pocket milling (rectangular)
Start at initial corner
Move tool to start position
Mill along X axis to opposite corner
Step over in Y axis
Mill back along X axis
Repeat stepping and milling until pocket is done
Retract tool and end
The tool moves back and forth along the X axis, stepping over in Y after each pass, to clear a rectangular pocket area.
Execution Sample
CNC Programming
G0 X0 Y0 Z5
G1 Z-2 F100
G1 X50 Y0 F200
G1 X50 Y10
G1 X0 Y10
G1 X0 Y20
G1 X50 Y20
G0 Z5
This CNC code mills a rectangular pocket by moving the tool in straight lines along X and Y axes with step overs.
Execution Table
StepCommandTool Position (X,Y,Z)ActionOutput/Result
1G0 X0 Y0 Z5(0,0,5)Rapid move to start above materialTool above start corner
2G1 Z-2 F100(0,0,-2)Plunge into materialTool at cutting depth
3G1 X50 Y0 F200(50,0,-2)Mill along X axis to right edgeMaterial removed along bottom edge
4G1 X50 Y10(50,10,-2)Step over in Y axisTool moves up to next pass line
5G1 X0 Y10(0,10,-2)Mill back along X axisMaterial removed along next pass
6G1 X0 Y20(0,20,-2)Step over in Y axisTool moves up again
7G1 X50 Y20(50,20,-2)Mill along X axisMaterial removed along top pass
8G0 Z5(50,20,5)Retract toolTool lifted out of pocket
9End(50,20,5)Pocket milling completeRectangular pocket cleared
💡 Tool retracts after completing all passes to clear the rectangular pocket.
Variable Tracker
VariableStartAfter Step 3After Step 5After Step 7Final
X05005050
Y00102020
Z5-2-2-25
Key Moments - 3 Insights
Why does the tool move back along the X axis after stepping over in Y?
Because the tool mills the pocket in a zigzag pattern, moving forward along X, stepping over in Y, then moving back along X to cover the entire rectangular area (see steps 3,4,5).
Why is the Z axis lowered only once at the start and not during each pass?
The tool plunges to the cutting depth once at the start (step 2) and stays there while moving in X and Y to mill the pocket, avoiding unnecessary up/down moves (see steps 2-7).
What happens if the step over in Y is too large?
If the step over is too large, some material will be left uncut between passes, resulting in an incomplete pocket (refer to step 4 and 6 for step over moves).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the tool position after step 5?
A(0,10,-2)
B(50,10,-2)
C(50,0,-2)
D(0,0,-2)
💡 Hint
Check the 'Tool Position' column for step 5 in the execution_table.
At which step does the tool retract out of the pocket?
AStep 7
BStep 6
CStep 8
DStep 9
💡 Hint
Look for the command that moves Z back to 5 in the execution_table.
If the step over in Y was doubled, how would the execution_table change?
AMore X axis moves per pass
BFewer Y step over steps, fewer passes
CMore Z plunges per pass
DNo change in passes
💡 Hint
Step over in Y controls how many passes are needed to cover the pocket height (see steps 4 and 6).
Concept Snapshot
Pocket milling (rectangular):
- Tool moves in zigzag along X axis
- Steps over in Y after each pass
- Plunges once to cutting depth
- Retracts after all passes
- Step over size controls finish quality
Full Transcript
Pocket milling for a rectangular area involves moving the cutting tool back and forth along the X axis while stepping over in the Y axis after each pass. The tool starts above the material, plunges to the cutting depth once, then mills along the X axis to the opposite edge. It steps over in Y, mills back along X, and repeats until the entire rectangular pocket is cleared. Finally, the tool retracts out of the pocket. This zigzag pattern ensures efficient material removal. The step over distance in Y affects how well the pocket is cleared without leaving uncut material. The execution table shows each step with tool position and action, helping visualize the process clearly.