{"id":"gcode-g64","model_id":"G64","name":"LinuxCNC G64","summary":"G64 is a LinuxCNC path control mode that blends motion for speed instead of stopping exactly at each programmed point. Programmed with a P tolerance, the actual path may deviate from the programmed endpoint by no more than P, and velocity is reduced as needed to hold that deviation. An optional Q value turns on the Naive CAM Detector, which collapses nearly collinear feed moves into a single linear move.","study_notes":["G64 without P keeps the best speed possible, no matter how far away from the programmed point the path ends up.","G64 P- blends between best speed and the deviation tolerance; velocity is reduced if needed to maintain the path.","With Q set to a non-zero value, a series of linear XYZ feed moves at the same feed rate that are less than Q away from being collinear are collapsed into a single linear move.","In the G17 (XY) plane, when the maximum deviation of an arc from a straight line is less than the G64 P tolerance, the arc is broken into two lines (start to midpoint, midpoint to end) which are then subject to the naive CAM algorithm for lines.","Line-arc, arc-arc, arc-line and line-line cases all benefit from the Naive CAM Detector, simplifying the path and improving contouring performance.","If Q is not specified, behavior is as before and the value of P is used; set Q to zero to disable the Naive CAM Detector.","It is OK to program for the mode that is already active.","The document recommends including a path control specification in the preamble of each G-code file."],"safety_notes":[],"sources":[{"url":"https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g64","title":"G-Codes","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":7,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"gcode","code":"G64","group":"path control","syntax":"G64 <P- <Q->>","parameters":[{"name":"P","description":"Motion blending tolerance: the actual path will be no more than P away from the programmed endpoint."},{"name":"Q","description":"Naive CAM tolerance: a non-zero value turns on the Naive CAM Detector; zero disables it."}],"dialect":"LinuxCNC","related":["gcode-g02"],"standards":[]},"url":"https://machineschema.com/instruction/gcode-g64","license":"https://creativecommons.org/licenses/by/4.0/"}