Skip to content

Commit

Permalink
Fix useless Z move before switching layer
Browse files Browse the repository at this point in the history
CURA-12268
This was introduced while moving positions to 3D points. The Z offset of the travel move now has to be correct, otherwise we will move the nozzle up for next layer, then move back down for the travel move, then move up again when actually starting to print.
  • Loading branch information
wawanbreton committed Nov 7, 2024
1 parent 7a327d4 commit 643a712
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/LayerPlan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2748,6 +2748,7 @@ void LayerPlan::writeGCode(GCodeExport& gcode)
gcode.writeTravel(current_position, extruder.settings_.get<Velocity>("speed_z_hop"));

// Prevent the final travel(s) from resetting to the 'previous' layer height.
path.z_offset = final_travel_z_ - z_;
gcode.setZ(final_travel_z_);
}
for (size_t point_idx = 0; point_idx + 1 < path.points.size(); point_idx++)
Expand Down

0 comments on commit 643a712

Please sign in to comment.