mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 18:44:25 +08:00
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
@ -913,9 +913,29 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
|||||||
return { L("No extrusions under current settings.") };
|
return { L("No extrusions under current settings.") };
|
||||||
|
|
||||||
if (extruders.size() > 1 && m_config.print_sequence != PrintSequence::ByObject) {
|
if (extruders.size() > 1 && m_config.print_sequence != PrintSequence::ByObject) {
|
||||||
auto ret = check_multi_filament_valid(*this);
|
if (m_config.single_extruder_multi_material) {
|
||||||
if (!ret.string.empty())
|
auto ret = check_multi_filament_valid(*this);
|
||||||
return ret;
|
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.print_sequence == PrintSequence::ByObject) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user