mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 09:31:59 +08:00
Add offset to the finalize wipe tower move
This commit is contained in:
parent
9b050bf52c
commit
cdcd4da809
@ -266,9 +266,10 @@ std::string WipeTowerIntegration::tool_change(GCodeGenerator &gcodegen, int extr
|
|||||||
std::string WipeTowerIntegration::finalize(GCodeGenerator &gcodegen)
|
std::string WipeTowerIntegration::finalize(GCodeGenerator &gcodegen)
|
||||||
{
|
{
|
||||||
std::string gcode;
|
std::string gcode;
|
||||||
if (std::abs(gcodegen.writer().get_position().z() - m_final_purge.print_z) > EPSILON)
|
const double purge_z{m_final_purge.print_z + gcodegen.config().z_offset.value};
|
||||||
|
if (std::abs(gcodegen.writer().get_position().z() - purge_z) > EPSILON)
|
||||||
gcode += gcodegen.generate_travel_gcode(
|
gcode += gcodegen.generate_travel_gcode(
|
||||||
{{gcodegen.last_position->x(), gcodegen.last_position->y(), scaled(m_final_purge.print_z)}},
|
{{gcodegen.last_position->x(), gcodegen.last_position->y(), scaled(purge_z)}},
|
||||||
"move to safe place for purging", [](){return "";}
|
"move to safe place for purging", [](){return "";}
|
||||||
);
|
);
|
||||||
gcode += append_tcr(gcodegen, m_final_purge, -1);
|
gcode += append_tcr(gcodegen, m_final_purge, -1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user