Cancel instance before moving to a next object in sequential print

This commit is contained in:
Martin Šach 2024-03-12 10:39:35 +01:00 committed by Lukas Matena
parent cb9aaf8b58
commit f850433e2b
2 changed files with 4 additions and 1 deletions

View File

@ -1247,6 +1247,9 @@ void GCodeGenerator::_do_export(Print& print, GCodeOutputStream &file, Thumbnail
m_enable_cooling_markers = false; // we're not filtering these moves through CoolingBuffer
m_avoid_crossing_perimeters.use_external_mp_once();
file.write(this->retract_and_wipe());
file.write(m_label_objects.maybe_stop_instance());
const double last_z{this->writer().get_position().z()};
file.write(this->writer().get_travel_to_z_gcode(last_z, "ensure z position"));
file.write(this->travel_to(*this->last_position, Point(0, 0), ExtrusionRole::None, "move to origin position for next object", ""));
m_enable_cooling_markers = true;
// Disable motion planner when traveling to first object point.

View File

@ -149,7 +149,7 @@ TEST_CASE("Extrusion, travels, temeperatures", "[GCode]") {
INFO("Unexpected E argument");
CHECK(!line.has_e());
if (line.has_z()) {
if (line.has_z() && std::abs(line.dist_Z(self)) > 0) {
z_moves.emplace_back(line.z());
}
if (line.has_x() || line.has_y()) {