Slicing 101: turning a model into machine moves

You have a 3D model on your screen. It looks like a finished object: a cube, a cable clip, a lemon squeezer. But your printer cannot read that file. A printer does not understand "this is a squeezer." It understands one thing: a long list of small physical moves. Go to this spot. Push out this much plastic. Heat to this temperature. Move up a fraction of a millimeter and do it again.

The program that translates between those two worlds is called a slicer. This chapter is about what it does and the handful of settings you actually need to touch as a beginner. By the end you will be able to open a model, pick sensible options, and produce a file your printer can run.

What a slicer is

Back in Chapter 1 we sketched the pipeline. Here it is again, because everything in this chapter lives inside that middle arrow:

model file  ->  SLICER  ->  G-code  ->  printer
 (the shape)   (this!)    (the moves)

A slicer is a piece of software that takes a 3D model file (usually an .stl or a .3mf, which describe the shape of the object) and slices it into hundreds or thousands of thin horizontal layers, like a loaf of bread. For each layer it works out the exact path the print head should follow, then writes all of those paths out as G-code.

G-code is a plain text file full of lines like "move to X position 40, Y position 12" and "extrude 4.2 millimeters of filament while you do it" and "set the nozzle to 230 degrees." You will almost never read it by hand. It is the language the printer speaks, and the slicer's whole job is to write it for you.

Don't be confused. A model file (the .stl) and a G-code file are not the same thing, and you cannot swap one for the other. The model is the shape: a description of the surface of the object, with no idea of layers, plastic, or temperature. The G-code is the recipe of moves for one specific printer at one specific set of settings. The same .stl sliced for a fast draft and for a slow fine print produces two completely different G-code files. You design or download an .stl; you slice it into G-code; the printer runs the G-code.

The good news for your wallet: every slicer most beginners use is free. Ultimaker Cura, PrusaSlicer, Bambu Studio, and OrcaSlicer all exist and cost nothing to download. They share the same core ideas and most of the same settings, so the rest of this chapter applies whichever one you end up in. I am not going to tell you which is "best," because the honest answer is that the one bundled with your printer is usually the easiest place to start.

The settings that matter (and why)

Open any slicer and you will see a wall of options. Ignore most of them. A beginner needs to understand maybe eight settings well, and the slicer fills in the other two hundred from a profile (more on profiles below). Here are the ones worth knowing.

Layer height

This is how thick each of those bread slices is, measured in millimeters. A common default is 0.2 mm. Thinner layers (say 0.12 mm) give a smoother surface because the steps between layers are smaller, but the print takes longer because there are more layers to lay down. Thicker layers (0.28 mm or 0.3 mm) print faster and look a bit more ridged.

For nearly everything you make as a beginner, 0.2 mm is the right answer. It is the sweet spot between looks, strength, and time. Change it later, once you have a reason to.

Infill

Here is a thing that surprises people: most prints are mostly hollow inside. Filling a solid object with solid plastic would waste material and take forever, and it would not make the object meaningfully more useful. So the slicer fills the interior with a sparse internal lattice called infill.

You set infill as a percentage. 0 percent is completely hollow; 100 percent is completely solid. Most prints live at 15 to 25 percent, which is enough to support the outer surfaces and give the part some backbone. More infill means a stronger, heavier part that takes longer to print. Less infill means a lighter, faster, more fragile one.

There are different infill patterns too (grids, honeycombs, zig-zags, gyroids). For now the pattern barely matters; the percentage is what you adjust. A grid or gyroid at 20 percent is a fine default for almost anything.

Walls (perimeters)

The walls, also called perimeters, are the solid outer loops the printer traces around the edge of each layer. They form the visible skin and the real structure of the part. Infill braces the inside, but the walls are what you actually touch and what carries most of the load.

A typical default is two or three walls. More walls means a stronger part and, importantly for us, a more watertight one: with extra perimeters there are fewer tiny gaps for liquid to seep through. That matters directly for our lemon squeezer, whose bowl has to hold juice without weeping it through the side. When we get to the build we will lean on a couple of extra walls for exactly this reason.

Top and bottom layers (solid skins)

Infill is sparse, so if the slicer just stopped there, the top of your print would be an open lattice you could see straight through. To close it off, the slicer lays down several fully solid layers on the very top and bottom. These are the top/bottom layers, sometimes called the solid skins.

If you set too few top layers, the solid skin has to bridge across the gaps in the infill below it, and it can sag into the holes and leave a pitted, gappy surface. Three or four top layers and three or four bottom layers is a safe default. If a flat top ever comes out looking like a screen door, the fix is usually "add a top layer or two" or "raise the infill a little."

Supports

Plastic comes out of the nozzle soft and needs something underneath to land on. When a part has a steep overhang (a roof with nothing below it, an arm sticking out into the air), the slicer can build a temporary scaffold called a support under it. You snap the supports off after the print is done and throw them away.

