{"id":"gcode-g71","model_id":"G71","name":"LinuxCNC G71","summary":"G71 is a LinuxCNC lathe roughing cycle that removes material in layers along Z to rough-cut a profile defined in a subroutine. The subroutine number is given by Q, and optional X and Z set the starting position, D the remaining distance, I the cutting increment, and R the retracting distance. It requires the ZX plane and is intended to leave material for a finishing cycle.","study_notes":["G71 removes layers of material while traversing in the Z direction; the profile's Z coordinate must be monotonically changing.","The profile subroutine may contain G0, G1, G2 and G3 motion commands; all other commands, including feed and speed settings, are ignored, and G0 commands are interpreted as G1.","An optional A number on a motion command inserts a fillet at that endpoint, and an optional C number inserts a chamfer; a too-large fillet radius can fail with a non-monotonic path error.","In absolute mode, U (for X) and W (for Z) can be used as incremental displacements.","D keeps a distance from the final profile to allow material to remain for finishing.","If X or Z are used, a rapid move to that position is made before cutting; after the profile is cut, the tool stops at the end of the profile including the D distance.","It is an error if no subroutine Q exists, if the profile is not monotonic in Z or X, if the ZX plane is not selected, or if G41/G42 cutter compensation is active.","The document notes that the G71 roughing cycle is currently somewhat fragile; it cites issues #707 and #1146."],"safety_notes":[],"sources":[{"url":"https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g71-g72","title":"G-Codes","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":15,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"gcode","code":"G71","group":"Lathe roughing cycle","syntax":"G71 Q- <X-> <Z-> <D-> <I-> <R->","parameters":[{"name":"Q","description":"The subroutine number."},{"name":"X","description":"The starting X position; defaults to the initial position."},{"name":"Z","description":"The starting Z position; defaults to the initial position."},{"name":"D","description":"The remaining distance to the profile; defaults to 0."},{"name":"I","description":"The cutting increment; defaults to 1."},{"name":"R","description":"The retracting distance; defaults to 0.5."}],"dialect":"LinuxCNC","related":["gcode-g01","gcode-g02"],"standards":[]},"url":"https://machineschema.com/instruction/gcode-g71","license":"https://creativecommons.org/licenses/by/4.0/"}