mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
remove bed temp 0 error for non-bambu printers
Signed-off-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
b7bdb65fd3
commit
3970b84d97
1 changed files with 22 additions and 20 deletions
|
@ -1124,29 +1124,31 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||||
const ConfigOptionDef* bed_type_def = print_config_def.get("curr_bed_type");
|
const ConfigOptionDef* bed_type_def = print_config_def.get("curr_bed_type");
|
||||||
assert(bed_type_def != nullptr);
|
assert(bed_type_def != nullptr);
|
||||||
|
|
||||||
const t_config_enum_values* bed_type_keys_map = bed_type_def->enum_keys_map;
|
if (is_BBL_printer()) {
|
||||||
for (unsigned int extruder_id : extruders) {
|
const t_config_enum_values* bed_type_keys_map = bed_type_def->enum_keys_map;
|
||||||
const ConfigOptionInts* bed_temp_opt = m_config.option<ConfigOptionInts>(get_bed_temp_key(m_config.curr_bed_type));
|
|
||||||
for (unsigned int extruder_id : extruders) {
|
for (unsigned int extruder_id : extruders) {
|
||||||
int curr_bed_temp = bed_temp_opt->get_at(extruder_id);
|
const ConfigOptionInts* bed_temp_opt = m_config.option<ConfigOptionInts>(get_bed_temp_key(m_config.curr_bed_type));
|
||||||
if (curr_bed_temp == 0 && bed_type_keys_map != nullptr) {
|
for (unsigned int extruder_id : extruders) {
|
||||||
std::string bed_type_name;
|
int curr_bed_temp = bed_temp_opt->get_at(extruder_id);
|
||||||
for (auto item : *bed_type_keys_map) {
|
if (curr_bed_temp == 0 && bed_type_keys_map != nullptr) {
|
||||||
if (item.second == m_config.curr_bed_type) {
|
std::string bed_type_name;
|
||||||
bed_type_name = item.first;
|
for (auto item : *bed_type_keys_map) {
|
||||||
break;
|
if (item.second == m_config.curr_bed_type) {
|
||||||
|
bed_type_name = item.first;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
StringObjectException except;
|
StringObjectException except;
|
||||||
except.string = format(L("Plate %d: %s does not support filament %s"), this->get_plate_index() + 1, L(bed_type_name), extruder_id + 1);
|
except.string = format(L("Plate %d: %s does not support filament %s"), this->get_plate_index() + 1, L(bed_type_name), extruder_id + 1);
|
||||||
except.string += "\n";
|
except.string += "\n";
|
||||||
except.type = STRING_EXCEPT_FILAMENT_NOT_MATCH_BED_TYPE;
|
except.type = STRING_EXCEPT_FILAMENT_NOT_MATCH_BED_TYPE;
|
||||||
except.params.push_back(std::to_string(this->get_plate_index() + 1));
|
except.params.push_back(std::to_string(this->get_plate_index() + 1));
|
||||||
except.params.push_back(L(bed_type_name));
|
except.params.push_back(L(bed_type_name));
|
||||||
except.params.push_back(std::to_string(extruder_id+1));
|
except.params.push_back(std::to_string(extruder_id + 1));
|
||||||
except.object = nullptr;
|
except.object = nullptr;
|
||||||
return except;
|
return except;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue