更新初始化文件

This commit is contained in:
cjw 2024-12-11 16:50:41 +08:00
parent ee56465b71
commit 14d8fdc9e2
4 changed files with 24 additions and 35 deletions

View File

@ -430,7 +430,7 @@ void PrintConfigDef::init_common_params()
def->tooltip = L("Slicing height for each layer. Smaller layer height means more accurate and more printing time"); def->tooltip = L("Slicing height for each layer. Smaller layer height means more accurate and more printing time");
def->sidetext = L("mm"); def->sidetext = L("mm");
def->min = 0; def->min = 0;
def->set_default_value(new ConfigOptionFloat(0.4)); def->set_default_value(new ConfigOptionFloat(0.2));
def = this->add("printable_height", coFloat); def = this->add("printable_height", coFloat);
def->label = L("Printable height"); def->label = L("Printable height");
@ -1163,9 +1163,6 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back("hilbertcurve"); def->enum_values.push_back("hilbertcurve");
def->enum_values.push_back("archimedeanchords"); def->enum_values.push_back("archimedeanchords");
def->enum_values.push_back("octagramspiral"); def->enum_values.push_back("octagramspiral");
//下面
def->enum_values.push_back("test");
def->enum_labels.push_back(L("Concentric")); def->enum_labels.push_back(L("Concentric"));
def->enum_labels.push_back(L("Rectilinear")); def->enum_labels.push_back(L("Rectilinear"));
def->enum_labels.push_back(L("Monotonic")); def->enum_labels.push_back(L("Monotonic"));
@ -1174,8 +1171,6 @@ void PrintConfigDef::init_fff_params()
def->enum_labels.push_back(L("Hilbert Curve")); def->enum_labels.push_back(L("Hilbert Curve"));
def->enum_labels.push_back(L("Archimedean Chords")); def->enum_labels.push_back(L("Archimedean Chords"));
def->enum_labels.push_back(L("Octagram Spiral")); def->enum_labels.push_back(L("Octagram Spiral"));
//下面
def->enum_labels.push_back("testtest Spiral");
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipRectilinear)); def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipRectilinear));
def = this->add("bottom_surface_pattern", coEnum); def = this->add("bottom_surface_pattern", coEnum);
@ -2605,7 +2600,7 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("Number of walls of every layer"); def->tooltip = L("Number of walls of every layer");
def->min = 0; def->min = 0;
def->max = 1000; def->max = 1000;
def->set_default_value(new ConfigOptionInt(5)); def->set_default_value(new ConfigOptionInt(2));
def = this->add("post_process", coStrings); def = this->add("post_process", coStrings);
def->label = L("Post-processing Scripts"); def->label = L("Post-processing Scripts");

View File

@ -5746,8 +5746,8 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
ImGui::SameLine(); ImGui::SameLine();
::sprintf(buf, imperial_units ? " %.2f oz" : " %.2f g", ps.total_weight / unit_conver); ::sprintf(buf, imperial_units ? " %.2f oz" : " %.2f g", ps.total_weight / unit_conver);
imgui.text(buf); imgui.text(buf);
//xiamian
/* ImGui::Dummy({ window_padding, window_padding }); ImGui::Dummy({ window_padding, window_padding });
ImGui::SameLine(); ImGui::SameLine();
imgui.text(model_filament_str + ":"); imgui.text(model_filament_str + ":");
ImGui::SameLine(max_len); ImGui::SameLine(max_len);
@ -5757,16 +5757,15 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
imgui.text(buf); imgui.text(buf);
ImGui::SameLine(); ImGui::SameLine();
::sprintf(buf, imperial_units ? " %.2f oz" : " %.2f g", (ps.total_weight - exlude_g) / unit_conver); ::sprintf(buf, imperial_units ? " %.2f oz" : " %.2f g", (ps.total_weight - exlude_g) / unit_conver);
imgui.text(buf);*/ imgui.text(buf);
//BBS: display cost of filaments //BBS: display cost of filaments
//xiamian ImGui::Dummy({ window_padding, window_padding });
/* ImGui::Dummy({ window_padding, window_padding });
ImGui::SameLine(); ImGui::SameLine();
imgui.text(cost_str + ":"); imgui.text(cost_str + ":");
ImGui::SameLine(max_len); ImGui::SameLine(max_len);
::sprintf(buf, "%.2f", ps.total_cost); ::sprintf(buf, "%.2f", ps.total_cost);
imgui.text(buf);*/ imgui.text(buf);
} }
auto role_time = [time_mode](ExtrusionRole role) { auto role_time = [time_mode](ExtrusionRole role) {
@ -5774,20 +5773,18 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
return (it != time_mode.roles_times.end()) ? it->second : 0.0f; return (it != time_mode.roles_times.end()) ? it->second : 0.0f;
}; };
//BBS: start gcode is mostly same with prepeare time //BBS: start gcode is mostly same with prepeare time
//xiamian if (time_mode.prepare_time != 0.0f) {
/* if (time_mode.prepare_time != 0.0f) {
ImGui::Dummy({ window_padding, window_padding }); ImGui::Dummy({ window_padding, window_padding });
ImGui::SameLine(); ImGui::SameLine();
imgui.text(prepare_str + ":"); imgui.text(prepare_str + ":");
ImGui::SameLine(max_len); ImGui::SameLine(max_len);
imgui.text(short_time(get_time_dhms(time_mode.prepare_time))); imgui.text(short_time(get_time_dhms(time_mode.prepare_time)));
}*/ }
//xiamian ImGui::Dummy({ window_padding, window_padding });
/*ImGui::Dummy({ window_padding, window_padding });
ImGui::SameLine(); ImGui::SameLine();
imgui.text(print_str + ":"); imgui.text(print_str + ":");
ImGui::SameLine(max_len); ImGui::SameLine(max_len);
imgui.text(short_time(get_time_dhms(time_mode.time - time_mode.prepare_time)));*/ imgui.text(short_time(get_time_dhms(time_mode.time - time_mode.prepare_time)));
ImGui::Dummy({ window_padding, window_padding }); ImGui::Dummy({ window_padding, window_padding });
ImGui::SameLine(); ImGui::SameLine();
imgui.text(total_str + ":"); imgui.text(total_str + ":");

View File

@ -1120,7 +1120,7 @@ void MainFrame::init_tabpanel()
m_webview = new WebViewPanel(m_tabpanel); m_webview = new WebViewPanel(m_tabpanel);
Bind(EVT_LOAD_URL, [this](wxCommandEvent &evt) { Bind(EVT_LOAD_URL, [this](wxCommandEvent &evt) {
wxString url = evt.GetString(); wxString url = evt.GetString();
//select_tab(MainFrame::tpHome); select_tab(MainFrame::tpHome);
m_webview->load_url(url); m_webview->load_url(url);
}); });
m_tabpanel->AddPage(m_webview, "", "tab_home_active", "tab_home_active", false); m_tabpanel->AddPage(m_webview, "", "tab_home_active", "tab_home_active", false);
@ -1136,10 +1136,9 @@ void MainFrame::init_tabpanel()
create_preset_tabs(); create_preset_tabs();
//BBS add pages //BBS add pages
// xiamin3 m_monitor = new MonitorPanel(m_tabpanel, wxID_ANY, wxDefaultPosition, wxDefaultSize);
/* m_monitor = new MonitorPanel(m_tabpanel, wxID_ANY, wxDefaultPosition, wxDefaultSize);
m_monitor->SetBackgroundColour(*wxWHITE); m_monitor->SetBackgroundColour(*wxWHITE);
m_tabpanel->AddPage(m_monitor, _L("Device"), std::string("tab_monitor_active"), std::string("tab_monitor_active"), false);*/ m_tabpanel->AddPage(m_monitor, _L("Device"), std::string("tab_monitor_active"), std::string("tab_monitor_active"), false);
m_printer_view = new PrinterWebView(m_tabpanel); m_printer_view = new PrinterWebView(m_tabpanel);
Bind(EVT_LOAD_PRINTER_URL, [this](wxCommandEvent &evt) { Bind(EVT_LOAD_PRINTER_URL, [this](wxCommandEvent &evt) {
@ -1150,20 +1149,19 @@ void MainFrame::init_tabpanel()
m_printer_view->Hide(); m_printer_view->Hide();
if (wxGetApp().is_enable_multi_machine()) { if (wxGetApp().is_enable_multi_machine()) {
//xiamian3 m_multi_machine = new MultiMachinePage(m_tabpanel, wxID_ANY, wxDefaultPosition, wxDefaultSize);
//m_multi_machine = new MultiMachinePage(m_tabpanel, wxID_ANY, wxDefaultPosition, wxDefaultSize); m_multi_machine->SetBackgroundColour(*wxWHITE);
//m_multi_machine->SetBackgroundColour(*wxWHITE); // TODO: change the bitmap
//// TODO: change the bitmap m_tabpanel->AddPage(m_multi_machine, _L("Multi-device"), std::string("tab_multi_active"), std::string("tab_multi_active"), false);
//m_tabpanel->AddPage(m_multi_machine, _L("Multi-device"), std::string("tab_multi_active"), std::string("tab_multi_active"), false);
} }
//xiamian3
/* m_project = new ProjectPanel(m_tabpanel, wxID_ANY, wxDefaultPosition, wxDefaultSize); m_project = new ProjectPanel(m_tabpanel, wxID_ANY, wxDefaultPosition, wxDefaultSize);
m_project->SetBackgroundColour(*wxWHITE); m_project->SetBackgroundColour(*wxWHITE);
m_tabpanel->AddPage(m_project, _L("Project"), std::string("tab_auxiliary_avtice"), std::string("tab_auxiliary_avtice"), false);*/ m_tabpanel->AddPage(m_project, _L("Project"), std::string("tab_auxiliary_avtice"), std::string("tab_auxiliary_avtice"), false);
//xiamian3
/*m_calibration = new CalibrationPanel(m_tabpanel, wxID_ANY, wxDefaultPosition, wxDefaultSize); m_calibration = new CalibrationPanel(m_tabpanel, wxID_ANY, wxDefaultPosition, wxDefaultSize);
m_calibration->SetBackgroundColour(*wxWHITE); m_calibration->SetBackgroundColour(*wxWHITE);
m_tabpanel->AddPage(m_calibration, _L("Calibration"), std::string("tab_calibration_active"), std::string("tab_calibration_active"), false);*/ m_tabpanel->AddPage(m_calibration, _L("Calibration"), std::string("tab_calibration_active"), std::string("tab_calibration_active"), false);
if (m_plater) { if (m_plater) {
// load initial config // load initial config

View File

@ -1103,7 +1103,6 @@ void PlaterPresetComboBox::update()
else { else {
set_label_marker(Append(separator(L("Select/Remove printers(system presets)")), *bmp), LABEL_ITEM_WIZARD_PRINTERS); set_label_marker(Append(separator(L("Select/Remove printers(system presets)")), *bmp), LABEL_ITEM_WIZARD_PRINTERS);
set_label_marker(Append(separator(L("Create printer")), *bmp), LABEL_ITEM_WIZARD_ADD_PRINTERS); set_label_marker(Append(separator(L("Create printer")), *bmp), LABEL_ITEM_WIZARD_ADD_PRINTERS);
set_label_marker(Append(separator("testtest"), *bmp), LABEL_ITEM_WIZARD_ADD_PRINTERS);
} }
} }