diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index ce788d582d5..7a75f873b23 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -4044,7 +4044,10 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description, double new_speed = m_config.get_abs_value(overhang_speed_key_map[overhang_degree].c_str()); speed = new_speed == 0.0 ? speed : new_speed; } - } else if (path.role() == erOverhangPerimeter || path.role() == erBridgeInfill || path.role() == erSupportTransition) { + } + else if(path.role() == erBridgeInfill) { + speed = m_config.get_abs_value("internal_bridge_speed"); + } else if (path.role() == erOverhangPerimeter || path.role() == erSupportTransition) { speed = m_config.get_abs_value("bridge_speed"); } else if (path.role() == erInternalInfill) { speed = m_config.get_abs_value("sparse_infill_speed"); diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 24a8b1eaa1d..72ccd450dad 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -750,12 +750,11 @@ static std::vector s_Preset_print_options { #endif /* HAS_PRESSURE_EQUALIZER */ "inner_wall_speed", "outer_wall_speed", "sparse_infill_speed", "internal_solid_infill_speed", "top_surface_speed", "support_speed", "support_object_xy_distance", "support_interface_speed", - "bridge_speed", "gap_infill_speed", "travel_speed", "travel_speed_z", "initial_layer_speed", + "bridge_speed", "internal_bridge_speed", "gap_infill_speed", "travel_speed", "travel_speed_z", "initial_layer_speed", "outer_wall_acceleration", "initial_layer_acceleration", "top_surface_acceleration", "default_acceleration", "skirt_loops", "skirt_speed", "skirt_distance", "skirt_height", "draft_shield", "brim_width", "brim_object_gap", "brim_type", "enable_support", "support_type", "support_threshold_angle", "enforce_support_layers", "raft_layers", "raft_first_layer_density", "raft_first_layer_expansion", "raft_contact_distance", "raft_expansion", "support_base_pattern", "support_base_pattern_spacing", "support_expansion", "support_style", - // BBS "independent_support_layer_height", "support_angle", "support_interface_top_layers", "support_interface_bottom_layers", "support_interface_pattern", "support_interface_spacing", "support_interface_loop_pattern", @@ -769,7 +768,6 @@ static std::vector s_Preset_print_options { "prime_tower_width", "prime_tower_brim_width", "prime_volume", "wipe_tower_no_sparse_layers", "compatible_printers", "compatible_printers_condition", "inherits", "flush_into_infill", "flush_into_objects", "flush_into_support", - // BBS "tree_support_branch_angle", "tree_support_wall_count", "tree_support_branch_distance", "tree_support_branch_diameter", "detect_narrow_internal_solid_infill", @@ -779,7 +777,6 @@ static std::vector s_Preset_print_options { "timelapse_type", "internal_bridge_support_thickness", "wall_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle", "wall_distribution_count", "min_feature_size", "min_bead_width", "post_process", - // SoftFever "small_perimeter_speed", "small_perimeter_threshold","bridge_angle", "filter_out_gap_fill", "travel_acceleration","inner_wall_acceleration", "min_width_top_surface", "default_jerk", "outer_wall_jerk", "inner_wall_jerk", "infill_jerk", "top_surface_jerk", "initial_layer_jerk","travel_jerk", "top_solid_infill_flow_ratio","bottom_solid_infill_flow_ratio","only_one_wall_first_layer", "print_flow_ratio", "seam_gap", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 8cecfa0b78a..6dcef0c91ce 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -831,7 +831,7 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionFloatOrPercent(0, false)); def = this->add("bridge_speed", coFloat); - def->label = L("Bridge"); + def->label = L("External"); def->category = L("Speed"); def->tooltip = L("Speed of bridge and completely overhang wall"); def->sidetext = L("mm/s"); @@ -839,6 +839,16 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionFloat(25)); + def = this->add("internal_bridge_speed", coFloatOrPercent); + def->label = L("Internal"); + def->category = L("Speed"); + def->tooltip = L("Speed of internal bridge. If the value is expressed as a percentage, it will be calculated based on the bridge_speed. Default value is 150%."); + def->sidetext = L("mm/s or %"); + def->ratio_over = "bridge_speed"; + def->min = 0; + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloatOrPercent(150, true)); + def = this->add("brim_width", coFloat); def->label = L("Brim width"); def->category = L("Support"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index ac415a38cfb..7a343e8ab9a 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -729,6 +729,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloat, bridge_angle)) ((ConfigOptionFloat, bridge_flow)) ((ConfigOptionFloat, bridge_speed)) + ((ConfigOptionFloatOrPercent, internal_bridge_speed)) ((ConfigOptionBool, ensure_vertical_shell_thickness)) ((ConfigOptionEnum, top_surface_pattern)) ((ConfigOptionEnum, bottom_surface_pattern)) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index caa0243c890..0e4facc9d7b 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -927,6 +927,7 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "overhang_3_4_speed" || opt_key == "overhang_4_4_speed" || opt_key == "bridge_speed" + || opt_key == "internal_bridge_speed" || opt_key == "outer_wall_speed" || opt_key == "small_perimeter_speed" || opt_key == "small_perimeter_threshold" diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 89a25c5c775..fdc62ec532a 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -563,7 +563,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co toggle_field(el, has_solid_infill); for (auto el : { "infill_direction", "sparse_infill_line_width", - "sparse_infill_speed", "bridge_speed", "bridge_angle" }) + "sparse_infill_speed", "bridge_speed", "internal_bridge_speed", "bridge_angle" }) toggle_field(el, have_infill || has_solid_infill); toggle_field("top_shell_thickness", ! has_spiral_vase && has_top_solid_infill); diff --git a/src/slic3r/GUI/GUI_Factories.cpp b/src/slic3r/GUI/GUI_Factories.cpp index 23f6f75a30d..8637e764b36 100644 --- a/src/slic3r/GUI/GUI_Factories.cpp +++ b/src/slic3r/GUI/GUI_Factories.cpp @@ -101,7 +101,7 @@ std::map> SettingsFactory::PART_CAT }}, { L("Speed"), {{"outer_wall_speed", "",1},{"inner_wall_speed", "",2},{"sparse_infill_speed", "",3},{"top_surface_speed", "",4}, {"internal_solid_infill_speed", "",5}, {"enable_overhang_speed", "",6}, {"overhang_speed_classic", "",6}, {"overhang_1_4_speed", "",7}, {"overhang_2_4_speed", "",8}, {"overhang_3_4_speed", "",9}, {"overhang_4_4_speed", "",10}, - {"bridge_speed", "",11}, {"gap_infill_speed", "",12} + {"bridge_speed", "",11}, {"gap_infill_speed", "",12}, {"internal_bridge_speed", "", 13} }} }; diff --git a/src/slic3r/GUI/OG_CustomCtrl.cpp b/src/slic3r/GUI/OG_CustomCtrl.cpp index 9fc2436f017..0ddaafa2e4a 100644 --- a/src/slic3r/GUI/OG_CustomCtrl.cpp +++ b/src/slic3r/GUI/OG_CustomCtrl.cpp @@ -75,7 +75,7 @@ void OG_CustomCtrl::init_ctrl_lines() for (const Line& line : og_lines) { if (line.is_separator()) { - ctrl_lines.emplace_back(CtrlLine(0, this, line)); + ctrl_lines.emplace_back(CtrlLine(3, this, line)); continue; } @@ -728,9 +728,9 @@ void OG_CustomCtrl::CtrlLine::render_separator(wxDC& dc, wxCoord v_pos) wxPoint begin(ctrl->m_h_gap, v_pos); wxPoint end(ctrl->GetSize().GetWidth() - ctrl->m_h_gap, v_pos); - wxPen pen, old_pen = pen = dc.GetPen(); - pen.SetColour(*wxLIGHT_GREY); - dc.SetPen(pen); + wxPen old_pen = dc.GetPen(); + // pen.SetColour(*wxLIGHT_GREY); + dc.SetPen(*wxTRANSPARENT_PEN); dc.DrawLine(begin, end); dc.SetPen(old_pen); } diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index 145ebb85e96..19f20cf1b34 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -212,10 +212,12 @@ void OptionsGroup::append_line(const Line& line) //BBS: get line for opt_key Line* OptionsGroup::get_line(const std::string& opt_key) { - for (int index = 0; index < m_lines.size(); index++) + for (auto& l : m_lines) { - if (m_lines[index].get_first_option_key() == opt_key) - return &(m_lines[index]); + if(l.is_separator()) + continue; + if (l.get_first_option_key() == opt_key) + return &l; } return nullptr; diff --git a/src/slic3r/GUI/OptionsGroup.hpp b/src/slic3r/GUI/OptionsGroup.hpp index a758f1652a6..f23f7298099 100644 --- a/src/slic3r/GUI/OptionsGroup.hpp +++ b/src/slic3r/GUI/OptionsGroup.hpp @@ -69,6 +69,8 @@ class Line { wxWindow* extra_widget_win {nullptr}; //BBS: add api to get the first option's key std::string& get_first_option_key() { + if(m_options.empty()) + return std::string(); return m_options[0].opt_id; } diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 1c34edb2711..01dea10ce8c 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1954,7 +1954,11 @@ void TabPrint::build() line.append_option(optgroup->get_option("overhang_3_4_speed")); line.append_option(optgroup->get_option("overhang_4_4_speed")); optgroup->append_line(line); - optgroup->append_single_option_line("bridge_speed"); + optgroup->append_separator(); + line = { L("Bridge"), L("Set speed for external and internal bridges") }; + line.append_option(optgroup->get_option("bridge_speed")); + line.append_option(optgroup->get_option("internal_bridge_speed")); + optgroup->append_line(line); optgroup = page->new_optgroup(L("Travel speed"), L"param_travel_speed", 15); optgroup->append_single_option_line("travel_speed"); @@ -2677,9 +2681,8 @@ void TabFilament::build() optgroup->append_single_option_line("bed_temperature_difference"); optgroup = page->new_optgroup(L("Print temperature"), L"param_temperature"); - optgroup->split_multi_line = true; - optgroup->option_label_at_right = true; optgroup->append_single_option_line("chamber_temperature"); + optgroup->append_separator(); line = { L("Nozzle"), L("Nozzle temperature when printing") };