NEW:add statistics of all plates in preview

Change-Id: Ia93ca5a31d07ae5d52a37bb7b6fb0e3b26cfd012
This commit is contained in:
liz.li 2023-01-05 09:06:18 +08:00 committed by Lane.Wei
parent b731ac8db8
commit 6114a415cf
11 changed files with 466 additions and 33 deletions

View file

@ -3105,6 +3105,25 @@ PartPlate* PartPlateList::get_selected_plate()
return m_plate_list[m_current_plate];
}
std::vector<PartPlate*> PartPlateList::get_nonempty_plate_list()
{
std::vector<PartPlate*> nonempty_plate_list;
for (auto plate : m_plate_list){
if (plate->get_extruders().size() != 0) {
nonempty_plate_list.push_back(plate);
}
}
return nonempty_plate_list;
}
std::vector<const GCodeProcessorResult*> PartPlateList::get_nonempty_plates_slice_results() {
std::vector<const GCodeProcessorResult*> nonempty_plates_slice_result;
for (auto plate : get_nonempty_plate_list()) {
nonempty_plates_slice_result.push_back(plate->get_slice_result());
}
return nonempty_plates_slice_result;
}
//select plate
int PartPlateList::select_plate(int index)
{