3MF vs G-code: from model to printer
3MF and G-code sit at opposite ends of the same process. A 3MF file describes an object: its shape, colours and often the settings you want to print it with. A G-code file is a list of machine instructions for one specific printer: move here, extrude this much, heat to this temperature. A slicer turns the first into the second.
What G-code contains
G-code is plain text. Each line is a command such as a move, an extrusion amount, a fan speed or a temperature. It is generated for a particular printer, nozzle, material and set of settings. That is why it is so specific:
- a G-code file made for one printer model can damage or confuse another
- changing the layer height, infill or material means slicing again
- turning G-code back into a clean 3D model is impractical; the shape survives only as toolpaths
What a 3MF contains
A 3MF holds the model itself: triangles, colours, units and the placement of objects on the plate. Slicer project 3MFs also store print settings, so you can reopen the project and slice it again for any printer the slicer supports. See what is a 3MF file.
How one becomes the other
- You open a 3MF (or STL) in a slicer.
- You choose the printer, material and settings.
- The slicer cuts the model into layers and plans the toolpaths.
- It writes G-code for that exact setup.
A geometry-only 3MF can be re-sliced with a different printer profile. A project 3MF may already carry printer, material and process settings, so check the active profile before slicing it on another machine. G-code is generated for one setup. OrcaSlicer project and import documentation For the split between a viewer and a slicer, see MeshView vs OrcaSlicer compared.
What about .gcode.3mf?
Bambu Studio can export a sliced plate as a .gcode.3mf file. Despite the name, this is a package that contains ready-to-print G-code for a particular printer, plus thumbnails and plate information, in a 3MF-style container. It is meant to be sent to a printer, not edited as a model. If you want something you can re-slice or share, use the project 3MF instead.
Which one to share
- Sharing a design with someone else: 3MF, or STL if they need maximum compatibility. They will slice it for their own printer.
- Sending a job to your own printer: G-code, or your slicer’s printer package.
- Archiving a print you want to repeat: keep both the project 3MF and the G-code that worked.
Check the model before you slice
Slicing a broken model produces broken G-code. Look at the 3MF first: its size, its colours and whether the mesh is closed. MeshView opens 3MF files on Android and shows the real dimensions, triangle count and volume, so you can catch a problem before it becomes a failed print. See 3D print failed? Rule out the file first.