slic3r.org »

Slic3r Manual

Slic3r can be used as a command line tool. It provides you with great flexibility so that you can perform operations in batch or as part of more complex workflows.

Actions

The general syntax is:

slic3r [ ACTION ] [ OPTIONS ] [ model1.stl model2.stl ... ]

where ACTION can be one (or more) of the following:

If called with no ACTION, the graphical interface will be launched and the supplied models (if any) will be loaded in the plater. If multiple actions are be specified, they will be executed in the given order. If multiple models are supplied, the requested action will be performed separately for each one.

Model transform

The following options will affect how the model(s) are transformed before performing the requested action:

These transform options are applied in the given order.

For convenience, if any of --cut, --cut-x, --cut-z, --split, --repair is supplied and none of the above actions is specified, --export-stl is implicitly assumed.

Examples:

slic3r --export-obj --scale 200% cube.stl
slic3r --cut 20 cube.stl
slic3r --cut 20 --export-3mf cube.stl
slic3r --gcode --merge model1.stl model2.stl
slic3r --split cubes.stl

Export options

All the --export-* actions are affected by the following options:

Configuration

Configuration options affect toolpath generation (thus --export-gcode and --export-sla-svg). All the options available in the graphical interface of Slic3r can be used from command line as individual switches.

For example:

slic3r -g my_model.stl --layer-height 0.2

This will generate a file named my_model.gcode in the same directory as the input STL file. You may want to specify a custom output path:

slic3r -g my_model.stl --layer-height 0.2 --output /path/to/output.gcode

To get the full listing, reference and defaults of available command line switches, just run:

slic3r --help-options

Most of the options accept an argument, like --layer-height 0.2 or --perimeters 3. Howevere there are some boolean options that work as simple flags, like --wipe or --avoid-crossing-perimeters. To negate those options you just need to prepend --no- to them (as in --no-wipe or --no-avoid-crossing-perimeters).

Some options, including the ones related to multiple extruders, accept multiple values. You can just append them multiple times:

slic3r --infill-extruder 2 --nozzle-diameter 0.35 --nozzle-diameter 0.5

Note: the print/filament/printer presets defined in the graphical interface are completely ignored when running in command line mode. Slic3r will always default to its factory default settings.

In order to use your presets you'll need to export them with the Export Config... command, which is located in the File menu. It will prompt you to save a .ini file that you can load from command line this way:

slic3r -g my_model.stl --load my_config.ini

You can override single options by appending them as command line switches:

slic3r -g my_model.stl --load my_config.ini --fill-pattern concentric

You can also create a config file from command line:

slic3r --nozzle-diameter 0.35 --filament-diameter 2.85 \
    --temperature 185 --first-layer-temperature 195 --layer-height 0.2 \
    --save my_config.ini

If you're an advanced user you can split your configuration into multiple .ini files and load them by appending multiple --load switches.

The --ignore-nonexistent-config will prevent Slic3r from throwing an error in case a non-existent file is supplied to --load.

One more way to use the print/filament/printer presets on command line is launching Slic3r with the --autosave option:

slic3r --autosave my_config.ini

This will launch the graphical interface of Slic3r but will automatically export the current configuration to the specified file. Thus, the last used presets will be remembered whenever you --load that file.

Positioning objects in the G-code coordinates

While in the graphical interface you can freely position your objects in the bed, command line provides two ways for telling position(s) to Slic3r:

  1. Use the --center X,Y option for defining a point in G-code coordinates and Slic3r will center the print around that point:

    slic3r -g my_model.stl --center 40,40

(By default, the center point is automatically calculated as the centroid of the configured print bed.)

  1. If you trust the coordinates of your STL file(s) and they are compatible with your machine's print bed, you can use --dont-arrange: Slic3r will leave the input locations untouched.

    slic3r -g my_model.stl --dont-arrange

Graphical interface options