mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-08 05:29:09 +08:00
Extrude brim of the wipe tower before any other objects.
This commit is contained in:
parent
11307eb350
commit
8bd3dec331
@ -140,7 +140,7 @@ Wipe::wipe(GCode &gcodegen, bool toolchange)
|
|||||||
return gcode;
|
return gcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
WipeTowerIntegration::WipeTowerIntegration(const PrintConfig &print_config)
|
WipeTowerIntegration::WipeTowerIntegration(const PrintConfig &print_config) : m_brim_done(false)
|
||||||
{
|
{
|
||||||
// Initialize the wipe tower.
|
// Initialize the wipe tower.
|
||||||
auto *wipe_tower = new WipeTowerPrusaMM(
|
auto *wipe_tower = new WipeTowerPrusaMM(
|
||||||
@ -164,7 +164,7 @@ std::string WipeTowerIntegration::tool_change(GCode &gcodegen, int extruder_id,
|
|||||||
bool over_wipe_tower = false;
|
bool over_wipe_tower = false;
|
||||||
std::string gcode;
|
std::string gcode;
|
||||||
|
|
||||||
if (gcodegen.writer().need_toolchange(extruder_id)) {
|
if (! m_brim_done || gcodegen.writer().need_toolchange(extruder_id)) {
|
||||||
// Move over the wipe tower.
|
// Move over the wipe tower.
|
||||||
gcode += this->travel_to(gcodegen, m_impl->tool_change(extruder_id, WipeTower::PURPOSE_MOVE_TO_TOWER).second);
|
gcode += this->travel_to(gcodegen, m_impl->tool_change(extruder_id, WipeTower::PURPOSE_MOVE_TO_TOWER).second);
|
||||||
// Let the tool change be executed by the wipe tower class.
|
// Let the tool change be executed by the wipe tower class.
|
||||||
@ -177,6 +177,7 @@ std::string WipeTowerIntegration::tool_change(GCode &gcodegen, int extruder_id,
|
|||||||
gcodegen.writer().travel_to_xy(Pointf(code_and_pos.second.x, code_and_pos.second.y));
|
gcodegen.writer().travel_to_xy(Pointf(code_and_pos.second.x, code_and_pos.second.y));
|
||||||
gcodegen.m_avoid_crossing_perimeters.use_external_mp_once = true;
|
gcodegen.m_avoid_crossing_perimeters.use_external_mp_once = true;
|
||||||
over_wipe_tower = true;
|
over_wipe_tower = true;
|
||||||
|
m_brim_done = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (finish_layer && ! m_impl->layer_finished()) {
|
if (finish_layer && ! m_impl->layer_finished()) {
|
||||||
|
@ -85,6 +85,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
std::string travel_to(GCode &codegen, const WipeTower::xy &dest);
|
std::string travel_to(GCode &codegen, const WipeTower::xy &dest);
|
||||||
std::unique_ptr<WipeTower> m_impl;
|
std::unique_ptr<WipeTower> m_impl;
|
||||||
|
bool m_brim_done;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GCode {
|
class GCode {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user