G68 rotates the coordinate system: after a line like G68 X0 Y0 R15.0, every programmed X and Y is reinterpreted as if the whole drawing had been turned 15 degrees counterclockwise about the point X0 Y0, and G69 turns the rotation back off. Nothing about the toolpath logic changes, a square is still programmed as a square, but the machine cuts it at the angle you named. That makes G68 the answer to three everyday situations: a part that sits in the vise at an angle you measured rather than chose, a feature the drawing defines at an odd angle that would otherwise mean trigonometry on every coordinate, and a pattern that repeats every N degrees around a center. It is one of the most useful codes that beginners have usually never heard of, and one of the easiest to leave active by accident, which is why it travels with its cancel code the way parentheses travel in pairs.

What a rotation actually does to your numbers

The mental model that makes G68 obvious: it does not move the part, tilt the head, or touch any physical axis; it redefines what your programmed coordinates mean to the control. The rotation takes two pieces of information, a center point and an angle, and from that line onward the control maps every programmed position through the rotation before moving. Program X2.0 Y0 with a 90-degree rotation about the origin and the machine goes to physical X0 Y2.0. The part programmer keeps thinking in the drawing’s clean, axis-aligned terms; the rotation handles the angle once, in one place.

The center matters as much as the angle. Rotating about X0 Y0 swings everything around the work offset origin; rotating about a feature’s center, G68 X3.0 Y1.5 R22.5, pivots the coordinate system on that feature, which is usually what you want when one feature is angled and the rest of the part is not. Choosing the pivot deliberately, instead of defaulting to the origin, is most of the skill of using the code; the rest is remembering that programmed positions, arcs included, all pass through the same mapping, so G02 and G03 arcs inside a rotation behave exactly as drawn, just turned.

G68 is modal, and G69 cancels it. The failure mode writes itself: a rotation left active past its feature quietly rotates everything after it, and the first symptom is holes in the wrong place on a face that was programmed correctly. The discipline mirrors cutter comp hygiene: activate close to the feature, cancel immediately after, and never let a rotation cross a tool change or program section boundary uncancelled. On the reading side, when a program’s coordinates make no sense against the drawing, scanning upward for an uncancelled G68 belongs on the same checklist as scanning for G90 versus G91 state.

The three jobs G68 does

SituationWithout G68With G68
Part clamped at a measured angleRe-indicate the vise square, or recompute every coordinateProbe the angle, rotate the program by it, run as-is
Feature drawn at an odd angleTrig on every hole and corner positionProgram the feature square, rotate it once into place
Pattern repeating every N degreesN sets of computed coordinatesOne feature block, called repeatedly with stepped angles

The first row is the industrial workhorse. A workpiece too big or awkward to align perfectly gets probed: the probe measures the actual angle the part sits at, the measured value lands in the rotation, and the program follows the part instead of the part being forced square to the machine. On probing-equipped machines this is automated inside the probe routines, and it is worth knowing that when a probing cycle “aligns” a part in software, a coordinate rotation is what it wrote; the Fanuc G-code list situates G68/G69 among the coordinate-control codes doing this quiet work.

The third row deserves its worked example, because it collapses beautifully with a subprogram. Five slots every 72 degrees about the part center:

(MAIN, slots every 72 deg)
G68 X0 Y0 R0.0
M98 P3010
G69
G68 X0 Y0 R72.0
M98 P3010
G69
G68 X0 Y0 R144.0
M98 P3010
G69
G68 X0 Y0 R216.0
M98 P3010
G69
G68 X0 Y0 R288.0
M98 P3010
G69
M30

Program O3010 machines one slot in plain, axis-aligned coordinates, and knows nothing about angles. Pairing rotation with M98 subprogram calls, or driving the angle from a variable in a loop on macro-equipped controls, is the standard pattern for rotational patterns that are not simple bolt circles; for plain hole circles, the arithmetic route in finding bolt hole circle coordinates is often all you need.

What G68 is not: the G68.2 boundary

The numbering invites a dangerous conflation. G68 is a two-dimensional rotation in the current working plane, almost always G17, the XY plane: it turns the drawing on the table like a sheet of paper. G68.2, despite the neighboring name, is a different machine entirely: the tilted working plane function for five-axis machines, which defines a new plane in space, tilts the coordinate system onto it, and lets 3-axis-style code run on an angled face. One rotates your paper; the other reorients your desk. The five-axis version has its own article, G68.2 tilted working plane, and the practical rule is strict: G68 for angles within the plane on any mill, G68.2 only on machines built and configured for it.

Ordering rules keep both honest. Rotation interacts with the rest of the coordinate stack in a fixed sequence, work offset first, then rotation, then things like scaling and cutter compensation inside it, and controls document which combinations are legal. The reliable pattern: select the work offset, apply G68, then start cutter compensation inside the rotated frame, and cancel in reverse order, comp off, G69, before the next section. Starting comp outside a rotation and ending it inside is the kind of legal-looking sequence that produces alarms or, worse, silently wrong geometry, and the manual for your specific control is the authority on the edge cases.

