ENH: add the smooth pei bed type

smooth pei plate uses the same parameters as high temp plate
JIRA: STUDIO-4181

Change-Id: I9db8ca7440b5b205902fd4b35af6c24440e1104d
This commit is contained in:
lane.wei 2023-08-23 21:24:07 +08:00 committed by Lane.Wei
parent 23079b23df
commit f1362a7757
4 changed files with 33 additions and 30 deletions

View File

@ -628,7 +628,7 @@ void PrintConfigDef::init_fff_params()
def->enum_values.emplace_back("Textured PEI Plate");
def->enum_labels.emplace_back(L("Cool Plate / PLA Plate"));
def->enum_labels.emplace_back(L("Engineering Plate"));
def->enum_labels.emplace_back(L("High Temp Plate"));
def->enum_labels.emplace_back(L("Smooth PEI Plate / High Temp Plate"));
def->enum_labels.emplace_back(L("Textured PEI Plate"));
def->set_default_value(new ConfigOptionEnum<BedType>(btPC));

View File

@ -23,8 +23,9 @@ class BBLModelTask;
enum MachineBedType {
//BED_TYPE_AUTO = 0,
BED_TYPE_PC = 0,
BED_TYPE_PEI,
BED_TYPE_PE,
BED_TYPE_PEI,
BED_TYPE_PTE,
BED_TYPE_COUNT,
};

View File

