mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-31 02:11:59 +08:00
Fix layer change smoothing
This commit is contained in:
parent
0b4e406b28
commit
12755cd374
@ -2124,8 +2124,10 @@ std::string GCodeGenerator::get_layer_change_gcode(const Vec3d& from, const Vec3
|
||||
elevation_params.lift_height = std::max(z_change, elevation_params.lift_height);
|
||||
|
||||
const double path_length = unscaled(xy_path.length());
|
||||
const double lift_at_travel_end =
|
||||
(elevation_params.lift_height / elevation_params.slope_end * path_length);
|
||||
const double lift_at_travel_end = std::min(
|
||||
elevation_params.lift_height,
|
||||
elevation_params.lift_height / elevation_params.slope_end * path_length
|
||||
);
|
||||
if (lift_at_travel_end < z_change) {
|
||||
elevation_params.lift_height = z_change;
|
||||
elevation_params.slope_end = path_length;
|
||||
|
Loading…
x
Reference in New Issue
Block a user