Added option to independently set z axis travel speed

This commit is contained in:
Martin Budden 2021-04-16 08:41:03 +01:00 committed by Lukas Matena
parent e1f2336b8e
commit bd6badf123
6 changed files with 13 additions and 2 deletions

View File

@ -370,7 +370,7 @@ std::string GCodeWriter::_travel_to_z(double z, const std::string &comment)
std::ostringstream gcode; std::ostringstream gcode;
gcode << "G1 Z" << XYZF_NUM(z) gcode << "G1 Z" << XYZF_NUM(z)
<< " F" << XYZF_NUM(this->config.travel_speed.value * 60.0); << " F" << XYZF_NUM(this->config.travel_speed_z.value * 60.0);
COMMENT(comment); COMMENT(comment);
gcode << "\n"; gcode << "\n";
return gcode.str(); return gcode.str();

View File

@ -430,7 +430,7 @@ const std::vector<std::string>& Preset::print_options()
#endif /* HAS_PRESSURE_EQUALIZER */ #endif /* HAS_PRESSURE_EQUALIZER */
"perimeter_speed", "small_perimeter_speed", "external_perimeter_speed", "infill_speed", "solid_infill_speed", "perimeter_speed", "small_perimeter_speed", "external_perimeter_speed", "infill_speed", "solid_infill_speed",
"top_solid_infill_speed", "support_material_speed", "support_material_xy_spacing", "support_material_interface_speed", "top_solid_infill_speed", "support_material_speed", "support_material_xy_spacing", "support_material_interface_speed",
"bridge_speed", "gap_fill_speed", "gap_fill_enabled", "travel_speed", "first_layer_speed", "perimeter_acceleration", "infill_acceleration", "bridge_speed", "gap_fill_speed", "gap_fill_enabled", "travel_speed", "travel_speed_z", "first_layer_speed", "perimeter_acceleration", "infill_acceleration",
"bridge_acceleration", "first_layer_acceleration", "default_acceleration", "skirts", "skirt_distance", "skirt_height", "draft_shield", "bridge_acceleration", "first_layer_acceleration", "default_acceleration", "skirts", "skirt_distance", "skirt_height", "draft_shield",
"min_skirt_length", "brim_width", "brim_offset", "brim_type", "support_material", "support_material_auto", "support_material_threshold", "support_material_enforce_layers", "min_skirt_length", "brim_width", "brim_offset", "brim_type", "support_material", "support_material_auto", "support_material_threshold", "support_material_enforce_layers",
"raft_layers", "raft_first_layer_density", "raft_first_layer_expansion", "raft_contact_distance", "raft_expansion", "raft_layers", "raft_first_layer_density", "raft_first_layer_expansion", "raft_contact_distance", "raft_expansion",

View File

@ -197,6 +197,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|| opt_key == "cooling_tube_length" || opt_key == "cooling_tube_length"
|| opt_key == "extra_loading_move" || opt_key == "extra_loading_move"
|| opt_key == "travel_speed" || opt_key == "travel_speed"
|| opt_key == "travel_speed_z"
|| opt_key == "first_layer_speed" || opt_key == "first_layer_speed"
|| opt_key == "z_offset") { || opt_key == "z_offset") {
steps.emplace_back(psWipeTower); steps.emplace_back(psWipeTower);

View File

@ -2738,6 +2738,14 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced; def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(130)); def->set_default_value(new ConfigOptionFloat(130));
def = this->add("travel_speed_z", coFloat);
def->label = L("Z travel");
def->tooltip = L("Speed for movements along the Z axis.");
def->sidetext = L("mm/s");
def->min = 1;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(12));
def = this->add("use_firmware_retraction", coBool); def = this->add("use_firmware_retraction", coBool);
def->label = L("Use firmware retraction"); def->label = L("Use firmware retraction");
def->tooltip = L("This experimental setting uses G10 and G11 commands to have the firmware " def->tooltip = L("This experimental setting uses G10 and G11 commands to have the firmware "

View File

@ -627,6 +627,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionBool, wipe_tower_no_sparse_layers)) ((ConfigOptionBool, wipe_tower_no_sparse_layers))
((ConfigOptionString, toolchange_gcode)) ((ConfigOptionString, toolchange_gcode))
((ConfigOptionFloat, travel_speed)) ((ConfigOptionFloat, travel_speed))
((ConfigOptionFloat, travel_speed_z))
((ConfigOptionBool, use_firmware_retraction)) ((ConfigOptionBool, use_firmware_retraction))
((ConfigOptionBool, use_relative_e_distances)) ((ConfigOptionBool, use_relative_e_distances))
((ConfigOptionBool, use_volumetric_e)) ((ConfigOptionBool, use_volumetric_e))

View File

@ -1545,6 +1545,7 @@ void TabPrint::build()
optgroup = page->new_optgroup(L("Speed for non-print moves")); optgroup = page->new_optgroup(L("Speed for non-print moves"));
optgroup->append_single_option_line("travel_speed"); optgroup->append_single_option_line("travel_speed");
optgroup->append_single_option_line("travel_speed_z");
optgroup = page->new_optgroup(L("Modifiers")); optgroup = page->new_optgroup(L("Modifiers"));
optgroup->append_single_option_line("first_layer_speed"); optgroup->append_single_option_line("first_layer_speed");