Nobody actually needs a RepRap-to-LinuxCNC file converter: a sliced print file is useless on a mill no matter how faithfully you translate it, because its toolpath deposits material instead of removing it. What moves between the two worlds is you, your G-code literacy, and a set of reflexes formed by printer firmware. Most of those reflexes transfer beautifully. A few translate wrong, and one of them translates dangerously. This is the map.
What carries over unchanged
The shared skeleton is real, and it is why printer people learn CNC faster than they expect. Both the RepRap G-code dialect and LinuxCNC descend from the same RS-274 tradition: G0 and G1 for rapid and feed moves, G2 and G3 for arcs, G90 and G91 for absolute and incremental, F for feed, comments in parentheses or after semicolons. If you can read a Marlin file, you can already follow the spine of a milling program, and the deeper transition story, workholding, feeds against real cutting forces, is covered in the 3D printer to CNC router transition guide.
The translation table
| Code or word | Printer firmware meaning | LinuxCNC meaning | The trap |
|---|---|---|---|
| G28 | Run the homing cycle | Rapid to a stored reference position, from wherever you are | The crossover crash; see below |
| M104 / M109 | Set hotend temperature | No thermal meaning | Strip every temperature code from your habits |
| M106 / M107 | Part fan on and off, PWM | Not a fan; numbers that high are builder or user territory | Do not assume a fan exists |
| E word | The extruder axis | Not a standard axis; rotaries are A, B, C | E moves are meaningless on a mill |
| M3 with S | Often laser or spindle PWM, 0 to 255 | Spindle clockwise, S in real RPM | S255 is a 255 RPM crawl, not full power |
| G29 | Probe the bed and build a level mesh | Not a leveling cycle; probing is the G38 family | Leveling reflexes do not transfer |
The table compresses two reference documents worth reading in full: the Marlin G-code index for what your printer reflexes actually assume, and the LinuxCNC G-code reference for what the same letters mean on the control you are moving to. Ten minutes with each, table in hand, converts most of the danger into mere vocabulary.
The G28 trap deserves its own paragraph
On a printer, G28 is the gentlest command in the file: find the endstops, establish home, hurt nothing. That is exactly why it is the dangerous one. In LinuxCNC, G28 means rapid to a stored reference position, optionally via an intermediate point, starting from wherever the tool happens to be. On a machine with a vise, a chuck, or a part in the way, a casually typed G28 commands a rapid straight through the obstacle course. The full autopsy of this mistake, and the safe idioms that replace the casual usage, are in why did my Z axis dive into the chuck on G28. If you internalize one row of the table, make it this one: G28 is not home-all anymore.
Additive habits, subtractive stakes
The deeper shift is not any single code but the consequence model. A bad print wastes filament; a bad cut breaks tooling. The printer habit that transfers best is reading files before running them, and CNC sharpens it into the verification culture described in additive versus subtractive G-code differences: preview, dry run, then cut. Feed rates also stop being free parameters you tune for cosmetics and become physics you calculate against tool and material, which has its own feed-rate introduction for G01.
The good news runs the same direction. LinuxCNC is free and runs complete simulator configurations on an ordinary PC, so the printer person’s instinct to tinker in software first is fully rewarded: the LinuxCNC learning ladder is the structured version, five steps from a sim config to writing your own .ngc files, no hardware at risk while the new meanings settle in.
Overwrite the reflexes deliberately
Vocabulary that conflicts with existing habits does not fade on its own; it has to be overwritten by practice. Short daily recall rounds work because they force you to produce the machining meaning of M3, S, and G28 from memory, repeatedly, until the printer meaning stops answering first. The free drills on the G-code practice page run exactly that loop. A week or two of 60-second rounds, and the table above stops being a reference you check and becomes the way you simply read the language now.
Sources
Frequently asked questions
Can I convert RepRap or Marlin G-code files to LinuxCNC?
You can strip and edit one, but it is almost never worth it: a sliced print file encodes extrusion, temperatures, and fan control with no milling meaning, and its toolpath deposits material rather than removing it. Regenerate toolpaths in CAM and translate your literacy instead.
What does G28 do in LinuxCNC compared to a 3D printer?
On a printer G28 runs the homing cycle. In LinuxCNC it rapids the machine to a stored reference position from wherever the tool currently is, which can drive the tool through anything in the path. It is the classic crossover mistake.
Do Marlin S values mean the same thing in LinuxCNC?
No. Printer firmware often uses S as a 0 to 255 PWM value, while in machining S is spindle speed in RPM. M3 S255 is full power on a printer-style laser and a 255 RPM crawl on a spindle.
What is the best app to relearn G-code coming from 3D printing?
G-Code Sprint is the strongest free pick for the crossover: 60-second recall drills on the machining core, including the codes whose meanings shift between printer firmware and CNC controls, with misses repeated until the new meanings overwrite the old reflexes.