Using 3dc to make an STL behave properly in RepRap

Unfortunately there seems to be a parsing bug in Java’s STL parsing script. This causes some STL’s to not display properly. This is what an STL model of a Hydralisk looked like when I first loaded it into the RepRap software:

This bug is very briefly outlined on the RepRap wiki here, with a link to 3dc, a piece of software developed by Alex W. Which you can download here.  (I have the fully compiled binary hosted here, compiled on Ubuntu 11.10 g++ 4.6.1) Unfortunately for me, I’m running Windows 7. However, I just happen to have VMWare Workstation and an Ubuntu install iso! If you don’t have VMWare, you can use Oracle’s free VirtualBox, and the process is pretty much identical.  So here’s what I did to get this model working:

Booted up VMWare and installed an instance of Ubuntu 11.10. This is a really simple process, however if you need help here’s a good write up on how to do it from

Tried to figure out the crazy new Unity interface. All I needed was a terminal, so all I had to do is click on the top icon (Dash) and do a search for Terminal:



After that, you have to install the Boost C++ libraries. This is pretty easy to do, just type in the command:

sudo apt-get install libboost-dev

When prompted, just press enter and Ubuntu should reach out and grab the latest Boost library and install it for you.

Now here’s a tricky part that took me a second to figure out. You also have to install g++ to compile 3dc. If you don’t, you will get an error about it not being found (Not really that tricky I guess). However it’s as easy as Boost to get, just issue the command:

sudo apt-get install g++

That’s it, you should be ready to compile.

With that done, it’s time to get the 3dc source files onto your virtual machine. This can be done many ways, however the easiest way will probably be to open up Firefox in Ubuntu and grab it from GitHub here:

Once it’s on your box, cd to it and just type


and hit enter.

Hopefully it compiled with no errors. If it did, you should now have a ‘bin’ directory in your 3dc directory. If it didn’t leave a message and we can figure out why. Inside that you will find a binary with the name ‘3dc’. This is what you will use to fix your STL file.

Now you have to get your STL file to your virtual box. The way I did it was to share a folder on my Windows 7  computer with all my STL files in it. That way, I could open a file explorer window in Ubuntu, and browse to it under ‘Network’. There a million other ways to share files between a virtual box and your main computer, but I find this the easiest. I always have trouble with the VMWare tools and really never bothered trying to get them working.

Anyway, if you need help sharing a folder in Windows 7, here’s a through explaination from Microsoft: Basically, just make a folder, right click it and go to sharing. Then click on share and you’ll get a dialog box asking who you want to share it with. I just put ‘Everyone’ in the box and click add (no one else is really on my network anyway). Make the permissions for ‘Everyone’ Read/Write. Also, so that I don’t have to log in to access the folder from Ubuntu, I just click the link at the bottom to the Network and Sharing Center, click on Home or Work, scroll down to Password protected sharing and click on Turn off password protected sharing. It just makes it easier.

To access the shared folder on Ubuntu, just click on the Home button to the left (second from the top), then click on Browse Network at the bottom. You should see your PC listed there, and you can just navigate to your shared folder.

From there copy your STL file to the bin directory 3dc created for you. I stuck it in my home directory, so it was at ~/3dc/bin.

Once your STL is in the same directory as your 3dc binary, issue the command to fix it. The format is

./3dc input_type input_file output_type output_file

So this is what I typed in to convert it:

./3dc stl Hydralisk.stl stld Hydralisk_fixed.stl

Now, all I did was move the Hydralisk_fixed.stl back to the shared folder on my Windows machine. Opening it up in RepRap, here’s what it looks like now:

By the way, this is the Hydralisk model by blueteak. If you would like the complied 3dc, here it is hosted on sendspace: Please keep in mind this is entirely the work on Alex W from His website is


One thought on “Using 3dc to make an STL behave properly in RepRap

  1. Hey Liam, thanks for putting this tutorial together. Since I spend most of my time in the Linux world, it’s easy for me to forget that compiling software may be out of some folks knowledge/comfort zone. Glad to see 3dc is working for you!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: