Fix fan speed on overhangs

supermerill/SuperSlicer#1127
This commit is contained in:
remi durand 2021-05-01 12:18:24 +02:00
parent 8b7aa58cf8
commit 612c049660
2 changed files with 5 additions and 3 deletions

View File

@ -3841,7 +3841,8 @@ std::string GCode::_before_extrude(const ExtrusionPath &path, const std::string
std::string comment;
if (m_enable_cooling_markers) {
if (is_bridge(path.role()))
if (is_bridge(path.role())
|| path.role() == ExtrusionRole::erOverhangPerimeter)
gcode += ";_BRIDGE_FAN_START\n";
else if (ExtrusionRole::erTopSolidInfill == path.role())
gcode += ";_TOP_FAN_START\n";
@ -3860,7 +3861,8 @@ std::string GCode::_before_extrude(const ExtrusionPath &path, const std::string
std::string GCode::_after_extrude(const ExtrusionPath &path) {
std::string gcode;
if (m_enable_cooling_markers)
if (is_bridge(path.role()))
if (is_bridge(path.role())
|| path.role() == ExtrusionRole::erOverhangPerimeter)
gcode += ";_BRIDGE_FAN_END\n";
else if (ExtrusionRole::erTopSolidInfill == path.role())
gcode += ";_TOP_FAN_END\n";

View File

@ -776,7 +776,7 @@ std::string CoolingBuffer::apply_layer_cooldown(
bridge_fan_speed = clamp(0, 255, int(float(bridge_fan_speed) * factor + 0.5f));
}
#undef EXTRUDER_CONFIG
// 0 is deprecated for diable: take care of temp settings.
// 0 is deprecated for disable: take care of temp settings.
if (bridge_fan_speed == 0) bridge_fan_speed = -1;
if (ext_peri_fan_speed == 0) ext_peri_fan_speed = -1;
if (top_fan_speed == 0) top_fan_speed = -1;