mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
Merge branch 'main' into dev/support-paint-vertical
This commit is contained in:
commit
a9a6f45f08
344 changed files with 29108 additions and 10950 deletions
|
@ -1838,6 +1838,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||
m_max_layer_z = 0.f;
|
||||
m_last_width = 0.f;
|
||||
m_is_overhang_fan_on = false;
|
||||
m_is_internal_bridge_fan_on = false;
|
||||
m_is_supp_interface_fan_on = false;
|
||||
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
|
||||
m_last_mm3_per_mm = 0.;
|
||||
|
@ -5320,11 +5321,12 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
|||
ref_speed = std::min(ref_speed, m_config.scarf_joint_speed.get_abs_value(ref_speed));
|
||||
}
|
||||
|
||||
ConfigOptionPercents overhang_overlap_levels({75, 50, 25, 13, 12.99, 0});
|
||||
ConfigOptionPercents overhang_overlap_levels({90, 75, 50, 25, 13, 0});
|
||||
|
||||
if (m_config.slowdown_for_curled_perimeters){
|
||||
ConfigOptionFloatsOrPercents dynamic_overhang_speeds(
|
||||
{(m_config.get_abs_value("overhang_1_4_speed", ref_speed) < 0.5) ?
|
||||
{FloatOrPercent{100, true},
|
||||
(m_config.get_abs_value("overhang_1_4_speed", ref_speed) < 0.5) ?
|
||||
FloatOrPercent{100, true} :
|
||||
FloatOrPercent{m_config.get_abs_value("overhang_1_4_speed", ref_speed) * 100 / ref_speed, true},
|
||||
(m_config.get_abs_value("overhang_2_4_speed", ref_speed) < 0.5) ?
|
||||
|
@ -5336,9 +5338,6 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
|||
(m_config.get_abs_value("overhang_4_4_speed", ref_speed) < 0.5) ?
|
||||
FloatOrPercent{100, true} :
|
||||
FloatOrPercent{m_config.get_abs_value("overhang_4_4_speed", ref_speed) * 100 / ref_speed, true},
|
||||
(m_config.get_abs_value("overhang_4_4_speed", ref_speed) < 0.5) ?
|
||||
FloatOrPercent{100, true} :
|
||||
FloatOrPercent{m_config.get_abs_value("overhang_4_4_speed", ref_speed) * 100 / ref_speed, true},
|
||||
(m_config.get_abs_value("overhang_4_4_speed", ref_speed) < 0.5) ?
|
||||
FloatOrPercent{100, true} :
|
||||
FloatOrPercent{m_config.get_abs_value("overhang_4_4_speed", ref_speed) * 100 / ref_speed, true}});
|
||||
|
@ -5347,7 +5346,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
|||
ref_speed, speed, m_config.slowdown_for_curled_perimeters);
|
||||
}else{
|
||||
ConfigOptionFloatsOrPercents dynamic_overhang_speeds(
|
||||
{(m_config.get_abs_value("overhang_1_4_speed", ref_speed) < 0.5) ?
|
||||
{FloatOrPercent{100, true},
|
||||
(m_config.get_abs_value("overhang_1_4_speed", ref_speed) < 0.5) ?
|
||||
FloatOrPercent{100, true} :
|
||||
FloatOrPercent{m_config.get_abs_value("overhang_1_4_speed", ref_speed) * 100 / ref_speed, true},
|
||||
(m_config.get_abs_value("overhang_2_4_speed", ref_speed) < 0.5) ?
|
||||
|
@ -5356,10 +5356,9 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
|||
(m_config.get_abs_value("overhang_3_4_speed", ref_speed) < 0.5) ?
|
||||
FloatOrPercent{100, true} :
|
||||
FloatOrPercent{m_config.get_abs_value("overhang_3_4_speed", ref_speed) * 100 / ref_speed, true},
|
||||
(m_config.get_abs_value("overhang_4_4_speed", ref_speed) < 0.5) ?
|
||||
FloatOrPercent{100, true} :
|
||||
FloatOrPercent{m_config.get_abs_value("overhang_4_4_speed", ref_speed) * 100 / ref_speed, true},
|
||||
FloatOrPercent{m_config.get_abs_value("bridge_speed") * 100 / ref_speed, true},
|
||||
(m_config.get_abs_value("overhang_4_4_speed", ref_speed) < 0.5) ?
|
||||
FloatOrPercent{100, true} :
|
||||
FloatOrPercent{m_config.get_abs_value("overhang_4_4_speed", ref_speed) * 100 / ref_speed, true},
|
||||
FloatOrPercent{m_config.get_abs_value("bridge_speed") * 100 / ref_speed, true}});
|
||||
|
||||
new_points = m_extrusion_quality_estimator.estimate_extrusion_quality(path, overhang_overlap_levels, dynamic_overhang_speeds,
|
||||
|
@ -5500,7 +5499,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
|||
// { "75%", Overhang_threshold_4_4 },
|
||||
// { "95%", Overhang_threshold_bridge }
|
||||
auto check_overhang_fan = [&overhang_fan_threshold](float overlap, ExtrusionRole role) {
|
||||
if (is_bridge(role)) {
|
||||
if (role == erBridgeInfill || role == erOverhangPerimeter) { // ORCA: Split out bridge infill to internal and external to apply separate fan settings
|
||||
return true;
|
||||
}
|
||||
switch (overhang_fan_threshold) {
|
||||
|
@ -5593,7 +5592,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
|||
int overhang_threshold = overhang_fan_threshold == Overhang_threshold_none ? Overhang_threshold_none
|
||||
: overhang_fan_threshold - 1;
|
||||
if ((overhang_fan_threshold == Overhang_threshold_none && is_external_perimeter(path.role())) ||
|
||||
(path.get_overhang_degree() > overhang_threshold || is_bridge(path.role()))) {
|
||||
(path.get_overhang_degree() > overhang_threshold ||
|
||||
(path.role() == erBridgeInfill || path.role() == erOverhangPerimeter))) { // ORCA: Add support for separate internal bridge fan speed control
|
||||
if (!m_is_overhang_fan_on) {
|
||||
gcode += ";_OVERHANG_FAN_START\n";
|
||||
m_is_overhang_fan_on = true;
|
||||
|
@ -5604,6 +5604,17 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
|||
gcode += ";_OVERHANG_FAN_END\n";
|
||||
}
|
||||
}
|
||||
if (path.role() == erInternalBridgeInfill) { // ORCA: Add support for separate internal bridge fan speed control
|
||||
if (!m_is_internal_bridge_fan_on) {
|
||||
gcode += ";_INTERNAL_BRIDGE_FAN_START\n";
|
||||
m_is_internal_bridge_fan_on = true;
|
||||
}
|
||||
} else {
|
||||
if (m_is_internal_bridge_fan_on) {
|
||||
m_is_internal_bridge_fan_on = false;
|
||||
gcode += ";_INTERNAL_BRIDGE_FAN_END\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (supp_interface_fan_speed >= 0 && path.role() == erSupportMaterialInterface) {
|
||||
if (!m_is_supp_interface_fan_on) {
|
||||
|
@ -5738,6 +5749,9 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
|||
bool cur_fan_enabled = false;
|
||||
if( m_enable_cooling_markers && enable_overhang_bridge_fan)
|
||||
pre_fan_enabled = check_overhang_fan(new_points[0].overlap, path.role());
|
||||
|
||||
if(path.role() == erInternalBridgeInfill) // ORCA: Add support for separate internal bridge fan speed control
|
||||
pre_fan_enabled = true;
|
||||
|
||||
double path_length = 0.;
|
||||
for (size_t i = 1; i < new_points.size(); i++) {
|
||||
|
@ -5761,6 +5775,19 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
|||
}
|
||||
pre_fan_enabled = cur_fan_enabled;
|
||||
}
|
||||
// ORCA: Add support for separate internal bridge fan speed control
|
||||
if (path.role() == erInternalBridgeInfill) {
|
||||
if (!m_is_internal_bridge_fan_on) {
|
||||
gcode += ";_INTERNAL_BRIDGE_FAN_START\n";
|
||||
m_is_internal_bridge_fan_on = true;
|
||||
}
|
||||
} else {
|
||||
if (m_is_internal_bridge_fan_on) {
|
||||
gcode += ";_INTERNAL_BRIDGE_FAN_END\n";
|
||||
m_is_internal_bridge_fan_on = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (supp_interface_fan_speed >= 0 && path.role() == erSupportMaterialInterface) {
|
||||
if (!m_is_supp_interface_fan_on) {
|
||||
gcode += ";_SUPP_INTERFACE_FAN_START\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue