G-code academy

G68 - Rotate coordinate system

The G68 command is used to perform rotation (rotation) of the coordinate system by a certain angle.
Command format: G68 X__ Y__ Z__ R
The choice of coordinates depends on the selected plane (G17, G18, G19). X and Y and Z are the coordinates of the point relative to which the coordinate system will be rotated, and R - determines the value of the angle of rotation. If X Y is not specified, then X Y Z are equal to the previous position.

Example: First, create a simple square program.

G00Z5
G00X0Y0
M3 S6000
G00Z0
G68 R45.0
G00X15Y15
G01X25Y15
G01X25Y25
G01X15Y25
G01X15Y15
M5
G00Z5
G00X0Y0



Rotate the shape 45 degrees, add the line G68 R45.0. Total result: