mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
NEW: two nozzles ams mapping
jira:[two nozzles ams mapping] Change-Id: I914439114b2946cdc1e3e4eb07a37f75f0529c12 (cherry picked from commit 62ef51d0512bdbaf115b92d95ffd0407a15f48bb)
This commit is contained in:
@@ -155,6 +155,7 @@ public:
|
||||
std::vector<MappingItem*> m_mapping_item_list;
|
||||
|
||||
bool m_has_unmatch_filament {false};
|
||||
bool m_supporting_mix_print {false};
|
||||
int m_current_filament_id;
|
||||
std::string m_tag_material;
|
||||
wxBoxSizer *m_sizer_main{nullptr};
|
||||
|
||||
@@ -854,6 +854,10 @@ bool MachineObject::is_support_ams_mapping()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MachineObject::is_support_amx_ext_mix_mapping() {
|
||||
return true;
|
||||
}
|
||||
|
||||
static float calc_color_distance(wxColour c1, wxColour c2)
|
||||
{
|
||||
float lab[2][3];
|
||||
@@ -876,17 +880,18 @@ void MachineObject::get_ams_colors(std::vector<wxColour> &ams_colors) {
|
||||
}
|
||||
}
|
||||
|
||||
int MachineObject::ams_filament_mapping(std::vector<FilamentInfo> filaments, std::vector<FilamentInfo> &result, std::vector<int> exclude_id)
|
||||
int MachineObject::ams_filament_mapping(std::vector<FilamentInfo> filaments, std::vector<FilamentInfo> &result, bool ext_first, bool ext_second, std::vector<int> exclude_id)
|
||||
{
|
||||
if (filaments.empty())
|
||||
return -1;
|
||||
|
||||
// tray_index : tray_color
|
||||
std::map<int, FilamentInfo> tray_filaments;
|
||||
|
||||
for (auto ams = amsList.begin(); ams != amsList.end(); ams++) {
|
||||
|
||||
std::string ams_id = ams->second->id;
|
||||
|
||||
FilamentInfo info;
|
||||
for (auto tray = ams->second->trayList.begin(); tray != ams->second->trayList.end(); tray++) {
|
||||
int ams_id = atoi(ams->first.c_str());
|
||||
int tray_id = atoi(tray->first.c_str());
|
||||
@@ -898,7 +903,6 @@ int MachineObject::ams_filament_mapping(std::vector<FilamentInfo> filaments, std
|
||||
}
|
||||
// push
|
||||
if (tray->second->is_tray_info_ready()) {
|
||||
FilamentInfo info;
|
||||
info.color = tray->second->color;
|
||||
info.type = tray->second->get_filament_type();
|
||||
info.id = tray_index;
|
||||
@@ -909,73 +913,67 @@ int MachineObject::ams_filament_mapping(std::vector<FilamentInfo> filaments, std
|
||||
/*for new ams mapping*/
|
||||
info.ams_id = ams->first.c_str();
|
||||
info.slot_id = tray->first.c_str();
|
||||
|
||||
}
|
||||
if (!ext_first && !ext_second)
|
||||
{
|
||||
tray_filaments.emplace(std::make_pair(tray_index, info));
|
||||
}
|
||||
else if (ams->second->nozzle == 0 && ext_first)
|
||||
{
|
||||
tray_filaments.emplace(std::make_pair(tray_index, info));
|
||||
}
|
||||
else if (ams->second->nozzle == 1 && ext_second)
|
||||
{
|
||||
tray_filaments.emplace(std::make_pair(tray_index, info));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// tray info list
|
||||
std::vector<FilamentInfo> tray_info_list;
|
||||
int flament_index_id = 0;
|
||||
for (auto ams = amsList.begin(); ams != amsList.end(); ams++) {
|
||||
for (auto tray = ams->second->trayList.begin(); tray != ams->second->trayList.end(); tray++) {
|
||||
|
||||
if (ext_first)
|
||||
{
|
||||
auto tray = vt_slot.begin();
|
||||
if (tray != vt_slot.end())
|
||||
{
|
||||
FilamentInfo info;
|
||||
info.id = flament_index_id;
|
||||
info.tray_id = flament_index_id;
|
||||
info.color = tray->second->color;
|
||||
info.type = tray->second->get_filament_type();
|
||||
info.ctype = tray->second->ctype;
|
||||
info.colors = tray->second->cols;
|
||||
|
||||
info.color = tray->color;
|
||||
//info.color = "EEEEEEFF";
|
||||
info.type = tray->get_filament_type();
|
||||
//info.type = "PLA"; //temp change
|
||||
info.tray_id = atoi(tray->id.c_str());
|
||||
info.id = atoi(tray->id.c_str());
|
||||
info.filament_id = tray->setting_id;
|
||||
info.ctype = tray->ctype;
|
||||
info.colors = tray->cols;
|
||||
|
||||
/*for new ams mapping*/
|
||||
info.ams_id = ams->second->id;
|
||||
info.slot_id = tray->second->id;
|
||||
|
||||
tray_info_list.push_back(info);
|
||||
flament_index_id++;
|
||||
info.ams_id = tray->id.c_str();
|
||||
info.slot_id = std::to_string(0);
|
||||
tray_filaments.emplace(std::make_pair(info.tray_id, info));
|
||||
}
|
||||
|
||||
}
|
||||
if (ext_second)
|
||||
{
|
||||
|
||||
|
||||
// is_support_ams_mapping
|
||||
if (!is_support_ams_mapping()) {
|
||||
BOOST_LOG_TRIVIAL(info) << "ams_mapping: do not support, use order mapping";
|
||||
result.clear();
|
||||
for (int i = 0; i < filaments.size(); i++) {
|
||||
auto tray = vt_slot.begin();
|
||||
tray++;
|
||||
if (tray != vt_slot.end())
|
||||
{
|
||||
FilamentInfo info;
|
||||
info.id = filaments[i].id;
|
||||
int ams_id = filaments[i].id / 4;
|
||||
auto ams_it = amsList.find(std::to_string(ams_id));
|
||||
if (ams_it == amsList.end()) {
|
||||
info.tray_id = -1;
|
||||
info.mapping_result = (int)MappingResult::MAPPING_RESULT_EXCEED;
|
||||
} else {
|
||||
info.tray_id = filaments[i].id;
|
||||
int tray_id = filaments[i].id % 4;
|
||||
auto tray_it = ams_it->second->trayList.find(std::to_string(tray_id));
|
||||
if (tray_it != ams_it->second->trayList.end()) {
|
||||
if (!tray_it->second->is_exists || tray_it->second->is_unset_third_filament()) {
|
||||
;
|
||||
} else {
|
||||
if (filaments[i].type == tray_it->second->get_filament_type()) {
|
||||
info.color = tray_it->second->color;
|
||||
info.type = tray_it->second->get_filament_type();
|
||||
info.ctype = tray_it->second->ctype;
|
||||
std::vector<wxColour> cols;
|
||||
info.colors = tray_it->second->cols;
|
||||
} else {
|
||||
info.tray_id = -1;
|
||||
info.mapping_result = (int)MappingResult::MAPPING_RESULT_TYPE_MISMATCH;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result.push_back(info);
|
||||
info.color = tray->color;
|
||||
//info.color = "EEEEEEFF";
|
||||
info.type = tray->get_filament_type();
|
||||
//info.type = "PLA"; //temp change
|
||||
info.tray_id = atoi(tray->id.c_str());
|
||||
info.id = atoi(tray->id.c_str());
|
||||
info.filament_id = tray->setting_id;
|
||||
info.ctype = tray->ctype;
|
||||
info.colors = tray->cols;
|
||||
|
||||
/*for new ams mapping*/
|
||||
info.ams_id = tray->id.c_str();
|
||||
info.slot_id = std::to_string(0);
|
||||
tray_filaments.emplace(std::make_pair(info.tray_id, info));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
char buffer[256];
|
||||
@@ -1096,53 +1094,11 @@ int MachineObject::ams_filament_mapping(std::vector<FilamentInfo> filaments, std
|
||||
return 0;
|
||||
}
|
||||
|
||||
reset_mapping_result(result);
|
||||
try {
|
||||
// try to use ordering ams mapping
|
||||
bool order_mapping_result = true;
|
||||
for (int i = 0; i < filaments.size(); i++) {
|
||||
if (i >= tray_info_list.size()) {
|
||||
order_mapping_result = false;
|
||||
break;
|
||||
}
|
||||
if (tray_info_list[i].tray_id == -1) {
|
||||
result[i].tray_id = tray_info_list[i].tray_id;
|
||||
} else {
|
||||
if (!tray_info_list[i].type.empty() && tray_info_list[i].type != filaments[i].type) {
|
||||
order_mapping_result = false;
|
||||
break;
|
||||
} else {
|
||||
result[i].tray_id = tray_info_list[i].tray_id;
|
||||
result[i].color = tray_info_list[i].color;
|
||||
result[i].type = tray_info_list[i].type;
|
||||
result[i].ctype = tray_info_list[i].ctype;
|
||||
result[i].colors = tray_info_list[i].colors;
|
||||
|
||||
/*for new ams mapping*/
|
||||
result[i].ams_id = tray_info_list[i].ams_id;
|
||||
result[i].slot_id = tray_info_list[i].slot_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//check order mapping result
|
||||
if (is_valid_mapping_result(result, true)) {
|
||||
return 0;
|
||||
}
|
||||
} catch(...) {
|
||||
reset_mapping_result(result);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// try to match some color
|
||||
reset_mapping_result(result);
|
||||
result = cache_map_result;
|
||||
for (auto it = result.begin(); it != result.end(); it++) {
|
||||
if (it->distance >= 6000) {
|
||||
it->tray_id = -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -610,9 +610,10 @@ public:
|
||||
bool has_ams() { return ams_exist_bits != 0; }
|
||||
bool can_unload_filament();
|
||||
bool is_support_ams_mapping();
|
||||
bool is_support_amx_ext_mix_mapping();
|
||||
|
||||
void get_ams_colors(std::vector<wxColour>& ams_colors);
|
||||
int ams_filament_mapping(std::vector<FilamentInfo> filaments, std::vector<FilamentInfo> &result, std::vector<int> exclude_id = std::vector<int>());
|
||||
int ams_filament_mapping(std::vector<FilamentInfo> filaments, std::vector<FilamentInfo> &result, bool ext_first = false, bool ext_second = false, std::vector<int> exclude_id = std::vector<int>());
|
||||
bool is_valid_mapping_result(std::vector<FilamentInfo>& result, bool check_empty_slot = false);
|
||||
// exceed index start with 0
|
||||
bool is_mapping_exceed_filament(std::vector<FilamentInfo>& result, int &exceed_index);
|
||||
|
||||
@@ -412,8 +412,10 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
||||
m_sizer_filament_2extruder->Add(m_filament_right_panel, 0, wxALIGN_CENTER, 0);
|
||||
m_sizer_filament_2extruder->Layout();
|
||||
|
||||
m_filament_left_panel->Hide();
|
||||
m_filament_right_panel->Hide();
|
||||
|
||||
//m_filament_left_panel->Hide();
|
||||
//m_filament_right_panel->Hide();
|
||||
m_filament_panel->Hide();
|
||||
|
||||
|
||||
|
||||
@@ -997,7 +999,12 @@ void SelectMachineDialog::sync_ams_mapping_result(std::vector<FilamentInfo> &res
|
||||
wxString ams_id;
|
||||
wxColour ams_col;
|
||||
|
||||
if (f->tray_id >= 0) {
|
||||
if (f->tray_id == VIRTUAL_TRAY_MAIN_ID || f->tray_id == VIRTUAL_TRAY_DEPUTY_ID)
|
||||
{
|
||||
ams_id = "Ext";
|
||||
}
|
||||
|
||||
else if (f->tray_id >= 0) {
|
||||
ams_id = wxGetApp().transition_tridid(f->tray_id);
|
||||
//ams_id = wxString::Format("%02d", f->tray_id + 1);
|
||||
} else {
|
||||
@@ -1044,8 +1051,94 @@ bool SelectMachineDialog::do_ams_mapping(MachineObject *obj_)
|
||||
if (!obj_) return false;
|
||||
obj_->get_ams_colors(m_cur_colors_in_thumbnail);
|
||||
// try color and type mapping
|
||||
int result = obj_->ams_filament_mapping(m_filaments, m_ams_mapping_result);
|
||||
if (result == 0) {
|
||||
|
||||
const auto& full_config = wxGetApp().preset_bundle->full_config();
|
||||
size_t nozzle_nums = full_config.option<ConfigOptionFloats>("nozzle_diameter")->values.size();
|
||||
|
||||
int filament_result = 0;
|
||||
if (nozzle_nums > 1)
|
||||
{
|
||||
//get nozzle property, the nozzles are same?, wait fill
|
||||
if (!is_two_nozzle_same())
|
||||
{
|
||||
m_filaments_map = wxGetApp().plater()->get_partplate_list().get_curr_plate()->get_filament_maps();
|
||||
std::vector<FilamentInfo> m_ams_mapping_result_first;
|
||||
std::vector<FilamentInfo> m_ams_mapping_result_second;
|
||||
std::vector<FilamentInfo> m_filament_first;
|
||||
std::vector<FilamentInfo> m_filament_second;
|
||||
for (auto it = m_filaments.begin(); it != m_filaments.end(); it++)
|
||||
{
|
||||
if (it->id < 0 || it->id > m_filaments_map.size())
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "error: do_ams_mapping: m_filaments[].it" << it->id;
|
||||
BOOST_LOG_TRIVIAL(info) << "m_filaments_map.size()" << m_filaments_map.size();
|
||||
return false;
|
||||
}
|
||||
if (m_filaments_map[it->id] == 1)
|
||||
{
|
||||
m_filament_first.push_back(*it);
|
||||
}
|
||||
else if (m_filaments_map[it->id] == 2)
|
||||
{
|
||||
m_filament_second.push_back(*it);
|
||||
}
|
||||
}
|
||||
std::vector<FilamentInfo> temp_result_first;
|
||||
std::vector<FilamentInfo> temp_result_second;
|
||||
int result_first = obj_->ams_filament_mapping(m_filament_first, m_ams_mapping_result_first, true, false);
|
||||
int result_second = obj_->ams_filament_mapping(m_filament_second, m_ams_mapping_result_second, false, true);
|
||||
|
||||
m_ams_mapping_result.clear();
|
||||
auto iter_first = m_ams_mapping_result_first.begin();
|
||||
auto iter_second = m_ams_mapping_result_second.begin();
|
||||
auto it = m_filaments.begin();
|
||||
while (it != m_filaments.end() && iter_first != m_ams_mapping_result_first.end() && iter_second != m_ams_mapping_result_second.end())
|
||||
{
|
||||
if (it->id < 0 || it->id >= m_filaments_map.size())
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (m_filaments_map[it->id] == 1)
|
||||
{
|
||||
m_ams_mapping_result.push_back(*iter_first);
|
||||
iter_first++;
|
||||
it++;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ams_mapping_result.push_back(*iter_second);
|
||||
iter_second++;
|
||||
it++;
|
||||
}
|
||||
}
|
||||
while (iter_first != m_ams_mapping_result_first.end())
|
||||
{
|
||||
m_ams_mapping_result.push_back(*iter_first);
|
||||
iter_first++;
|
||||
}
|
||||
while (iter_second != m_ams_mapping_result_second.end())
|
||||
{
|
||||
m_ams_mapping_result.push_back(*iter_second);
|
||||
iter_second++;
|
||||
}
|
||||
filament_result = (result_first && result_second);
|
||||
}
|
||||
else {
|
||||
filament_result = obj_->ams_filament_mapping(m_filaments, m_ams_mapping_result, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
if (obj_->is_support_amx_ext_mix_mapping())
|
||||
{
|
||||
filament_result = obj_->ams_filament_mapping(m_filaments, m_ams_mapping_result, true, false);
|
||||
}
|
||||
else {
|
||||
filament_result = obj_->ams_filament_mapping(m_filaments, m_ams_mapping_result, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (filament_result == 0) {
|
||||
print_ams_mapping_result(m_ams_mapping_result);
|
||||
std::string ams_array;
|
||||
std::string ams_array2;
|
||||
@@ -1064,7 +1157,7 @@ bool SelectMachineDialog::do_ams_mapping(MachineObject *obj_)
|
||||
} else {
|
||||
// do not support ams mapping try to use order mapping
|
||||
bool is_valid = obj_->is_valid_mapping_result(m_ams_mapping_result);
|
||||
if (result != 1 && !is_valid) {
|
||||
if (filament_result != 1 && !is_valid) {
|
||||
//reset invalid result
|
||||
for (int i = 0; i < m_ams_mapping_result.size(); i++) {
|
||||
m_ams_mapping_result[i].tray_id = -1;
|
||||
@@ -1129,10 +1222,13 @@ bool SelectMachineDialog::get_ams_mapping_result(std::string &mapping_array_str,
|
||||
//convert #RRGGBB to RRGGBBAA
|
||||
mapping_item["sourceColor"] = m_filaments[k].color;
|
||||
mapping_item["targetColor"] = m_ams_mapping_result[k].color;
|
||||
|
||||
if (tray_id == VIRTUAL_TRAY_MAIN_ID || tray_id == VIRTUAL_TRAY_DEPUTY_ID)
|
||||
{
|
||||
tray_id = -1;
|
||||
}
|
||||
|
||||
/*new ams mapping data*/
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
if (m_ams_mapping_result[k].ams_id.empty() || m_ams_mapping_result[k].slot_id.empty()) { // invalid case
|
||||
@@ -1214,6 +1310,10 @@ bool SelectMachineDialog::build_nozzles_info(std::string& nozzles_info)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SelectMachineDialog::is_two_nozzle_same() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void SelectMachineDialog::prepare(int print_plate_idx)
|
||||
{
|
||||
m_print_plate_idx = print_plate_idx;
|
||||
@@ -1404,6 +1504,11 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
|
||||
update_print_status_msg(msg_text, true, false);
|
||||
Enable_Send_Button(false);
|
||||
Enable_Refresh_Button(true);
|
||||
} else if (status == PrintDialogStatus::PrintStatusAmsMappingMixInvalid) {
|
||||
wxString msg_text = _L("Please do not mix-use the Ext with Ams");
|
||||
update_print_status_msg(msg_text, true, false);
|
||||
Enable_Send_Button(false);
|
||||
Enable_Refresh_Button(true);
|
||||
} else if (status == PrintDialogStatus::PrintStatusAmsMappingU0Invalid) {
|
||||
wxString msg_text;
|
||||
if (params.size() > 1)
|
||||
@@ -2822,6 +2927,28 @@ void SelectMachineDialog::update_show_status()
|
||||
do_ams_mapping(obj_);
|
||||
}
|
||||
|
||||
if (!m_mapping_popup.m_supporting_mix_print)
|
||||
{
|
||||
bool useAms = false;
|
||||
bool useExt = false;
|
||||
for (auto iter = m_ams_mapping_result.begin(); iter != m_ams_mapping_result.end(); iter++)
|
||||
{
|
||||
if (iter->tray_id != VIRTUAL_TRAY_MAIN_ID)
|
||||
{
|
||||
useAms = true;
|
||||
}
|
||||
if (iter->tray_id == VIRTUAL_TRAY_MAIN_ID)
|
||||
{
|
||||
useExt = true;
|
||||
}
|
||||
if (useAms && useExt)
|
||||
{
|
||||
show_status(PrintDialogStatus::PrintStatusAmsMappingMixInvalid);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!obj_->is_support_ams_mapping()) {
|
||||
int exceed_index = -1;
|
||||
if (obj_->is_mapping_exceed_filament(m_ams_mapping_result, exceed_index)) {
|
||||
@@ -3217,7 +3344,7 @@ void SelectMachineDialog::reset_and_sync_ams_list()
|
||||
for (int f_index = 0; f_index < preset_bundle->filaments.size(); f_index++) {
|
||||
PresetCollection *filament_presets = &wxGetApp().preset_bundle->filaments;
|
||||
Preset * preset = &filament_presets->preset(f_index);
|
||||
|
||||
int size = preset_bundle->filaments.size();
|
||||
if (preset && filament_name.compare(preset->name) == 0) {
|
||||
std::string display_filament_type;
|
||||
std::string filament_type = preset->config.get_filament_type(display_filament_type);
|
||||
@@ -3252,6 +3379,16 @@ void SelectMachineDialog::reset_and_sync_ams_list()
|
||||
m_materialList.clear();
|
||||
m_filaments.clear();
|
||||
|
||||
const auto& full_config = wxGetApp().preset_bundle->full_config();
|
||||
const auto& extra_flush_volumes = get_min_flush_volumes(full_config, 0); // todo multi_extruder: always display nozzle 1
|
||||
size_t nozzle_nums = full_config.option<ConfigOptionFloats>("nozzle_diameter")->values.size();
|
||||
|
||||
bool use_double_extruder = nozzle_nums > 1 ? true : false;
|
||||
if (use_double_extruder)
|
||||
{
|
||||
m_filaments_map = wxGetApp().plater()->get_partplate_list().get_curr_plate()->get_filament_maps();
|
||||
}
|
||||
|
||||
for (auto i = 0; i < extruders.size(); i++) {
|
||||
auto extruder = extruders[i] - 1;
|
||||
auto colour = wxGetApp().preset_bundle->project_config.opt_string("filament_colour", (unsigned int) extruder);
|
||||
@@ -3261,8 +3398,26 @@ void SelectMachineDialog::reset_and_sync_ams_list()
|
||||
auto colour_rgb = wxColour((int) rgb[0], (int) rgb[1], (int) rgb[2], (int) rgb[3]);
|
||||
if (extruder >= materials.size() || extruder < 0 || extruder >= display_materials.size()) continue;
|
||||
|
||||
MaterialItem *item = new MaterialItem(m_filament_panel, colour_rgb, _L(display_materials[extruder]));
|
||||
m_sizer_ams_mapping->Add(item, 0, wxALL, FromDIP(5));
|
||||
MaterialItem* item = nullptr;
|
||||
if (use_double_extruder)
|
||||
{
|
||||
|
||||
if (m_filaments_map[extruder] == 1)
|
||||
{
|
||||
item = new MaterialItem(m_filament_left_panel, colour_rgb, _L(display_materials[extruder]));
|
||||
m_sizer_ams_mapping_left->Add(item, 0, wxALL, FromDIP(5));
|
||||
}
|
||||
else if (m_filaments_map[extruder] == 2)
|
||||
{
|
||||
item = new MaterialItem(m_filament_right_panel, colour_rgb, _L(display_materials[extruder]));
|
||||
m_sizer_ams_mapping_right->Add(item, 0, wxALL, FromDIP(5));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item = new MaterialItem(m_filament_panel, colour_rgb, _L(display_materials[extruder]));
|
||||
m_sizer_ams_mapping->Add(item, 0, wxALL, FromDIP(5));
|
||||
}
|
||||
|
||||
item->Bind(wxEVT_LEFT_UP, [this, item, materials, extruder](wxMouseEvent &e) {});
|
||||
item->Bind(wxEVT_LEFT_DOWN, [this, item, materials, extruder](wxMouseEvent &e) {
|
||||
@@ -3327,9 +3482,23 @@ void SelectMachineDialog::reset_and_sync_ams_list()
|
||||
m_sizer_ams_mapping->SetCols(10);
|
||||
}*/
|
||||
|
||||
m_sizer_ams_mapping->SetCols(8);
|
||||
m_sizer_ams_mapping->Layout();
|
||||
m_filament_panel_sizer->Layout();
|
||||
if (use_double_extruder)
|
||||
{
|
||||
m_sizer_ams_mapping_left->SetCols(4);
|
||||
m_sizer_ams_mapping_left->Layout();
|
||||
//m_filament_panel_left_sizer->Layout();
|
||||
|
||||
m_sizer_ams_mapping_right->SetCols(4);
|
||||
m_sizer_ams_mapping_right->Layout();
|
||||
//m_filament_panel_right_sizer->Layout();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sizer_ams_mapping->SetCols(8);
|
||||
m_sizer_ams_mapping->Layout();
|
||||
m_filament_panel_sizer->Layout();
|
||||
}
|
||||
|
||||
// reset_ams_material();//show "-"
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ enum PrintDialogStatus {
|
||||
PrintStatusAmsMappingSuccess,
|
||||
PrintStatusAmsMappingInvalid,
|
||||
PrintStatusAmsMappingU0Invalid,
|
||||
PrintStatusAmsMappingMixInvalid,
|
||||
PrintStatusAmsMappingValid,
|
||||
PrintStatusAmsMappingByOrder,
|
||||
PrintStatusRefreshingMachineList,
|
||||
@@ -199,6 +200,7 @@ private:
|
||||
std::vector<MachineObject*> m_list;
|
||||
std::vector<FilamentInfo> m_filaments;
|
||||
std::vector<FilamentInfo> m_ams_mapping_result;
|
||||
std::vector<int> m_filaments_map;
|
||||
std::shared_ptr<BBLStatusBarSend> m_status_bar;
|
||||
std::unique_ptr<Worker> m_worker;
|
||||
|
||||
@@ -369,6 +371,7 @@ public:
|
||||
bool Show(bool show);
|
||||
bool do_ams_mapping(MachineObject* obj_);
|
||||
bool get_ams_mapping_result(std::string& mapping_array_str, std::string& mapping_array_str2, std::string& ams_mapping_info);
|
||||
bool is_two_nozzle_same();
|
||||
bool build_nozzles_info(std::string& nozzles_info);
|
||||
|
||||
std::string get_print_status_info(PrintDialogStatus status);
|
||||
|
||||
Reference in New Issue
Block a user