Watch a 3D printer working, and its movements can look puzzling. The nozzle traces an outline, moves across the middle, then starts another pattern. How does it know where to go?

For a typical filament printer, those movements are planned before printing begins. A piece of software called a slicer turns a digital 3D model into instructions the printer can follow.

Turning a shape into layers

A 3D model describes the shape of an object. The slicer divides that shape into thin horizontal layers and works out what needs to be printed at each height.

Imagine slicing a sphere horizontally. Near the bottom, each slice is a small circle. The circles grow wider toward the middle, then become smaller again near the top. A cube is simpler: most slices have the same square outline.

The slicer uses these cross-sections, along with the selected printer and print settings, to prepare the printing instructions. The resulting file, often in G-code format, is what the printer uses to carry out the job.

Planning what goes inside

Each layer needs more than an outline. The slicer also plans the walls and the material inside them.

Many filament prints use a patterned internal structure called infill, rather than being solid all the way through. The top and bottom usually have solid layers that close the object. Depending on the shape, the slicer may also generate temporary supports for areas that need something underneath during printing.

Layer height affects how finely the shape is divided vertically. Thinner layers can make curved or sloping surfaces look smoother, but they also mean more layers to print. They do not automatically improve every detail: a small feature lying flat on the print bed also depends on factors such as nozzle size.

Resin printers work differently. They use light to harden liquid resin, rather than depositing melted filament through a nozzle. They still build objects layer by layer, though the equipment and printing instructions differ.

To see the planning for yourself, open a model in a slicer and move through its layer preview. An apparently solid object becomes a sequence of outlines and internal patterns. You can inspect those layers before printing, including places where a new section needs support underneath it. Every movement that seemed puzzling at first has a place in that plan.