Convert Figma logo to code with AI

slic3r logoSlic3r

Open Source toolpath generator for 3D printers

3,418
1,308
3,418
1,161

Top Related Projects

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)

6,408

3D printer / slicing GUI built on top of the Uranium framework

Quick Overview

Slic3r is an open-source 3D printing toolchain for converting 3D models into G-code instructions for 3D printers. It offers advanced features for slicing, path planning, and generating support structures, making it a popular choice among 3D printing enthusiasts and professionals.

Pros

  • Highly customizable with a wide range of settings for fine-tuning print quality
  • Supports multi-material printing and complex geometries
  • Actively maintained with regular updates and improvements
  • Cross-platform compatibility (Windows, macOS, Linux)

Cons

  • Steeper learning curve compared to some other slicing software
  • User interface can be overwhelming for beginners
  • Some users report occasional stability issues
  • Limited built-in profiles for specific printer models

Code Examples

As Slic3r is primarily a GUI application and not a code library, there are no direct code examples to provide. However, Slic3r does support command-line usage and configuration files. Here are a few examples of command-line usage:

# Basic slicing command
slic3r model.stl --output model.gcode

# Slicing with a specific configuration file
slic3r --load config.ini model.stl

# Generating multiple outputs with different layer heights
slic3r model.stl --layer-height 0.1 --output fine.gcode --layer-height 0.3 --output fast.gcode

Getting Started

To get started with Slic3r:

  1. Download the appropriate version for your operating system from the Slic3r website.
  2. Install the application following the provided instructions.
  3. Launch Slic3r and configure your printer settings:
    • Go to "File" > "Printer Settings" to set up your printer's specifications.
    • Configure filament settings under "File" > "Filament Settings".
    • Adjust print settings under "File" > "Print Settings".
  4. Load a 3D model file (STL, OBJ, AMF, 3MF) using "File" > "Open".
  5. Click "Slice now" to generate G-code.
  6. Save the G-code file and transfer it to your 3D printer.

For more detailed instructions and advanced usage, refer to the Slic3r manual.

Competitor Comparisons

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)

Pros of PrusaSlicer

  • More frequent updates and active development
  • Enhanced support for Prusa printers and materials
  • Advanced features like variable layer height and paint-on supports

Cons of PrusaSlicer

  • Larger file size and potentially higher resource usage
  • Steeper learning curve for new users due to additional features

Code Comparison

Slic3r:

