mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 03:35:52 +08:00
Fix of issue 1368 (vector index out of bounds in the wipe tower generator)
This commit is contained in:
parent
720fb29768
commit
f2836d4738
@ -643,6 +643,7 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::tool_change(unsigned int tool, boo
|
|||||||
"\n\n");
|
"\n\n");
|
||||||
|
|
||||||
// Ask our writer about how much material was consumed:
|
// Ask our writer about how much material was consumed:
|
||||||
|
if (m_current_tool < m_used_filament_length.size())
|
||||||
m_used_filament_length[m_current_tool] += writer.get_and_reset_used_filament_length();
|
m_used_filament_length[m_current_tool] += writer.get_and_reset_used_filament_length();
|
||||||
|
|
||||||
ToolChangeResult result;
|
ToolChangeResult result;
|
||||||
@ -1068,7 +1069,8 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::finish_layer()
|
|||||||
|
|
||||||
m_depth_traversed = m_wipe_tower_depth-m_perimeter_width;
|
m_depth_traversed = m_wipe_tower_depth-m_perimeter_width;
|
||||||
|
|
||||||
// Ask our writer about how much material was consumed:
|
// Ask our writer about how much material was consumed.
|
||||||
|
if (m_current_tool < m_used_filament_length.size())
|
||||||
m_used_filament_length[m_current_tool] += writer.get_and_reset_used_filament_length();
|
m_used_filament_length[m_current_tool] += writer.get_and_reset_used_filament_length();
|
||||||
|
|
||||||
ToolChangeResult result;
|
ToolChangeResult result;
|
||||||
@ -1166,7 +1168,6 @@ void WipeTowerPrusaMM::save_on_last_wipe()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Processes vector m_plan and calls respective functions to generate G-code for the wipe tower
|
// Processes vector m_plan and calls respective functions to generate G-code for the wipe tower
|
||||||
// Resulting ToolChangeResults are appended into vector "result"
|
// Resulting ToolChangeResults are appended into vector "result"
|
||||||
void WipeTowerPrusaMM::generate(std::vector<std::vector<WipeTower::ToolChangeResult>> &result)
|
void WipeTowerPrusaMM::generate(std::vector<std::vector<WipeTower::ToolChangeResult>> &result)
|
||||||
@ -1256,6 +1257,4 @@ void WipeTowerPrusaMM::make_wipe_tower_square()
|
|||||||
lay.extra_spacing = lay.depth / lay.toolchanges_depth();
|
lay.extra_spacing = lay.depth / lay.toolchanges_depth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}; // namespace Slic3r
|
}; // namespace Slic3r
|
||||||
|
Loading…
x
Reference in New Issue
Block a user