diff options
author | supermerill <merill@free.fr> | 2022-02-14 01:48:41 +0300 |
---|---|---|
committer | supermerill <merill@free.fr> | 2022-02-14 01:48:41 +0300 |
commit | e9184dbfb9c26e7ad86c230493d914407a932e36 (patch) | |
tree | 1308622f7e12419960087485f11ce52e331ac775 /src/libslic3r/PrintConfig.cpp | |
parent | 3c7655b1be330b060bc9b13e331a2bdb2a76dcbb (diff) | |
parent | 2b908bc196b4a71cd4c49f16a8283a34924babc7 (diff) |
merge 2.3.57.11 fixes
also a fix for 2.4.1 merge (missing preset)
Diffstat (limited to 'src/libslic3r/PrintConfig.cpp')
-rw-r--r-- | src/libslic3r/PrintConfig.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 3714ee416..f7771d67e 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2371,12 +2371,13 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionFloatOrPercent(30, false)); def = this->add("first_layer_infill_speed", coFloatOrPercent); - def->label = L("Infill"); - def->full_label = L("Infill first layer speed"); + def->label = L("Max infill"); + def->full_label = L("Infill max first layer speed"); def->category = OptionCategory::speed; def->tooltip = L("If expressed as absolute value in mm/s, this speed will be applied as a maximum for all infill print moves of the first layer." "\nIf expressed as a percentage it will scale the current infill speed." - "\nSet it at 100% to remove any infill first layer speed modification."); + "\nSet it at 100% to remove any infill first layer speed modification." + "\nSet zero to disable (using first_layer_speed instead)."); def->sidetext = L("mm/s or %"); def->ratio_over = "depends"; def->min = 0; @@ -4314,7 +4315,8 @@ void PrintConfigDef::init_fff_params() def->full_label = L("Small perimeters speed"); def->category = OptionCategory::speed; def->tooltip = L("This separate setting will affect the speed of perimeters having radius <= 6.5mm (usually holes)." - "\nIf expressed as percentage (for example: 80%) it will be calculated on the Internal Perimeters speed setting above. Set zero for auto."); + "\nIf expressed as percentage (for example: 80%) it will be calculated on the Internal Perimeters speed setting above." + "\nSet zero to disable."); def->sidetext = L("mm/s or %"); def->ratio_over = "perimeter_speed"; def->min = 0; @@ -7633,6 +7635,7 @@ std::set<const DynamicPrintConfig*> DynamicPrintConfig::value_changed(const t_co if (opt_key.find("extrusion_width") != std::string::npos) { const ConfigOptionFloats* nozzle_diameter_option = find_option<ConfigOptionFloats>("nozzle_diameter", this, config_collection); const ConfigOptionFloat* layer_height_option = find_option<ConfigOptionFloat>("layer_height", this, config_collection); + ConfigOptionFloatOrPercent* default_width_option = this->option<ConfigOptionFloatOrPercent>("extrusion_width"); ConfigOptionFloatOrPercent* width_option = this->option<ConfigOptionFloatOrPercent>(opt_key); float overlap_ratio = 1; const ConfigOptionPercents* filament_max_overlap_option = find_option<ConfigOptionPercents>("filament_max_overlap", this, config_collection); @@ -7649,7 +7652,7 @@ std::set<const DynamicPrintConfig*> DynamicPrintConfig::value_changed(const t_co if (width_option) { width_option->set_phony(false); spacing_option->set_phony(true); - Flow flow = Flow::new_from_config_width(FlowRole::frPerimeter, *width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); + Flow flow = Flow::new_from_config_width(FlowRole::frPerimeter, width_option->value == 0 ? *width_option : *default_width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); if (flow.width() < flow.height()) flow.with_height(flow.width()); spacing_option->value = (width_option->percent) ? std::round(100 * flow.spacing() / max_nozzle_diameter) : (std::round(flow.spacing() * 10000) / 10000); spacing_option->percent = width_option->percent; @@ -7661,7 +7664,7 @@ std::set<const DynamicPrintConfig*> DynamicPrintConfig::value_changed(const t_co if (width_option) { width_option->set_phony(false); spacing_option->set_phony(true); - Flow flow = Flow::new_from_config_width(FlowRole::frPerimeter, *width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); + Flow flow = Flow::new_from_config_width(FlowRole::frPerimeter, width_option->value == 0 ? *width_option : *default_width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); if (flow.width() < flow.height()) flow.with_height(flow.width()); spacing_option->value = (width_option->percent) ? std::round(100 * flow.spacing() / max_nozzle_diameter) : (std::round(flow.spacing() * 10000) / 10000); spacing_option->percent = width_option->percent; @@ -7674,7 +7677,7 @@ std::set<const DynamicPrintConfig*> DynamicPrintConfig::value_changed(const t_co if (width_option && perimeter_overlap_option) { width_option->set_phony(false); spacing_option->set_phony(true); - Flow flow = Flow::new_from_config_width(FlowRole::frExternalPerimeter, *width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); + Flow flow = Flow::new_from_config_width(FlowRole::frExternalPerimeter, width_option->value == 0 ? *width_option : *default_width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); if (flow.width() < flow.height()) flow = flow.with_height(flow.width()); flow = flow.with_spacing_ratio(std::min(flow.spacing_ratio(), (float)perimeter_overlap_option->get_abs_value(1))); spacing_option->value = (width_option->percent) ? std::round(100 * flow.spacing() / max_nozzle_diameter) : (std::round(flow.spacing() * 10000) / 10000); @@ -7688,7 +7691,7 @@ std::set<const DynamicPrintConfig*> DynamicPrintConfig::value_changed(const t_co if (width_option && external_perimeter_overlap_option) { width_option->set_phony(false); spacing_option->set_phony(true); - Flow ext_perimeter_flow = Flow::new_from_config_width(FlowRole::frPerimeter, *width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); + Flow ext_perimeter_flow = Flow::new_from_config_width(FlowRole::frPerimeter, width_option->value == 0 ? *width_option : *default_width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); if (ext_perimeter_flow.width() < ext_perimeter_flow.height()) ext_perimeter_flow = ext_perimeter_flow.with_height(ext_perimeter_flow.width()); ext_perimeter_flow = ext_perimeter_flow.with_spacing_ratio(std::min(ext_perimeter_flow.spacing_ratio() * 0.5f, float(external_perimeter_overlap_option->get_abs_value(0.5)))); spacing_option->value = (width_option->percent) ? std::round(100 * ext_perimeter_flow.spacing() / max_nozzle_diameter) : (std::round(ext_perimeter_flow.spacing() * 10000) / 10000); @@ -7701,7 +7704,7 @@ std::set<const DynamicPrintConfig*> DynamicPrintConfig::value_changed(const t_co if (width_option) { width_option->set_phony(false); spacing_option->set_phony(true); - Flow flow = Flow::new_from_config_width(FlowRole::frInfill, *width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); + Flow flow = Flow::new_from_config_width(FlowRole::frInfill, width_option->value == 0 ? *width_option : *default_width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); if (flow.width() < flow.height()) flow = flow.with_height(flow.width()); spacing_option->value = (width_option->percent) ? std::round(100 * flow.spacing() / max_nozzle_diameter) : (std::round(flow.spacing() * 10000) / 10000); spacing_option->percent = width_option->percent; @@ -7714,7 +7717,7 @@ std::set<const DynamicPrintConfig*> DynamicPrintConfig::value_changed(const t_co if (width_option) { width_option->set_phony(false); spacing_option->set_phony(true); - Flow flow = Flow::new_from_config_width(FlowRole::frSolidInfill, *width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); + Flow flow = Flow::new_from_config_width(FlowRole::frSolidInfill, width_option->value == 0 ? *width_option : *default_width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); if (flow.width() < flow.height()) flow = flow.with_height(flow.width()); flow = flow.with_spacing_ratio(std::min(flow.spacing_ratio(), float(solid_infill_overlap_option->get_abs_value(1.)))); spacing_option->value = (width_option->percent) ? std::round(100 * flow.spacing() / max_nozzle_diameter) : (std::round(flow.spacing() * 10000) / 10000); @@ -7727,7 +7730,7 @@ std::set<const DynamicPrintConfig*> DynamicPrintConfig::value_changed(const t_co if (width_option) { width_option->set_phony(false); spacing_option->set_phony(true); - Flow flow = Flow::new_from_config_width(FlowRole::frTopSolidInfill, *width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); + Flow flow = Flow::new_from_config_width(FlowRole::frTopSolidInfill, width_option->value == 0 ? *width_option : *default_width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); if (flow.width() < flow.height()) flow = flow.with_height(flow.width()); spacing_option->value = (width_option->percent) ? std::round(100 * flow.spacing() / max_nozzle_diameter) : (std::round(flow.spacing() * 10000) / 10000); spacing_option->percent = width_option->percent; @@ -7735,7 +7738,7 @@ std::set<const DynamicPrintConfig*> DynamicPrintConfig::value_changed(const t_co } } //if (opt_key == "support_material_extrusion_width") { - // Flow flow = Flow::new_from_config_width(FlowRole::frSupportMaterial, *width_option, max_nozzle_diameter, layer_height_option->value, 0); + // Flow flow = Flow::new_from_config_width(FlowRole::frSupportMaterial, width_option->value == 0 ? *width_option : *default_width_option, max_nozzle_diameter, layer_height_option->value, 0); // if (width_option->percent) // this->set_key_value("support_material_extrusion_spacing", new ConfigOptionFloatOrPercent(std::round(100 * flow.spacing() / max_nozzle_diameter), true)); // else @@ -7743,7 +7746,7 @@ std::set<const DynamicPrintConfig*> DynamicPrintConfig::value_changed(const t_co // something_changed = true; //} //if (opt_key == "skirt_extrusion_width") { - // Flow flow = Flow::new_from_config_width(FlowRole::frPerimeter, *width_option, max_nozzle_diameter, layer_height_option->value, 0); + // Flow flow = Flow::new_from_config_width(FlowRole::frPerimeter, width_option->value == 0 ? *width_option : *default_width_option, max_nozzle_diameter, layer_height_option->value, 0); // if (width_option->percent) // this->set_key_value("skirt_extrusion_spacing", new ConfigOptionFloatOrPercent(std::round(100 * flow.spacing() / max_nozzle_diameter), true)); // else @@ -7765,7 +7768,7 @@ std::set<const DynamicPrintConfig*> DynamicPrintConfig::value_changed(const t_co width_option->percent = true; width_option->set_phony(false); spacing_option->set_phony(true); - Flow flow = Flow::new_from_config_width(FlowRole::frPerimeter, *width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); + Flow flow = Flow::new_from_config_width(FlowRole::frPerimeter, width_option->value == 0 ? *width_option : *default_width_option, max_nozzle_diameter, layer_height_option->value, overlap_ratio, 0); spacing_option->value = (width_option->percent) ? std::round(100 * flow.spacing() / max_nozzle_diameter) : (std::round(flow.spacing() * 10000) / 10000); spacing_option->percent = width_option->percent; something_changed = true; |