mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
FIX: support flush params in machine start GCode
jira: NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I7566b960421b088f1d122936d9bc3974057a1e6b (cherry picked from commit dd796026b3f869cfc40e8d9c5769c2a40e565441)
This commit is contained in:
@@ -2518,6 +2518,18 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||||||
this->placeholder_parser().set("retraction_distances_when_ec", new ConfigOptionFloatsNullable(m_config.retraction_distances_when_ec));
|
this->placeholder_parser().set("retraction_distances_when_ec", new ConfigOptionFloatsNullable(m_config.retraction_distances_when_ec));
|
||||||
this->placeholder_parser().set("long_retractions_when_ec",new ConfigOptionBoolsNullable(m_config.long_retractions_when_ec));
|
this->placeholder_parser().set("long_retractions_when_ec",new ConfigOptionBoolsNullable(m_config.long_retractions_when_ec));
|
||||||
|
|
||||||
|
auto flush_v_speed = m_config.filament_flush_volumetric_speed.values;
|
||||||
|
auto flush_temps = m_config.filament_flush_temp.values;
|
||||||
|
for (size_t idx = 0; idx < flush_v_speed.size(); ++idx) {
|
||||||
|
if (flush_v_speed[idx] == 0)
|
||||||
|
flush_v_speed[idx] = m_config.filament_max_volumetric_speed.get_at(idx);
|
||||||
|
}
|
||||||
|
for (size_t idx = 0; idx < flush_temps.size(); ++idx) {
|
||||||
|
if (flush_temps[idx] == 0)
|
||||||
|
flush_temps[idx] = m_config.nozzle_temperature_range_high.get_at(idx);
|
||||||
|
}
|
||||||
|
this->placeholder_parser().set("flush_volumetric_speeds", new ConfigOptionFloats(flush_v_speed));
|
||||||
|
this->placeholder_parser().set("flush_temperatures", new ConfigOptionInts(flush_temps));
|
||||||
//Set variable for total layer count so it can be used in custom gcode.
|
//Set variable for total layer count so it can be used in custom gcode.
|
||||||
this->placeholder_parser().set("total_layer_count", m_layer_count);
|
this->placeholder_parser().set("total_layer_count", m_layer_count);
|
||||||
// Useful for sequential prints.
|
// Useful for sequential prints.
|
||||||
|
|||||||
@@ -2178,7 +2178,7 @@ void PrintConfigDef::init_fff_params()
|
|||||||
|
|
||||||
def = this->add("filament_flush_temp", coInts);
|
def = this->add("filament_flush_temp", coInts);
|
||||||
def->label = L("Flush temperature");
|
def->label = L("Flush temperature");
|
||||||
def->tooltip = L("temperature when flushing filament");
|
def->tooltip = L("temperature when flushing filament. 0 indicates the upper bound of the recommended nozzle temperature range");
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->nullable = true;
|
def->nullable = true;
|
||||||
def->min = 0;
|
def->min = 0;
|
||||||
@@ -2187,7 +2187,7 @@ void PrintConfigDef::init_fff_params()
|
|||||||
|
|
||||||
def = this->add("filament_flush_volumetric_speed", coFloats);
|
def = this->add("filament_flush_volumetric_speed", coFloats);
|
||||||
def->label = L("Flush volumetric speed");
|
def->label = L("Flush volumetric speed");
|
||||||
def->tooltip = L("Volumetric speed when flushing filament");
|
def->tooltip = L("Volumetric speed when flushing filament. 0 indicates the max volumetric speed");
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->nullable = true;
|
def->nullable = true;
|
||||||
def->min = 0;
|
def->min = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user