diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index 7c8181ff6..0c8f4fe9f 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -800,7 +800,7 @@ void WipeTowerPrusaMM::toolchange_Unload( const float start_x = writer.x(); turning_point = ( xr-start_x > start_x-xl ? xr : xl ); const float max_x_dist = 2*std::abs(start_x-turning_point); - const unsigned int N = 4 + std::max(0,(m_filpar[m_current_tool].cooling_time-14)/3); + const unsigned int N = 4 + std::max(0.f, (m_filpar[m_current_tool].cooling_time-14)/3); float time = m_filpar[m_current_tool].cooling_time / float(N); i = 0; diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp index 4f97f700f..636b4b738 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.hpp @@ -67,7 +67,7 @@ public: // Set the extruder properties. void set_extruder(size_t idx, material_type material, int temp, int first_layer_temp, float loading_speed, - float unloading_speed, float delay, int cooling_time, std::string ramming_parameters) + float unloading_speed, float delay, float cooling_time, std::string ramming_parameters) { //while (m_filpar.size() < idx+1) // makes sure the required element is in the vector m_filpar.push_back(FilamentParameters()); @@ -205,7 +205,7 @@ private: float loading_speed = 0.f; float unloading_speed = 0.f; float delay = 0.f ; - int cooling_time = 0; + float cooling_time = 0.f; float ramming_line_width_multiplicator = 0.f; float ramming_step_multiplicator = 0.f; std::vector ramming_speed; diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index cb5bcea4a..aef9a8fa2 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -470,14 +470,14 @@ PrintConfigDef::PrintConfigDef() def->min = 0; def->default_value = new ConfigOptionFloats { 0. }; - def = this->add("filament_cooling_time", coInts); + def = this->add("filament_cooling_time", coFloats); def->label = L("Cooling time"); def->tooltip = L("The filament is slowly moved back and forth after retraction into the cooling tube " "for this amount of time."); def->cli = "filament_cooling_time=i@"; def->sidetext = L("s"); def->min = 0; - def->default_value = new ConfigOptionInts { 14 }; + def->default_value = new ConfigOptionFloats { 14.f }; def = this->add("filament_ramming_parameters", coStrings); def->label = L("Ramming parameters"); @@ -1779,7 +1779,7 @@ PrintConfigDef::PrintConfigDef() def->default_value = new ConfigOptionBool(false); def = this->add("wiping_volumes_extruders", coFloats); - def->label = L("Extrusion multiplier"); + def->label = L("Purging volumes - load/unload volumes"); def->tooltip = L("This vector saves required volumes to change from/to each tool used on the " "wipe tower. These values are used to simplify creation of the full purging " "volumes below. "); @@ -1787,7 +1787,7 @@ PrintConfigDef::PrintConfigDef() def->default_value = new ConfigOptionFloats { 50.f, 50.f, 50.f, 50.f, 50.f, 50.f, 50.f, 50.f, 50.f, 50.f }; def = this->add("wiping_volumes_matrix", coFloats); - def->label = L("Extrusion multiplier"); + def->label = L("Purging volumes - matrix"); def->tooltip = L("This matrix describes volumes (in cubic milimetres) required to purge the" " new filament on the wipe tower for any given pair of tools. "); def->cli = "wiping-volumes-matrix=f@"; diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index d184a2161..be64d35bd 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -469,7 +469,7 @@ public: ConfigOptionFloats filament_loading_speed; ConfigOptionFloats filament_unloading_speed; ConfigOptionFloats filament_toolchange_delay; - ConfigOptionInts filament_cooling_time; + ConfigOptionFloats filament_cooling_time; ConfigOptionStrings filament_ramming_parameters; ConfigOptionBool gcode_comments; ConfigOptionEnum gcode_flavor; diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp index 267e579b6..82d4c456d 100644 --- a/xs/src/slic3r/GUI/Tab.cpp +++ b/xs/src/slic3r/GUI/Tab.cpp @@ -521,7 +521,7 @@ void TabPrint::build() optgroup->append_single_option_line("wipe_tower_bridging"); line = { _(L("Advanced")), "" }; line.widget = [this](wxWindow* parent){ - m_wipe_tower_btn = new wxButton(parent, wxID_ANY, _(L("Advanced settings"))+"\u2026", wxDefaultPosition, wxDefaultSize, wxBU_LEFT | wxBU_EXACTFIT); + m_wipe_tower_btn = new wxButton(parent, wxID_ANY, _(L("Purging volumes"))+"\u2026", wxDefaultPosition, wxDefaultSize, wxBU_LEFT | wxBU_EXACTFIT); auto sizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add(m_wipe_tower_btn); m_wipe_tower_btn->Bind(wxEVT_BUTTON, ([this](wxCommandEvent& e) @@ -958,10 +958,8 @@ void TabFilament::build() ramming_dialog_btn->Bind(wxEVT_BUTTON, ([this](wxCommandEvent& e) { RammingDialog dlg(this,(m_config->option("filament_ramming_parameters"))->get_at(0)); - if (dlg.ShowModal() == wxID_OK) { - wxMessageBox("DIALOG OK:\n"+dlg.get_parameters()); - //load_key_value("wipe_tower_advanced", dlg.get_parameters()); - } + if (dlg.ShowModal() == wxID_OK) + (m_config->option("filament_ramming_parameters"))->get_at(0) = dlg.get_parameters(); })); return sizer; };