diff --git a/resources/ui_layout/print.ui b/resources/ui_layout/print.ui index eea13508f..e5f232a39 100644 --- a/resources/ui_layout/print.ui +++ b/resources/ui_layout/print.ui @@ -240,7 +240,10 @@ group:label_width$8:sidetext_width$7:Speed for print moves end_line setting:label$Ironing post-process speed:label_width$30:width$4:ironing_speed group:Speed for non-print moves - setting:travel_speed + line:Travel speed + setting:label$xy:travel_speed + setting:label$z:travel_speed_z + end_line group:sidetext_width$7:Modifiers line:First layer speed setting:label_width$8:width$4:first_layer_speed diff --git a/src/libslic3r/GCodeWriter.cpp b/src/libslic3r/GCodeWriter.cpp index 820aa454d..d0c881039 100644 --- a/src/libslic3r/GCodeWriter.cpp +++ b/src/libslic3r/GCodeWriter.cpp @@ -496,7 +496,9 @@ std::string GCodeWriter::_travel_to_z(double z, const std::string &comment) gcode << "G1 Z" << PRECISION(z, 6); else gcode << "G1 Z" << XYZF_NUM(z); - gcode << " F" << XYZF_NUM(this->config.travel_speed.value * 60.0); + + const double speed = this->config.travel_speed_z.value == 0.0 ? this->config.travel_speed.value : this->config.travel_speed_z.value; + gcode << " F" << XYZF_NUM(speed * 60.0); COMMENT(comment); gcode << "\n"; return gcode.str(); diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 1f036c048..83a34835f 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -505,7 +505,7 @@ const std::vector& Preset::print_options() "gap_fill_min_area", "gap_fill_overlap", "gap_fill_speed", - "travel_speed", "first_layer_speed", "perimeter_acceleration", "infill_acceleration", + "travel_speed", "travel_speed_z", "first_layer_speed", "perimeter_acceleration", "infill_acceleration", "bridge_acceleration", "first_layer_acceleration", "default_acceleration", "duplicate_distance", "skirts", "skirt_distance", "skirt_height", diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 2a8ea4937..2fb2aaa51 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -173,6 +173,7 @@ bool Print::invalidate_state_by_config_options(const std::vectormode = comAdvanced; def->set_default_value(new ConfigOptionFloat(130)); + def = this->add("travel_speed_z", coFloat); + def->label = L("Z Travel"); + def->full_label = L("Z travel speed"); + def->category = OptionCategory::speed; + def->tooltip = L("Speed for movements along the Z axis.\nWhen set to zero, this value " + "is ignored and regular travel speed is used instead."); + def->sidetext = L("mm/s"); + def->aliases = { "travel_feed_rate_z" }; + def->min = 0; + def->mode = comExpert; + def->set_default_value(new ConfigOptionFloat(0.)); + def = this->add("use_firmware_retraction", coBool); def->label = L("Use firmware retraction"); def->category = OptionCategory::general; @@ -5475,7 +5487,7 @@ void PrintConfigDef::to_prusa(t_config_option_key& opt_key, std::string& value, "top_infill_extrusion_spacing", "start_gcode_manual", "perimeter_round_corners", - +"travel_speed_z", }; //looks if it's to be removed, or have to be transformed if (to_remove_keys.find(opt_key) != to_remove_keys.end()) { diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index eb638f84c..c11c5c8cb 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -1106,6 +1106,7 @@ public: ConfigOptionStrings tool_name; ConfigOptionString toolchange_gcode; ConfigOptionFloat travel_speed; + ConfigOptionFloat travel_speed_z; ConfigOptionBool use_firmware_retraction; ConfigOptionBool use_relative_e_distances; ConfigOptionBool use_volumetric_e; @@ -1218,6 +1219,7 @@ protected: OPT_PTR(tool_name); OPT_PTR(toolchange_gcode); OPT_PTR(travel_speed); + OPT_PTR(travel_speed_z); OPT_PTR(use_firmware_retraction); OPT_PTR(use_relative_e_distances); OPT_PTR(use_volumetric_e);