void GCode::set_extruder(unsigned int extruder_id)
{
    if (!this->writer.need_toolchange(extruder_id))
        return;
    
    // prepend retraction on the current extruder
    this->writer.retract();

PrusaSlicer:

void GCode::set_extruder(unsigned int extruder_id, double print_z)
{
    if (!m_writer.need_toolchange(extruder_id))
        return;

    // prepend retraction on the current extruder
    std::string gcode;
    m_writer.retract(gcode);

The code comparison shows that PrusaSlicer has evolved from Slic3r, with similar structure but additional parameters and functionality. PrusaSlicer's implementation includes a print_z parameter and uses a std::string for gcode generation, potentially offering more flexibility and efficiency.

6,408

3D printer / slicing GUI built on top of the Uranium framework

Pros of Cura

  • More user-friendly interface, especially for beginners
  • Extensive library of pre-configured printer profiles
  • Regular updates and active development from Ultimaker

Cons of Cura

  • Can be resource-intensive on older hardware
  • Some advanced features may be hidden or less accessible

Code Comparison

Slic3r (Perl):

sub make_perimeters {
    my $self = shift;
    my ($object) = @_;
    
    foreach my $region_id (0..$#{$object->region_volumes}) {
        $self->_make_perimeters_for_region($object, $region_id);
    }
}

Cura (Python):

def calculatePathsForMesh(self, mesh: MeshData, extruder_stack: ExtruderStack) -> None:
    if mesh.getVertices() is None:
        return
    
    extruder_nr = extruder_stack.getProperty("extruder_nr", "value")
    self._calculatePathsForMesh(mesh, extruder_nr)

Both repositories focus on 3D printing slicing software, but they differ in implementation languages and overall architecture. Slic3r is primarily written in Perl and C++, while Cura uses Python and C++. The code snippets demonstrate different approaches to mesh processing and path calculation, reflecting their distinct design philosophies.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Slic3r Build Status Build status Build StatusCoverity Status

We have automated builds for Windows (64-bit) and OSX (>= 10.7). Get a fresh build now and stay up-to-date with the development!

The MacOS X build server is kindly sponsored by: <img width=150 src=https://cloud.githubusercontent.com/assets/31754/22719818/09998c92-ed6d-11e6-9fa0-09de638f3a36.png />

So, what's this Slic3r?

Slic3r is mainly a toolpath generator for 3D printers: it reads 3D models (STL, OBJ, AMF, 3MF) and it converts them into G-code instructions for 3D printers. But it does much more than that, see the features list below.

Slic3r was born in 2011 within the RepRap community and thanks to its high configurability became the swiss-army knife for 3D printing. It served as a platform for implementing several new (experimental) ideas that later became technology standards, such as multiple extruders, brim, variable-height layers, per-object settings, modifiers, post-processing scripts, G-code macros and more. Despite being based on volunteer efforts, Slic3r is still pushing the boundaries of 3D printing.

Slic3r is:

  • Open: it is totally open source and it's independent from any commercial company or printer manufacturer. We want to keep 3D printing open and free.
  • Compatible: it supports all the known G-code dialects (Marlin, Repetier, Mach3, LinuxCNC, Machinekit, Smoothie, Makerware, Sailfish).
  • Advanced: many configuration options allow for fine-tuning and full control. While novice users often need just few options, Slic3r is mostly used by advanced users.
  • Community-driven: new features or issues are discussed in the GitHub repository. Join our collaborative effort and help improve it!
  • Robust: the codebase includes more than 1,000 unit and regression tests, collected in 6 years of development.
  • Modular: the core of Slic3r is libslic3r, a C++ library that provides a granular API and reusable components.
  • Embeddable: a complete and powerful command line interface allows Slic3r to be used from the shell or integrated with server-side applications.
  • Powerful: see the list below!

See the project homepage at slic3r.org for more information.

Features

(Most of these are also available in the command line interface.)

  • G-code generation for FFF/FDM printers;
  • conversion between STL, OBJ, AMF, 3MF and POV formats;
  • auto-repair of non-manifold meshes (and ability to re-export them);
  • SVG export of slices;
  • built-in USB/serial host controller, supporting multiple simultaneous printers each one with a spool queue;
  • OctoPrint integration (send to printer);
  • built-in projector and host for DLP printers;
  • tool for cutting meshes in multiple solid parts with visual preview (also in batch using a grid);
  • tool for extruding 2.5D TIN meshes.

What language is it written in?

The core parts of Slic3r are written in C++11, with multithreading. The graphical interface is in the process of being ported to C++14.

How to install?

You can download a precompiled package from slic3r.org (releases) or from dl.slicr3r.org (automated builds).

If you want to compile the source yourself follow the instructions on one of these wiki pages:

Can I help?

Sure, but please read the CONTRIBUTING document first!

Directory structure

  • package/: the scripts used for packaging the executables
  • src/: the C++ source of the slic3r executable and the CMake definition file for compiling it
  • src/GUI: The C++ GUI.
  • src/test: New test suite for libslic3r and the GUI. Implemented with Catch2
  • t/: the test suite (deprecated)
  • utils/: various useful scripts
  • xs/src/libslic3r/: C++ sources for libslic3r
  • xs/t/: test suite for libslic3r (deprecated)
  • xs/xsp/: bindings for calling libslic3r from Perl (XS) (deprecated)

Acknowledgements

The main author of Slic3r is Alessandro Ranellucci (@alranel, Sound in IRC, @alranel on Twitter), who started the project in 2011.

Joseph Lenox (@lordofhyphens, LoH in IRC, @LenoxPlay on Twitter) is the current co-maintainer.

Contributions by Henrik Brix Andersen, Vojtech Bubnik, Nicolas Dandrimont, Mark Hindess, Petr Ledvina, Y. Sapir, Mike Sheldrake, Kliment Yanev and numerous others. Original manual by Gary Hodgson. Slic3r logo designed by Corey Daniels, Silk Icon Set designed by Mark James, stl and gcode file icons designed by Akira Yasuda.

How can I invoke Slic3r using the command line?

The command line is documented in the relevant manual page.