diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 5755c3b..e27aa3e 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -2862,7 +2862,8 @@ std::string GCodeGenerator::extrude_loop(const ExtrusionLoop &loop_src, const GC // if polyline was shorter than the clipping distance we'd get a null polyline, so // we discard it in that case. if (m_enable_loop_clipping) - clip_end(smooth_path, scaled(EXTRUDER_CONFIG(nozzle_diameter)) * LOOP_CLIPPING_LENGTH_OVER_NOZZLE_DIAMETER, scaled(min_gcode_segment_length)); + //Y21 + clip_end(smooth_path, scaled(EXTRUDER_CONFIG(nozzle_diameter)) * (m_config.seam_gap.value / 100), scaled(min_gcode_segment_length)); if (smooth_path.empty()) return {}; diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index de6c963..65c8e33 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -473,6 +473,8 @@ static std::vector s_Preset_print_options { ,"first_layer_infill_speed" //w11 ,"detect_narrow_internal_solid_infill" + //Y21 + ,"seam_gap" }; static std::vector s_Preset_filament_options { diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 7d4412c..c7677e7 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -142,6 +142,8 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n "retract_restart_extra", "retract_restart_extra_toolchange", "retract_speed", + //Y21 + "seam_gap", "single_extruder_multi_material_priming", "slowdown_below_layer_time", "solid_infill_acceleration", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 5476d55..54732a3 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2533,6 +2533,15 @@ void PrintConfigDef::init_fff_params() def->mode = comSimple; def->set_default_value(new ConfigOptionEnum(spAligned)); +//Y21 + def = this->add("seam_gap", coPercent); + def->label = L("Seam gap"); + def->tooltip = L("In order to reduce the visibility of the seam in a closed loop extrusion, the loop is interrupted and shortened by a specified amount.\n" "This amount as a percentage of the current extruder diameter. The default value for this parameter is 15"); + def->sidetext = L("%"); + def->min = 0; + def->mode = comExpert; + def->set_default_value(new ConfigOptionPercent(15)); + def = this->add("staggered_inner_seams", coBool); def->label = L("Staggered inner seams"); // TRN PrintSettings: "Staggered inner seams" diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 2499721..3c6b6ab 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -524,6 +524,8 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloat, raft_first_layer_expansion)) ((ConfigOptionInt, raft_layers)) ((ConfigOptionEnum, seam_position)) + //Y21 + ((ConfigOptionPercent, seam_gap)) ((ConfigOptionBool, staggered_inner_seams)) // ((ConfigOptionFloat, seam_preferred_direction)) // ((ConfigOptionFloat, seam_preferred_direction_jitter)) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 8732483..48c9dcc 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -868,6 +868,8 @@ bool PrintObject::invalidate_state_by_config_options( steps.emplace_back(posSlice); } else if ( opt_key == "seam_position" + //Y21 + || opt_key == "seam_gap" || opt_key == "seam_preferred_direction" || opt_key == "seam_preferred_direction_jitter" || opt_key == "support_material_speed" diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 5219666..4b42350 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -244,7 +244,8 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config) { bool have_perimeters = config->opt_int("perimeters") > 0; for (auto el : { "extra_perimeters","extra_perimeters_on_overhangs", "thin_walls", "overhangs", - "seam_position","staggered_inner_seams", "external_perimeters_first", "external_perimeter_extrusion_width", +//Y21 + "seam_position","seam_gap","staggered_inner_seams", "external_perimeters_first", "external_perimeter_extrusion_width", "perimeter_speed", "small_perimeter_speed", "external_perimeter_speed", "enable_dynamic_overhang_speeds"}) toggle_field(el, have_perimeters); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 005e036..0636386 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1461,6 +1461,8 @@ void TabPrint::build() optgroup = page->new_optgroup(L("Advanced")); optgroup->append_single_option_line("seam_position", category_path + "seam-position"); + //Y21 + optgroup->append_single_option_line("seam_gap", category_path + "seam-gap"); optgroup->append_single_option_line("staggered_inner_seams", category_path + "staggered-inner-seams"); optgroup->append_single_option_line("external_perimeters_first", category_path + "external-perimeters-first"); optgroup->append_single_option_line("gap_fill_enabled", category_path + "fill-gaps");