@ -225,14 +225,14 @@ void MachineObjectPanel::doRender(wxDC &dc)
}
auto sizet = dc.GetTextExtent(dev_name);
auto text_end = 0;
if (m_show_edit) {
text_end = size.x - m_unbind_img.GetBmpSize().x - 30;
}
else {
text_end = size.x - m_unbind_img.GetBmpSize().x;
}
wxString finally_name = dev_name;
if (sizet.x > (text_end - left)) {
auto limit_width = text_end - left - dc.GetTextExtent("...").x - 15;
@ -268,7 +268,7 @@ void MachineObjectPanel::doRender(wxDC &dc)
dc.DrawBitmap(m_edit_name_img.bmp(), left, (size.y - m_edit_name_img.GetBmpSize().y) / 2);
}
}
}
void MachineObjectPanel::update_machine_info(MachineObject *info, bool is_my_devices)
@ -868,13 +868,15 @@ static wxString MACHINE_BED_TYPE_STRING[BED_TYPE_COUNT] = {
//_L("Auto"),
_L("Bambu Cool Plate") + " / " + _L("PLA Plate"),
_L("Bamabu Engineering Plate"),
_L("Bamabu High Temperature Plate")};
_L("Bamabu Smooth PEI Plate") + "/" + _L("High temperature Plate"),
_L("Bamabu Textured PEI Plate")};
static std::string MachineBedTypeString[BED_TYPE_COUNT] = {
//"auto",
"pc",
"pei",
"pe",
"pei",
"pte",
};
void SelectMachineDialog::stripWhiteSpace(std::string& str)
@ -1297,7 +1299,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_st_txt_error_desc = new Label(m_sw_print_failed_info, wxEmptyString);
st_title_error_desc->SetForegroundColour(0x909090);
st_title_error_desc_doc->SetForegroundColour(0x909090);
m_st_txt_error_desc->SetForegroundColour(0x909090);
m_st_txt_error_desc->SetForegroundColour(0x909090);
st_title_error_desc->SetFont(::Label::Body_13);
st_title_error_desc_doc->SetFont(::Label::Body_13);
m_st_txt_error_desc->SetFont(::Label::Body_13);
@ -1314,7 +1316,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_st_txt_extra_info = new Label(m_sw_print_failed_info, wxEmptyString);
st_title_extra_info->SetForegroundColour(0x909090);
st_title_extra_info_doc->SetForegroundColour(0x909090);
m_st_txt_extra_info->SetForegroundColour(0x909090);
m_st_txt_extra_info->SetForegroundColour(0x909090);
st_title_extra_info->SetFont(::Label::Body_13);
st_title_extra_info_doc->SetFont(::Label::Body_13);
m_st_txt_extra_info->SetFont(::Label::Body_13);
@ -1440,7 +1442,7 @@ void SelectMachineDialog::init_bind()
}
}
}
});
});
m_bitmap_last_plate->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {
if (m_print_plate_idx > 0) {
@ -1637,7 +1639,7 @@ wxWindow *SelectMachineDialog::create_item_checkbox(wxString title, wxWindow *pa
config->set_str("print", param, "0");
}
});
text->Bind(wxEVT_LEFT_DOWN, [this, check, param](wxMouseEvent &) {
//if (!m_checkbox_state_list[param]) {return;}
check->SetValue(check->GetValue() ? false : true);
@ -1697,7 +1699,7 @@ void SelectMachineDialog::prepare_mode(bool refresh_button)
if (refresh_button) {
Enable_Send_Button(true);
}
m_status_bar->reset();
if (m_simplebook->GetSelection() != 0) {
m_simplebook->SetSelection(0);
@ -1726,7 +1728,7 @@ void SelectMachineDialog::sending_mode()
Fit();
}
if (m_print_page_mode != PrintPageModeSending) {
m_print_page_mode = PrintPageModeSending;
for (auto it = m_materialList.begin(); it != m_materialList.end(); it++) {
@ -2261,7 +2263,7 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
PartPlate* plate = m_plater->get_partplate_list().get_curr_plate();
for (auto warning : plate->get_slice_result()->warnings) {
if (warning.msg == BED_TEMP_TOO_HIGH_THAN_FILAMENT) {
if ((obj_->printer_type == "BL-P001" || obj_->printer_type == "BL-P002")) {
@ -2346,7 +2348,7 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
else {
this->on_send_print();
}
});
confirm_text.push_back(_L("Please click the confirm button if you still want to proceed with printing.") + "\n");
@ -2937,11 +2939,11 @@ void SelectMachineDialog::on_timer(wxTimerEvent &event)
if(!dev) return;
MachineObject* obj_ = dev->get_selected_machine();
if(!obj_) return;
if (!obj_
|| obj_->amsList.empty()
|| obj_->ams_exist_bits == 0
if (!obj_
|| obj_->amsList.empty()
|| obj_->ams_exist_bits == 0
|| !obj_->is_support_filament_backup
|| !obj_->ams_auto_switch_filament_flag
|| !obj_->ams_auto_switch_filament_flag
|| !m_checkbox_list["use_ams"]->GetValue() ) {
if (m_ams_backup_tip->IsShown()) {
m_ams_backup_tip->Hide();
@ -3347,11 +3349,11 @@ void SelectMachineDialog::on_dpi_changed(const wxRect &suggested_rect)
m_button_ensure->SetCornerRadius(FromDIP(12));
m_status_bar->msw_rescale();
for (auto checkpire : m_checkbox_list) {
for (auto checkpire : m_checkbox_list) {
checkpire.second->Rescale();
}
for (auto material1 : m_materialList) {
for (auto material1 : m_materialList) {
material1.second->item->msw_rescale();
}
@ -3432,7 +3434,7 @@ void SelectMachineDialog::set_default()
filename = m_plater->get_export_gcode_filename("", true);
if (filename.empty()) filename = _L("Untitled");
}
fs::path filename_path(filename.c_str());
m_current_project_name = wxString::FromUTF8(filename_path.filename().string());
@ -3528,7 +3530,7 @@ void SelectMachineDialog::set_default_normal()
std::vector<std::string> materials;
std::vector<std::string> brands;
std::vector<std::string> display_materials;
auto preset_bundle = wxGetApp().preset_bundle;
for (auto filament_name : preset_bundle->filament_presets) {
for (auto iter = preset_bundle->filaments.lbegin(); iter != preset_bundle->filaments.end(); iter++) {
@ -3546,7 +3548,7 @@ void SelectMachineDialog::set_default_normal()
}
}
//init MaterialItem
//init MaterialItem
auto extruders = wxGetApp().plater()->get_partplate_list().get_curr_plate()->get_used_extruders();
BitmapCache bmcache;
@ -3718,8 +3720,8 @@ void SelectMachineDialog::set_default_from_sdcard()
materials.push_back(fo.type);
brands.push_back(fo.brand);
}
//init MaterialItem
//init MaterialItem
MaterialHash::iterator iter = m_materialList.begin();
while (iter != m_materialList.end()) {
int id = iter->first;
@ -3734,7 +3736,7 @@ void SelectMachineDialog::set_default_from_sdcard()
m_materialList.clear();
m_filaments.clear();
for (auto i = 0; i < m_required_data_plate_data_list[m_print_plate_idx]->slice_filaments_info.size(); i++) {
FilamentInfo fo = m_required_data_plate_data_list[m_print_plate_idx]->slice_filaments_info[i];
@ -3902,7 +3904,7 @@ bool SelectMachineDialog::Show(bool show)
if (obj_->is_connected()) {
obj_->disconnect();
}
}
}
}

View File

@ -2665,7 +2665,7 @@ void TabFilament::build()
line.append_option(optgroup->get_option("eng_plate_temp"));
optgroup->append_line(line);
line = { L("High Temp Plate"), L("Bed temperature when high temperature plate is installed. Value 0 means the filament does not support to print on the High Temp Plate") };
line = {L("Smooth PEI Plate / High Temp Plate"), L("Bed temperature when Smooth PEI Plate/High temperature plate is installed. Value 0 means the filament does not support to print on the Smooth PEI Plate/High Temp Plate") };
line.append_option(optgroup->get_option("hot_plate_temp_initial_layer"));
line.append_option(optgroup->get_option("hot_plate_temp"));
optgroup->append_line(line);
@ -3106,7 +3106,7 @@ void TabPrinter::build_fff()
optgroup->append_single_option_line("extruder_clearance_radius");
optgroup->append_single_option_line("extruder_clearance_height_to_rod");
optgroup->append_single_option_line("extruder_clearance_height_to_lid");
optgroup = page->new_optgroup(L("Accessory") /*, L"param_accessory"*/);
optgroup->append_single_option_line("nozzle_type");
optgroup->append_single_option_line("auxiliary_fan");