diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index 051e88ea6b..fb04b14f7b 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -633,6 +633,7 @@ void WipeTower::set_extruder(size_t idx, const PrintConfig& config) m_filpar[idx].cooling_initial_speed = float(config.filament_cooling_initial_speed.get_at(idx)); m_filpar[idx].cooling_final_speed = float(config.filament_cooling_final_speed.get_at(idx)); m_filpar[idx].filament_skinnydip_move = config.filament_skinnydip_move.get_at(idx); + m_filpar[idx].filament_cold_ramming = config.filament_cold_ramming.get_at(idx); m_filpar[idx].filament_skinnydip_loading_speed = float(config.filament_skinnydip_loading_speed.get_at(idx)); m_filpar[idx].filament_skinnydip_unloading_speed = float(config.filament_skinnydip_unloading_speed.get_at(idx)); m_filpar[idx].filament_skinnydip_distance = float(config.filament_skinnydip_distance.get_at(idx)); @@ -930,6 +931,11 @@ void WipeTower::toolchange_Unload( } + bool cold_ramming = m_filpar[m_current_tool].filament_cold_ramming; + + if (cold_ramming) + writer.set_extruder_temp(0, false); + // now the ramming itself: while (do_ramming && i < m_filpar[m_current_tool].ramming_speed.size()) { @@ -973,7 +979,7 @@ void WipeTower::toolchange_Unload( // be already set and there is no need to change anything. Also, the temperature could be changed // for wrong extruder. if (m_semm) { - if (new_temperature != 0 && (new_temperature != m_old_temperature || is_first_layer()) ) { // Set the extruder temperature, but don't wait. + if (new_temperature != 0 && (new_temperature != m_old_temperature || is_first_layer() || cold_ramming) ) { // Set the extruder temperature, but don't wait. // If the required temperature is the same as last time, don't emit the M104 again (if user adjusted the value, it would be reset) // However, always change temperatures on the first layer (this is to avoid issues with priming lines turned off). writer.set_extruder_temp(new_temperature, false); diff --git a/src/libslic3r/GCode/WipeTower.hpp b/src/libslic3r/GCode/WipeTower.hpp index 69207f8396..b0f8043c4d 100644 --- a/src/libslic3r/GCode/WipeTower.hpp +++ b/src/libslic3r/GCode/WipeTower.hpp @@ -238,6 +238,7 @@ public: float delay = 0.f ; int filament_skinnydip_move = 0; + bool filament_cold_ramming = false; float filament_skinnydip_loading_speed = 0.f; float filament_skinnydip_unloading_speed = 0.f; float filament_skinnydip_distance = 0.f; diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index e8763f1111..60181ee33d 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -478,7 +478,7 @@ static std::vector s_Preset_print_options { static std::vector s_Preset_filament_options { "filament_colour", "filament_diameter", "filament_type", "filament_soluble", "filament_notes", "filament_max_volumetric_speed", "extrusion_multiplier", "filament_density", "filament_cost", "filament_spool_weight", "filament_loading_speed", "filament_loading_speed_start", "filament_load_time", - "filament_unloading_speed", "filament_unloading_speed_start", "filament_unload_time", "filament_toolchange_delay", "filament_cooling_moves", "filament_skinnydip_move", "filament_skinnydip_loading_speed", "filament_skinnydip_unloading_speed", "filament_skinnydip_distance", "filament_skinnydip_number_of_dips", + "filament_unloading_speed", "filament_unloading_speed_start", "filament_unload_time", "filament_toolchange_delay", "filament_cooling_moves", "filament_skinnydip_move", "filament_cold_ramming", "filament_skinnydip_loading_speed", "filament_skinnydip_unloading_speed", "filament_skinnydip_distance", "filament_skinnydip_number_of_dips", "filament_cooling_initial_speed", "filament_cooling_final_speed", "filament_ramming_parameters", "filament_minimal_purge_on_wipe_tower", "filament_multitool_ramming", "filament_multitool_ramming_volume", "filament_multitool_ramming_flow", "temperature", "idle_temperature", "first_layer_temperature", "bed_temperature", "first_layer_bed_temperature", "fan_always_on", "cooling", "min_fan_speed", diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index e5ac50e2e9..4995177dd7 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -220,6 +220,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n || opt_key == "filament_cooling_moves" || opt_key == "filament_skinnydip_number_of_dips" || opt_key == "filament_skinnydip_move" + || opt_key == "filament_cold_ramming" || opt_key == "filament_skinnydip_loading_speed" || opt_key == "filament_skinnydip_unloading_speed" || opt_key == "filament_skinnydip_distance" diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index cb5c980ac7..f1a6d88b21 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -1093,6 +1093,13 @@ void PrintConfigDef::init_fff_params() def->mode = comExpert; def->set_default_value(new ConfigOptionFloats { 0. }); + def = this->add("filament_cold_ramming", coBools); + def->label = L("ELIAS: Cold ramming"); + def->tooltip = L(""); + def->min = 0; + def->mode = comExpert; + def->set_default_value(new ConfigOptionBools { false }); + def = this->add("filament_skinnydip_move", coInts); def->label = L("ELIAS: Skinnydip is performed after N-th cooling move"); def->tooltip = L("Zero - before cooling. Larger than number of cooling moves - after cooling."); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 9ec88ec4f8..00c3956609 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -733,6 +733,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloats, filament_multitool_ramming_volume)) ((ConfigOptionFloats, filament_multitool_ramming_flow)) ((ConfigOptionInts, filament_skinnydip_move)) + ((ConfigOptionBools, filament_cold_ramming)) ((ConfigOptionFloats, filament_skinnydip_loading_speed)) ((ConfigOptionFloats, filament_skinnydip_unloading_speed)) ((ConfigOptionFloats, filament_skinnydip_distance)) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 37fff78e58..96d47cafdc 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2274,6 +2274,7 @@ void TabFilament::build() optgroup->append_single_option_line("filament_skinnydip_loading_speed"); optgroup->append_single_option_line("filament_skinnydip_unloading_speed"); optgroup->append_single_option_line("filament_skinnydip_distance"); + optgroup->append_single_option_line("filament_cold_ramming"); create_line_with_widget(optgroup.get(), "filament_ramming_parameters", "", [this](wxWindow* parent) { auto ramming_dialog_btn = new wxButton(parent, wxID_ANY, _(L("Ramming settings"))+dots, wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);