fix some bug

This commit is contained in:
QIDI TECH
2024-09-03 16:11:08 +08:00
parent 0ab17435c8
commit 4626916f7c
7 changed files with 295 additions and 238 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -361,6 +361,29 @@ void CalibrationPresetPage::msw_rescale()
#define NOZZLE_LIST_DEFAULT 1
float nozzle_diameter_list[NOZZLE_LIST_COUNT] = {0.2, 0.4, 0.6, 0.8 };
void CalibrationPresetPage::create_paragraph(wxWindow* parent, Label* title, std::string title_txt, Label* content, std::string content_txt) {
title = new Label(this, _L(title_txt));
title->SetFont(Label::Head_14);
title->Wrap(FromDIP(1100));
title->SetMinSize({ FromDIP(1100), -1 });
content = new Label(this, _L(content_txt));;
content->SetFont(Label::Body_14);
content->Wrap(FromDIP(1100));
content->SetMinSize({ FromDIP(1100), -1 });
m_top_sizer->Add(title);
m_top_sizer->Add(content);
m_top_sizer->AddSpacer(PRESET_GAP);
}
void CalibrationPresetPage::create_txt(wxWindow* parent, Label* label, std::string label_txt) {
label = new Label(parent, _L(label_txt));
label->SetFont(Label::Body_14);
label->Wrap(FromDIP(1100));
label->SetMinSize({ FromDIP(1100), -1 });
m_top_sizer->Add(label);
m_top_sizer->AddSpacer(PRESET_GAP);
}
//w29
void CalibrationPresetPage::add_bitmap(wxWindow* parent, wxBoxSizer* m_top_sizer, std::string img,const bool custom_cut , const int px_cnt) {
wxBitmap before_bmp;// = create_scaled_bitmap(img, this, 350);
@@ -395,195 +418,256 @@ void CalibrationPresetPage::create_gif_images(wxWindow* parent, wxBoxSizer* m_to
//w29
void CalibrationPresetPage::create_page_flow_coarse(wxWindow* parent, wxBoxSizer* m_top_sizer) {
create_paph(parent, _L("Step 1"), _L("You only need to click the \"Calibrate\" button below and wait for a short time.After successful slicing, you have three ways to print:\
Label* title_1{ nullptr };
std::string title_text_1 = "Step 1";
Label* content_1{ nullptr };
std::string content_text_1 = "You only need to click the \"Calibrate\" button below and wait for a short time.After successful slicing, you have three ways to print:\
\n1. Directly send the sliced file and print it;\
\n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;.\
\n3. Send the sliced file to a storage medium and print it through the storage medium.\
\nAfter successful printing, you will receive the model as shown in the picture. Choose the number with the smoothest surface. \
\nThe value of the number \"0\" in the figure has the smoothest surface, so the value obtained from coarse calibration is \"1 + 0.00 = 1\", which can be used as the intermediate value for fine calibration."));
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
\nThe value of the number \"0\" in the figure has the smoothest surface, so the value obtained from coarse calibration is \"1 + 0.00 = 1\", which can be used as the intermediate value for fine calibration.";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
add_bitmap(parent, m_top_sizer, "flowcoarseresult", true, 400);
m_top_sizer->AddSpacer(PRESET_GAP);
m_custom_range_panel = new CaliPresetCustomRangePanel(parent, 1);
//m_value_inputs
m_top_sizer->Add(m_custom_range_panel, 0, wxALIGN_CENTER);
create_paph(parent, _L("Step 2"), _L("You can also directly apply this value to your printing configuration, return to the \"Prepare\" interface, enter the filaments parameters to make modifications, and then click the save button to save your configuration."));
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
//add_bitmap(parent, m_top_sizer, "flowratiocoarseset", true, 180);
create_gif_images(parent, m_top_sizer, "flowratiocoarseset");
Label* title_2{ nullptr };
std::string title_text_2 = "Step 2";
Label* content_2{ nullptr };
std::string content_text_2 = "You can also directly apply this value to your printing configuration, return to the \"Prepare\" interface, enter the filaments parameters to make modifications, and then click the save button to save your configuration.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
create_gif_images(parent, m_top_sizer, "flowratiocoarseset");
#ifdef __linux__
wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2]() {
title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
Layout();
Fit();
});
#endif
}
//w29
void CalibrationPresetPage::create_page_flow_fine(wxWindow* parent, wxBoxSizer* m_top_sizer) {
create_paph(parent, _L("Step 1"), _L("After passing the \"coarse calibration\", the intermediate value \"1\" was obtained. Enter this value into the text box below and follow the steps in the \"coarse calibration\" to print."));
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
Label* title_1{ nullptr };
std::string title_text_1 = "Step 1";
Label* content_1{ nullptr };
std::string content_text_1 = "After passing the \"coarse calibration\", the intermediate value \"1\" was obtained. Enter this value into the text box below and follow the steps in the \"coarse calibration\" to print.";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
m_custom_range_panel = new CaliPresetCustomRangePanel(parent, 1,true);
m_top_sizer->Add(m_custom_range_panel, 0, wxALIGN_CENTER);
m_top_sizer->AddSpacer(PRESET_GAP);
create_paph(parent, _L("Step 2"), _L("After printing, select a number with the smoothest and smoothest surface, as shown in the figure below as \" - 1\". The optimal flow rate for obtaining current filaments is \"1.00 - 0.01 = 0.99\"."));
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
Label* title_2{ nullptr };
std::string title_text_2 = "Step 2";
Label* content_2{ nullptr };
std::string content_text_2 = "After printing, select a number with the smoothest and smoothest surface, as shown in the figure below as \" - 1\". The optimal flow rate for obtaining current filaments is \"1.00 - 0.01 = 0.99\".";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
add_bitmap(parent, m_top_sizer, "flowfineresult", true, 430);
m_top_sizer->AddSpacer(PRESET_GAP);
create_paph(parent, _L("Step 3"), _L("Fill in the value obtained in step 2 into the \"Flow ratio\" in the filaments settings, and you have completed the flow calibration here"));
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
//add_bitmap(parent, m_top_sizer, "flowratioset", true, 180);
create_gif_images(parent, m_top_sizer, "flowratioset");
Label* title_3{ nullptr };
std::string title_text_3 = "Step 3";
Label* content_3{ nullptr };
std::string content_text_3 = "Fill in the value obtained in step 2 into the \"Flow ratio\" in the filaments settings, and you have completed the flow calibration here";
create_paragraph(parent, title_3, title_text_3, content_3, content_text_3);
create_gif_images(parent, m_top_sizer, "flowratioset");
#ifdef __linux__
wxGetApp().CallAfter([this, title_1, title_2, title_3, content_1, content_2, content_3]() {
title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
title_3->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_3->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
Layout();
Fit();
});
#endif
}
//w29
void CalibrationPresetPage::create_page_pa_line(wxWindow* parent, wxBoxSizer* m_top_sizer) {
create_paph(parent, _L("Step 1"), _L("Enter the minimum pressure advance value, maximum pressure advance value, and step size at the bottom of the current page, click the \"Calibrate\" button at the bottom of the page, and wait for a little time.The software will automatically set the calibration configuration."));
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
Label* title_1{ nullptr };
std::string title_text_1 = "Step 1";
Label* content_1{ nullptr };
std::string content_text_1 = "Enter the minimum pressure advance value, maximum pressure advance value, and step size at the bottom of the current page, click the \"Calibrate\" button at the bottom of the page, and wait for a little time.The software will automatically set the calibration configuration.";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
m_custom_range_panel = new CaliPresetCustomRangePanel(parent);
m_top_sizer->Add(m_custom_range_panel, 0, wxALIGN_CENTER);
m_top_sizer->AddSpacer(PRESET_GAP);
auto extra_text = new Label(parent, _L("After successful slicing, you have three methods to perform the operation:\
Label* introduce_1{ nullptr };
std::string introduce_text_1 = "After successful slicing, you have three methods to perform the operation:\
\n1. Directly send the sliced file and print it;\
\n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;\
\n3. Send the sliced file to a storage medium and print it through the storage medium.\
\nReferring to the process in the \"PA Line\", you will print the calibration model as shown in the following figure."));
extra_text->SetFont(Label::Body_14);
extra_text->Wrap(FromDIP(1000));
extra_text->SetMinSize({ FromDIP(1000), -1 });
m_top_sizer->Add(extra_text);
m_top_sizer->AddSpacer(PRESET_GAP);
\nReferring to the process in the \"PA Line\", you will print the calibration model as shown in the following figure.";
create_txt(parent, introduce_1, introduce_text_1);
add_bitmap(parent, m_top_sizer, "PressureAdvanceLine", true, 400);
m_top_sizer->AddSpacer(PRESET_GAP);
create_paph(parent, _L("Step 2"), _L("After printing is completed, select the smoothest line, enter its corresponding value into the software and save it."));
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
Label* title_2{ nullptr };
std::string title_text_2 = "Step 2";
Label* content_2{ nullptr };
std::string content_text_2 = "After printing is completed, select the smoothest line, enter its corresponding value into the software and save it.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
create_gif_images(parent, m_top_sizer, "pavalue03");
#ifdef __linux__
wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2, introduce_1]() {
title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
introduce_1->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
Layout();
Fit();
});
#endif
}
//w29
void CalibrationPresetPage::create_page_pa_pattern(wxWindow* parent, wxBoxSizer* m_top_sizer) {
create_paph(parent, _L("Step 1"), _L("Enter the minimum pressure advance value, maximum pressure advance value, and step size at the bottom of the current page, click the \"Calibrate\" button at the bottom of the page, and wait for a little time.The software will automatically set the calibration configuration."));
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
Label* title_1{ nullptr };
std::string title_text_1 = "Step 1";
Label* content_1{ nullptr };
std::string content_text_1 = "Enter the minimum pressure advance value, maximum pressure advance value, and step size at the bottom of the current page, click the \"Calibrate\" button at the bottom of the page, and wait for a little time.The software will automatically set the calibration configuration.";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
m_custom_range_panel = new CaliPresetCustomRangePanel(parent);
m_top_sizer->Add(m_custom_range_panel, 0, wxALIGN_CENTER);
m_top_sizer->AddSpacer(PRESET_GAP);
auto extra_text = new Label(parent, _L("After successful slicing, you have three methods to perform the operation:\
Label* introduce_1{ nullptr };
std::string introduce_text_1 = "After successful slicing, you have three methods to perform the operation:\
\n1. Directly send the sliced file and print it;\
\n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;\
\n3. Send the sliced file to a storage medium and print it through the storage medium.\
\nReferring to the process in the \"PA Pattern\", you will print the calibration model as shown in the following figure."));
extra_text->SetFont(Label::Body_14);
extra_text->Wrap(FromDIP(1000));
extra_text->SetMinSize({ FromDIP(1000), -1 });
m_top_sizer->Add(extra_text);
m_top_sizer->AddSpacer(PRESET_GAP);
\nReferring to the process in the \"PA Pattern\", you will print the calibration model as shown in the following figure.";
create_txt(parent, introduce_1, introduce_text_1);
add_bitmap(parent, m_top_sizer, "PressureAdvancePattern", true, 350);
m_top_sizer->AddSpacer(PRESET_GAP);
create_paph(parent, _L("Step 2"), _L("There are three feature regions in this model that need to be observed:\
Label* title_2{ nullptr };
std::string title_text_2 = "Step 2";
Label* content_2{ nullptr };
std::string content_text_2 = "There are three feature regions in this model that need to be observed:\
\n1. In regions 1 and 3 of the figure, when the pressure advance value is too small, material stacking will occur and the endpoints will exceed the bounding box. When the pressure advance value is too high, there may be a shortage of wire and the endpoint has not reached the bounding box.\
\n2. In region 2 of the figure, when the pressure advance value is too small, material stacking may occur, which can cause excessive overflow at corners during actual printing. When the pressure value is too high, there may be missing threads. In actual printing, it can cause corners to become rounded and lead to missing threads.\
\nFinally, save the value with the best surface effect."));
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
\nFinally, save the value with the best surface effect.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
create_gif_images(parent, m_top_sizer, "pavalue03");
#ifdef __linux__
wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2, introduce_1]() {
title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
introduce_1->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
Layout();
Fit();
});
#endif
}
//w29
void CalibrationPresetPage::create_page_pa_tower(wxWindow* parent, wxBoxSizer* m_top_sizer) {
create_paph(parent, _L("Step 1"), _L("Enter the minimum pressure advance value, maximum pressure advance value, and step size at the bottom of the current page, click the \"Calibrate\" button at the bottom of the page, and wait for a little time. The software will automatically set the calibration configuration."));
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
Label* title_1{ nullptr };
std::string title_text_1 = "Step 1";
Label* content_1{ nullptr };
std::string content_text_1 = "Enter the minimum pressure advance value, maximum pressure advance value, and step size at the bottom of the current page, click the \"Calibrate\" button at the bottom of the page, and wait for a little time. The software will automatically set the calibration configuration.";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
m_custom_range_panel = new CaliPresetCustomRangePanel(parent);
m_top_sizer->Add(m_custom_range_panel, 0, wxALIGN_CENTER);
m_top_sizer->AddSpacer(PRESET_GAP);
auto extra_text = new Label(parent, _L("After successful slicing, you have three methods to perform the operation:\
Label* introduce_1{ nullptr };
std::string introduce_text_1 = "After successful slicing, you have three methods to perform the operation:\
\n1. Directly send the sliced file and print it;\
\n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;\
\n3. Send the sliced file to a storage medium and print it through the storage medium.\
\nReferring to the process in the \"PA Tower\", you will print the calibration model as shown in the following figure."));
extra_text->SetFont(Label::Body_14);
extra_text->Wrap(FromDIP(1000));
extra_text->SetMinSize({ FromDIP(1000), -1 });
m_top_sizer->Add(extra_text);
m_top_sizer->AddSpacer(PRESET_GAP);
\nReferring to the process in the \"PA Tower\", you will print the calibration model as shown in the following figure.";
create_txt(parent, introduce_1, introduce_text_1);
add_bitmap(parent, m_top_sizer, "patowermodel", true, 350);
m_top_sizer->AddSpacer(PRESET_GAP);
create_paph(parent, _L("Step 2"), _L("Observe each corner of the model and calibrate it. The pressure advance increases by a step value gradient with every 5mm increase in height. If the pressure advance value is too small, there will be excessive extrusion at the corner. If the pressure advance value is too large, there will be a right angle becoming rounded or even missing threads at the corner. Determine the optimal position for the effect and use a scale to determine the height."));
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
Label* title_2{ nullptr };
std::string title_text_2 = "Step 2";
Label* content_2{ nullptr };
std::string content_text_2 = "Observe each corner of the model and calibrate it. The pressure advance increases by a step value gradient with every 5mm increase in height. If the pressure advance value is too small, there will be excessive extrusion at the corner. If the pressure advance value is too large, there will be a right angle becoming rounded or even missing threads at the corner. Determine the optimal position for the effect and use a scale to determine the height.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
create_paph(parent, _L("Step 3"), _L("Calculate the optimal pressure advance value using the given formula:\
Label* title_3{ nullptr };
std::string title_text_3 = "Step 3";
Label* content_3{ nullptr };
std::string content_text_3 = "Calculate the optimal pressure advance value using the given formula:\
\nPressure Advance = k_Start + floor(height ÷ 5) × k_Step\
\nNOTICE: floor() represents rounding downwards\
\nAccording to the measured values, the pressure advance value in the figure is : 0.00 + floor(22.7 ÷ 5) × 0.005 = 0.02\
\nFinally, save the value with the best surface effect."));
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
\nFinally, save the value with the best surface effect.";
create_paragraph(parent, title_3, title_text_3, content_3, content_text_3);
create_gif_images(parent, m_top_sizer, "pavalue02");
#ifdef __linux__
wxGetApp().CallAfter([this, title_1, title_2, title_3, content_1, content_2, content_3, introduce_1]() {
title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
title_3->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_3->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
introduce_1->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
Layout();
Fit();
});
#endif
}
void CalibrationPresetPage::create_page_max_volumetric_speed(wxWindow* parent, wxBoxSizer* m_top_sizer) {
create_paph(parent, _L("Step 1"), _L("Enter the minimum volumetric speed value, maximum volumetric speed value, and step size at the bottom of the current page, click the \"Calibrate\" button at the bottom of the page, and wait for a little time. The software will automatically set the calibration configuration."));
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
Label* title_1{ nullptr };
std::string title_text_1 = "Step 1";
Label* content_1{ nullptr };
std::string content_text_1 = "Enter the minimum volumetric speed value, maximum volumetric speed value, and step size at the bottom of the current page, click the \"Calibrate\" button at the bottom of the page, and wait for a little time. The software will automatically set the calibration configuration.";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
m_custom_range_panel = new CaliPresetCustomRangePanel(parent);
m_top_sizer->Add(m_custom_range_panel, 0, wxALIGN_CENTER);
m_top_sizer->AddSpacer(PRESET_GAP);
auto extra_text = new Label(parent, _L("After successful slicing, you have three methods to perform the operation:\
Label* introduce_1{ nullptr };
std::string introduce_text_1 = "After successful slicing, you have three methods to perform the operation:\
\n1. Directly send the sliced file and print it;\
\n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;\
\n3. Send the sliced file to a storage medium and print it through the storage medium.\
\nReferring to the process in the \"Max Volumetric Speed Calibration\", you will print the calibration model as shown in the following figure."));
extra_text->SetFont(Label::Body_14);
extra_text->Wrap(FromDIP(1000));
extra_text->SetMinSize({ FromDIP(1000), -1 });
m_top_sizer->Add(extra_text);
m_top_sizer->AddSpacer(PRESET_GAP);
\nReferring to the process in the \"Max Volumetric Speed Calibration\", you will print the calibration model as shown in the following figure.";
create_txt(parent, introduce_1, introduce_text_1);
add_bitmap(parent, m_top_sizer, "Volumetricspeedmodel", true, 350);
m_top_sizer->AddSpacer(PRESET_GAP);
create_paph(parent, _L("Step 2"), _L("It can be observed that at a certain height, the model begins to show missing fibers. There are two methods to measure the maximum volumetric velocity:\
\n1. Observing the number of notches nums on the right side, you can use StartV + (step * 2) = Max Volumetric Speed.\
@@ -591,7 +675,27 @@ void CalibrationPresetPage::create_page_max_volumetric_speed(wxWindow* parent, w
m_top_sizer->Add(m_txt_title);
m_top_sizer->Add(m_txt_content);
m_top_sizer->AddSpacer(PRESET_GAP);
Label* title_2{ nullptr };
std::string title_text_2 = "Step 2";
Label* content_2{ nullptr };
std::string content_text_2 = "It can be observed that at a certain height, the model begins to show missing fibers. There are two methods to measure the maximum volumetric velocity:\
\n1. Observing the number of notches nums on the right side, you can use StartV + (step * 2) = Max Volumetric Speed.\
\n2. In the \"Preview\" interface, view the Gcode of the model, find the \"Flow\" value corresponding to the missing part, and save it.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
create_gif_images(parent, m_top_sizer, "Volumetricspeedset");
#ifdef __linux__
wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2, introduce_1]() {
title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
introduce_1->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
Layout();
Fit();
});
#endif
}

