mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-24 10:44:28 +08:00
Fix fan speed for first layer when full_fan_speed_layer > 0 and disable_fan_first_layers == 0
supermerill/SuperSlicer#1727
This commit is contained in:
parent
db8d15241b
commit
f5996fe42f
@ -797,9 +797,8 @@ std::string CoolingBuffer::apply_layer_cooldown(
|
||||
|
||||
// Is the fan speed ramp enabled?
|
||||
int full_fan_speed_layer = EXTRUDER_CONFIG(full_fan_speed_layer);
|
||||
// When ramping up fan speed from disable_fan_first_layers to full_fan_speed_layer, force disable_fan_first_layers above zero,
|
||||
// so there will be a zero fan speed at least at the 1st layer.
|
||||
disable_fan_first_layers = std::max(disable_fan_first_layers, 1);
|
||||
// When ramping up fan speed from disable_fan_first_layers to full_fan_speed_layer, if disable_fan_first_layers is zero,
|
||||
// the not-fan layer is a hypothetical -1 layer.
|
||||
if (int(layer_id) >= disable_fan_first_layers && int(layer_id) + 1 < full_fan_speed_layer) {
|
||||
// Ramp up the fan speed from disable_fan_first_layers to full_fan_speed_layer.
|
||||
float factor = float(int(layer_id + 1) - disable_fan_first_layers) / float(full_fan_speed_layer - disable_fan_first_layers);
|
||||
|
Loading…
x
Reference in New Issue
Block a user