diff --git a/resources/profiles/BBL/filament/Bambu PLA Basic @base.json b/resources/profiles/BBL/filament/Bambu PLA Basic @base.json index b975be47d..81275272a 100644 --- a/resources/profiles/BBL/filament/Bambu PLA Basic @base.json +++ b/resources/profiles/BBL/filament/Bambu PLA Basic @base.json @@ -20,6 +20,19 @@ "filament_vendor": [ "Bambu Lab" ], + "filament_scarf_seam_type": [ + "all" + ], + "filament_scarf_height":[ + "10%" + ], + "filament_scarf_gap":[ + "0%" + ], + "filament_scarf_length":[ + "10" + ], + "compatible_printers": [], "filament_start_gcode": [ "; filament start gcode\n{if (bed_temperature[current_extruder] >55)||(bed_temperature_initial_layer[current_extruder] >55)}M106 P3 S200\n{elsif(bed_temperature[current_extruder] >50)||(bed_temperature_initial_layer[current_extruder] >50)}M106 P3 S150\n{elsif(bed_temperature[current_extruder] >45)||(bed_temperature_initial_layer[current_extruder] >45)}M106 P3 S50\n{endif}\n\n{if activate_air_filtration[current_extruder] && support_air_filtration}\nM106 P3 S{during_print_exhaust_fan_speed_num[current_extruder]} \n{endif}" ] diff --git a/resources/profiles/BBL/filament/Bambu PLA Matte @base.json b/resources/profiles/BBL/filament/Bambu PLA Matte @base.json index 36156e0af..b4e54a272 100644 --- a/resources/profiles/BBL/filament/Bambu PLA Matte @base.json +++ b/resources/profiles/BBL/filament/Bambu PLA Matte @base.json @@ -17,6 +17,18 @@ "filament_vendor": [ "Bambu Lab" ], + "filament_scarf_seam_type": [ + "all" + ], + "filament_scarf_height":[ + "5%" + ], + "filament_scarf_gap":[ + "0%" + ], + "filament_scarf_length":[ + "10" + ], "filament_start_gcode": [ "; filament start gcode\n{if (bed_temperature[current_extruder] >55)||(bed_temperature_initial_layer[current_extruder] >55)}M106 P3 S200\n{elsif(bed_temperature[current_extruder] >50)||(bed_temperature_initial_layer[current_extruder] >50)}M106 P3 S150\n{elsif(bed_temperature[current_extruder] >45)||(bed_temperature_initial_layer[current_extruder] >45)}M106 P3 S50\n{endif}\n\n{if activate_air_filtration[current_extruder] && support_air_filtration}\nM106 P3 S{during_print_exhaust_fan_speed_num[current_extruder]} \n{endif}" ] diff --git a/resources/profiles/BBL/filament/Bambu PLA Silk @base.json b/resources/profiles/BBL/filament/Bambu PLA Silk @base.json index 346070089..2b074bab8 100644 --- a/resources/profiles/BBL/filament/Bambu PLA Silk @base.json +++ b/resources/profiles/BBL/filament/Bambu PLA Silk @base.json @@ -18,6 +18,18 @@ "filament_vendor": [ "Bambu Lab" ], + "filament_scarf_seam_type": [ + "all" + ], + "filament_scarf_height":[ + "5%" + ], + "filament_scarf_gap":[ + "0%" + ], + "filament_scarf_length":[ + "10" + ], "nozzle_temperature": [ "230" ], diff --git a/resources/profiles/BBL/filament/fdm_filament_common.json b/resources/profiles/BBL/filament/fdm_filament_common.json index 73beba5ec..b237688ab 100644 --- a/resources/profiles/BBL/filament/fdm_filament_common.json +++ b/resources/profiles/BBL/filament/fdm_filament_common.json @@ -162,6 +162,18 @@ "textured_plate_temp_initial_layer": [ "60" ], + "filament_scarf_seam_type": [ + "none" + ], + "filament_scarf_height":[ + "10%" + ], + "filament_scarf_gap":[ + "0%" + ], + "filament_scarf_length":[ + "10" + ], "compatible_printers": [], "filament_start_gcode": [ "; Filament gcode\n{if activate_air_filtration[current_extruder] && support_air_filtration}\nM106 P3 S{during_print_exhaust_fan_speed_num[current_extruder]} \n{endif}" diff --git a/src/libslic3r/Config.hpp b/src/libslic3r/Config.hpp index ec9999f4d..ed45a4861 100644 --- a/src/libslic3r/Config.hpp +++ b/src/libslic3r/Config.hpp @@ -31,6 +31,11 @@ namespace Slic3r { double value; bool percent; + FloatOrPercent() {} + FloatOrPercent(double value_, bool percent_) : value(value_), percent(percent_) {} + + double get_abs_value(double ratio_over) const { return this->percent ? (ratio_over * this->value / 100) : this->value; } + private: friend class cereal::access; template void serialize(Archive& ar) { ar(this->value); ar(this->percent); } diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 862af71e2..9a949b3eb 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -4036,10 +4036,10 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou } else loop.split_at(last_pos, false); - const auto seam_scarf_type = m_config.seam_slope_type.value; // BBS: not apply on fist layer, too small E has stick issue with hotend plate - bool enable_seam_slope = ((seam_scarf_type == SeamScarfType::External && !is_hole) || - seam_scarf_type == SeamScarfType::All) && + int filament_scarf_type = EXTRUDER_CONFIG(filament_scarf_seam_type); + bool enable_seam_slope = (filament_scarf_type == int(SeamScarfType::External) && !is_hole) || + filament_scarf_type == int(SeamScarfType::All) && !m_config.spiral_mode && (loop.role() == erExternalPerimeter || (loop.role() == erPerimeter && m_config.seam_slope_inner_walls)) && @@ -4082,20 +4082,22 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou if (enable_seam_slope) { // Create seam slope double start_slope_ratio; - if (m_config.seam_slope_start_height.percent) { - start_slope_ratio = m_config.seam_slope_start_height.value / 100.; - } else { - // Get the ratio against current layer height - double h = paths.front().height; - start_slope_ratio = m_config.seam_slope_start_height.value / h; + if (EXTRUDER_CONFIG(filament_scarf_height).percent) + start_slope_ratio = EXTRUDER_CONFIG(filament_scarf_height).value / 100; + else { + start_slope_ratio = EXTRUDER_CONFIG(filament_scarf_height).value / paths.front().height; } + float slope_gap = EXTRUDER_CONFIG(filament_scarf_gap).get_abs_value(scale_(EXTRUDER_CONFIG(nozzle_diameter))); + + double scarf_seam_length = EXTRUDER_CONFIG(filament_scarf_length); + double loop_length = 0.; for (const auto &path : paths) { loop_length += unscale_(path.length()); } const bool slope_entire_loop = m_config.seam_slope_entire_loop; - const double slope_min_length = slope_entire_loop ? loop_length : std::min(m_config.seam_slope_min_length.value, loop_length); + const double slope_min_length = slope_entire_loop ? loop_length : std::min(scarf_seam_length, loop_length); const int slope_steps = m_config.seam_slope_steps; const double slope_max_segment_length = scale_(slope_min_length / slope_steps); // BBS: check if has overhang on slope path @@ -4107,7 +4109,6 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou ExtrusionLoopSloped new_loop(paths, seam_gap, slope_min_length, slope_max_segment_length, start_slope_ratio, loop.loop_role()); //BBS: clip end and start to get better seam - const double slope_gap = m_config.seam_slope_gap.get_abs_value(scale_(EXTRUDER_CONFIG(nozzle_diameter))); new_loop.clip_slope(slope_gap); // BBS: slowdown speed to improve seam, to be fix, cooling need to be apply correctly //new_loop.target_speed = get_path_speed(new_loop.starts.back()); diff --git a/src/libslic3r/Layer.cpp b/src/libslic3r/Layer.cpp index 026530198..cc4d26480 100644 --- a/src/libslic3r/Layer.cpp +++ b/src/libslic3r/Layer.cpp @@ -179,12 +179,9 @@ void Layer::make_perimeters() && config.fuzzy_skin == other_config.fuzzy_skin && config.fuzzy_skin_thickness == other_config.fuzzy_skin_thickness && config.fuzzy_skin_point_distance == other_config.fuzzy_skin_point_distance - && config.seam_slope_type == other_config.seam_slope_type && config.seam_slope_conditional == other_config.seam_slope_conditional && config.scarf_angle_threshold == other_config.scarf_angle_threshold - && config.seam_slope_start_height == other_config.seam_slope_start_height && config.seam_slope_entire_loop == other_config.seam_slope_entire_loop - && config.seam_slope_min_length == other_config.seam_slope_min_length && config.seam_slope_steps == other_config.seam_slope_steps && config.seam_slope_inner_walls == other_config.seam_slope_inner_walls) { diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 11050d5f0..def44c624 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -851,11 +851,11 @@ static std::vector s_Preset_print_options { // calib "print_flow_ratio", //Orca - "exclude_object", "seam_slope_type", "seam_slope_conditional", "scarf_angle_threshold", "seam_slope_start_height", "seam_slope_entire_loop", "seam_slope_min_length", - "seam_slope_steps", "seam_slope_inner_walls", "role_base_wipe_speed", "seam_slope_gap"}; + "exclude_object", /*"seam_slope_type",*/ "seam_slope_conditional", "scarf_angle_threshold", /*"seam_slope_start_height", */"seam_slope_entire_loop",/* "seam_slope_min_length",*/ + "seam_slope_steps", "seam_slope_inner_walls", "role_base_wipe_speed"/*, "seam_slope_gap"*/}; static std::vector s_Preset_filament_options { - /*"filament_colour", */ "default_filament_colour","required_nozzle_HRC","filament_diameter", "filament_type", "filament_soluble", "filament_is_support", + /*"filament_colour", */ "default_filament_colour","required_nozzle_HRC","filament_diameter", "filament_type", "filament_soluble", "filament_is_support","filament_scarf_seam_type", "filament_scarf_height", "filament_scarf_gap","filament_scarf_length", "filament_max_volumetric_speed", "filament_flow_ratio", "filament_density", "filament_cost", "filament_minimal_purge_on_wipe_tower", "nozzle_temperature", "nozzle_temperature_initial_layer", diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 6a9065260..601260bad 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -258,6 +258,10 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n steps.emplace_back(psSkirtBrim); } else if (opt_key == "filament_soluble" || opt_key == "filament_is_support" + || opt_key == "filament_scarf_seam_type" + || opt_key == "filament_scarf_height" + || opt_key == "filament_scarf_gap" + || opt_key == "filament_scarf_length" || opt_key == "independent_support_layer_height") { steps.emplace_back(psWipeTower); // Soluble support interface / non-soluble base interface produces non-soluble interface layers below soluble interface layers. diff --git a/src/libslic3r/PrintApply.cpp b/src/libslic3r/PrintApply.cpp index a11e8a5a9..3538c6b8d 100644 --- a/src/libslic3r/PrintApply.cpp +++ b/src/libslic3r/PrintApply.cpp @@ -1047,24 +1047,62 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_ else m_support_used = false; + // check if filament ebnable scarf seam { - const auto &o = model.objects; - const auto opt_has_scarf_joint_seam = [](const DynamicConfig &c) { - return c.has("seam_slope_type") && c.opt_enum("seam_slope_type") != SeamScarfType::None; + std::vector scarf_seam_type = new_full_config.option("filament_scarf_seam_type")->values; + auto check_object_scarf_seam_type = [](const std::vector scarf_seam_type, const ModelObject *mo) { + //get filament scarf seam type + //check volumes + for (ModelVolume *mv : mo->volumes) { + std::vector volume_extruders = mv->get_extruders(); + for (int filament_id : volume_extruders) { + if( scarf_seam_type[filament_id - 1] != 0 ) { + return true; + } + + } + } + + // check layer range + for (auto layer_range : mo->layer_config_ranges) { + if(layer_range.second.has("extruder")) + if (int id = layer_range.second.option("extruder")->getInt(); id > 0 && scarf_seam_type[id - 1] != 0) + return true; + } + + return false; + }; - const bool has_scarf_joint_seam = std::any_of(o.begin(), o.end(), [&new_full_config, &opt_has_scarf_joint_seam](ModelObject *obj) { - return obj->get_config_value>(new_full_config, "seam_slope_type")->value != SeamScarfType::None || - std::any_of(obj->volumes.begin(), obj->volumes.end(), - [&opt_has_scarf_joint_seam](const ModelVolume *v) { return opt_has_scarf_joint_seam(v->config.get()); }) || - std::any_of(obj->layer_config_ranges.begin(), obj->layer_config_ranges.end(), - [&opt_has_scarf_joint_seam](const auto &r) { return opt_has_scarf_joint_seam(r.second.get()); }); + + //check custom gcode + auto check_gcode_scarf_seam_type = [](const std::vector scarf_seam_type, const Model &model) { + auto it = model.plates_custom_gcodes.begin(); + + while (it != model.plates_custom_gcodes.end()) { + const CustomGCode::Info &gcode_info = it->second; + auto item = gcode_info.gcodes.begin(); + while (item != gcode_info.gcodes.end()) { + if (item->type == CustomGCode::Type::ToolChange && item->extruder <= scarf_seam_type.size() && scarf_seam_type[item->extruder - 1] != 0) + return true; + item++; + } + it++; + } + + return false; + }; + + // check custon_gcode + bool has_scarf_joint_seam = check_gcode_scarf_seam_type(scarf_seam_type, model) || + std::any_of(model.objects.begin(), model.objects.end(), [scarf_seam_type, &check_object_scarf_seam_type](const ModelObject *obj) { + return check_object_scarf_seam_type(scarf_seam_type, obj); }); + + if (has_scarf_joint_seam) { new_full_config.set("has_scarf_joint_seam", true); } - - BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ", has_scarf_joint_seam:" << has_scarf_joint_seam; } // Find modified keys of the various configs. Resolve overrides extruder retract values by filament profiles. diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 61f787470..701e3b903 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -1609,11 +1609,43 @@ void PrintConfigDef::init_fff_params() def->mode = comDevelop; def->set_default_value(new ConfigOptionBools { false }); - def = this->add("filament_is_support", coBools); - def->label = L("Support material"); + def = this->add("filament_scarf_seam_type", coEnums); + def->label = L("Filament scarf seam type"); + def->tooltip = L("Will replace the scarf parameters on process profile."); + def->enum_keys_map = &ConfigOptionEnum::get_enum_values(); + def->enum_values.push_back("none"); + def->enum_values.push_back("external"); + def->enum_values.push_back("all"); + def->enum_labels.push_back(L("None")); + def->enum_labels.push_back(L("Contour")); + def->enum_labels.push_back(L("Contour and hole")); + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionEnumsGeneric{0}); + + def = this->add("filament_scarf_height", coFloatsOrPercents); + def->label = L("Filament scarf seam height"); + def->ratio_over = "layer_height"; + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloatsOrPercents{FloatOrPercent( 0, 10)}); + + def = this->add("filament_scarf_gap", coFloatsOrPercents); + def->label = L("Filament scarf seam slope height"); + def->min = 0; + def->ratio_over = "nozzle_diameter"; + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloatsOrPercents{FloatOrPercent(0, 0)}); + + def = this->add("filament_scarf_length", coFloats); + def->label = L("Filament scarf seam length"); + def->min = 0; + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloats{10}); + + def = this->add("filament_is_support", coBools); + def->label = L("Support material"); def->tooltip = L("Support material is commonly used to print support and support interface"); - def->mode = comDevelop; - def->set_default_value(new ConfigOptionBools { false }); + def->mode = comDevelop; + def->set_default_value(new ConfigOptionBools{false}); // BBS def = this->add("temperature_vitrification", coInts); @@ -2953,19 +2985,6 @@ void PrintConfigDef::init_fff_params() def->mode = comDevelop; def->set_default_value(new ConfigOptionPercent(15)); - def = this->add("seam_slope_type", coEnum); - def->label = L("Scarf joint seam (experimental)"); - def->tooltip = L("Use scarf joint to minimize seam visibility and increase seam strength."); - def->enum_keys_map = &ConfigOptionEnum::get_enum_values(); - def->enum_values.push_back("none"); - def->enum_values.push_back("external"); - def->enum_values.push_back("all"); - def->enum_labels.push_back(L("None")); - def->enum_labels.push_back(L("Contour")); - def->enum_labels.push_back(L("Contour and hole")); - def->mode = comAdvanced; - def->set_default_value(new ConfigOptionEnum(SeamScarfType::None)); - def = this->add("seam_slope_conditional", coBool); def->label = L("Conditional scarf joint"); def->tooltip = L("Apply scarf joints only to smooth perimeters where traditional seams do not conceal the seams at sharp corners effectively."); @@ -2979,24 +2998,7 @@ void PrintConfigDef::init_fff_params() def->sidetext = L("°"); def->min = 0; def->max = 180; - def->set_default_value(new ConfigOptionInt(155)); - - def = this->add("seam_slope_start_height", coFloatOrPercent); - def->label = L("Scarf start height"); - def->tooltip = L("Start height of the scarf.\n" - "This amount can be specified in millimeters or as a percentage of the current layer height. The default value for this parameter is 0."); - def->sidetext = L("mm or %"); - def->min = 0; - def->mode = comAdvanced; - def->set_default_value(new ConfigOptionFloatOrPercent(50, true)); - - def = this->add("seam_slope_gap", coFloatOrPercent); - def->label = L("Slop 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("mm or %"); - def->min = 0; - def->mode = comAdvanced; - def->set_default_value(new ConfigOptionFloatOrPercent(15, true)); + def->set_default_value(new ConfigOptionInt(0)); def = this->add("seam_slope_entire_loop", coBool); def->label = L("Scarf around entire wall"); @@ -3004,14 +3006,6 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); - def = this->add("seam_slope_min_length", coFloat); - def->label = L("Scarf length"); - def->tooltip = L("Length of the scarf. Setting this parameter to zero effectively disables the scarf."); - def->sidetext = L("mm"); - def->min = 0; - def->mode = comAdvanced; - def->set_default_value(new ConfigOptionFloat(10)); - def = this->add("seam_slope_steps", coInt); def->label = L("Scarf steps"); def->tooltip = L("Minimum number of segments of each scarf."); @@ -4837,7 +4831,8 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va "support_transition_line_width", "support_transition_speed", "bed_temperature", "bed_temperature_initial_layer", "can_switch_nozzle_type", "can_add_auxiliary_fan", "extra_flush_volume", "spaghetti_detector", "adaptive_layer_height", "z_hop_type","nozzle_hrc","chamber_temperature","only_one_wall_top","bed_temperature_difference","long_retraction_when_cut", - "retraction_distance_when_cut" + "retraction_distance_when_cut", + "seam_slope_type","seam_slope_start_height","seam_slope_gap", "seam_slope_min_length" }; if (ignore.find(opt_key) != ignore.end()) { diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 7f1a46d7f..97154e215 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -146,7 +146,7 @@ enum SeamPosition { // Orca enum class SeamScarfType { - None, + None = 0, External, All, }; @@ -863,13 +863,13 @@ PRINT_CONFIG_CLASS_DEFINE( //calib ((ConfigOptionFloat, print_flow_ratio)) // Orca: seam slopes - ((ConfigOptionEnum, seam_slope_type)) + //((ConfigOptionEnum, seam_slope_type)) ((ConfigOptionBool, seam_slope_conditional)) ((ConfigOptionInt, scarf_angle_threshold)) - ((ConfigOptionFloatOrPercent, seam_slope_start_height)) - ((ConfigOptionFloatOrPercent, seam_slope_gap)) + //((ConfigOptionFloatOrPercent, seam_slope_start_height)) + //((ConfigOptionFloatOrPercent, seam_slope_gap)) ((ConfigOptionBool, seam_slope_entire_loop)) - ((ConfigOptionFloat, seam_slope_min_length)) + //((ConfigOptionFloat, seam_slope_min_length)) ((ConfigOptionInt, seam_slope_steps)) ((ConfigOptionBool, seam_slope_inner_walls)) ) @@ -923,6 +923,10 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionStrings, filament_type)) ((ConfigOptionBools, filament_soluble)) ((ConfigOptionBools, filament_is_support)) + ((ConfigOptionEnumsGeneric, filament_scarf_seam_type)) + ((ConfigOptionFloatsOrPercents, filament_scarf_height)) + ((ConfigOptionFloatsOrPercents, filament_scarf_gap)) + ((ConfigOptionFloats, filament_scarf_length)) ((ConfigOptionFloats, filament_cost)) ((ConfigOptionString, filament_notes)) ((ConfigOptionStrings, default_filament_colour)) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 1755d866d..8490defd0 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -889,13 +889,9 @@ bool PrintObject::invalidate_state_by_config_options( steps.emplace_back(posSlice); } else if ( opt_key == "seam_position" - || opt_key == "seam_slope_type" || opt_key == "seam_slope_conditional" || opt_key == "scarf_angle_threshold" - || opt_key == "seam_slope_start_height" - || opt_key == "seam_slope_gap" || opt_key == "seam_slope_entire_loop" - || opt_key == "seam_slope_min_length" || opt_key == "seam_slope_steps" || opt_key == "seam_slope_inner_walls" || opt_key == "seam_gap" diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 8abea5938..dec577f86 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -207,37 +207,6 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con is_msg_dlg_already_exist = false; } - //BBS: limit scarf seam start height range - bool apply_scarf_seam = config->opt_enum("seam_slope_type") != SeamScarfType::None; - if (apply_scarf_seam) { - // scarf seam start height shouldn't small than zero - double layer_height = config->opt_float("layer_height"); - double scarf_seam_slope_height = config->option("seam_slope_start_height")->get_abs_value(layer_height); - - if (scarf_seam_slope_height < EPSILON) { - const wxString msg_text = _(L("Too small scarf start height.\nReset to 50%")); - MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK); - DynamicPrintConfig new_conf = *config; - is_msg_dlg_already_exist = true; - dialog.ShowModal(); - new_conf.set_key_value("seam_slope_start_height", new ConfigOptionFloatOrPercent(50, true)); - apply(config, &new_conf); - is_msg_dlg_already_exist = false; - } - - // scarf seam start height shouldn't bigger than layer height - if (scarf_seam_slope_height > config->opt_float("layer_height") + EPSILON) { - const wxString msg_text = _(L("Too big scarf start height.\nReset to 50%")); - MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK); - DynamicPrintConfig new_conf = *config; - is_msg_dlg_already_exist = true; - dialog.ShowModal(); - new_conf.set_key_value("seam_slope_start_height", new ConfigOptionFloatOrPercent(50, true)); - apply(config, &new_conf); - is_msg_dlg_already_exist = false; - } - } - //BBS: top_area_threshold showed if the top one wall function be applyed bool top_one_wall_apply = config->opt_enum("top_one_wall_type") == TopOneWallType::None; toggle_line("top_area_threshold", !top_one_wall_apply); @@ -738,18 +707,6 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co toggle_field("accel_to_decel_factor", config->opt_bool("accel_to_decel_enable")); } toggle_line("exclude_object", gcflavor == gcfKlipper); - - toggle_field("seam_slope_type", !has_spiral_vase); - bool has_seam_slope = !has_spiral_vase && config->opt_enum("seam_slope_type") != SeamScarfType::None; - toggle_line("seam_slope_conditional", has_seam_slope); - toggle_line("scarf_angle_threshold", has_seam_slope && config->opt_bool("seam_slope_conditional")); - toggle_line("seam_slope_start_height", has_seam_slope); - toggle_line("seam_slope_gap", has_seam_slope); - toggle_line("seam_slope_entire_loop", has_seam_slope); - toggle_line("seam_slope_min_length", has_seam_slope); - toggle_line("seam_slope_steps", has_seam_slope); - toggle_line("seam_slope_inner_walls", has_seam_slope); - toggle_field("seam_slope_min_length", !config->opt_bool("seam_slope_entire_loop")); } void ConfigManipulation::update_print_sla_config(DynamicPrintConfig* config, const bool is_global_config/* = false*/) diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index 9d5e8beab..86c3c229b 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -57,6 +57,7 @@ const t_field& OptionsGroup::build_field(const t_config_option_key& id, const Co default: switch (opt.type) { case coFloatOrPercent: + case coFloatsOrPercents: case coFloat: case coFloats: case coPercent: diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 698f8d0e8..5877044bd 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1925,13 +1925,9 @@ void TabPrint::build() optgroup = page->new_optgroup(L("Seam"), L"param_seam"); optgroup->append_single_option_line("seam_position", "Seam"); optgroup->append_single_option_line("seam_gap", "Seam"); - optgroup->append_single_option_line("seam_slope_type"); optgroup->append_single_option_line("seam_slope_conditional"); optgroup->append_single_option_line("scarf_angle_threshold"); - optgroup->append_single_option_line("seam_slope_start_height"); - optgroup->append_single_option_line("seam_slope_gap"); optgroup->append_single_option_line("seam_slope_entire_loop"); - optgroup->append_single_option_line("seam_slope_min_length"); optgroup->append_single_option_line("seam_slope_steps"); optgroup->append_single_option_line("seam_slope_inner_walls"); optgroup->append_single_option_line("wipe_speed", "Seam"); @@ -3000,6 +2996,7 @@ void TabFilament::build() optgroup->append_single_option_line("filament_soluble"); // BBS optgroup->append_single_option_line("filament_is_support"); + //optgroup->append_single_option_line("filament_colour"); optgroup->append_single_option_line("required_nozzle_HRC"); optgroup->append_single_option_line("default_filament_colour"); @@ -3009,6 +3006,7 @@ void TabFilament::build() optgroup->append_single_option_line("pressure_advance"); optgroup->append_single_option_line("filament_density"); optgroup->append_single_option_line("filament_cost"); + //BBS optgroup->append_single_option_line("temperature_vitrification"); Line line = { L("Recommended nozzle temperature"), L("Recommended nozzle temperature range of this filament. 0 means no set") }; @@ -3094,6 +3092,13 @@ void TabFilament::build() optgroup = page->new_optgroup(L("Volumetric speed limitation"), L"param_volumetric_speed"); optgroup->append_single_option_line("filament_max_volumetric_speed"); + // BBS + optgroup = page->new_optgroup(L("Filament scarf seam settings"), L"param_volumetric_speed"); + optgroup->append_single_option_line("filament_scarf_seam_type"); + optgroup->append_single_option_line("filament_scarf_height"); + optgroup->append_single_option_line("filament_scarf_gap"); + optgroup->append_single_option_line("filament_scarf_length"); + //line = { "", "" }; //line.full_width = 1; //line.widget = [this](wxWindow* parent) {