Fix of #11648: Prevent overhang fan speeds from spilling into infill.

This commit is contained in:
Justin Schuh 2023-11-12 15:40:28 -08:00 committed by Lukáš Hejl
parent 689fd61146
commit 0b68210849
2 changed files with 7 additions and 7 deletions

View File

@ -3265,12 +3265,10 @@ std::string GCodeGenerator::_extrude(
} }
if (m_enable_cooling_markers) if (m_enable_cooling_markers)
gcode += path_attr.role.is_bridge() ? ";_BRIDGE_FAN_END" : ";_EXTRUDE_END"; gcode += path_attr.role.is_bridge() ? ";_BRIDGE_FAN_END\n" : ";_EXTRUDE_END\n";
if (dynamic_speed_and_fan_speed.second >= 0) if (dynamic_speed_and_fan_speed.second >= 0)
gcode += ";_RESET_FAN_SPEED"; gcode += ";_RESET_FAN_SPEED\n";
gcode += "\n";
this->set_last_pos(path.back().point); this->set_last_pos(path.back().point);
return gcode; return gcode;

View File

@ -560,16 +560,18 @@ std::vector<PerExtruderAdjustments> CoolingBuffer::parse_layer_gcode(const std::
} else } else
line.time = 0; line.time = 0;
line.time_max = line.time; line.time_max = line.time;
} else if (boost::contains(sline, ";_SET_FAN_SPEED")) { }
if (boost::contains(sline, ";_SET_FAN_SPEED")) {
auto speed_start = sline.find_last_of('D'); auto speed_start = sline.find_last_of('D');
int speed = 0; int speed = 0;
for (char num : sline.substr(speed_start + 1)) { for (char num : sline.substr(speed_start + 1)) {
speed = speed * 10 + (num - '0'); speed = speed * 10 + (num - '0');
} }
line.type = CoolingLine::TYPE_SET_FAN_SPEED; line.type |= CoolingLine::TYPE_SET_FAN_SPEED;
line.fan_speed = speed; line.fan_speed = speed;
} else if (boost::contains(sline, ";_RESET_FAN_SPEED")) { } else if (boost::contains(sline, ";_RESET_FAN_SPEED")) {
line.type = CoolingLine::TYPE_RESET_FAN_SPEED; line.type |= CoolingLine::TYPE_RESET_FAN_SPEED;
} }
if (line.type != 0) if (line.type != 0)