Allow printing a MM object on a single material printer.

All extruders are clamped to the number of physical extruders
when passed to the back end.
This commit is contained in:
bubnikv 2018-12-06 16:53:43 +01:00
parent 67e9829b49
commit 0e8d13142b
2 changed files with 31 additions and 12 deletions

View file

@ -1088,7 +1088,7 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::finish_layer()
// Appends a toolchange into m_plan and calculates neccessary depth of the corresponding box
void WipeTowerPrusaMM::plan_toolchange(float z_par, float layer_height_par, unsigned int old_tool, unsigned int new_tool, bool brim, float wipe_volume)
{
assert(m_plan.back().z <= z_par + WT_EPSILON ); // refuses to add a layer below the last one
assert(m_plan.empty() || m_plan.back().z <= z_par + WT_EPSILON); // refuses to add a layer below the last one
if (m_plan.empty() || m_plan.back().z + WT_EPSILON < z_par) // if we moved to a new layer, we'll add it to m_plan first
m_plan.push_back(WipeTowerInfo(z_par, layer_height_par));