mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-06-04 11:14:17 +08:00
SPE-2719 Use writer z instead of print z for first layer travel (#14298)
print_z does not make sense on first layer of sequentialy printed object as the first travel is not on the same layer, rather it is from the last layer of the previous object to the first layer of the current one
This commit is contained in:
parent
5aa70f17e4
commit
9968c68eb6
@ -2762,7 +2762,11 @@ LayerResult GCodeGenerator::process_layer(
|
||||
if (m_current_instance != next_instance) {
|
||||
m_avoid_crossing_perimeters.use_external_mp_once = true;
|
||||
}
|
||||
gcode += this->travel_to_first_position(first_point - to_3d(shift, 0), print_z, ExtrusionRole::Mixed, [this]() {
|
||||
|
||||
const double writer_z{m_writer.get_position().z()};
|
||||
const double previous_z{writer_z <= std::numeric_limits<double>::epsilon() ? print_z : writer_z};
|
||||
|
||||
gcode += this->travel_to_first_position(first_point - to_3d(shift, 0), previous_z, ExtrusionRole::Mixed, [this]() {
|
||||
if (m_writer.multiple_extruders) {
|
||||
return std::string{""};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user