3MF against G-code

A .3mf is the job before slicing: shapes, where they sit, and the settings to slice them with. G-code is the job after: a list of moves for one printer, one nozzle, one filament. Slicing turns the first into the second, and nothing turns it back.

What is actually in each one?

A .3mf holds a scene. Objects with meshes, a transform placing each on the plate, the plate itself, and the slicer's own configuration beside them. It knows nothing about layers, because it has not been sliced.

G-code holds motion. G1 X10 Y20 E0.5 moves the head and extrudes. A header sets the temperatures, and the rest is the toolpath, layer by layer, already committed to a layer height, a nozzle diameter and a speed. It knows nothing about objects, because they were resolved into moves.

The relationship is one-way. Given a .3mf you can produce G-code by slicing it. Given G-code you cannot recover the model: the shape is gone, replaced by the paths that trace it.

Which one does my printer read?

G-code, almost always. A printer's firmware executes motion commands, so the file that reaches the SD card or the network is the sliced one.

The confusion comes from the .gcode.3mf that Bambu Studio, OrcaSlicer and Creality Print send. It is a 3MF container carrying the sliced G-code plus the previews and plate data, so it has a .3mf extension but is a sliced job, not a project. Open one expecting to edit settings and there are none to edit. When a file will not open covers telling the two apart.

Which one should I share?

The .3mf, if the person is going to print it on their own machine. It carries the model, the layout, and the settings you used, so they can reslice for their printer and their filament rather than inheriting yours.

G-code, only when the other person has the same printer, nozzle and filament. Speeds, temperatures and flow are baked in, so a mismatch fails on the first layer at best.

Printables, MakerWorld and Thingiverse all take .3mf for this reason: one file carries the job, and the recipient decides how to make it.

Can I edit either after the fact?

A .3mf, yes. The settings are key and value pairs in a config part, so a layer height or a temperature can be changed and the file re-sliced. Editing a file covers what preslice can change and how the change is recorded.

G-code, barely. You can edit the text, and people do insert a filament change or a pause, but every move after your edit was computed from the settings you just contradicted. Changing a header temperature works because the header is a command; changing a layer height does not, because the layers are already there.

How do I tell which one I have?

Open it. Drop the file on preslice and the header names the slicer and version that wrote it; if it carries print settings, the Content tab lists them, and if it is a sliced job the Raw tab shows the G-code member sitting inside the archive.

For the format itself, the container is defined by the 3MF Core Specification. G-code has no single specification; each firmware documents its own dialect, and PrusaSlicer is a reasonable place to read what one slicer emits.