Wipe tower: remove extra skinnydip parameters

This commit is contained in:
Lukas Matena 2023-12-20 15:06:13 +01:00
parent 18150a82d9
commit d497757a7d
7 changed files with 20 additions and 82 deletions

View File

@ -633,14 +633,10 @@ void WipeTower::set_extruder(size_t idx, const PrintConfig& config)
m_filpar[idx].cooling_moves = config.filament_cooling_moves.get_at(idx);
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));
m_filpar[idx].filament_skinnydip_number_of_dips = config.filament_skinnydip_number_of_dips.get_at(idx);
m_filpar[idx].filament_skinnydip_extra_move = float(config.filament_skinnydip_extra_move.get_at(idx));
m_filpar[idx].filament_skinnydip_delay = float(config.filament_skinnydip_delay.get_at(idx));
}
m_filpar[idx].filament_area = float((M_PI/4.f) * pow(config.filament_diameter.get_at(idx), 2)); // all extruders are assumed to have the same filament diameter at this point
@ -934,11 +930,6 @@ 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())
{
@ -982,7 +973,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() || cold_ramming) ) { // Set the extruder temperature, but don't wait.
if (new_temperature != 0 && (new_temperature != m_old_temperature || is_first_layer()) ) { // 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);
@ -992,49 +983,41 @@ void WipeTower::toolchange_Unload(
// Cooling:
const int& number_of_moves = m_filpar[m_current_tool].cooling_moves;
if (m_semm && (number_of_moves > 0 || m_filpar[m_current_tool].filament_skinnydip_number_of_dips > 0)) {
if (m_semm && number_of_moves > 0) {
const float& initial_speed = m_filpar[m_current_tool].cooling_initial_speed;
const float& final_speed = m_filpar[m_current_tool].cooling_final_speed;
float speed_inc = (final_speed - initial_speed) / (2.f * number_of_moves - 1.f);
bool skinnydip_done = false;
writer.suppress_preview()
.travel(writer.x(), writer.y() + y_step);
old_x = writer.x();
turning_point = xr-old_x > old_x-xl ? xr : xl;
for (int i=0; i<=number_of_moves; ++i) { // the last one is for skinnydip
for (int i=0; i<number_of_moves; ++i) {
// Skinnydip:
if (! skinnydip_done && (m_filpar[m_current_tool].filament_skinnydip_move == i || i == number_of_moves)) {
// Skinnydip - happens after every cooling move except for the last one.
if (i>0 && m_filpar[m_current_tool].filament_skinnydip_distance != 0) {
float dist_e = m_filpar[m_current_tool].filament_skinnydip_distance + m_cooling_tube_length / 2.f;
for (int s=0; s<m_filpar[m_current_tool].filament_skinnydip_number_of_dips; ++s) {
// Only last 5mm will be done with the fast x travel. The point is to spread possible blobs
// along the whole wipe tower.
if (dist_e > 5) {
//writer.load_move_x_advanced_there_and_back(turning_point, dist_e-5, m_filpar[m_current_tool].filament_skinnydip_loading_speed, 50);
float cent = writer.x();
writer.load_move_x_advanced(turning_point, 0.5*(dist_e - 5), m_filpar[m_current_tool].filament_skinnydip_loading_speed, 200);
writer.load_move_x_advanced(cent, 0.5*(dist_e - 5), m_filpar[m_current_tool].filament_skinnydip_loading_speed, 200);
writer.travel(cent, writer.y());
writer.load_move_x_advanced_there_and_back(turning_point, 5, m_filpar[m_current_tool].filament_skinnydip_loading_speed, m_travel_speed);
} else
writer.load_move_x_advanced_there_and_back(turning_point, dist_e, m_filpar[m_current_tool].filament_skinnydip_loading_speed, m_travel_speed);
writer.load_move_x_advanced_there_and_back(turning_point, -dist_e, m_filpar[m_current_tool].filament_skinnydip_unloading_speed, 50);
// Only last 5mm will be done with the fast x travel. The point is to spread possible blobs
// along the whole wipe tower.
if (dist_e > 5) {
//writer.load_move_x_advanced_there_and_back(turning_point, dist_e-5, m_filpar[m_current_tool].filament_skinnydip_loading_speed, 50);
float cent = writer.x();
writer.load_move_x_advanced(turning_point, 0.5*(dist_e - 5), m_filpar[m_current_tool].filament_skinnydip_loading_speed, 200);
writer.load_move_x_advanced(cent, 0.5*(dist_e - 5), m_filpar[m_current_tool].filament_skinnydip_loading_speed, 200);
writer.travel(cent, writer.y());
writer.load_move_x_advanced_there_and_back(turning_point, 5, m_filpar[m_current_tool].filament_skinnydip_loading_speed, m_travel_speed);
} else
writer.load_move_x_advanced_there_and_back(turning_point, dist_e, m_filpar[m_current_tool].filament_skinnydip_loading_speed, m_travel_speed);
writer.load_move_x_advanced_there_and_back(turning_point, -dist_e, m_filpar[m_current_tool].filament_skinnydip_unloading_speed, 50);
writer.wait(m_filpar[m_current_tool].filament_skinnydip_delay);
if (m_filpar[m_current_tool].filament_skinnydip_extra_move != 0.f)
dist_e += m_filpar[m_current_tool].filament_skinnydip_extra_move;
}
skinnydip_done = true;
if (m_filpar[m_current_tool].filament_skinnydip_extra_move != 0.f)
dist_e += m_filpar[m_current_tool].filament_skinnydip_extra_move;
}
if (i == number_of_moves)
break;
float speed = initial_speed + speed_inc * 2*i;
writer.load_move_x_advanced(turning_point, m_cooling_tube_length, speed);
speed += speed_inc;

View File

@ -237,14 +237,10 @@ public:
float unloading_speed_start = 0.f;
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;
float filament_skinnydip_extra_move = 0.f;
float filament_skinnydip_delay = 0.f;
int filament_skinnydip_number_of_dips = 0;
int cooling_moves = 0;
float cooling_initial_speed = 0.f;

View File

@ -478,7 +478,7 @@ static std::vector<std::string> s_Preset_print_options {
static std::vector<std::string> 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_skinnydip_extra_move", "filament_skinnydip_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_unloading_speed", "filament_unloading_speed_start", "filament_unload_time", "filament_toolchange_delay", "filament_skinnydip_extra_move", "filament_cooling_moves", "filament_skinnydip_loading_speed", "filament_skinnydip_unloading_speed", "filament_skinnydip_distance",
"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",

View File

@ -218,11 +218,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|| opt_key == "filament_unloading_speed_start"
|| opt_key == "filament_toolchange_delay"
|| opt_key == "filament_skinnydip_extra_move"
|| opt_key == "filament_skinnydip_delay"
|| 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"

View File

@ -1093,27 +1093,6 @@ 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.");
def->min = 0;
def->mode = comExpert;
def->set_default_value(new ConfigOptionInts { 0 });
def = this->add("filament_skinnydip_number_of_dips", coInts);
def->label = L("ELIAS: Number of skinnydips");
def->tooltip = L("");
def->min = 0;
def->mode = comExpert;
def->set_default_value(new ConfigOptionInts { 0 });
def = this->add("filament_skinnydip_loading_speed", coFloats);
def->label = L("ELIAS: Skinnydip loading speed");
def->tooltip = L("");
@ -1142,14 +1121,6 @@ void PrintConfigDef::init_fff_params()
def->mode = comExpert;
def->set_default_value(new ConfigOptionFloats { 0. });
def = this->add("filament_skinnydip_delay", coFloats);
def->label = L("ELIAS Skinnydip delay");
def->tooltip = L("...");
def->sidetext = L("s");
def->min = 0;
def->mode = comExpert;
def->set_default_value(new ConfigOptionFloats { 0. });
def = this->add("filament_cooling_moves", coInts);
def->label = L("Number of cooling moves");
def->tooltip = L("Filament is cooled by being moved back and forth in the "

View File

@ -724,7 +724,6 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloats, filament_toolchange_delay))
((ConfigOptionFloats, filament_unload_time))
((ConfigOptionInts, filament_cooling_moves))
((ConfigOptionInts, filament_skinnydip_number_of_dips))
((ConfigOptionFloats, filament_cooling_initial_speed))
((ConfigOptionFloats, filament_minimal_purge_on_wipe_tower))
((ConfigOptionFloats, filament_cooling_final_speed))
@ -732,13 +731,10 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionBools, filament_multitool_ramming))
((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))
((ConfigOptionFloats, filament_skinnydip_extra_move))
((ConfigOptionFloats, filament_skinnydip_delay))
((ConfigOptionBool, gcode_comments))
((ConfigOptionEnum<GCodeFlavor>, gcode_flavor))
((ConfigOptionEnum<LabelObjectsStyle>, gcode_label_objects))

View File

@ -2269,14 +2269,10 @@ void TabFilament::build()
optgroup->append_single_option_line("filament_cooling_moves");
optgroup->append_single_option_line("filament_cooling_initial_speed");
optgroup->append_single_option_line("filament_cooling_final_speed");
optgroup->append_single_option_line("filament_skinnydip_number_of_dips");
optgroup->append_single_option_line("filament_skinnydip_move");
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_skinnydip_extra_move");
optgroup->append_single_option_line("filament_skinnydip_delay");
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);