diff --git a/resources/profiles/Anycubic.json b/resources/profiles/Anycubic.json index fbf6502645..3d15169e5e 100644 --- a/resources/profiles/Anycubic.json +++ b/resources/profiles/Anycubic.json @@ -1,6 +1,6 @@ { "name": "Anycubic", - "version": "01.02.00.02", + "version": "01.02.00.03", "force_update": "0", "description": "Anycubic configurations", "machine_model_list": [ diff --git a/resources/profiles/Anycubic/machine/fdm_machine_common.json b/resources/profiles/Anycubic/machine/fdm_machine_common.json index 8680aa36fb..8897f0444f 100644 --- a/resources/profiles/Anycubic/machine/fdm_machine_common.json +++ b/resources/profiles/Anycubic/machine/fdm_machine_common.json @@ -134,5 +134,6 @@ "machine_pause_gcode": "M400 U1\n", "wipe": [ "1" - ] + ], + "z_lift_type": "NormalLift" } diff --git a/resources/profiles/Anycubic/process/fdm_process_common.json b/resources/profiles/Anycubic/process/fdm_process_common.json index 5e7ee1fb7e..d1e28bb1d5 100644 --- a/resources/profiles/Anycubic/process/fdm_process_common.json +++ b/resources/profiles/Anycubic/process/fdm_process_common.json @@ -101,5 +101,7 @@ "internal_solid_infill_speed": "150", "top_surface_speed": "50", "gap_infill_speed": "30", - "travel_speed": "200" + "travel_speed": "200", + "enable_arc_fitting": "0" + } diff --git a/resources/profiles/Voron.json b/resources/profiles/Voron.json index a6d5ba4d8b..43c0b91751 100644 --- a/resources/profiles/Voron.json +++ b/resources/profiles/Voron.json @@ -1,6 +1,6 @@ { "name": "Voron", - "version": "01.02.00.03", + "version": "01.02.00.04", "force_update": "0", "description": "Voron configurations", "machine_model_list": [ diff --git a/resources/profiles/Voron/machine/fdm_klipper_common.json b/resources/profiles/Voron/machine/fdm_klipper_common.json index e329d490fd..a554b495f5 100644 --- a/resources/profiles/Voron/machine/fdm_klipper_common.json +++ b/resources/profiles/Voron/machine/fdm_klipper_common.json @@ -116,6 +116,7 @@ "deretraction_speed": [ "30" ], + "z_lift_type": "NormalLift", "silent_mode": "0", "single_extruder_multi_material": "1", "change_filament_gcode": "", diff --git a/resources/profiles/Voron/process/fdm_process_voron_common.json b/resources/profiles/Voron/process/fdm_process_voron_common.json index f5ce26ed43..d29395944a 100644 --- a/resources/profiles/Voron/process/fdm_process_voron_common.json +++ b/resources/profiles/Voron/process/fdm_process_voron_common.json @@ -102,6 +102,7 @@ "prime_tower_width": "35", "xy_hole_compensation": "0", "xy_contour_compensation": "0", + "enable_arc_fitting": "0", "compatible_printers": [ "Voron 2.4 250 0.4 nozzle", "Voron 2.4 300 0.4 nozzle", diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index cf1405fae5..7e7c5d7527 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -3953,7 +3953,11 @@ std::string GCode::retract(bool toolchange, bool is_last_retraction) if (m_writer.extruder()->retraction_length() > 0) { // BBS: don't do lazy_lift when enable spiral vase size_t extruder_id = m_writer.extruder()->id(); - gcode += m_writer.lift((!m_spiral_vase && m_config.enable_arc_fitting) ? LiftType::SpiralLift : LiftType::NormalLift); + auto _lift = m_config.z_lift_type.value; + if(m_spiral_vase) + _lift = NormalLift; + + gcode += m_writer.lift(_lift); } return gcode; diff --git a/src/libslic3r/GCodeWriter.hpp b/src/libslic3r/GCodeWriter.hpp index a845816096..3920b71808 100644 --- a/src/libslic3r/GCodeWriter.hpp +++ b/src/libslic3r/GCodeWriter.hpp @@ -11,12 +11,6 @@ namespace Slic3r { -enum class LiftType { - NormalLift, - LazyLift, - SpiralLift -}; - class GCodeWriter { public: GCodeConfig config; diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 773e7da27b..487c44be84 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -722,7 +722,7 @@ static std::vector s_Preset_machine_limits_options { static std::vector s_Preset_printer_options { "printer_technology", - "printable_area", "bed_exclude_area", "gcode_flavor", + "printable_area", "bed_exclude_area", "gcode_flavor","z_lift_type", "single_extruder_multi_material", "machine_start_gcode", "machine_end_gcode", "before_layer_change_gcode", "layer_change_gcode", "change_filament_gcode", "printer_model", "printer_variant", "printable_height", "extruder_clearance_radius", "extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod", "default_print_profile", "inherits", diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 89dc94d5dd..d7c6d1002f 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -129,6 +129,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n "filament_start_gcode", "change_filament_gcode", "wipe", + "z_lift_type", // BBS "wipe_distance", "curr_bed_type", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index cfc305d5bb..42b529000b 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -105,6 +105,15 @@ static t_config_enum_values s_keys_map_GCodeFlavor { }; CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(GCodeFlavor) + +static t_config_enum_values s_keys_map_LiftType { + { "NormalLift", int(LiftType::NormalLift) }, + { "LazyLift", int(LiftType::LazyLift) }, + { "SpiralLift", int(LiftType::SpiralLift) } +}; +CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(LiftType) + + static t_config_enum_values s_keys_map_FuzzySkinType { { "none", int(FuzzySkinType::None) }, { "external", int(FuzzySkinType::External) }, @@ -2794,6 +2803,19 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionBools { false }); + def = this->add("z_lift_type", coEnum); + def->label = L("z lift type"); + def->tooltip = L("z lift type"); + def->enum_keys_map = &ConfigOptionEnum::get_enum_values(); + def->enum_values.push_back("NormalLift"); + def->enum_values.push_back("SpiralLift"); + // def->enum_values.push_back("LazyLift"); + def->enum_labels.push_back(L("NormalLift")); + def->enum_labels.push_back(L("SpiralLift")); + // def->enum_labels.push_back(L("LazyLift")); + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionEnum(LiftType::SpiralLift)); + def = this->add("wipe_distance", coFloats); def->label = L("Wipe Distance"); def->tooltip = L("Discribe how long the nozzle will move along the last path when retracting"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 95501ac3e2..474aa8bdc2 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -115,6 +115,12 @@ enum SeamPosition { spNearest, spAligned, spRear, spRandom }; +enum LiftType { + NormalLift, + SpiralLift, + LazyLift +}; + enum SLAMaterial { slamTough, slamFlex, @@ -775,6 +781,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloats, retraction_length)) ((ConfigOptionFloats, retract_length_toolchange)) ((ConfigOptionFloats, z_hop)) + ((ConfigOptionEnum, z_lift_type)) ((ConfigOptionFloats, retract_restart_extra)) ((ConfigOptionFloats, retract_restart_extra_toolchange)) ((ConfigOptionFloats, retraction_speed)) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 8a118a30e3..88dea6e6fd 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -3263,6 +3263,7 @@ void TabPrinter::build_unregular_pages(bool from_initial_build/* = false*/) optgroup = page->new_optgroup(L("Retraction"), L"param_retraction"); optgroup->append_single_option_line("retraction_length", "", extruder_idx); optgroup->append_single_option_line("z_hop", "", extruder_idx); + optgroup->append_single_option_line("z_lift_type", "", extruder_idx); optgroup->append_single_option_line("retraction_speed", "", extruder_idx); optgroup->append_single_option_line("deretraction_speed", "", extruder_idx); //optgroup->append_single_option_line("retract_restart_extra", "", extruder_idx);