View File

@@ -119,6 +119,8 @@ public:
void msw_rescale() override;
//w29
void create_paragraph(wxWindow* parent, Label* title, std::string title_txt, Label* content, std::string content_txt);
void create_txt(wxWindow* parent, Label* label, std::string label_txt);
void create_paph(wxWindow* parent, wxString title, wxString content)
{
m_txt_title = new Label(this, title);

View File

@@ -95,6 +95,28 @@ void CalibrationStartPage::add_bitmap(wxWindow* parent, wxBoxSizer* m_top_sizer,
m_bmp_intro_temp = { nullptr };
m_images_sizer_temp = { nullptr };
}
void CalibrationStartPage::create_paragraph(wxWindow* parent, Label* title, std::string title_txt, Label* content, std::string content_txt) {
title = new Label(this, _L(title_txt));
title->SetFont(Label::Head_14);
title->Wrap(FromDIP(1100));
title->SetMinSize({ FromDIP(1100), -1 });
content = new Label(this, _L(content_txt));;
content->SetFont(Label::Body_14);
content->Wrap(FromDIP(1100));
content->SetMinSize({ FromDIP(1100), -1 });
m_top_sizer->Add(title);
m_top_sizer->Add(content);
m_top_sizer->AddSpacer(PRESET_GAP);
}
void CalibrationStartPage::create_txt(wxWindow* parent, Label* label, std::string label_txt) {
label = new Label(parent, _L(label_txt));
label->SetFont(Label::Body_14);
label->Wrap(FromDIP(1100));
label->SetMinSize({ FromDIP(1100), -1 });
m_top_sizer->Add(label);
m_top_sizer->AddSpacer(PRESET_GAP);
}
CalibrationPAStartPage::CalibrationPAStartPage(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
@@ -156,40 +178,31 @@ void CalibrationPAStartPage::create_page(wxWindow* parent)
m_page_caption->show_prev_btn(false);
m_top_sizer->Add(m_page_caption, 0, wxALIGN_CENTER, 0);
create_when(parent,
_L("What is Pressure Advance Calibration ?"),
_L("From fluid mechanics, when a newtonian fluid flow through a hole, it needs pressure, and the pressure is proportional to the flow rate.\
\nAs the filament is not rigid body, when the extruder starts to extrude, the filament will be compressed to generate the pressure. The compression process will delay the response of the real flow, as the extruder only provides the amount of the filament that needs to extrude, no extra."));
m_top_sizer->Add(m_when_title);
m_top_sizer->Add(m_when_content);
m_top_sizer->AddSpacer(PRESET_GAP);
Label* title_1{ nullptr };
std::string title_text_1 = "What is Pressure Advance Calibration ?";
Label* content_1{ nullptr };
std::string content_text_1 = "From fluid mechanics, when a newtonian fluid flow through a hole, it needs pressure, and the pressure is proportional to the flow rate.\
\nAs the filament is not rigid body, when the extruder starts to extrude, the filament will be compressed to generate the pressure. The compression process will delay the response of the real flow, as the extruder only provides the amount of the filament that needs to extrude, no extra.";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
add_bitmap(parent, m_top_sizer, "PressureAdvanceCompare",true, 346);
m_top_sizer->AddSpacer(PRESET_GAP);
create_when(parent,
_L("When to Calibrate Pressure in Advance"),
_L("1.Use different brands of filaments, or the filaments are damp;\
Label* title_2{ nullptr };
std::string title_text_2 = "When to Calibrate Pressure in Advance";
Label* content_2{ nullptr };
std::string content_text_2 = "1.Use different brands of filaments, or the filaments are damp;\
\n2.The nozzle is worn or replaced with a different size nozzle;\
\n3.Use different printing parameters such as temperature and line width;\
\n4.PA calibration does not work with PETG."));
\n4.PA calibration does not work with PETG.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
m_top_sizer->Add(m_when_title);
m_top_sizer->Add(m_when_content);
m_top_sizer->AddSpacer(PRESET_GAP);
auto introduce_text = new Label(parent, _L("We have provided 3 calibration modes. Click the button below to enter the corresponding calibration page.\
\nBefore calibration, you need to select the printer you are using, the consumables that need to be calibrated, and the process. You can directly select them in the upper left corner of the current page."));
introduce_text->SetFont(Label::Body_14);
introduce_text->Wrap(CALIBRATION_START_PAGE_TEXT_MAX_LENGTH);
introduce_text->SetMinSize({ CALIBRATION_START_PAGE_TEXT_MAX_LENGTH, -1 });
m_top_sizer->Add(introduce_text);
m_top_sizer->AddSpacer(PRESET_GAP);
Label* introduce{ nullptr };
std::string introduce_text = "We have provided 3 calibration modes. Click the button below to enter the corresponding calibration page.\
\nBefore calibration, you need to select the printer you are using, the consumables that need to be calibrated, and the process. You can directly select them in the upper left corner of the current page.";
create_txt(parent, introduce, introduce_text);
//w29
m_action_panel = new CaliPageActionPanel(parent, CalibMode::Calib_PA_Line, CaliPageType::CALI_PAGE_START);
m_top_sizer->Add(m_action_panel, 0, wxEXPAND, 0);
@@ -197,14 +210,17 @@ void CalibrationPAStartPage::create_page(wxWindow* parent)
m_top_sizer->Add(m_tips_panel, 0);
m_top_sizer->AddSpacer(PRESET_GAP);
// #ifdef __linux__
// wxGetApp().CallAfter([this]() {
// m_when_content->SetMinSize(m_when_content->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
// m_about_content->SetMinSize(m_about_content->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
// Layout();
// Fit();
// });
// #endif
#ifdef __linux__
wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2, introduce]() {
title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
introduce->SetMinSize(introduce_text->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
Layout();
Fit();
});
#endif
}
//w29
@@ -238,65 +254,42 @@ void CalibrationFlowRateStartPage::create_page(wxWindow* parent)
m_page_caption->show_prev_btn(false);
m_top_sizer->Add(m_page_caption, 0, wxALIGN_CENTER, 0);
Label* title_1{ nullptr };
Label* introduce{ nullptr };
std::string introduce_text = "When using official filaments, the default values of the software are obtained through our testing, and usually perform well in the vast majority of printing situations.";
create_txt(parent, introduce, introduce_text);
Label* title_1{nullptr};
std::string title_text_1 = "When do you need Flowrate Calibration";
Label* content_1{ nullptr };
Label* title_2{ nullptr };
Label* content_2{ nullptr };
auto introduce_text = new Label(parent, _L("When using official filaments, the default values of the software are obtained through our testing, and usually perform well in the vast majority of printing situations."));
introduce_text->SetFont(Label::Body_14);
introduce_text->Wrap(CALIBRATION_START_PAGE_TEXT_MAX_LENGTH);
introduce_text->SetMinSize({ CALIBRATION_START_PAGE_TEXT_MAX_LENGTH, -1 });
m_top_sizer->Add(introduce_text);
m_top_sizer->AddSpacer(PRESET_GAP);
title_1 = new Label(this, _L("When do you need Flowrate Calibration"));
title_1->SetFont(Label::Head_14);
title_1->Wrap(CALIBRATION_START_PAGE_TEXT_MAX_LENGTH);
title_1->SetMinSize({ CALIBRATION_START_PAGE_TEXT_MAX_LENGTH, -1 });
content_1 = new Label(this, _L("If you notice the following signs and other uncertain reasons during printing, you may consider performing flowrate calibration:\
std::string content_text_1 = "If you notice the following signs and other uncertain reasons during printing, you may consider performing flowrate calibration:\
\n1. Over-Extrusion: If you see excess material on your printed object, forming blobs or zits, or the layers seem too thick, it could be a sign of over-extrusion;\
\n2. Under-Extrusion: This is the opposite of over - extrusion.Signs include missing layers, weak infill, or gaps in the print.This could mean that your printer isn't extruding enough filament;\
\n3. Poor Surface Quality : If the surface of your prints seems rough or uneven, this could be a result of an incorrect flow rate;\
\n4. Weak Structural Integrity : If your prints break easily or don't seem as sturdy as they should be, this might be due to under-extrusion or poor layer adhesion, which can be improved by flow rate calibration;\
\n5. When using third-party filaments"));;
content_1->SetFont(Label::Body_14);
content_1->Wrap(CALIBRATION_START_PAGE_TEXT_MAX_LENGTH);
content_1->SetMinSize({ CALIBRATION_START_PAGE_TEXT_MAX_LENGTH, -1 });
m_top_sizer->Add(title_1);
m_top_sizer->Add(content_1);
m_top_sizer->AddSpacer(PRESET_GAP);
\n5. When using third-party filaments";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
add_bitmap(parent, m_top_sizer, "FlowrateCompare",true,290);
title_2 = new Label(this, _L("Calibration process"));
title_2->SetFont(Label::Head_14);
title_2->Wrap(CALIBRATION_START_PAGE_TEXT_MAX_LENGTH);
title_2->SetMinSize({ CALIBRATION_START_PAGE_TEXT_MAX_LENGTH, -1 });
content_2 = new Label(this, _L("The calibration process includes two types: coarse calibration and fine calibration.\
Label* title_2{ nullptr };
std::string title_text_2 = "Calibration process";
Label* content_2{ nullptr };
std::string content_text_2 = "The calibration process includes two types: coarse calibration and fine calibration.\
\nUsually, we first use coarse calibration to obtain a range, and then perform fine calibration to obtain precise values. You can also directly use the values of coarse calibration.\
\nBefore calibration, you need to select the printer you are using, the consumables that need to be calibrated, and the process. You can directly select them in the upper left corner of the current page."));
content_2->SetFont(Label::Body_14);
content_2->Wrap(CALIBRATION_START_PAGE_TEXT_MAX_LENGTH);
content_2->SetMinSize({ CALIBRATION_START_PAGE_TEXT_MAX_LENGTH, -1 });
m_top_sizer->Add(title_2);
m_top_sizer->Add(content_2);
m_top_sizer->AddSpacer(PRESET_GAP);
\nBefore calibration, you need to select the printer you are using, the consumables that need to be calibrated, and the process. You can directly select them in the upper left corner of the current page.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
m_action_panel = new CaliPageActionPanel(parent, CalibMode::Calib_Flow_Rate, CaliPageType::CALI_PAGE_START);
m_top_sizer->Add(m_action_panel, 0, wxEXPAND, 0);
#ifdef __linux__
wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2, introduce_text]() {
wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2, introduce]() {
title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
introduce_text->SetMinSize(introduce_text->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
introduce->SetMinSize(introduce_text->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
Layout();
Fit();
});
@@ -333,89 +326,45 @@ void CalibrationMaxVolumetricSpeedStartPage::create_page(wxWindow* parent)
m_page_caption->show_prev_btn(false);
m_top_sizer->Add(m_page_caption, 0, wxALIGN_CENTER, 0);
create_when(parent,
_L("What is Max Volumetric Speed Calibration ?"),
_L("Different filaments have different maximum volume speed.\
Label* title_1{ nullptr };
std::string title_text_1 = "What is Max Volumetric Speed Calibration ?";
Label* content_1{ nullptr };
std::string content_text_1 = "Different filaments have different maximum volume speed.\
\nNozzle material, caliber, printing temperature, etc., will affect the maximum volume speed.\
\nWhen the maximum volume velocity is set too high and does not match the filament properties, there may be missing threads during the printing process, resulting in a deterioration of the surface texture of the model.\
\nThis is a test designed to calibrate the maximum volumetric speed of the specific filament. The generic or 3rd party filament types may not have the correct volumetric flow rate set in the filament. This test will help you to find the maximum volumetric speed of the filament."));
\nThis is a test designed to calibrate the maximum volumetric speed of the specific filament. The generic or 3rd party filament types may not have the correct volumetric flow rate set in the filament. This test will help you to find the maximum volumetric speed of the filament.";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
m_top_sizer->Add(m_when_title);
m_top_sizer->Add(m_when_content);
m_top_sizer->AddSpacer(PRESET_GAP);
create_when(parent,
_L("When to Calibrate Max Volumetric Speed ?"),
_L("We have configured corresponding values for our official consumables in the software. When you have the following situations, you need to calibrate the Max Volumetric Speed:\
Label* title_2{ nullptr };
std::string title_text_2 = "When to Calibrate Max Volumetric Speed ?";
Label* content_2{ nullptr };
std::string content_text_2 = "We have configured corresponding values for our official consumables in the software. When you have the following situations, you need to calibrate the Max Volumetric Speed:\
\n1.Use different brands of filaments;\
\n2.Replaced nozzles with different materials and diameters;\
\n3.You have changed the printing temperature;\
\n4.During the printing process, it was found that there were missing threads, insufficient extrusion, or broken filling.\
\nBefore calibration, you need to select the printer you are using, the consumables that need to be calibrated, and the process. You can directly select them in the upper left corner of the current page."));
\nBefore calibration, you need to select the printer you are using, the consumables that need to be calibrated, and the process. You can directly select them in the upper left corner of the current page.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
m_top_sizer->Add(m_when_title);
m_top_sizer->Add(m_when_content);
m_top_sizer->AddSpacer(PRESET_GAP);
add_bitmap(parent, m_top_sizer, "maxvolumetricspeedmodel", true, 300);
m_top_sizer->AddSpacer(PRESET_GAP);
/*
auto extra_text = new Label(parent, _L("Different filaments have different maximum volume speed.\
\nNozzle material, caliber, printing temperature, etc., will affect the maximum volume speed.\
\nWhen the maximum volume velocity is set too high and does not match the filament properties, there may be missing threads during the printing process, resulting in a deterioration of the surface texture of the model.\
\nThis is a test designed to calibrate the maximum volumetric speed of the specific filament. The generic or 3rd party filament types may not have the correct volumetric flow rate set in the filament. This test will help you to find the maximum volumetric speed of the filament."));
extra_text->SetFont(Label::Body_14);
extra_text->Wrap(CALIBRATION_START_PAGE_TEXT_MAX_LENGTH);
extra_text->SetMinSize({ CALIBRATION_START_PAGE_TEXT_MAX_LENGTH, -1 });
m_top_sizer->Add(extra_text);
m_top_sizer->AddSpacer(PRESET_GAP);*/
/*
auto end_text = new Label(parent, _L("During the test, the printing speed will increase layer by layer. When there is a hole or missing wire on the surface of the model, it indicates that the layer has reached the maximum volume speed, and the maximum volume speed is calculated according to the ratio of height."));
end_text->SetFont(Label::Body_14);
end_text->Wrap(CALIBRATION_START_PAGE_TEXT_MAX_LENGTH);
end_text->SetMinSize({ CALIBRATION_START_PAGE_TEXT_MAX_LENGTH, -1 });
m_top_sizer->Add(end_text);
m_top_sizer->AddSpacer(PRESET_GAP);*/
/*
create_when(parent, _L("When you need Max Volumetric Speed Calibration"), _L("Over-extrusion or under extrusion"));
m_top_sizer->Add(m_when_title);
m_top_sizer->Add(m_when_content);
m_top_sizer->AddSpacer(PRESET_GAP);
auto recommend_title = new Label(parent, _L("Max Volumetric Speed calibration is recommended when you print with:"));
recommend_title->SetFont(Label::Head_14);
recommend_title->Wrap(CALIBRATION_START_PAGE_TEXT_MAX_LENGTH);
m_top_sizer->Add(recommend_title);
auto recommend_text1 = new Label(parent, _L("material with significant thermal shrinkage/expansion, such as..."));
recommend_text1->Wrap(CALIBRATION_START_PAGE_TEXT_MAX_LENGTH);
recommend_text1->SetFont(Label::Body_14);
m_top_sizer->Add(recommend_text1);
auto recommend_text2 = new Label(parent, _L("materials with inaccurate filament diameter"));
recommend_text2->Wrap(CALIBRATION_START_PAGE_TEXT_MAX_LENGTH);
recommend_text2->SetFont(Label::Body_14);
m_top_sizer->Add(recommend_text2);
m_top_sizer->AddSpacer(PRESET_GAP);
if (wxGetApp().app_config->get_language_code() == "zh-cn") {
create_bitmap(parent, "cali_page_before_pa_CN", "cali_page_after_pa_CN");
} else {
create_bitmap(parent, "cali_page_before_pa", "cali_page_after_pa");
}
m_top_sizer->Add(m_images_sizer, 0, wxALL, 0);
m_top_sizer->AddSpacer(PRESET_GAP);*/
m_action_panel = new CaliPageActionPanel(parent, m_cali_mode, CaliPageType::CALI_PAGE_START);
m_top_sizer->Add(m_action_panel, 0, wxEXPAND, 0);
CaliPresetTipsstartPanel* m_tips_panel = new CaliPresetTipsstartPanel(parent);
m_top_sizer->Add(m_tips_panel, 0);
m_top_sizer->AddSpacer(PRESET_GAP);
#ifdef __linux__
wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2]() {
title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
Layout();
Fit();
});
#endif
}
void CalibrationMaxVolumetricSpeedStartPage::msw_rescale()

View File

@@ -37,6 +37,8 @@ protected:
void create_bitmap(wxWindow* parent, std::string img);
//w29
void add_bitmap(wxWindow* parent, wxBoxSizer* m_top_sizer, std::string img,bool can_modify = false , int modify_size =350);
void create_paragraph(wxWindow* parent, Label* title, std::string title_txt, Label* content, std::string content_txt);
void create_txt(wxWindow* parent, Label* label, std::string label_txt);
};
class CalibrationPAStartPage : public CalibrationStartPage

View File

@@ -107,7 +107,7 @@ public:
wxWindow * stb;
const wxString icon;
const wxString title;
size_t label_width = 15 ;// {200};
size_t label_width = 20 ;// {200};
wxSizer* sizer {nullptr};
OG_CustomCtrl* custom_ctrl{ nullptr };
int ctrl_horiz_alignment{ wxALIGN_LEFT};