Supports work, but they are a hassle: they use extra plastic and time, they leave rough marks where they touched the part, and they can be fiddly to remove. So the beginner's rule is avoid them when you can. Often you can dodge supports entirely just by turning the model a different way on the bed, or by designing the part so it never has a steep unsupported overhang in the first place. We spend a whole chapter on this trick, Chapter 9, because it is one of the highest-value habits in printing.

Bed adhesion helpers: skirt, brim, raft

The first layer has to stick to the build plate, or the print peels up mid-job. Slicers offer three helpers, and it is worth knowing the difference:

HelperWhat it isWhen to use it
SkirtA loose loop printed around the part, not touching it. It primes the nozzle and lets you confirm the first layer looks good.Almost always. It is cheap insurance and easy to remove.
BrimA flat collar of plastic printed attached to the base of the part, widening its footprint so it grips the bed better.Tall or tippy parts, or parts with a small contact area. Peels off after.
RaftA full printed platform under the whole part, which then prints on top of the raft.Stubborn warping or a rough bed. Uses the most plastic; needed least often.

Start with a skirt. Reach for a brim if a part keeps lifting at the corners. You will rarely need a raft.

The nozzle temperature and how fast the head moves both matter, but as a beginner you should not set these by hand. They come from the material profile (next section). PLA likes one temperature range, PETG likes a hotter one, and the profile already knows. We covered what these materials are and why their temperatures differ back in Chapter 3, and you dialed in your first real print in Chapter 4.

The one thing worth knowing: faster printing is rougher printing. Push the speed up and you trade surface quality and a bit of strength for time. The profile's default speed is a reasonable balance, so leave it alone until you have a finished print in your hand and a specific complaint about it.

Orientation on the bed

How you turn the model before slicing changes everything: which surfaces look smooth, how strong the part is, and whether you need supports at all. Layers stack vertically, so a part is generally weakest along the direction it was built up, and an overhang that needs support in one orientation may need none in another. This is a big enough topic that it gets its own treatment in Chapter 9. For now, just know the slicer lets you rotate the model, and that rotating it is often the simplest fix for a printing problem.

Material profiles: start from a preset

That is a lot of settings, and the relief is that you do not set them one by one. Every slicer ships with material profiles: a preset bundle of all of the above, tuned for a specific plastic. Pick the "PLA" profile and the slicer quietly sets a sensible temperature, speed, layer height, fan behavior, and adhesion default for PLA. Pick the "PETG" profile and it adjusts all of those for PETG instead.

So the real beginner workflow is not "set thirty things." It is start from the right profile, then change two or three things on purpose. Choose your material preset first. Then maybe bump the walls up for a watertight part, or the infill up for a part that takes weight. That is it.

What the slicer can tell you before you print

Here is a genuinely useful thing slicers do once they have sliced a model: they estimate how much filament the print will use (its length and its mass), how long it will take, and roughly what the plastic costs. These numbers are right there on screen before you commit.

It is worth understanding where one of those numbers comes from, because it demystifies the whole thing. Filament is just a long round thread of plastic, usually 1.75 mm across. Any solid volume of plastic is simply that thread, straightened out. The little Python helper below does that conversion: give it a volume of plastic and it tells you the length of thread, the mass, and the cost. It only needs numpy.

"""Estimate how much filament a print uses, and what it costs.

A 3D print is made from a thin plastic thread (filament) that the printer melts and
lays down. Slicers report the length of thread a print needs. This helper converts
between the numbers a beginner actually cares about: solid volume of plastic, the
LENGTH of 1.75 mm filament that volume becomes, its mass, and the cost.

Only depends on numpy. Run with:  python3 filament_cost.py
"""

import numpy as np


# Density of common filaments, grams per cubic centimeter (g/cm^3).
DENSITY_G_PER_CM3 = {
    "PLA": 1.24,
    "PETG": 1.27,
    "ABS": 1.04,
    "TPU": 1.21,
}


def filament_length_m(volume_cm3, diameter_mm=1.75):
    """Length of round filament (in meters) that holds a given solid volume.

    Filament is a cylinder, so volume = pi * r^2 * length. Solve for length.
    """
    radius_cm = (diameter_mm / 10.0) / 2.0          # mm -> cm, then radius
    area_cm2 = np.pi * radius_cm ** 2
    length_cm = volume_cm3 / area_cm2
    return length_cm / 100.0                         # cm -> m


def print_estimate(name, volume_cm3, material="PETG",
                   spool_price=25.0, spool_grams=1000.0):
    """Print a tidy estimate for one object."""
    density = DENSITY_G_PER_CM3[material]
    mass_g = volume_cm3 * density
    length_m = filament_length_m(volume_cm3)
    cost = (mass_g / spool_grams) * spool_price
    print(f"{name} ({material}):")
    print(f"  solid plastic volume : {volume_cm3:6.1f} cm^3")
    print(f"  filament length      : {length_m:6.1f} m of 1.75 mm thread")
    print(f"  mass                 : {mass_g:6.1f} g")
    print(f"  material cost        : ${cost:5.2f}  "
          f"(spool ${spool_price:.0f} / {spool_grams:.0f} g)")
    print()


