diff --git a/resources/images/bed_cool.png b/resources/images/bed_cool.png index 3154344b58..41234a1ac5 100644 Binary files a/resources/images/bed_cool.png and b/resources/images/bed_cool.png differ diff --git a/resources/images/bed_cool_supertack.png b/resources/images/bed_cool_supertack.png index 10ec5e0b50..cf05fb85ea 100644 Binary files a/resources/images/bed_cool_supertack.png and b/resources/images/bed_cool_supertack.png differ diff --git a/resources/images/bed_cool_supertack_mini.png b/resources/images/bed_cool_supertack_mini.png new file mode 100644 index 0000000000..b363b43093 Binary files /dev/null and b/resources/images/bed_cool_supertack_mini.png differ diff --git a/resources/images/bed_engineering.png b/resources/images/bed_engineering.png index 4b2a88c6da..9fe23a2666 100644 Binary files a/resources/images/bed_engineering.png and b/resources/images/bed_engineering.png differ diff --git a/resources/images/bed_high_templ.png b/resources/images/bed_high_templ.png index 7512b1d45b..3fe8a603c8 100644 Binary files a/resources/images/bed_high_templ.png and b/resources/images/bed_high_templ.png differ diff --git a/resources/images/bed_high_templ_mini.png b/resources/images/bed_high_templ_mini.png new file mode 100644 index 0000000000..6036556c0a Binary files /dev/null and b/resources/images/bed_high_templ_mini.png differ diff --git a/resources/images/bed_high_templ_o.png b/resources/images/bed_high_templ_o.png new file mode 100644 index 0000000000..f0fadb7667 Binary files /dev/null and b/resources/images/bed_high_templ_o.png differ diff --git a/resources/images/bed_pei.png b/resources/images/bed_pei.png index eff98a1307..4a1913516d 100644 Binary files a/resources/images/bed_pei.png and b/resources/images/bed_pei.png differ diff --git a/resources/images/bed_pei_mini.png b/resources/images/bed_pei_mini.png new file mode 100644 index 0000000000..cea0373230 Binary files /dev/null and b/resources/images/bed_pei_mini.png differ diff --git a/resources/images/bed_pei_o.png b/resources/images/bed_pei_o.png new file mode 100644 index 0000000000..d6fd7ce0a6 Binary files /dev/null and b/resources/images/bed_pei_o.png differ diff --git a/resources/images/big_bed_cool.png b/resources/images/big_bed_cool.png index 87f2922635..2d2917e2ed 100644 Binary files a/resources/images/big_bed_cool.png and b/resources/images/big_bed_cool.png differ diff --git a/resources/images/big_bed_cool_supertack.png b/resources/images/big_bed_cool_supertack.png index 07f05200cb..87ab558248 100644 Binary files a/resources/images/big_bed_cool_supertack.png and b/resources/images/big_bed_cool_supertack.png differ diff --git a/resources/images/big_bed_cool_supertack_mini.png b/resources/images/big_bed_cool_supertack_mini.png new file mode 100644 index 0000000000..18605c6b67 Binary files /dev/null and b/resources/images/big_bed_cool_supertack_mini.png differ diff --git a/resources/images/big_bed_engineering.png b/resources/images/big_bed_engineering.png index f7d53c658b..7cdd39b641 100644 Binary files a/resources/images/big_bed_engineering.png and b/resources/images/big_bed_engineering.png differ diff --git a/resources/images/big_bed_high_templ.png b/resources/images/big_bed_high_templ.png index edcf8004a8..ebc1b5f237 100644 Binary files a/resources/images/big_bed_high_templ.png and b/resources/images/big_bed_high_templ.png differ diff --git a/resources/images/big_bed_high_templ_mini.png b/resources/images/big_bed_high_templ_mini.png new file mode 100644 index 0000000000..8f5800af04 Binary files /dev/null and b/resources/images/big_bed_high_templ_mini.png differ diff --git a/resources/images/big_bed_high_templ_o.png b/resources/images/big_bed_high_templ_o.png new file mode 100644 index 0000000000..e75df475ac Binary files /dev/null and b/resources/images/big_bed_high_templ_o.png differ diff --git a/resources/images/big_bed_pei.png b/resources/images/big_bed_pei.png index e1501a1ab4..e87d15993d 100644 Binary files a/resources/images/big_bed_pei.png and b/resources/images/big_bed_pei.png differ diff --git a/resources/images/big_bed_pei_mini.png b/resources/images/big_bed_pei_mini.png new file mode 100644 index 0000000000..18878f8147 Binary files /dev/null and b/resources/images/big_bed_pei_mini.png differ diff --git a/resources/images/big_bed_pei_o.png b/resources/images/big_bed_pei_o.png new file mode 100644 index 0000000000..51a5bef46a Binary files /dev/null and b/resources/images/big_bed_pei_o.png differ diff --git a/resources/profiles/BBL/machine/Bambu Lab A1 mini.json b/resources/profiles/BBL/machine/Bambu Lab A1 mini.json index 26ba6994c7..3e00135189 100644 --- a/resources/profiles/BBL/machine/Bambu Lab A1 mini.json +++ b/resources/profiles/BBL/machine/Bambu Lab A1 mini.json @@ -6,6 +6,8 @@ "bed_model": "bbl-3dp-A1M.stl", "bed_texture": "bbl-3dp-logo.svg", "default_bed_type": "Textured PEI Plate", + "image_bed_type": "mini", + "not_support_bed_type":"Cool Plate;Engineering Plate", "family": "BBL-3DP", "machine_tech": "FFF", "model_id": "N1", diff --git a/resources/profiles/BBL/machine/Bambu Lab H2D.json b/resources/profiles/BBL/machine/Bambu Lab H2D.json index 63d543b8f6..54426663ba 100644 --- a/resources/profiles/BBL/machine/Bambu Lab H2D.json +++ b/resources/profiles/BBL/machine/Bambu Lab H2D.json @@ -6,6 +6,7 @@ "bed_model": "bbl-3dp-H2D.stl", "bed_texture": "bbl-3dp-logo.svg", "default_bed_type": "Textured PEI Plate", + "image_bed_type": "o", "not_support_bed_type":"Cool Plate;Engineering Plate;Bambu Cool Plate SuperTack", "family": "BBL-3DP", "machine_tech": "FFF", diff --git a/src/libslic3r/Preset.hpp b/src/libslic3r/Preset.hpp index 950c69c7ee..f4d2e3ad5c 100644 --- a/src/libslic3r/Preset.hpp +++ b/src/libslic3r/Preset.hpp @@ -60,6 +60,7 @@ #define BBL_JSON_KEY_FAMILY "family" #define BBL_JSON_KEY_BED_MODEL "bed_model" #define BBL_JSON_KEY_BED_TEXTURE "bed_texture" +#define BBL_JSON_KEY_IMAGE_BED_TYPE "image_bed_type" #define BBL_JSON_KEY_HOTEND_MODEL "hotend_model" #define BBL_JSON_KEY_DEFAULT_MATERIALS "default_materials" #define BBL_JSON_KEY_NOT_SUPPORT_BED_TYPE "not_support_bed_type" @@ -118,8 +119,8 @@ public: // Vendor & Printer Model specific print bed model & texture. std::string bed_model; std::string bed_texture; + std::string image_bed_type; std::string hotend_model; - PrinterVariant* variant(const std::string &name) { for (auto &v : this->variants) if (v.name == name) diff --git a/src/libslic3r/PresetBundle.cpp b/src/libslic3r/PresetBundle.cpp index b6fbd4e7cf..5862480d6a 100644 --- a/src/libslic3r/PresetBundle.cpp +++ b/src/libslic3r/PresetBundle.cpp @@ -3299,6 +3299,8 @@ std::pair PresetBundle::load_vendor_configs_ else if (boost::iequals(it.key(), BBL_JSON_KEY_BED_MODEL)) { //get bed model model.bed_model = it.value(); + } else if (boost::iequals(it.key(), BBL_JSON_KEY_IMAGE_BED_TYPE)) { + model.image_bed_type = it.value(); } else if (boost::iequals(it.key(), BBL_JSON_KEY_BED_TEXTURE)) { //get bed texture diff --git a/src/slic3r/GUI/ImageDPIFrame.cpp b/src/slic3r/GUI/ImageDPIFrame.cpp index 0dd781fae9..c2ee92f98c 100644 --- a/src/slic3r/GUI/ImageDPIFrame.cpp +++ b/src/slic3r/GUI/ImageDPIFrame.cpp @@ -20,18 +20,17 @@ namespace Slic3r { namespace GUI { ImageDPIFrame::ImageDPIFrame() : DPIFrame(static_cast(wxGetApp().mainframe), wxID_ANY, "", wxDefaultPosition, wxDefaultSize, !wxCAPTION | !wxCLOSE_BOX | wxBORDER_NONE) { - m_image_px = 260; + m_image_px = 280; int width = 270; //SetTransparent(0); SetMinSize(wxSize(FromDIP(width), -1)); SetMaxSize(wxSize(FromDIP(width), -1)); - + SetBackgroundColour(wxColour(242, 242, 242, 255)); m_sizer_main = new wxBoxSizer(wxVERTICAL); auto image_sizer = new wxBoxSizer(wxVERTICAL); auto imgsize = FromDIP(width); m_bitmap = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("printer_preview_C13", this, m_image_px), wxDefaultPosition, wxSize(imgsize, imgsize * 0.94), 0); image_sizer->Add(m_bitmap, 0, wxALIGN_CENTER | wxALL, FromDIP(0)); - m_sizer_main->Add(image_sizer, FromDIP(0), wxALIGN_CENTER, FromDIP(0)); Bind(wxEVT_CLOSE_WINDOW, [this](auto &e) { diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index a4cc30bc3c..9144857cb2 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1557,12 +1557,11 @@ Sidebar::Sidebar(Plater *parent) reset_bed_type_combox_choices(); p->combo_printer_bed->Bind(wxEVT_COMBOBOX, [this](auto &e) { - auto select_bed_type = get_cur_select_bed_type(); bool isDual = static_cast(p->panel_printer_preset->GetSizer())->GetOrientation() == wxVERTICAL; - p->image_printer_bed->SetBitmap(create_scaled_bitmap(bed_type_thumbnails[select_bed_type], this, isDual ? 48 : 32)); + auto image_path = get_cur_select_bed_image(); + p->image_printer_bed->SetBitmap(create_scaled_bitmap(image_path, this, isDual ? 48 : 32)); if (p->big_bed_image_popup) { - p->big_bed_image_popup->set_bitmap( - create_scaled_bitmap("big_" + bed_type_thumbnails[select_bed_type], p->big_bed_image_popup, p->big_bed_image_popup->get_image_px())); + p->big_bed_image_popup->set_bitmap(create_scaled_bitmap("big_" + image_path, p->big_bed_image_popup, p->big_bed_image_popup->get_image_px())); } e.Skip(); // fix bug:Event spreads to sidebar }); @@ -1573,9 +1572,8 @@ Sidebar::Sidebar(Plater *parent) wxPoint temp_pos(pos.x + rect.GetWidth(), pos.y); if (p->big_bed_image_popup == nullptr) { p->big_bed_image_popup = new ImageDPIFrame(); - auto select_bed_type = get_cur_select_bed_type(); - p->big_bed_image_popup->set_bitmap( - create_scaled_bitmap("big_" + bed_type_thumbnails[select_bed_type], p->big_bed_image_popup, p->big_bed_image_popup->get_image_px())); + auto image_path = get_cur_select_bed_image(); + p->big_bed_image_popup->set_bitmap(create_scaled_bitmap("big_" + image_path, p->big_bed_image_popup, p->big_bed_image_popup->get_image_px())); } p->big_bed_image_popup->SetCanFocus(false); p->big_bed_image_popup->SetPosition(temp_pos); @@ -2199,15 +2197,14 @@ void Sidebar::update_presets(Preset::Type preset_type) bool is_dual_extruder = nozzle_diameter->size() == 2; p->layout_printer(isBBL, is_dual_extruder); - auto select_bed_type = get_cur_select_bed_type(); + auto image_path = get_cur_select_bed_image(); if (is_dual_extruder) { AMSCountPopupWindow::UpdateAMSCount(0, p->left_extruder); AMSCountPopupWindow::UpdateAMSCount(1, p->right_extruder); - - p->image_printer_bed->SetBitmap(create_scaled_bitmap(bed_type_thumbnails[select_bed_type], this, 48)); + p->image_printer_bed->SetBitmap(create_scaled_bitmap(image_path, this, 48)); } else { AMSCountPopupWindow::UpdateAMSCount(0, p->single_extruder); - p->image_printer_bed->SetBitmap(create_scaled_bitmap(bed_type_thumbnails[select_bed_type], this, 32)); + p->image_printer_bed->SetBitmap(create_scaled_bitmap(image_path, this, 32)); } if (GUI::wxGetApp().plater()) @@ -2268,6 +2265,14 @@ BedType Sidebar::get_cur_select_bed_type() { return select_bed_type; } +std::string Sidebar::get_cur_select_bed_image() +{ + auto select_bed_type = get_cur_select_bed_type(); + auto series_suffix_str = m_cur_image_bed_type.empty() ? "" : ("_" + m_cur_image_bed_type); + auto image_path = bed_type_thumbnails[select_bed_type] + series_suffix_str; + return image_path; +} + void Sidebar::set_bed_type_accord_combox(BedType bed_type) { for (size_t i = 0; i < m_cur_combox_bed_types.size(); i++) { if (m_cur_combox_bed_types[i] == bed_type) { @@ -2275,7 +2280,11 @@ void Sidebar::set_bed_type_accord_combox(BedType bed_type) { return; } } - p->combo_printer_bed->SelectAndNotify(0); + use_default_bed_type(); + //re save preferred bed type + auto select_bed_type = get_cur_select_bed_type(); + std::string bed_type_name = print_config_def.get("curr_bed_type")->enum_values[int(select_bed_type) - 1]; + save_bed_type_to_config(bed_type_name); } bool Sidebar::reset_bed_type_combox_choices() { @@ -2301,6 +2310,9 @@ bool Sidebar::reset_bed_type_combox_choices() { m_cur_combox_bed_types.clear(); if (pm &&bed_type_def && bed_type_def->enum_keys_map) { int index = 0; + if (m_cur_image_bed_type != pm->image_bed_type) { + m_cur_image_bed_type = pm->image_bed_type; + } for (auto item : bed_type_def->enum_labels) { index++; bool find = std::find(pm->not_support_bed_types.begin(), pm->not_support_bed_types.end(), item) != pm->not_support_bed_types.end(); @@ -2312,6 +2324,7 @@ bool Sidebar::reset_bed_type_combox_choices() { } } else { + m_cur_image_bed_type = ""; int index = 0; for (auto item : bed_type_def->enum_labels) { index++; @@ -2344,9 +2357,10 @@ void Sidebar::msw_rescale() p->m_printer_setting->msw_rescale(); p->btn_edit_printer->msw_rescale(); p->image_printer->SetSize(PRINTER_THUMBNAIL_SIZE); - bool isDual = static_cast(p->panel_printer_preset->GetSizer())->GetOrientation() == wxVERTICAL; - auto select_bed_type = get_cur_select_bed_type(); - p->image_printer_bed->SetBitmap(create_scaled_bitmap(bed_type_thumbnails[select_bed_type], this, 48)); + bool isDual = static_cast(p->panel_printer_preset->GetSizer())->GetOrientation() == wxVERTICAL; + auto image_path = get_cur_select_bed_image(); + p->image_printer_bed->SetBitmap(create_scaled_bitmap(image_path, this, isDual ? 48 : 32)); + p->m_filament_icon->msw_rescale(); p->m_bpButton_add_filament->msw_rescale(); p->m_bpButton_del_filament->msw_rescale(); diff --git a/src/slic3r/GUI/Plater.hpp b/src/slic3r/GUI/Plater.hpp index 515db7f067..5b4ff783a6 100644 --- a/src/slic3r/GUI/Plater.hpp +++ b/src/slic3r/GUI/Plater.hpp @@ -132,6 +132,7 @@ class Sidebar : public wxPanel std::shared_ptr m_sna_dialog{nullptr}; std::shared_ptr m_fna_dialog{nullptr}; std::vector m_cur_combox_bed_types; + std::string m_cur_image_bed_type; int m_last_combo_bedtype_count{0}; bool m_begin_sync_printer_status{false}; std::shared_ptr m_sync_dlg{nullptr}; @@ -160,6 +161,7 @@ public: //BBS void update_presets_from_to(Slic3r::Preset::Type preset_type, std::string from, std::string to); BedType get_cur_select_bed_type(); + std::string get_cur_select_bed_image(); void set_bed_type_accord_combox(BedType bed_type); bool reset_bed_type_combox_choices(); void change_top_border_for_mode_sizer(bool increase_border);