Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsupermerill <merill@free.fr>2022-03-26 20:18:36 +0300
committersupermerill <merill@free.fr>2022-03-27 23:37:47 +0300
commit67fb7c06eb7b8c984f391dc2af52d88889c2cd28 (patch)
tree273a5ddb6b1052b299215f573bd12387d939db1f /src
parentad9c852bde809a473e49fbfea6710b3aa11d2a1a (diff)
change min layer times from int to float
supermerill/SuperSlicer#2574
Diffstat (limited to 'src')
-rw-r--r--src/libslic3r/PrintConfig.cpp8
-rw-r--r--src/libslic3r/PrintConfig.hpp4
-rw-r--r--src/slic3r/GUI/CalibrationRetractionDialog.cpp6
-rw-r--r--src/slic3r/GUI/PresetHints.cpp4
-rw-r--r--src/slic3r/GUI/Tab.cpp6
5 files changed, 14 insertions, 14 deletions
diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp
index 18c913ae5..652b683a9 100644
--- a/src/libslic3r/PrintConfig.cpp
+++ b/src/libslic3r/PrintConfig.cpp
@@ -1714,7 +1714,7 @@ void PrintConfigDef::init_fff_params()
def->is_vector_extruder = true;
def->set_default_value(new ConfigOptionBools{ true });
- def = this->add("fan_below_layer_time", coInts);
+ def = this->add("fan_below_layer_time", coFloats);
def->label = L("Enable fan if layer print time is below");
def->category = OptionCategory::cooling;
def->tooltip = L("If layer print time is estimated below this number of seconds, fan will be enabled "
@@ -1725,7 +1725,7 @@ void PrintConfigDef::init_fff_params()
def->max = 1000;
def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
- def->set_default_value(new ConfigOptionInts { 60 });
+ def->set_default_value(new ConfigOptionFloats { 60 });
def = this->add("filament_colour", coStrings);
def->label = L("Color");
@@ -4370,7 +4370,7 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvancedE | comPrusa;
def->set_default_value(new ConfigOptionEnum<SlicingMode>(SlicingMode::Regular));
- def = this->add("slowdown_below_layer_time", coInts);
+ def = this->add("slowdown_below_layer_time", coFloats);
def->label = L("Slow down if layer print time is below");
def->category = OptionCategory::cooling;
def->tooltip = L("If layer print time is estimated below this number of seconds, print moves "
@@ -4381,7 +4381,7 @@ void PrintConfigDef::init_fff_params()
def->max = 1000;
def->mode = comExpert | comPrusa;
def->is_vector_extruder = true;
- def->set_default_value(new ConfigOptionInts{ 5 });
+ def->set_default_value(new ConfigOptionFloats{ 5 });
def = this->add("small_perimeter_speed", coFloatOrPercent);
def->label = L("Speed");
diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp
index 747b6c0f2..b507e813e 100644
--- a/src/libslic3r/PrintConfig.hpp
+++ b/src/libslic3r/PrintConfig.hpp
@@ -1101,7 +1101,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionStrings, extruder_colour))
((ConfigOptionPoints, extruder_offset))
((ConfigOptionBools, fan_always_on))
- ((ConfigOptionInts, fan_below_layer_time))
+ ((ConfigOptionFloats, fan_below_layer_time))
((ConfigOptionStrings, filament_colour))
((ConfigOptionStrings, filament_custom_variables))
((ConfigOptionStrings, filament_notes))
@@ -1156,7 +1156,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE(
((ConfigOptionFloatOrPercent, skirt_extrusion_width))
((ConfigOptionFloatsOrPercents, seam_gap))
((ConfigOptionInt, skirts))
- ((ConfigOptionInts, slowdown_below_layer_time))
+ ((ConfigOptionFloats, slowdown_below_layer_time))
((ConfigOptionBool, spiral_vase))
((ConfigOptionFloatOrPercent, solid_infill_acceleration))
((ConfigOptionInt, standby_temperature_delta))
diff --git a/src/slic3r/GUI/CalibrationRetractionDialog.cpp b/src/slic3r/GUI/CalibrationRetractionDialog.cpp
index 6b2b63231..5604513cf 100644
--- a/src/slic3r/GUI/CalibrationRetractionDialog.cpp
+++ b/src/slic3r/GUI/CalibrationRetractionDialog.cpp
@@ -80,14 +80,14 @@ void CalibrationRetractionDialog::remove_slowdown(wxCommandEvent& event_args) {
const DynamicPrintConfig* filament_config = this->gui_app->get_tab(Preset::TYPE_FFF_FILAMENT)->get_config();
DynamicPrintConfig new_filament_config = *filament_config; //make a copy
- const ConfigOptionInts *fil_conf = filament_config->option<ConfigOptionInts>("slowdown_below_layer_time");
- ConfigOptionInts *new_fil_conf = new ConfigOptionInts();
+ const ConfigOptionFloats *fil_conf = filament_config->option<ConfigOptionFloats>("slowdown_below_layer_time");
+ ConfigOptionFloats *new_fil_conf = new ConfigOptionFloats();
new_fil_conf->default_value = 5;
new_fil_conf->values = fil_conf->values;
new_fil_conf->values[0] = 0;
new_filament_config.set_key_value("slowdown_below_layer_time", new_fil_conf);
- fil_conf = filament_config->option<ConfigOptionInts>("fan_below_layer_time"); new_fil_conf = new ConfigOptionInts();
+ fil_conf = filament_config->option<ConfigOptionFloats>("fan_below_layer_time"); new_fil_conf = new ConfigOptionFloats();
new_fil_conf->default_value = 60;
new_fil_conf->values = fil_conf->values;
new_fil_conf->values[0] = 0;
diff --git a/src/slic3r/GUI/PresetHints.cpp b/src/slic3r/GUI/PresetHints.cpp
index d58da2894..6a9d1d722 100644
--- a/src/slic3r/GUI/PresetHints.cpp
+++ b/src/slic3r/GUI/PresetHints.cpp
@@ -26,10 +26,10 @@ std::string PresetHints::cooling_description(const Preset &preset)
int ext_peri_fan_speed = preset.config.opt_int("external_perimeter_fan_speed", 0);
int disable_fan_first_layers = preset.config.opt_int("disable_fan_first_layers", 0);
int full_fan_speed_layer = preset.config.opt_int("full_fan_speed_layer", 0);
- int slowdown_below_layer_time = preset.config.opt_int("slowdown_below_layer_time", 0);
+ float slowdown_below_layer_time = preset.config.opt_float("slowdown_below_layer_time", 0);
int min_print_speed = int(preset.config.opt_float("min_print_speed", 0) + 0.5);
int max_speed_reduc = int(preset.config.opt_float("max_speed_reduction", 0));
- int fan_below_layer_time = preset.config.opt_int("fan_below_layer_time", 0);
+ float fan_below_layer_time = preset.config.opt_float("fan_below_layer_time", 0);
//for the time being, -1 shoudl eb for disabel, but it's 0 from legacy.
if (top_fan_speed == 0) top_fan_speed = -1;
diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp
index 7cf794710..d06ceb817 100644
--- a/src/slic3r/GUI/Tab.cpp
+++ b/src/slic3r/GUI/Tab.cpp
@@ -2807,10 +2807,10 @@ void TabFilament::toggle_options()
{
bool fan_always_on = m_config->opt_bool("fan_always_on", 0);
- //get_field("max_fan_speed")->toggle(m_config->opt_int("fan_below_layer_time", 0) > 0);
+ //get_field("max_fan_speed")->toggle(m_config->opt_float("fan_below_layer_time", 0) > 0);
Field* min_print_speed_field = get_field("min_print_speed");
if (min_print_speed_field)
- min_print_speed_field->toggle(m_config->opt_int("slowdown_below_layer_time", 0) > 0);
+ min_print_speed_field->toggle(m_config->opt_float("slowdown_below_layer_time", 0) > 0);
// hidden 'cooling', it's now deactivated.
//for (auto el : { "min_fan_speed", "disable_fan_first_layers" })
@@ -2823,7 +2823,7 @@ void TabFilament::toggle_options()
Field* max_fan_speed_field = get_field("max_fan_speed");
if (max_fan_speed_field)
- max_fan_speed_field->toggle(m_config->opt_int("fan_below_layer_time", 0) > 0 || m_config->opt_int("slowdown_below_layer_time", 0) > 0);
+ max_fan_speed_field->toggle(m_config->opt_float("fan_below_layer_time", 0) > 0 || m_config->opt_float("slowdown_below_layer_time", 0) > 0);
}
update_filament_overrides_page();