ENH: support force cooling for outer wall only

For PA-cf material, forcing cooling for all outer
wall and using lower fan speed for infill and inner
wall can get more high strength.

Add this cooling strategy.

When set overhang fan threshold to be 0%, then bridge
and all outer wall will be force to cool with
the overhang fan speed.

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: Ideed1ac8690f1eeb68aad760678db76bb4dae8ec
This commit is contained in:
salt.wei 2022-10-19 12:29:35 +08:00 committed by Lane.Wei
parent 5aee1505a6
commit 47302b0cf9
6 changed files with 57 additions and 23 deletions

View file

@ -3674,11 +3674,21 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
std::string comment;
if (m_enable_cooling_markers) {
if (EXTRUDER_CONFIG(enable_overhang_bridge_fan) &&
(path.get_overhang_degree() > EXTRUDER_CONFIG(overhang_fan_threshold) || is_bridge(path.role())))
gcode += ";_OVERHANG_FAN_START\n";
else
if (EXTRUDER_CONFIG(enable_overhang_bridge_fan)) {
//BBS: Overhang_threshold_none means Overhang_threshold_1_4 and forcing cooling for all external perimeter
int overhang_threshold = EXTRUDER_CONFIG(overhang_fan_threshold) == Overhang_threshold_none ?
Overhang_threshold_none : EXTRUDER_CONFIG(overhang_fan_threshold) - 1;
if ((EXTRUDER_CONFIG(overhang_fan_threshold) == Overhang_threshold_none && path.role() == erExternalPerimeter) ||
path.get_overhang_degree() > overhang_threshold ||
is_bridge(path.role()))
gcode += ";_OVERHANG_FAN_START\n";
else
comment = ";_EXTRUDE_SET_SPEED";
}
else {
comment = ";_EXTRUDE_SET_SPEED";
}
if (path.role() == erExternalPerimeter)
comment += ";_EXTERNAL_PERIMETER";
}
@ -3742,10 +3752,22 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
}
}
}
if (m_enable_cooling_markers)
gcode += (EXTRUDER_CONFIG(enable_overhang_bridge_fan) &&
(is_bridge(path.role()) || path.get_overhang_degree() > EXTRUDER_CONFIG(overhang_fan_threshold))) ?
";_OVERHANG_FAN_END\n" : ";_EXTRUDE_END\n";
if (m_enable_cooling_markers) {
if (EXTRUDER_CONFIG(enable_overhang_bridge_fan)) {
//BBS: Overhang_threshold_none means Overhang_threshold_1_4 and forcing cooling for all external perimeter
int overhang_threshold = EXTRUDER_CONFIG(overhang_fan_threshold) == Overhang_threshold_none ?
Overhang_threshold_none : EXTRUDER_CONFIG(overhang_fan_threshold) - 1;
if ((EXTRUDER_CONFIG(overhang_fan_threshold) == Overhang_threshold_none && path.role() == erExternalPerimeter) ||
path.get_overhang_degree() > overhang_threshold ||
is_bridge(path.role()))
gcode += ";_OVERHANG_FAN_END\n";
else
gcode += ";_EXTRUDE_END\n";
}
else {
gcode += ";_EXTRUDE_END\n";
}
}
this->set_last_pos(path.last_point());
return gcode;