Book Image

Instant Slic3r

By : David Moore
Book Image

Instant Slic3r

By: David Moore

Overview of this book

One of the most critical parts of 3D printing is taking a 3D model and converting it to a format that a 3D printer can print. Slic3r is one of the best pieces of software out there. It gives great control over how an object is converted, and can save you hours upon hours of frustration by producing great prints. This book will show you how. Instant Slic3r strives to give you a good foundation for what Slic3r can do. It offers a hands-on way to learn about how Slic3r works, and how you can use its powerful features to produce great prints. It takes you from the beginning setup, through advanced features such as post processing the G-Code that it produces. You will get a good grasp on how Slic3r works, and ways to troubleshoot your prints to make the best objects your printer can produce. Instant Slic3r covers where to get Slic3r and how to install it on a variety of platforms, and helps lead you through the setup and tweaking your personal printer settings. The book is clearly laid out and easy to follow, but with information that even experienced users of Slic3r will find useful. You will learn how Slic3r converts your model into G-Code. Then, you will learn how to not only read that G-Code, but how you can write scripts for post-processing the output, before it is sent to the printer. You will also learn what things can go wrong with printing, and how you can use Slic3r to troubleshoot the issue and then fix it. Along with this, you will learn how to improve your printing by delving into Slic3r's expert settings. The book is filled with examples, leading you through not only how to do things, but why they need to be done. After you are finished with this book, you will have a deeper understanding of Slic3r and 3D printing.
Table of Contents (7 chapters)

Getting and installing Slic3r (Must know)


In order for us to use Slic3r, first we need to get it, and this is fairly simple. This recipe will cover the different platforms that Slic3r is available on (Mac OS X, Windows, Linux, and Raspberry Pi). It will also cover the steps for getting and installing the stable release version for each platform, and how to get older versions if you need them.

Getting ready

Slic3r is undergoing lots of development. This recipe will talk about how to get the latest stable release. While you can get the latest release if you build from the source, we're going to talk about getting the release built here, in this recipe, because it will be the most stable. If you are interested in building from the source, we will cover that at the end of this recipe.

How to do it...

As we talked about earlier, we are getting the release version.

  1. Navigate to http://www.slic3r.org and select the Download link at the top of the page. You can also go directly to the download page at http://www.slic3r.org/download.

  2. Select the operating system that you use. Slic3r is available for Mac OS X, Windows (32 bit and 64 bit), along with Linux (also both 32 bit and 64 bit). The Linux versions that run on Raspberry Pi need some special attention and we will cover installing that separately when we get to installing from the source. Once you click on the icon for your operating system, it may be a bit confusing at first glance to chose which file to download. For all operating systems, the link icon takes you to a page that has a folder labeled old, and one or more file links.

    Note

    For us, the choice of Mac OS X here is simple. You can click on the file link to download the Slic3r software. The filename starts with slic3r-osx- and ends in .dmg. The text in the middle is the version number of the software, but we don't need to worry about that right now, since we just want the latest build.

    For Windows, there will be two choices:

    • For 64 bit machines, download the file that starts with slic3r-mswin-x64 and ends with .zip

    • For 32 bit machines, click on the file that starts with slic3r-mswin-x86 and ends with .zip

    For Linux machines there are also two choices (one for 32 bit and one for 64 bit like the Windows version):

    • For 64 bit Linux versions, get the file that starts with slic3r-linux-x86_64 and ends with .tar.gz

    • For 32 bit Linux machines, download the file that has slic3r-linux without the _64 term, also ending in .tar.gz

Once you have the software downloaded, it's time to put it where we want it. There's no actual installation, as it is a standalone program.

  • Mac OS X: The .dmg file can be installed just like any other program on Mac. Double-click on it and drag the content of the opened folder into the Applications folder of your drive.

  • Windows and Linux: Uncompress the .zip or tar.gz file and place the Slic3r folder in a convenient location on your system. On Windows, I usually put it on C:\Slic3r, so I can find it easily.

Now you can launch Slic3r as you would any other program on your OS.

How it works...

Slic3r is built on the Perl programming language with some parts written in C++. Perl is known for its ability to parse files in a quick and efficient manner, and is one of the reasons why Slic3r is so fast at slicing STL and other files.

It is also a language that is known for allowing developers to work quickly, though it is also notoriously hard to read for people not familiar with the language.

There's more...

Slic3r is undergoing constant development. At the time of writing, there have been incremental versions every two to three months. The primary developer of Slic3r, Alessandro Ranellucci, is constantly making improvements in speed and adding new features. He is assisted by several other developers and the open source community, comprising of you and me.

Getting older builds

If, for some reason, you need an older version of the software, we can get that too. Just go into the "old" folder of the required operating system, and select the version that you want. The release notes for each version are on the download page of Slic3r.org, where you originally chose your operating system.

Note

Given that Slic3r isn't installed on Windows or Linux machines, we can even run different versions of Slic3r on the same machine by keeping the versions in separate folders. This is because Slic3r is a standalone program and doesn't need to be installed into the operating system on which we will be running it.

Running from source code

Slic3r's source code can be found on GitHub.com (https://github.com/alexrj/Slic3r is the original repository), and it is licensed under the GNU Affero General Public License, Version 3, which means that we can look at the source code, modify it, and even create products out of it, as long as we post the modified source code we made (see the license for full details).

What does this mean for us? Well, it means that we can build Slic3r from the source. If you want to have the most bleeding edge version of Slic3r—because it fixes an issue you have with the current release build, or maybe you just want to have the newest and shiniest version of the software—you can get the source code and build it yourself. You might even have an idea for an improvement to Slic3r and want to contribute. All of these are valid reasons why we want to look at building from the source code.

The instructions for building from source for each system are located on the download page of Slic3r.org. You will require a version of Perl on your system to build Slic3r; the instructions for it and getting any of its other dependencies are in each OS's instruction.

Installing on Raspberry Pi

Raspberry Pi is a small computer (about the width and height of a credit card) that costs about $35 and requires very little power to run. People have been wanting to use it with their 3D printers to make their setup smaller and less dependent on a desktop or laptop to run.

Note

The Raspberry Pi is an ARM-based computer, and has very little processing power and RAM. So while it has the benefits of portability, it will take longer to slice our objects than it would on another machine.

At the time of writing, Slic3r has been installed and runs on a Raspberry Pi using the Raspbian operating system. You might hear it called a distro by some, because it is a distribution of Linux made for Raspberry Pi. The instructions for installing it are almost the same as the installation for Linux, but with a few changes. The following commands must all be run from the command line or terminal window:

  1. Go to https://github.com/alexrj/Slic3r/wiki/Running-Slic3r-from-git-on-GNU-Linux and follow the Install dependencies through the package manager instructions.

  2. Before moving on to Get Slic3r, we will need to install a few extra dependencies, because Raspbian does not install everything that a full-sized Linux install would. The following three dependencies need to be installed:

    • sudo apt-get install libextutils-cbuilder-perl

    • sudo apt-get install gcc-4.7

    • sudo apt-get install g++-4.7

  3. We can now proceed with the rest of the instructions on the page, starting with Get Slic3r.

  4. If you run into any issues, the build.log file will tell you what went wrong and whether any other dependencies need to be installed.

    Note

    The build.log file is located at ~/.cpanm/build.log.