mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
ENH: refine enclosed printing logic
1.Display a pop-up window based on whether is enclosed jira: STUDIO-4532 Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I5e7c85f6590ebe1c65f957c6bcc57a969e804964
This commit is contained in:
parent
882e4ff114
commit
241d10c637
3 changed files with 14 additions and 1 deletions
|
@ -474,6 +474,18 @@ PrinterArch MachineObject::get_printer_arch() const
|
||||||
return DeviceManager::get_printer_arch(printer_type);
|
return DeviceManager::get_printer_arch(printer_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//BBS: check if machine is enclosed
|
||||||
|
bool MachineObject::is_printer_enclosed() const
|
||||||
|
{
|
||||||
|
std::unordered_set<std::string>enclosed_printers = {
|
||||||
|
"C12",
|
||||||
|
"BL-P002",
|
||||||
|
"BL-P001",
|
||||||
|
"C13"
|
||||||
|
};
|
||||||
|
return enclosed_printers.find(printer_type) != enclosed_printers.end();
|
||||||
|
}
|
||||||
|
|
||||||
MachineObject::MachineObject(NetworkAgent* agent, std::string name, std::string id, std::string ip)
|
MachineObject::MachineObject(NetworkAgent* agent, std::string name, std::string id, std::string ip)
|
||||||
:dev_name(name),
|
:dev_name(name),
|
||||||
dev_id(id),
|
dev_id(id),
|
||||||
|
|
|
@ -471,6 +471,7 @@ public:
|
||||||
std::string printer_type; /* model_id */
|
std::string printer_type; /* model_id */
|
||||||
PrinterSeries get_printer_series() const;
|
PrinterSeries get_printer_series() const;
|
||||||
PrinterArch get_printer_arch() const;
|
PrinterArch get_printer_arch() const;
|
||||||
|
bool is_printer_enclosed() const;
|
||||||
|
|
||||||
std::string printer_thumbnail_img;
|
std::string printer_thumbnail_img;
|
||||||
std::string monitor_upgrade_printer_img;
|
std::string monitor_upgrade_printer_img;
|
||||||
|
|
|
@ -2286,7 +2286,7 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
|
||||||
|
|
||||||
for (auto warning : plate->get_slice_result()->warnings) {
|
for (auto warning : plate->get_slice_result()->warnings) {
|
||||||
if (warning.msg == BED_TEMP_TOO_HIGH_THAN_FILAMENT) {
|
if (warning.msg == BED_TEMP_TOO_HIGH_THAN_FILAMENT) {
|
||||||
if ((obj_->get_printer_series() == PrinterSeries::SERIES_X1)) {
|
if (obj_->is_printer_enclosed()) {
|
||||||
confirm_text.push_back(Plater::get_slice_warning_string(warning) + "\n");
|
confirm_text.push_back(Plater::get_slice_warning_string(warning) + "\n");
|
||||||
has_slice_warnings = true;
|
has_slice_warnings = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue