mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-05 20:16:10 +08:00
ENH: add flush params for multi filament
jira: STUDIO-11965 Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I2245f22a03c65b570bc60a2792daf4c1683f1ebd
This commit is contained in:
parent
674fe4dab6
commit
ffe2653341
@ -57,6 +57,12 @@
|
||||
"filament_flow_ratio": [
|
||||
"1"
|
||||
],
|
||||
"filament_flush_temp": [
|
||||
"0"
|
||||
],
|
||||
"filament_flush_volumetric_speed": [
|
||||
"0"
|
||||
],
|
||||
"filament_is_support": [
|
||||
"0"
|
||||
],
|
||||
|
@ -765,6 +765,18 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||
config.set_key_value("travel_point_3_x", new ConfigOptionFloat(float(travel_point_3.x())));
|
||||
config.set_key_value("travel_point_3_y", new ConfigOptionFloat(float(travel_point_3.y())));
|
||||
|
||||
auto flush_v_speed = m_print_config->filament_flush_volumetric_speed.values;
|
||||
auto flush_temps = m_print_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_print_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_print_config->nozzle_temperature_range_high.get_at(idx);
|
||||
}
|
||||
config.set_key_value("flush_volumetric_speeds", new ConfigOptionFloats(flush_v_speed));
|
||||
config.set_key_value("flush_temperatures", new ConfigOptionInts(flush_temps));
|
||||
config.set_key_value("flush_length", new ConfigOptionFloat(purge_length));
|
||||
config.set_key_value("wipe_avoid_perimeter", new ConfigOptionBool(is_used_travel_avoid_perimeter));
|
||||
config.set_key_value("wipe_avoid_pos_x", new ConfigOptionFloat(wipe_avoid_pos_x));
|
||||
@ -2203,6 +2215,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
|
||||
m_placeholder_parser.set("retraction_distances_when_cut", new ConfigOptionFloatsNullable(m_config.retraction_distances_when_cut));
|
||||
m_placeholder_parser.set("long_retractions_when_cut",new ConfigOptionBoolsNullable(m_config.long_retractions_when_cut));
|
||||
|
||||
//Set variable for total layer count so it can be used in custom gcode.
|
||||
m_placeholder_parser.set("total_layer_count", m_layer_count);
|
||||
// Useful for sequential prints.
|
||||
@ -6217,6 +6230,18 @@ std::string GCode::set_extruder(unsigned int new_filament_id, double print_z, bo
|
||||
dyn_config.set_key_value("wipe_avoid_perimeter", new ConfigOptionBool(false));
|
||||
dyn_config.set_key_value("wipe_avoid_pos_x", new ConfigOptionFloat(wipe_avoid_pos_x));
|
||||
|
||||
auto flush_v_speed = m_print->config().filament_flush_volumetric_speed.values;
|
||||
auto flush_temps =m_print->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_print->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_print->config().nozzle_temperature_range_high.get_at(idx);
|
||||
}
|
||||
dyn_config.set_key_value("flush_volumetric_speeds", new ConfigOptionFloats(flush_v_speed));
|
||||
dyn_config.set_key_value("flush_temperatures", new ConfigOptionInts(flush_temps));
|
||||
dyn_config.set_key_value("flush_length", new ConfigOptionFloat(wipe_length));
|
||||
|
||||
int flush_count = std::min(g_max_flush_count, (int)std::round(wipe_volume / g_purge_volume_one_time));
|
||||
|
@ -937,7 +937,7 @@ static std::vector<std::string> s_Preset_filament_options {/*"filament_colour",
|
||||
"enable_pressure_advance", "pressure_advance", "chamber_temperatures","filament_notes",
|
||||
"filament_long_retractions_when_cut","filament_retraction_distances_when_cut","filament_shrink",
|
||||
//BBS filament change length while the extruder color
|
||||
"filament_change_length","filament_prime_volume"
|
||||
"filament_change_length","filament_prime_volume","filament_flush_volumetric_speed","filament_flush_temp"
|
||||
};
|
||||
|
||||
static std::vector<std::string> s_Preset_machine_limits_options {
|
||||
|
@ -1733,6 +1733,24 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionEnum<FilamentMapMode>(fmmAutoForFlush));
|
||||
|
||||
def = this->add("filament_flush_temp", coInts);
|
||||
def->label = L("Flush temperature");
|
||||
def->tooltip = L("temperature when flushing filament");
|
||||
def->mode = comAdvanced;
|
||||
def->nullable = true;
|
||||
def->min = 0;
|
||||
def->max = max_temp;
|
||||
def->set_default_value(new ConfigOptionIntsNullable{0});
|
||||
|
||||
def = this->add("filament_flush_volumetric_speed", coFloats);
|
||||
def->label = L("Flush volumetric speed");
|
||||
def->tooltip = L("Volumetric speed when flushing filament");
|
||||
def->mode = comAdvanced;
|
||||
def->nullable = true;
|
||||
def->min = 0;
|
||||
def->max = 200;
|
||||
def->set_default_value(new ConfigOptionFloatsNullable{ 0 });
|
||||
|
||||
def = this->add("filament_max_volumetric_speed", coFloats);
|
||||
def->label = L("Max volumetric speed");
|
||||
def->tooltip = L("This setting stands for how much volume of filament can be melted and extruded per second. "
|
||||
@ -5707,8 +5725,9 @@ std::set<std::string> filament_options_with_variant = {
|
||||
"filament_long_retractions_when_cut",
|
||||
"filament_retraction_distances_when_cut",
|
||||
"nozzle_temperature_initial_layer",
|
||||
"nozzle_temperature"
|
||||
|
||||
"nozzle_temperature",
|
||||
"filament_flush_volumetric_speed",
|
||||
"filament_flush_temp"
|
||||
};
|
||||
|
||||
// Parameters that are the same as the number of extruders
|
||||
|
@ -1062,6 +1062,8 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||
((ConfigOptionFloatsNullable, hotend_cooling_rate))
|
||||
((ConfigOptionFloatsNullable, hotend_heating_rate))
|
||||
((ConfigOptionFloats, filament_minimal_purge_on_wipe_tower))
|
||||
((ConfigOptionFloatsNullable, filament_flush_volumetric_speed))
|
||||
((ConfigOptionIntsNullable, filament_flush_temp))
|
||||
// BBS
|
||||
((ConfigOptionBool, scan_first_layer))
|
||||
((ConfigOptionPoints, thumbnail_size))
|
||||
|
@ -3508,6 +3508,11 @@ void TabFilament::build()
|
||||
optgroup->append_single_option_line(option);
|
||||
optgroup->m_on_change = [this, optgroup](const t_config_option_key &opt_key, const boost::any &value) { validate_custom_note_cb(this, optgroup, opt_key, value); };
|
||||
|
||||
|
||||
page = add_options_page(L("Multi Filament"), "advanced");
|
||||
optgroup = page->new_optgroup(L("Multi Filament"));
|
||||
optgroup->append_single_option_line("filament_flush_temp", "", 0);
|
||||
optgroup->append_single_option_line("filament_flush_volumetric_speed", "", 0);
|
||||
//BBS
|
||||
#if 0
|
||||
//page = add_options_page(L("Dependencies"), "advanced");
|
||||
@ -4274,7 +4279,6 @@ void TabPrinter::build_unregular_pages(bool from_initial_build/* = false*/)
|
||||
// do not display this params now
|
||||
optgroup->append_single_option_line("long_retractions_when_cut", "", extruder_idx);
|
||||
optgroup->append_single_option_line("retraction_distances_when_cut", "", extruder_idx);
|
||||
|
||||
#if 0
|
||||
//optgroup = page->new_optgroup(L("Preview"), -1, true);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user