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

dualstrusion-postproc.pl v0.6

This webpage provides a post-processing script that allows to make high-quality dual extrusion prints on the type of 3D printers that have two extruders on a single carriage, like the FlashForge Creator Pro which is based on the Replicator Dual. The script takes regular Slic3r dual extrusion G-code as input, and transforms it such as to produce prints free of ooze and gaps. The downside is that printing time and waste material will be greatly increased, but this is inevitable with the single-carriage-dual-extruder system.

Why would you want to use this? The single-carriage-dual-extruder design was a first naïve attempt at offering dual extrusion and it wasn't well thought out. If you have such model of 3D printer and attempted a dual extrusion, most likely you noticed the inactive extruder contaminating the rest of the object, and perhaps you also noticed under-extrusion after each tool change. A specific strategy is required to avoid these problems, this post-processing script offers such strategy.

Note: recent versions of the Prusa3D Edition of Slic3r also contain multi-material printing improvements. However, those changes are specific to the Prusa i3 multi-material setup which is very different from printers like the FFCP. It is unlikely that the strategy I implemented in this post-processing script will be incorporated into Slic3r anytime soon, therefore the script presented here will probably remain your best bet for making good-looking dual extrusion prints on an FFCP or similar printer if you are using Slic3r.

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


Before I made this script, I shied away from doing dual extrusion prints using Slic3r with my FlashForge Creator Pro because the few times I tried, the results were pretty awful. There are two main problems: first, the unused extruder keeps oozing filament, polluting the print. Second, due to all this oozing, there is considerable lag when the nozzle is reactivated 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. prime the activated nozzle by printing a sacrificial structure,
  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.

If you want to do dual extrusion prints on a regular basis, a better dual extruder design with separate carriages like the BCN3D Sigma may be a good investment. Another option is the Prusa i3 with multi-material upgrade, which can combine 4 materials. (It still requires priming the extruder at each material change however.) For the occasional dualstrusion with the less-than-optimal design of the FFCP though, the approach presented here is adequate if you have a bit of patience.

Post-processing script

The script is hosted as a GitHub project ‘DualstrusionPostproc’. Go to the Releases to download the latest version that has been deemed at least somewhat usable.

Make sure to update your Slic3r configs if you are upgrading this script from a version older than 0.6. The configs and start G-code were switched to relative E coordinates between version 0.5 and 0.6. The script will refuse to work with the old G-code.

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 main reason why I put this on GitHub is to make it easier for anyone with programming skills to contribute to it. For instance, it would be nice to make the script compatible with other slicing programs. I know, it is in Perl and not some fancy new hipster language, but if you look in the source code you'll see that I believe it is possible to write readable and maintainable Perl code.


The README.md file in the download contains concise instructions, here are somewhat more elaborate ones:

The current version of the script cannot be directly configured as a post-processing script inside Slic3r because the converted G-code is sent to 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 make_fcp_x3g that can invoke the dualstrusion script, as well as the GPX tool. Edit that script so it contains the path where you placed the dualstrusion-postproc.pl script. 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 although the latest Win10 versions allow easy integration of a Linux shell).

Important: the script only works if ‘Use relative E distances’ is enabled in printer settings. If you use my latest Slic3r configs, this should be the case.

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 new printer profile in Slic3r, or update all the existing ‘Dual Material’ profiles. Paste the ‘Start-dual-extruders-postproc.gcode’ into the Start G-code field, 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. I plan to implement a smarter placement of the priming tower and automatic shifting of the entire print when necessary, but for the time being you'll have to do this yourself.

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.

For things with inlays, like typical coasters or poker chips, you should enable the ‘Lift Z’ feature in the Printer Settings, not necessarily for the entire print, but certainly for the topmost layers. I recommend a lift distance of 0.2 mm. This avoids that the second colour printed in a layer smears the first one during travel moves. Smearing is difficult to avoid and especially visible when combining black filament with a lighter colour. To get the best results, use nozzles that are as pointy as possible.

If the two materials are not perfectly aligned, you will need to adjust your toolhead offsets. This can be caused by your extruder carriage not being perfectly parallel to the X axis. You can of course try to loosen the screws and wiggle it, but it is better to measure the deviation and compensate for it. Do a small test print (I recommend the minimalAlign model from here) and make a guess at how far the extruders are misaligned. Go to ‘Toolhead Offsets’ in the printer's ‘Settings’ LCD menu. Normally, you only need to modify the Y offset and leave the X offset untouched. Repeat your small test print after adjusting the Y offset (no need to reboot the printer).
Unfortunately there seems to be a discrepancy between firmware versions when it comes to the direction in which the Y offset needs to be adjusted. In the most recent Sailfish build I've used, I had to use a negative Y offset if the left extruder prints more towards the rear edge of the bed than the right extruder. Try it this way and if it moves the extruder in the wrong direction, just adjust it in the opposite direction.

If the object you're printing has small intricate details and small perimeters, you should avoid large differences in extrusion rate, otherwise you risk over- or under-extrusion problems. If you are using my Slic3r profiles, the ‘mediumStrong’ print settings are a good starting point but they will still print the skirt at a much higher speed than the rest. To remedy this, reduce the ‘support material’ speed to be nearer to the perimeters speed. You can also try increasing the small perimeters speed a bit. Next to this, it helps a lot if all parts in the model can be printed with at least 2 perimeters because this gives the extruders more time to equalise their pressure before printing the outer walls of your object. If you cannot edit the model to make small parts thicker, it might still be possible to increase the thickness of small details by using the ‘XY size compensation’ in the advanced settings.


First, the script assumes that the print always starts with T0 (the right extruder). This is no longer guaranteed with the latest Prusa3D Slic3r releases. If the first layer of your model only has a single material, either make sure to load it in the right extruder, or add a dummy object and assign it to the right extruder to ensure there is some T0 material on the first layer.

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.


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.

Version History


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-2018/05 Alexander Thomas