工具栏取消 | ,gcode导出,弹窗字体变大
This commit is contained in:
parent
d5cc4e703d
commit
e15c2fd88d
|
@ -8102,7 +8102,7 @@ void GLCanvas3D::_render_separator_toolbar_left() const
|
||||||
float left = main_toolbar_left + (m_main_toolbar.get_width()) * inv_zoom;
|
float left = main_toolbar_left + (m_main_toolbar.get_width()) * inv_zoom;
|
||||||
|
|
||||||
m_separator_toolbar.set_position(top, left);
|
m_separator_toolbar.set_position(top, left);
|
||||||
m_separator_toolbar.render(*this,GLToolbarItem::SeparatorLine);
|
//m_separator_toolbar.render(*this,GLToolbarItem::SeparatorLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLCanvas3D::_render_collapse_toolbar() const
|
void GLCanvas3D::_render_collapse_toolbar() const
|
||||||
|
|
|
@ -372,7 +372,7 @@ public:
|
||||||
memDc.DrawBitmap(version_bmp, 50, 500, false);
|
memDc.DrawBitmap(version_bmp, 50, 500, false);
|
||||||
|
|
||||||
BitmapCache title_cache;
|
BitmapCache title_cache;
|
||||||
wxBitmap title_bmp = *title_cache.load_svg("ui_title", FromDIP(600), FromDIP(600));
|
wxBitmap title_bmp = *title_cache.load_svg("ui_title", FromDIP(700), FromDIP(700));
|
||||||
memDc.DrawBitmap(title_bmp, 50, 350, false);
|
memDc.DrawBitmap(title_bmp, 50, 350, false);
|
||||||
|
|
||||||
BitmapCache config_cache;
|
BitmapCache config_cache;
|
||||||
|
|
|
@ -1565,7 +1565,8 @@ wxBoxSizer* MainFrame::create_side_tools()
|
||||||
m_publish_btn = new Button(this, _L("Upload"), "bar_publish", 0, FromDIP(16));
|
m_publish_btn = new Button(this, _L("Upload"), "bar_publish", 0, FromDIP(16));
|
||||||
m_slice_btn = new SideButton(this, _L("Slice plate"), "");
|
m_slice_btn = new SideButton(this, _L("Slice plate"), "");
|
||||||
m_slice_option_btn = new SideButton(this, "", "sidebutton_dropdown", 0, FromDIP(14));
|
m_slice_option_btn = new SideButton(this, "", "sidebutton_dropdown", 0, FromDIP(14));
|
||||||
m_print_btn = new SideButton(this, _L("Print plate"), "");
|
//m_print_btn = new SideButton(this, _L("Print plate"), "");
|
||||||
|
m_print_btn = new SideButton(this, _L("Export G-code file"), "");
|
||||||
m_print_option_btn = new SideButton(this, "", "sidebutton_dropdown", 0, FromDIP(14));
|
m_print_option_btn = new SideButton(this, "", "sidebutton_dropdown", 0, FromDIP(14));
|
||||||
|
|
||||||
update_side_button_style();
|
update_side_button_style();
|
||||||
|
@ -1723,7 +1724,7 @@ wxBoxSizer* MainFrame::create_side_tools()
|
||||||
p->Dismiss();
|
p->Dismiss();
|
||||||
});*/
|
});*/
|
||||||
|
|
||||||
p->append_button(send_gcode_btn);
|
//p->append_button(send_gcode_btn);
|
||||||
//p->append_button(upload_gcode_btn);
|
//p->append_button(upload_gcode_btn);
|
||||||
p->append_button(export_gcode_btn);
|
p->append_button(export_gcode_btn);
|
||||||
}
|
}
|
||||||
|
@ -1736,8 +1737,8 @@ wxBoxSizer* MainFrame::create_side_tools()
|
||||||
//SideButton* send_to_printer_btn = new SideButton(p, _L("Send"), "");
|
//SideButton* send_to_printer_btn = new SideButton(p, _L("Send"), "");
|
||||||
//send_to_printer_btn->SetCornerRadius(0);
|
//send_to_printer_btn->SetCornerRadius(0);
|
||||||
|
|
||||||
SideButton* export_sliced_file_btn = new SideButton(p, _L("Export plate sliced file"), "");
|
//SideButton* export_sliced_file_btn = new SideButton(p, _L("Export plate sliced file"), "");
|
||||||
export_sliced_file_btn->SetCornerRadius(0);
|
//export_sliced_file_btn->SetCornerRadius(0);
|
||||||
|
|
||||||
/* SideButton* export_all_sliced_file_btn = new SideButton(p, _L("Export all sliced file"), "");
|
/* SideButton* export_all_sliced_file_btn = new SideButton(p, _L("Export all sliced file"), "");
|
||||||
export_all_sliced_file_btn->SetCornerRadius(0);*/
|
export_all_sliced_file_btn->SetCornerRadius(0);*/
|
||||||
|
@ -1782,15 +1783,24 @@ wxBoxSizer* MainFrame::create_side_tools()
|
||||||
p->Dismiss();
|
p->Dismiss();
|
||||||
});*/
|
});*/
|
||||||
|
|
||||||
export_sliced_file_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
/*export_sliced_file_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||||
m_print_btn->SetLabel(_L("Export plate sliced file"));
|
m_print_btn->SetLabel(_L("Export plate sliced file"));
|
||||||
m_print_select = eExportSlicedFile;
|
m_print_select = eExportSlicedFile;
|
||||||
m_print_enable = get_enable_print_status();
|
m_print_enable = get_enable_print_status();
|
||||||
m_print_btn->Enable(m_print_enable);
|
m_print_btn->Enable(m_print_enable);
|
||||||
this->Layout();
|
this->Layout();
|
||||||
p->Dismiss();
|
p->Dismiss();
|
||||||
|
});*/
|
||||||
|
SideButton* export_gcode_btn = new SideButton(p, _L("Export G-code file"), "");
|
||||||
|
export_gcode_btn->SetCornerRadius(0);
|
||||||
|
export_gcode_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||||
|
m_print_btn->SetLabel(_L("Export G-code file"));
|
||||||
|
m_print_select = eExportGcode;
|
||||||
|
m_print_enable = get_enable_print_status();
|
||||||
|
m_print_btn->Enable(m_print_enable);
|
||||||
|
this->Layout();
|
||||||
|
p->Dismiss();
|
||||||
});
|
});
|
||||||
|
|
||||||
/* export_all_sliced_file_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
/* export_all_sliced_file_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||||
m_print_btn->SetLabel(_L("Export all sliced file"));
|
m_print_btn->SetLabel(_L("Export all sliced file"));
|
||||||
m_print_select = eExportAllSlicedFile;
|
m_print_select = eExportAllSlicedFile;
|
||||||
|
@ -1804,7 +1814,8 @@ wxBoxSizer* MainFrame::create_side_tools()
|
||||||
//p->append_button(print_all_btn);
|
//p->append_button(print_all_btn);
|
||||||
//p->append_button(send_to_printer_btn);
|
//p->append_button(send_to_printer_btn);
|
||||||
//p->append_button(send_to_printer_all_btn);
|
//p->append_button(send_to_printer_all_btn);
|
||||||
p->append_button(export_sliced_file_btn);
|
//p->append_button(export_sliced_file_btn);
|
||||||
|
p->append_button(export_gcode_btn);
|
||||||
//p->append_button(export_all_sliced_file_btn);
|
//p->append_button(export_all_sliced_file_btn);
|
||||||
/*if (enable_multi_machine) {
|
/*if (enable_multi_machine) {
|
||||||
SideButton* print_multi_machine_btn = new SideButton(p, _L("Send to Multi-device"), "");
|
SideButton* print_multi_machine_btn = new SideButton(p, _L("Send to Multi-device"), "");
|
||||||
|
@ -3561,24 +3572,30 @@ void MainFrame::on_config_changed(DynamicPrintConfig* config) const
|
||||||
|
|
||||||
void MainFrame::set_print_button_to_default(PrintSelectType select_type)
|
void MainFrame::set_print_button_to_default(PrintSelectType select_type)
|
||||||
{
|
{
|
||||||
if (select_type == PrintSelectType::ePrintPlate) {
|
//if (select_type == PrintSelectType::ePrintPlate) {
|
||||||
m_print_btn->SetLabel(_L("Print plate"));
|
// m_print_btn->SetLabel(_L("Print plate"));
|
||||||
m_print_select = ePrintPlate;
|
// m_print_select = ePrintPlate;
|
||||||
if (m_print_enable)
|
// if (m_print_enable)
|
||||||
m_print_enable = get_enable_print_status();
|
// m_print_enable = get_enable_print_status();
|
||||||
m_print_btn->Enable(m_print_enable);
|
// m_print_btn->Enable(m_print_enable);
|
||||||
this->Layout();
|
// this->Layout();
|
||||||
} else if (select_type == PrintSelectType::eSendGcode) {
|
//} else if (select_type == PrintSelectType::eSendGcode) {
|
||||||
m_print_btn->SetLabel(_L("Print"));
|
// m_print_btn->SetLabel(_L("Print"));
|
||||||
m_print_select = eSendGcode;
|
// m_print_select = eSendGcode;
|
||||||
if (m_print_enable)
|
// if (m_print_enable)
|
||||||
m_print_enable = get_enable_print_status() && can_send_gcode();
|
// m_print_enable = get_enable_print_status() && can_send_gcode();
|
||||||
m_print_btn->Enable(m_print_enable);
|
// m_print_btn->Enable(m_print_enable);
|
||||||
this->Layout();
|
// this->Layout();
|
||||||
} else {
|
//} else {
|
||||||
//unsupport
|
// //unsupport
|
||||||
return;
|
// return;
|
||||||
}
|
//}
|
||||||
|
m_print_btn->SetLabel(_L("Export G-code file"));
|
||||||
|
m_print_select = eExportGcode;
|
||||||
|
if (m_print_enable)
|
||||||
|
m_print_enable = get_enable_print_status();
|
||||||
|
m_print_btn->Enable(m_print_enable);
|
||||||
|
this->Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainFrame::add_to_recent_projects(const wxString& filename)
|
void MainFrame::add_to_recent_projects(const wxString& filename)
|
||||||
|
|
|
@ -2083,12 +2083,12 @@ void TabPrint::build()
|
||||||
page = add_options_page(L("Support"), "support");
|
page = add_options_page(L("Support"), "support");
|
||||||
optgroup = page->new_optgroup("", L"param_support");
|
optgroup = page->new_optgroup("", L"param_support");
|
||||||
optgroup->append_single_option_line("enable_support", "support");
|
optgroup->append_single_option_line("enable_support", "support");
|
||||||
optgroup->append_single_option_line("support_type", "support#support-types");
|
//optgroup->append_single_option_line("support_type", "support#support-types");
|
||||||
optgroup->append_single_option_line("support_style", "support#support-styles");
|
//optgroup->append_single_option_line("support_style", "support#support-styles");
|
||||||
optgroup->append_single_option_line("support_threshold_angle", "support#threshold-angle");
|
//optgroup->append_single_option_line("support_threshold_angle", "support#threshold-angle");
|
||||||
optgroup->append_single_option_line("support_on_build_plate_only");
|
//optgroup->append_single_option_line("support_on_build_plate_only");
|
||||||
optgroup->append_single_option_line("support_critical_regions_only");
|
//optgroup->append_single_option_line("support_critical_regions_only");
|
||||||
optgroup->append_single_option_line("support_remove_small_overhang");
|
//optgroup->append_single_option_line("support_remove_small_overhang");
|
||||||
//optgroup->append_single_option_line("enforce_support_layers");
|
//optgroup->append_single_option_line("enforce_support_layers");
|
||||||
|
|
||||||
//optgroup = page->new_optgroup(L("Raft"), L"param_raft");
|
//optgroup = page->new_optgroup(L("Raft"), L"param_raft");
|
||||||
|
@ -4549,22 +4549,39 @@ void TabConfig::toggle_options() {
|
||||||
if (m_preset_bundle) {
|
if (m_preset_bundle) {
|
||||||
is_BBL_printer = m_preset_bundle->configs.get_edited_preset().is_bbl_vendor_preset(m_preset_bundle);
|
is_BBL_printer = m_preset_bundle->configs.get_edited_preset().is_bbl_vendor_preset(m_preset_bundle);
|
||||||
}
|
}
|
||||||
//std::string cde = "1";
|
bool enable_support = m_preset_bundle->prints.get_edited_preset().config.opt_bool("enable_support");
|
||||||
//m_preset_bundle->filament_presets
|
|
||||||
/* for (auto& f : m_preset_bundle->filament_presets) {
|
|
||||||
cde = f;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
//for (auto el : { "support_style", "support_base_pattern",
|
for (auto el : { "support_style", "support_base_pattern",
|
||||||
// "support_base_pattern_spacing", "support_expansion", "support_angle",
|
"support_base_pattern_spacing", "support_expansion", "support_angle",
|
||||||
// "support_interface_pattern", "support_interface_top_layers", "support_interface_bottom_layers",
|
"support_interface_pattern", "support_interface_top_layers", "support_interface_bottom_layers",
|
||||||
// "bridge_no_support", "max_bridge_length", "support_top_z_distance", "support_bottom_z_distance",
|
"bridge_no_support", "max_bridge_length", "support_top_z_distance", "support_bottom_z_distance",
|
||||||
// //BBS: add more support params to dependent of enable_support
|
//BBS: add more support params to dependent of enable_support
|
||||||
// "support_type", "support_on_build_plate_only",
|
"support_type", "support_on_build_plate_only",
|
||||||
// "support_remove_small_overhang","support_interface_not_for_body",
|
"support_remove_small_overhang","support_interface_not_for_body",
|
||||||
// "support_object_xy_distance","support_object_first_layer_gap"/*, "independent_support_layer_height"*/ })
|
"support_object_xy_distance","support_object_first_layer_gap",/* "independent_support_layer_height"*/
|
||||||
// toggle_option(el, have_support_material);
|
"support_filament","support_interface_filament"})
|
||||||
|
toggle_option(el, enable_support);
|
||||||
|
|
||||||
|
Field* field = m_active_page->get_field("support_style");
|
||||||
|
auto support_type = m_config->opt_enum<SupportType>("support_type");
|
||||||
|
if (auto choice = dynamic_cast<Choice*>(field)) {
|
||||||
|
auto def = print_config_def.get("support_style");
|
||||||
|
std::vector<int> enum_set_normal = { smsDefault, smsGrid, smsSnug };
|
||||||
|
std::vector<int> enum_set_tree = { smsDefault, smsTreeSlim, smsTreeStrong, smsTreeHybrid, smsTreeOrganic };
|
||||||
|
auto& set = is_tree(support_type) ? enum_set_tree : enum_set_normal;
|
||||||
|
auto& opt = const_cast<ConfigOptionDef&>(field->m_opt);
|
||||||
|
auto cb = dynamic_cast<ComboBox*>(choice->window);
|
||||||
|
auto n = cb->GetValue();
|
||||||
|
opt.enum_values.clear();
|
||||||
|
opt.enum_labels.clear();
|
||||||
|
cb->Clear();
|
||||||
|
for (auto i : set) {
|
||||||
|
opt.enum_values.push_back(def->enum_values[i]);
|
||||||
|
opt.enum_labels.push_back(def->enum_labels[i]);
|
||||||
|
cb->Append(_(def->enum_labels[i]));
|
||||||
|
}
|
||||||
|
cb->SetValue(n);
|
||||||
|
}
|
||||||
//p->combos_filament
|
//p->combos_filament
|
||||||
//m_preset_bundle->configs.update_dirty();
|
//m_preset_bundle->configs.update_dirty();
|
||||||
//wxString abc = wxString::FromUTF8( m_preset_bundle->configs.get_selected_preset().name);
|
//wxString abc = wxString::FromUTF8( m_preset_bundle->configs.get_selected_preset().name);
|
||||||
|
|
Loading…
Reference in New Issue