For printers with two extruders, the firmware must effect a tool change when switching between extruders. Part of this process entails moving the extruder you are about to use into the position currently occupied by the extruder you were using. When switching from the right to the left extruder, this means moving the entire extruder carriage to the right. And, when switching from the left to the right extruder, moving the carriage to the left. The carriage needs to be moved forward or backwards as well when there is a displacement along the Y axis between the two extruders.
The distance along the X and Y axes which the carriage needs to be moved is the separation along those axes between the two extruders. The separation along the X axis is referred to as the X toolhead offset. Similarly, the separation along the Y axis is the Y toolhead offset. Collectively, these values are referred to as the toolhead offsets.
For the next part, keep in mind that, while facing the front of the printer, the direction of increasing X is to the right and the direction of increasing Y is to the back. The X toolhead offset is taken to be a positive distance. Let us call this distance Ox. The Y toolhead offset, Oy, is taken to be zero when the two extruders have no separation along the Y axis and positive when the left extruder is forward — towards the front of the printer — relative to the right extruder. When switching from the right to left extruder, the carriage is thus moved by the displacement vector (Ox,Oy). For example, for Ox = 33.4 mm and Oy = 0.2 mm, the carriage will be displaced by (33.4 mm,0.2 mm). In other words, moved to the right by 33.4 mm and towards the back by 0.2 mm. And that would be exactly the displacement required to move the left extruder nozzle to the point in space previously occupied by the right extruder nozzle. When switching from the left extruder to the right extruder, the carriage is displaced by the vector (-Ox,-Oy).
As to the firmware implementation of the displacements, Sailfish follows MakerBot’s implementation: the displacement vector is added to the next motion command. That is, a tool change does not create a motion command of its own. As a result of this implementation choice, it is important that slicers and gcode ensure that the next motion command after a tool change does not attempt to print plastic. If it were to print plastic, then the slope of the motion in the XY-plane will be incorrect owing to the added toolhead offset displacement. In other words, the printed line segment will be wrong. Slicers and gcode must ensure that the first motion command after a tool change is either a travel move or a filament retraction.2
Finally, as part of supporting an older MakerBot dualstrusion system from ReplicatorG 39 and earlier, Sailfish will interpret an X toolhead offset in the inclusive range from -4.0 mm to +4.0 mm as the deviation from the printer’s ideal X toolhead offset. In keeping with the conventions of that older system, Sailfish will convert that deviation, ΔOx, to a proper X toolhead offset using the formula:
where Sx is the ideal or perfect spacing along the X axis. Note that the sign conventions between the older system and the current system are reversed.3 For many Replicator 1 and clones, Sx is 33.0 mm, but for FlashForge printers, Sx is 34.0 mm. For the Replicator 2X, Sx is 35.0 mm.
2If this seems confusing or counterintuitive, it is not you — this is a counterintuitive design chosen by MakerBot in 2011.
3MakerBot actually missed noticing the difference in the sign conventions in their own firmware and incorrectly used Sx + ΔOx. When users upgraded from earlier firmwares, they experienced difficulty and found that their dualstrusion prints had gaps along the X axis of 2ΔOx.