Fix check multi filament valid (#1433)
* no need to check different filaments if using a multi-head printer * bed temperatures warning
This commit is contained in:
parent
1c780496aa
commit
1a809b0931
1 changed files with 23 additions and 3 deletions
|
@ -913,11 +913,31 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
|||
return { L("No extrusions under current settings.") };
|
||||
|
||||
if (extruders.size() > 1 && m_config.print_sequence != PrintSequence::ByObject) {
|
||||
if (m_config.single_extruder_multi_material) {
|
||||
auto ret = check_multi_filament_valid(*this);
|
||||
if (!ret.string.empty())
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (warning) {
|
||||
for (unsigned int extruder_a: extruders) {
|
||||
const ConfigOptionInts* bed_temp_opt = m_config.option<ConfigOptionInts>(get_bed_temp_key(m_config.curr_bed_type));
|
||||
const ConfigOptionInts* bed_temp_1st_opt = m_config.option<ConfigOptionInts>(get_bed_temp_1st_layer_key(m_config.curr_bed_type));
|
||||
int bed_temp_a = bed_temp_opt->get_at(extruder_a);
|
||||
int bed_temp_1st_a = bed_temp_1st_opt->get_at(extruder_a);
|
||||
for (unsigned int extruder_b: extruders) {
|
||||
int bed_temp_b = bed_temp_opt->get_at(extruder_b);
|
||||
int bed_temp_1st_b = bed_temp_1st_opt->get_at(extruder_b);
|
||||
if (std::abs(bed_temp_a - bed_temp_b) > 15 || std::abs(bed_temp_1st_a - bed_temp_1st_b) > 15) {
|
||||
warning->string = L("Bed temperatures for the used filaments differ significantly.");
|
||||
goto DONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
DONE:;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_config.print_sequence == PrintSequence::ByObject) {
|
||||
if (m_config.timelapse_type == TimelapseType::tlSmooth)
|
||||
return {L("Smooth mode of timelapse is not supported when \"by object\" sequence is enabled.")};
|
||||
|
|
Loading…
Reference in a new issue