Add seam gap

This commit is contained in:
QIDI TECH
2024-01-16 09:38:57 +08:00
parent 2f7a8a7568
commit 0b6f75c9dc
8 changed files with 23 additions and 2 deletions

View File

@@ -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<double>(EXTRUDER_CONFIG(nozzle_diameter)) * LOOP_CLIPPING_LENGTH_OVER_NOZZLE_DIAMETER, scaled<double>(min_gcode_segment_length));
//Y21
clip_end(smooth_path, scaled<double>(EXTRUDER_CONFIG(nozzle_diameter)) * (m_config.seam_gap.value / 100), scaled<double>(min_gcode_segment_length));
if (smooth_path.empty())
return {};

View File

@@ -473,6 +473,8 @@ static std::vector<std::string> s_Preset_print_options {
,"first_layer_infill_speed"
//w11
,"detect_narrow_internal_solid_infill"
//Y21
,"seam_gap"
};
static std::vector<std::string> s_Preset_filament_options {

View File

@@ -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",

View File

@@ -2533,6 +2533,15 @@ void PrintConfigDef::init_fff_params()
def->mode = comSimple;
def->set_default_value(new ConfigOptionEnum<SeamPosition>(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"

View File

@@ -524,6 +524,8 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloat, raft_first_layer_expansion))
((ConfigOptionInt, raft_layers))
((ConfigOptionEnum<SeamPosition>, seam_position))
//Y21
((ConfigOptionPercent, seam_gap))
((ConfigOptionBool, staggered_inner_seams))
// ((ConfigOptionFloat, seam_preferred_direction))
// ((ConfigOptionFloat, seam_preferred_direction_jitter))

View File

@@ -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"

View File

@@ -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);

View File

@@ -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");