Initializing 3D Canvas...

CNC Offsets & Relief

2 min read1 page

CNC Cutter Radius Compensation (Minkowski Offset): In subtractive CNC milling, a machine toolpath cannot follow the nominal workpiece contour directly because the rotary cutting tool possesses a finite radius $R$. The spindle center must be offset by the Minkowski sum of the part boundary and the circular cutter disk, inserting radial arc fillets around convex corners.

Cutter Compensation Invariant:

1. G41 / G42 Offset: Shifts cutter centerline to the left or right of the programmed contour. 2. Corner Arc Insertion: Generates circular lead-in arcs around sharp exterior corners. 3. Self-Intersection Clipping: Prunes offset loops where narrow features are smaller than cutter diameter.
python
1import numpy as np
2
3def compute_tool_offset_path(polygon, tool_radius=0.25):
4 """
5 Computes CNC center toolpath using 2D Minkowski sum with tool disk of radius R.
6 At convex corners, inserts circular arc fillets centered at the vertex.
7 """
8 offset_segments = []
9 n = len(polygon)
10
11 for i in range(n):
12 p1 = polygon[i]
13 p2 = polygon[(i + 1) % n]
14 edge = p2 - p1
15 normal = np.array([-edge[1], edge[0]]) / np.linalg.norm(edge)
16
17 # Parallel offset segment
18 p1_off = p1 + normal * tool_radius
19 p2_off = p2 + normal * tool_radius
20 offset_segments.append((p1_off, p2_off))
21
22 return offset_segments
Tool Radius R
0.30
2 min read1 page

CNC Inside Corner Relief (Dogbone Fillets): Rotary milling cutters can never produce a sharp interior $90^\circ$ corner; the bit radius leaves a residual circular corner fillet. When assembling friction-fit slot joinery (e.g. mortise and tenon in plywood or aluminum), mating square corners jam. A dogbone fillet deliberately overcuts into the corner along its angle bisector, clearing the square vertex.

Dogbone Clearance Geometry:

1. Rotary Tool Constraint: Cylindrical endmills leave an uncut corner fillet of radius $R$. 2. Bisector Overcut: Extends cutter center along the diagonal angle bisector by distance $R$. 3. Zero Interference: Allows square rectangular parts to seat fully flush against pocket walls.
python
1import math
2
3def compute_dogbone_relief(corner_vertex, in_dir, out_dir, tool_radius=0.25):
4 """
5 Computes CNC dogbone corner relief center.
6 A cylindrical bit cannot cut an internal 90-degree corner.
7 To clear the square mating tab, the tool must overcut diagonally into the corner.
8 Distance from corner: d = tool_radius.
9 """
10 # Bisector direction into material
11 bisector = -(in_dir + out_dir)
12 bisector = bisector / math.sqrt(bisector[0]**2 + bisector[1]**2)
13
14 relief_center = corner_vertex + bisector * tool_radius
15 return relief_center
Bit Radius R
0.30