A concrete before-and-after makes the payoff vivid. A plate carries a rectangular pocket, 2.0 by 1.0, centered at X3.0 Y2.0, tilted 25 degrees on the drawing. Without rotation, each corner of the pocket needs the rotation formulas applied by hand: X’ = Xc + (x cos a - y sin a), Y’ = Yc + (x sin a + y cos a), evaluated for every corner, every arc center, every lead-in point, with each result carrying rounding decisions and each hand computation carrying a chance of a sign error. Sixteen computed coordinates for a simple pocket, and a drawing change to 27 degrees means doing them all again.

With rotation, the pocket is programmed once in its own clean terms, centered on local zero, and the main program frames it:

G68 X3.0 Y2.0 R25.0
M98 P3020 (pocket, programmed square about X0 Y0)
G69

The drawing change to 27 degrees is now a one-character edit. Multiply this across a part with several angled features and the rotation approach is not just faster to write; it is auditable, because each angle appears exactly once, next to the feature it belongs to, instead of being smeared invisibly through dozens of computed coordinates. Reviewers checking the program against the drawing can see the 25 where the drawing says 25.

Dialects: where G68 exists and where it does not

G68/G69 with this meaning is a Fanuc-family convention, shared by Haas and several other controls that follow the dialect; Haas documents G68 among its standard codes on machines with the rotation-and-scaling feature enabled. Elsewhere the same capability wears different clothes. LinuxCNC has no G68: its rotation lives in the work offset itself, set by a G10 line with an R word, G10 L2 P1 R15.0 rotates the G54 system by 15 degrees, as the LinuxCNC G-code reference documents. Siemens spells the idea ROT and AROT. GRBL and most hobby controls have no rotation at all, so router users get the effect by rotating the toolpath in CAM instead.

The CAM point generalizes into the honest caveat about the whole feature: in CAM-driven shops, rotation often has no reason to appear in G-code, because the CAM system outputs coordinates already computed for the part’s true orientation. G68 earns its keep at the machine, when the angle is discovered at setup time, probed, measured, adjusted, and regenerating the program from CAM for every fixture’s actual angle would be slower than one line of code. That is also why the code shows up heavily in probing, fixturing, and rework contexts and hardly at all in surfacing work.

Bottom line: one line replaces the trigonometry

G68 rotates the coordinate system about a chosen point by a chosen angle; G69 cancels it, and the two travel as a pair. Use it when the part sits at a measured angle, when a feature is drawn at an angle, or when a pattern repeats around a center, and choose the pivot point deliberately. Keep rotations short-lived and inside a disciplined ordering with offsets and comp, remember that G68.2 is a different, five-axis machine despite the name, and translate the concept, not the syntax, on LinuxCNC and Siemens. The alternative to learning it is doing trigonometry on every coordinate of every angled feature forever, and nobody who learns the code goes back.

Frequently asked questions

What does G68 do in G-code?

G68 rotates the coordinate system in the current working plane about a point you specify, by an angle you specify: after G68 X0 Y0 R15.0, every programmed XY position is reinterpreted as if the drawing were turned 15 degrees about that point. The toolpath is programmed square and cut at the angle. G69 cancels the rotation. It is used for parts clamped at measured angles, features drawn at angles, and patterns repeating around a center.

What is the difference between G68 and G68.2?

G68 is a two-dimensional rotation within the working plane, available on ordinary three-axis mills: it turns the drawing like paper on a table. G68.2 is the tilted working plane function for five-axis machines: it defines a new plane in space and reorients the coordinate system onto it so 3-axis-style code runs on an angled face. The names are neighbors; the machines and the risks are not. Use G68 for in-plane angles, G68.2 only on five-axis machines configured for it.

Why are my holes in the wrong place after using G68?

Almost always an uncancelled rotation: G68 is modal, and everything programmed after it stays rotated until G69 appears. Check whether the rotation was cancelled before the next section, whether the pivot point was the one intended (origin versus feature center changes everything), and whether cutter compensation was started and ended inside the rotation rather than across its boundary. Scanning upward for the last G68/G69 pair answers it in seconds.

What is the best way to learn coordinate rotation and the codes around it?

Drill the recall first, G68 rotates, G69 cancels, pivot plus angle, comp inside rotation, so the rules are instant at the machine, then practice by programming one angled feature both ways: trig by hand once, rotation once. A free app like G-Code Sprint quizzes G68/G69 alongside the offset and comp codes in short timed rounds and resurfaces what you miss, which keeps the pairing automatic months later.

Does GRBL or LinuxCNC support G68?

GRBL does not; hobby routers rotate geometry in CAM instead. LinuxCNC achieves the same result differently: the rotation is a property of the work offset, set with G10 L2 and an R word, for example G10 L2 P1 R15.0 to rotate G54 by 15 degrees. Siemens controls use ROT/AROT. The concept, rotating the coordinate frame instead of recomputing coordinates, is universal; only the spelling changes between dialects.

Sources