if __name__ == "__main__":
    # A printed object is mostly hollow: the slicer fills the inside with a sparse
    # lattice called "infill". So the SOLID plastic used is far less than the
    # object's outer size. We approximate solid plastic volume directly here.
    print("=== Filament and cost estimates ===\n")

    # A 20 mm calibration cube, printed at 20% infill, is roughly 2 cm^3 of plastic.
    print_estimate("Calibration cube", volume_cm3=2.0, material="PLA")

    # A small cable clip.
    print_estimate("Cable clip", volume_cm3=1.5, material="PETG")

    # Our lemon squeezer: reamer cone + ribbed bowl + spout, ~35 cm^3 of plastic.
    print_estimate("Lemon squeezer v1", volume_cm3=35.0, material="PETG")

    # Reusing one spool for many squeezers:
    sq_mass = 35.0 * DENSITY_G_PER_CM3["PETG"]
    per_spool = 1000.0 / sq_mass
    print(f"One 1 kg PETG spool makes about {per_spool:.0f} lemon squeezers.")
=== Filament and cost estimates ===

Calibration cube (PLA):
  solid plastic volume :    2.0 cm^3
  filament length      :    0.8 m of 1.75 mm thread
  mass                 :    2.5 g
  material cost        : $ 0.06  (spool $25 / 1000 g)

Cable clip (PETG):
  solid plastic volume :    1.5 cm^3
  filament length      :    0.6 m of 1.75 mm thread
  mass                 :    1.9 g
  material cost        : $ 0.05  (spool $25 / 1000 g)

Lemon squeezer v1 (PETG):
  solid plastic volume :   35.0 cm^3
  filament length      :   14.6 m of 1.75 mm thread
  mass                 :   44.5 g
  material cost        : $ 1.11  (spool $25 / 1000 g)

One 1 kg PETG spool makes about 22 lemon squeezers.

Look at what those numbers say. A calibration cube, the little test object you print to check your machine, costs about six cents in plastic. A cable clip is a nickel. The whole lemon squeezer, the actual thing this book is building toward, is about a dollar of plastic, around 44 grams of PETG. And a single 1 kilogram spool of PETG, which is one normal roll, has enough thread in it to make roughly 22 squeezers. The prices in the script are placeholder values for the math; your real spool may cost more or less. The point stands: printed objects use far less material than people expect, because the inside is mostly air.

The slicing workflow, end to end

Putting it together, here is the loop you will run every single time you print something:

  1. Import the model. Open the .stl or .3mf in your slicer. It appears sitting on a picture of your build plate.
  2. Pick the material profile. PLA or PETG, matching the spool actually loaded in your printer.
  3. Set the few settings that matter. Layer height (0.2 mm is fine), infill (15 to 25 percent), walls (more if it needs to be strong or watertight). Usually the profile defaults are already good.
  4. Add supports only if needed. Check for steep overhangs. If there are none, leave supports off. If there are, try rotating the part first; add supports only if you must.
  5. Click Slice. The software chews on it for a moment and produces the G-code, along with the time and material estimate.
  6. Preview the layers. This is the step beginners skip and pay for. The slicer lets you scrub through the print layer by layer, watching it build up on screen. Drag the slider from bottom to top. You are looking for anything that does not make sense: a floating island with nothing under it, a top that never closes over, supports in a silly place. Catching it here costs you ten seconds. Catching it after a three-hour print costs you three hours.
  7. Save the G-code or send it to the printer. Export the file to an SD card or USB stick, or send it over the network if your printer supports that. Then it prints.

That preview step in particular is worth making a habit. It is the closest thing printing has to a spell-check.

Takeaways

  • A slicer is free software (Cura, PrusaSlicer, Bambu Studio, OrcaSlicer all qualify) that turns a model file into G-code, the move-by-move instructions your printer runs.
  • A model file is the shape; G-code is the moves. They are different files and not interchangeable; one .stl can slice into many different G-codes.
  • The settings a beginner actually touches: layer height (0.2 mm default), infill (15 to 25 percent, the sparse inner lattice), walls (more = stronger and more watertight), top/bottom layers (too few leaves a gappy top), and supports (scaffolding for overhangs, avoid when you can).
  • Skirt for confidence, brim for grip on tippy parts, raft only for stubborn warping.
  • Leave temperature and speed to the material profile; start from a PLA or PETG preset and change just a few things on purpose.
  • The slicer estimates length, mass, time, and cost before you print. A calibration cube is pennies, the whole squeezer is about a dollar of plastic, and one spool makes around 22 of them.
  • Always preview the sliced layers before you save the G-code. It is the cheapest mistake-catcher you have.

👉 You understand the pipeline now, so let us actually make things. Next up: Easy wins: real things to print first, a set of small, satisfying prints that build your skills before we tackle the squeezer itself.