mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-30 06:52:03 +08:00
MMU: Fixed missing travel to the wipe tower in one more case
This commit is contained in:
parent
38d5cb95fa
commit
fd3ab55197
@ -236,10 +236,11 @@ namespace Slic3r {
|
||||
|
||||
const bool needs_toolchange = gcodegen.writer().need_toolchange(new_extruder_id);
|
||||
const bool will_go_down = ! is_approx(z, current_z);
|
||||
|
||||
if (! needs_toolchange || (gcodegen.config().single_extruder_multi_material && ! tcr.priming)) {
|
||||
if (tcr.force_travel || ! needs_toolchange || (gcodegen.config().single_extruder_multi_material && ! tcr.priming)) {
|
||||
// Move over the wipe tower. If this is not single-extruder MM, the first wipe tower move following the
|
||||
// toolchange will travel there anyway (if there is a toolchange).
|
||||
// FIXME: It would be better if the wipe tower set the force_travel flag for all toolchanges,
|
||||
// then we could simplify the condition and make it more readable.
|
||||
gcode += gcodegen.retract();
|
||||
gcodegen.m_avoid_crossing_perimeters.use_external_mp_once();
|
||||
gcode += gcodegen.travel_to(
|
||||
@ -265,7 +266,6 @@ namespace Slic3r {
|
||||
deretraction_str = gcodegen.unretract();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1387,8 +1387,10 @@ void WipeTower::generate(std::vector<std::vector<WipeTower::ToolChangeResult>> &
|
||||
layer_result.emplace_back(std::move(finish_layer_tcr));
|
||||
}
|
||||
else {
|
||||
if (idx == -1)
|
||||
if (idx == -1) {
|
||||
layer_result[0] = merge_tcr(finish_layer_tcr, layer_result[0]);
|
||||
layer_result[0].force_travel = true;
|
||||
}
|
||||
else
|
||||
layer_result[idx] = merge_tcr(layer_result[idx], finish_layer_tcr);
|
||||
}
|
||||
|
@ -82,6 +82,8 @@ public:
|
||||
}
|
||||
return e_length;
|
||||
}
|
||||
|
||||
bool force_travel = false;
|
||||
};
|
||||
|
||||
struct box_coordinates
|
||||
|
Loading…
x
Reference in New Issue
Block a user