mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-21 12:15:21 +00:00
Compare commits
6 Commits
fix/cli-se
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbaa5b761a | ||
|
|
f203cdd682 | ||
|
|
b81f865784 | ||
|
|
f3cb1992d6 | ||
|
|
e68f8284e7 | ||
|
|
30d342160b |
@@ -46,11 +46,23 @@ void name_tbb_thread_pool_threads_set_locale();
|
||||
template<class Fn>
|
||||
inline boost::thread create_thread(boost::thread::attributes &attrs, Fn &&fn)
|
||||
{
|
||||
// Duplicating the stack allocation size of Thread Building Block worker
|
||||
// threads of the thread pool: allocate 4MB on a 64bit system, allocate 2MB
|
||||
// on a 32bit system by default.
|
||||
|
||||
attrs.set_stack_size((sizeof(void*) == 4) ? (2048 * 1024) : (4096 * 1024));
|
||||
// Stack size for our worker threads. Originally duplicated TBB's pool
|
||||
// default (4 MB), but the Emboss text-cut path calls into CGAL's
|
||||
// Polygon_mesh_processing::corefine, which falls back from filtered
|
||||
// interval arithmetic to exact rational arithmetic (mpq_class) on
|
||||
// near-degenerate input, and the constrained 2D triangulation walker
|
||||
// (Triangulation_2::march_locate_2D) can recurse deeply enough to
|
||||
// exceed 4 MB on real models -- producing a SIGBUS at the next thread's
|
||||
// stack guard page on macOS / Linux.
|
||||
//
|
||||
// 16 MB chosen as 4x defensive headroom over the observed crash
|
||||
// threshold (n=1 reproducer at exactly 4 MB on macOS arm64). All three
|
||||
// platforms defer-commit reserved stack pages: macOS / Linux mmap the
|
||||
// stack and only fault in pages on touch; Boost.Thread on Win32 passes
|
||||
// STACK_SIZE_PARAM_IS_A_RESERVATION to _beginthreadex, so the value is
|
||||
// a reserve, not the initial commit. Resident memory therefore stays
|
||||
// proportional to actual stack depth on every target.
|
||||
attrs.set_stack_size(16 * 1024 * 1024);
|
||||
return boost::thread{attrs, std::forward<Fn>(fn)};
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ void DeviceErrorDialog::init_button_list()
|
||||
init_button(PROBLEM_SOLVED_RESUME, _L("Problem Solved and Resume"));
|
||||
init_button(TURN_OFF_FIRE_ALARM, _L("Got it, Turn off the Fire Alarm."));
|
||||
init_button(RETRY_PROBLEM_SOLVED, _L("Retry (problem solved)"));
|
||||
init_button(CANCLE, _L("Cancel"));
|
||||
init_button(CANCEL, _L("Cancel"));
|
||||
init_button(STOP_DRYING, _L("Stop Drying"));
|
||||
init_button(PROCEED, _L("Proceed"));
|
||||
init_button(DBL_CHECK_CANCEL, _L("Cancel"));
|
||||
@@ -445,7 +445,7 @@ void DeviceErrorDialog::on_button_click(ActionButton btn_id)
|
||||
m_obj->command_ams_control("resume");
|
||||
break;
|
||||
}
|
||||
case DeviceErrorDialog::CANCLE: {
|
||||
case DeviceErrorDialog::CANCEL: {
|
||||
break;
|
||||
}
|
||||
case DeviceErrorDialog::STOP_DRYING: {
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
RETRY_PROBLEM_SOLVED = 34,
|
||||
STOP_DRYING = 35,
|
||||
CANCLE = 37,
|
||||
CANCEL = 37,
|
||||
REMOVE_CLOSE_BTN = 39, // special case, do not show close button
|
||||
PROCEED = 41,
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ FilamentMapDialog::FilamentMapDialog(wxWindow *parent,
|
||||
main_sizer->Add(bottom_panel, 0, wxEXPAND);
|
||||
|
||||
m_ok_btn->Bind(wxEVT_BUTTON, &FilamentMapDialog::on_ok, this);
|
||||
m_cancel_btn->Bind(wxEVT_BUTTON, &FilamentMapDialog::on_cancle, this);
|
||||
m_cancel_btn->Bind(wxEVT_BUTTON, &FilamentMapDialog::on_cancel, this);
|
||||
SetEscapeId(wxID_CANCEL);
|
||||
Bind(wxEVT_CHAR_HOOK, [this](wxKeyEvent& e) {
|
||||
if (e.GetKeyCode() == WXK_ESCAPE) {
|
||||
@@ -286,7 +286,7 @@ void FilamentMapDialog::on_ok(wxCommandEvent &event)
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
|
||||
void FilamentMapDialog::on_cancle(wxCommandEvent &event) { EndModal(wxID_CANCEL); }
|
||||
void FilamentMapDialog::on_cancel(wxCommandEvent &event) { EndModal(wxID_CANCEL); }
|
||||
|
||||
void FilamentMapDialog::update_panel_status(PageType page)
|
||||
{
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
void set_modal_btn_labels(const wxString& left_label, const wxString& right_label);
|
||||
private:
|
||||
void on_ok(wxCommandEvent &event);
|
||||
void on_cancle(wxCommandEvent &event);
|
||||
void on_cancel(wxCommandEvent &event);
|
||||
void on_switch_mode(wxCommandEvent &event);
|
||||
void on_checkbox(wxCommandEvent &event);
|
||||
|
||||
|
||||
@@ -4874,9 +4874,9 @@ void GUI_App::on_http_error(wxCommandEvent &evt)
|
||||
if (provider == ORCA_CLOUD_PROVIDER && status >= 400 && code != HttpErrorVersionLimited) {
|
||||
wxString msg;
|
||||
if (!error.empty()) {
|
||||
msg = wxString::Format(_L("API error (HTTP %u): %s"), status, wxString::FromUTF8(error));
|
||||
msg = wxString::Format(_L("Failed to connect to OrcaCloud.\nPlease check your network connectivity\n(HTTP %u): %s"), status, wxString::FromUTF8(error));
|
||||
} else {
|
||||
msg = wxString::Format(_L("API error (HTTP %u)"), status);
|
||||
msg = wxString::Format(_L("Failed to connect to OrcaCloud.\nPlease check your network connectivity\n(HTTP %u)"), status);
|
||||
}
|
||||
|
||||
if (app_config->get_bool("developer_mode")) {
|
||||
@@ -4893,7 +4893,7 @@ void GUI_App::on_http_error(wxCommandEvent &evt)
|
||||
|
||||
if (!m_is_error_shown) {
|
||||
m_is_error_shown = true;
|
||||
wxMessageBox(msg, _L("Orca Cloud API Error"), wxOK | wxICON_ERROR, wxGetApp().mainframe);
|
||||
wxMessageBox(msg, _L("Cloud Error"), wxOK | wxICON_ERROR, wxGetApp().mainframe);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5849,17 +5849,20 @@ void GUI_App::reload_settings()
|
||||
load_pending_vendors();
|
||||
preset_bundle->load_user_presets(*app_config, user_presets, ForwardCompatibilitySubstitutionRule::Enable);
|
||||
preset_bundle->save_user_presets(*app_config, get_delete_cache_presets());
|
||||
if (is_main_thread_active()) {
|
||||
// Orca: settings changed, refresh ui to reflect the new preset values
|
||||
auto refresh_synced_ui = [this] {
|
||||
mainframe->update_side_preset_ui();
|
||||
for (auto tab : tabs_list) {
|
||||
tab->reload_config();
|
||||
tab->update_changed_ui();
|
||||
}
|
||||
if (plater_)
|
||||
plater_->sidebar().update_all_preset_comboboxes();
|
||||
} else {
|
||||
CallAfter([this] {
|
||||
mainframe->update_side_preset_ui();
|
||||
if (plater_)
|
||||
plater_->sidebar().update_all_preset_comboboxes();
|
||||
});
|
||||
}
|
||||
};
|
||||
if (is_main_thread_active())
|
||||
refresh_synced_ui();
|
||||
else
|
||||
CallAfter(refresh_synced_ui);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2788,9 +2788,6 @@ void MainFrame::init_menubar_as_editor()
|
||||
info_dlg.ShowModal();
|
||||
return;
|
||||
}
|
||||
if (m_plater)
|
||||
m_plater->get_notification_manager()->push_notification(
|
||||
into_u8(_L("Syncing presets from cloud\u2026")));
|
||||
wxGetApp().restart_sync_user_preset();
|
||||
}, "", nullptr,
|
||||
[this]() {
|
||||
|
||||
@@ -824,7 +824,7 @@ bool PartSkipDialog::IsAllChecked()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PartSkipDialog::IsAllCancled()
|
||||
bool PartSkipDialog::IsAllCanceled()
|
||||
{
|
||||
for (auto &[part_id, part_state] : m_parts_state) {
|
||||
if (part_state == PartState::psChecked) return false;
|
||||
@@ -851,7 +851,7 @@ void PartSkipDialog::OnAllCheckbox(wxCommandEvent &event)
|
||||
|
||||
void PartSkipDialog::UpdateApplyButtonStatus()
|
||||
{
|
||||
if (IsAllCancled()) {
|
||||
if (IsAllCanceled()) {
|
||||
m_apply_btn->SetStyle(ButtonStyle::Regular, ButtonType::Choice);
|
||||
m_apply_btn->SetToolTip(_L("Nothing selected"));
|
||||
m_enable_apply_btn = false;
|
||||
|
||||
@@ -153,7 +153,7 @@ private:
|
||||
void UpdateDialogUI();
|
||||
void UpdateApplyButtonStatus();
|
||||
bool IsAllChecked();
|
||||
bool IsAllCancled();
|
||||
bool IsAllCanceled();
|
||||
|
||||
void OnRetryButton(wxCommandEvent &event);
|
||||
void OnAllCheckbox(wxCommandEvent &event);
|
||||
|
||||
@@ -50,7 +50,10 @@ std::map<std::string, std::string> BBLCloudServiceAgent::get_extra_header()
|
||||
{
|
||||
std::map<std::string, std::string> extra_headers;
|
||||
extra_headers.emplace("X-BBL-Client-Type", "slicer");
|
||||
extra_headers.emplace("X-BBL-Client-Name", SLIC3R_APP_NAME);
|
||||
|
||||
// Unable to get camera live view when the printer is connected to cloud for H2D
|
||||
extra_headers.emplace("X-BBL-Client-Name", "BambuStudio");
|
||||
|
||||
extra_headers.emplace("X-BBL-Client-Version", GUI::wxGetApp().get_bbl_client_version());
|
||||
#if defined(__WINDOWS__)
|
||||
#ifdef _M_X64
|
||||
|
||||
Reference in New Issue
Block a user