SPE-2721: Use correct z for a travel between objects (#14304)

This commit is contained in:
Martin Šach 2025-03-19 12:12:56 +01:00 committed by Lukas Matena
parent 9968c68eb6
commit 445c121f1e

View File

@ -1298,8 +1298,8 @@ void GCodeGenerator::_do_export(Print& print, GCodeOutputStream &file, Thumbnail
file.write(this->writer().travel_to_z_force(last_z, "ensure z position"));
const double travel_z = std::max(last_z, double(m_max_layer_z));
file.write(this->writer().travel_to_z_force(travel_z, "ensure z position to clear all already printed objects"));
const Vec3crd from{to_3d(*this->last_position, scaled(this->m_last_layer_z))};
const Vec3crd to{0, 0, scaled(this->m_last_layer_z)};
const Vec3crd from{to_3d(*this->last_position, scaled(travel_z))};
const Vec3crd to{0, 0, scaled(travel_z)};
file.write(this->travel_to(from, to, ExtrusionRole::None, "move to origin position for next object", [](){return "";}));
m_enable_cooling_markers = true;
// Disable motion planner when traveling to first object point.