(Near) Perfect Dualstrusions with the FlashForge Creator Pro and Slic3r

dualstrusion-postproc.pl v0.4

Note: the Prusa3D team, who have become the main driving force behind making Slic3r more usable, are implementing similar improvements in parallel with what I will be presenting here, hence certain features will appear in the Prusa3d fork of Slic3r soon. For the time being though, the post-processing script presented here is probably your best bet to make good-looking dual extrusion prints on an FFCP or similar printer.

This article presents a post-processing script that turns regular Slic3r dual extrusion output into something that allows a multi-extruder 3D printer like the FlashForge Creator Pro to produce dual extrusion prints of high quality. The prints will take ages and quite a bit of waste material will be produced, which is inevitable due to the rather poor design of putting two extruders on the same carriage. However, they will look great. If you want to do dual extrusion prints on a regular basis, a better dual extruder printer design like the BCN3D Sigma may be a good investment. The Prusa3D with multi-material upgrade allows to go beyond dualstrusion (but its design still requires priming the extruder). For the occasional dualstrusion though, the approach presented here is adequate if you have a bit of patience.

2-color tree frog by nervoussystem (this print is from the more Slic3r-friendly ‘repaired’ version by LordThrash).


Until recently, I shied away from trying dual extrusion prints using Slic3r with my FlashForge Creator Pro, because the few times I tried, the results were pretty awful. I never even tried PLA dual extrusions before this, because it usually oozes even worse than ABS. There are two main problems: first, the unused extruder keeps oozing filament, polluting the print. Second, due to all this oozing, when the nozzle resumes printing, there is considerable lag and nothing comes out the first few seconds, causing gaps in the model.

The only provisions Slic3r offers to combat oozing at the time of this writing, are adding a skirt as tall as the object, and an experimental feature to lower the temperature of the unused nozzle. The skirt is ineffective for larger objects because the other nozzle will be inside the skirt and pass over the model anyway, oozing all over it. The skirt is also printed always with the same nozzle, making it useless to prime both nozzles. The temperature feature is useless because it has bugs that cause the wrong nozzle to heat up at the wrong times with the wrong temperature, and moreover it does not wait for the other nozzle to cool down, therefore it oozes anyway.

An ideal tool change should:

  1. Move the toolheads away from the print before doing the tool change,
  2. Let the deactivated nozzle cool down to a temperature where it stops oozing,
  3. Heat up the activated nozzle to normal printing temperature,
  4. Print a sacrificial structure with the activated nozzle to prime it,
  5. Wipe any ooze from the deactivated nozzle on that sacrificial structure.

As you can see, a whole procedure expensive both in time and material, therefore it is essential to bring the number of tool changes for any print down to the absolute minimum. Only the Prusa3D fork of Slic3r starting from version 1.35.1 optimizes tool changes, older versions and the main Slic3r release just always start printing every layer with extruder 1, then switches to extruder 2. Depending on what version you use, it may even do three tool changes in the first layer to print the skirt with both extruders.

Because I saw no evidence of anything like the above strategy being implemented in Slic3r, I did it myself. I wrote a script that prints a hollow priming tower behind the actual object. It varies the position at which the wipe occurs, to reduce the risk that a wipe operation will bump into a solidified blob from a previous wipe. The script does not actively wait for the inactive nozzle to cool down, only for the active nozzle to heat up. The main reason for this is that it is better not to wait until the nozzle has cooled down completely when wiping it.

Post-processing script

Download the script (v0.4, 2017/03/17; 32.0 kB)
I added an extra ‘.txt’ extension to avoid that webservers would treat this as a CGI script or something. Remove this extension and make sure the script is executable.

The script is written in Perl. It pulls the input G-code file apart and then reassembles it in an order that minimises the number of tool changes, and replaces the simple tool changes by the above procedure. If there was no tool change in a layer, it will ‘top up’ the priming tower to maintain it, unless there are no more tool changes in the rest of the print.


The current version of the script cannot be directly configured as a post-processing script inside Slic3r, because it prints the converted file on standard output. You'll need to manually run the script and redirect the output to a file, or use a wrapper script. The config bundle that can be downloaded on my main Slic3r how-to page, contains a wrapper script that can invoke the dualstrusion script, as well as the GPX tool. You need a Perl interpreter, which is not a problem in Linux or Mac OS X, but for Windows you'll probably need something extra (however, I cannot help you with that).

This script must either be used with my custom G-code, or you must modify it to look for your own custom markers. Create a printer profile with the ‘Start-dual-extruders-postproc.gcode’ pasted in the Start G-code field in Slic3r, the ‘End.gcode’ in the End G-code field, and the ‘ToolChange.gcode’ in the Tool Change G-code field.

Slic3r setup

In Slic3r, load the STL file for one part of the dual material model. Then click ‘Settings’ for this part, and inside that dialog, load the second part. Assign extruder 1 (right) and 2 (left) to the desired parts.

You should enable a tall skirt for maximum print quality. The skirt must reach the highest layer where a tool change occurs. One loop is enough, but you should fiddle with the ‘Minimum extrusion length’ until the first layer of the skirt has at least 2 loops, or 3 to 4 for small objects, to ensure it is well anchored. (Mind that Slic3r will show the additional loops for all layers in the preview and layers, even if it will only print one loop for all layers above the first one.)

Example of a print
What a typical (small) print looks like. The tower is especially messy in this one because most of it exists of top-up layers, but as you can see the mess is entirely contained within the tower.

Make sure there is enough space behind the object to print the priming tower. It needs 22 mm behind the highest Y coordinate that occurs in the print, skirt included.

The default values configured in the script should be OK. You may want to tweak the temperatureDrop value depending on your filament. A smaller drop will speed up the tool change, but increase the risk of ooze.

Make sure your nozzles are perfectly clean before starting a print. This will reduce the risk that strands of ooze stick to them and get past the wipe tower and skirt, and end up in the print.


First, the script cannot deal yet with the ‘lift Z’ feature that can lift the nozzle when doing travel moves. Do not enable this in the printer profile or things may go haywire.

Second, it is not suitable for printing two materials that should not be printed on top of each other, like ABS and PLA, because there is only one priming tower that just piles everyting together. I might update the script to allow two separate priming towers. It should be OK for soluble support materials, because those are supposed to be stackable.

Third, the script assumes that the print always starts with T0 (the right extruder). This may no longer be guaranteed with the latest Prusa3D Slic3r releases. If the first layer of your model only has a single material, make sure to load it in the right extruder to avoid any problems.

Version History

If you appreciate the effort that went into this script, you may consider leaving a tip :) You can also tip me through my Thingiverse profile.


This script is released under the Creative Commons Attribution 4.0 International license. In short, you can do pretty much anything with it, at the condition that you give appropriate credit to the author. You can use my real name ‘Alexander Thomas’ or my pseudonym ‘DrLex’, and you should preferably link to this website.

©2017/03 Alexander Thomas