mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-07 00:39:05 +08:00
Connected filament_ramming_parameters to respective dialog, other minor changes
This commit is contained in:
parent
56fef5302c
commit
1b4dc685f4
@ -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;
|
||||
|
@ -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<float> ramming_speed;
|
||||
|
@ -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@";
|
||||
|
@ -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<GCodeFlavor> gcode_flavor;
|
||||
|
@ -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<ConfigOptionStrings>("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<ConfigOptionStrings>("filament_ramming_parameters"))->get_at(0) = dlg.get_parameters();
|
||||
}));
|
||||
return sizer;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user