Implemented an initial priming line for a single-material print

on a Prusa Multi-Material printer.
This commit is contained in:
bubnikv 2017-09-04 13:51:05 +02:00
parent 29d9a1e810
commit 2c5304a520
7 changed files with 38 additions and 11 deletions

View file

@ -950,6 +950,9 @@ void _3DScene::_load_wipe_tower_toolpaths(
const std::vector<std::string> &tool_colors_str,
bool use_VBOs)
{
if (print->m_wipe_tower_tool_changes.empty())
return;
std::vector<float> tool_colors = parse_colors(tool_colors_str);
struct Ctxt
@ -978,8 +981,10 @@ void _3DScene::_load_wipe_tower_toolpaths(
ctxt.print = print;
ctxt.tool_colors = tool_colors.empty() ? nullptr : &tool_colors;
ctxt.priming.emplace_back(*print->m_wipe_tower_priming.get());
ctxt.final.emplace_back(*print->m_wipe_tower_final_purge.get());
if (print->m_wipe_tower_priming)
ctxt.priming.emplace_back(*print->m_wipe_tower_priming.get());
if (print->m_wipe_tower_final_purge)
ctxt.final.emplace_back(*print->m_wipe_tower_final_purge.get());
BOOST_LOG_TRIVIAL(debug) << "Loading wipe tower toolpaths in parallel - start";