From d574816aef8210f0c3f83605cd4b5aeeddb8595e Mon Sep 17 00:00:00 2001 From: Ocraftyone Date: Thu, 2 Nov 2023 06:28:13 -0400 Subject: [PATCH 1/3] Add default page selection (#2569) Add option to change default page --- src/libslic3r/AppConfig.cpp | 3 +++ src/slic3r/GUI/GUI_App.cpp | 2 ++ src/slic3r/GUI/Preferences.cpp | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp index 0c3771be0a..cec5d8bab8 100644 --- a/src/libslic3r/AppConfig.cpp +++ b/src/libslic3r/AppConfig.cpp @@ -149,6 +149,9 @@ void AppConfig::set_defaults() if (get("use_inches").empty()) set("use_inches", "0"); + + if (get("default_page").empty()) + set("default_page", "0"); } else { #ifdef _WIN32 diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index d1316b9add..068b38a956 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -1107,6 +1107,8 @@ void GUI_App::post_init() //#endif if (is_editor()) mainframe->select_tab(size_t(0)); + if (app_config->get("default_page") == "1") + mainframe->select_tab(size_t(1)); mainframe->Thaw(); plater_->trigger_restore_project(1); BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ", end load_gl_resources"; diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index a6fbf0be35..8e009323fe 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -979,6 +979,9 @@ wxWindow* PreferencesDialog::create_general_page() std::vector Units = {_L("Metric") + " (mm, g)", _L("Imperial") + " (in, oz)"}; auto item_currency = create_item_combobox(_L("Units"), page, _L("Units"), "use_inches", Units); + std::vector DefaultPage = {_L("Home"), _L("Prepare")}; + auto item_default_page = create_item_combobox(_L("Default Page"), page, _L("Set the page opened on startup."), "default_page", DefaultPage); + auto item_mouse_zoom_settings = create_item_checkbox(_L("Zoom to mouse position"), page, _L("Zoom in towards the mouse pointer's position in the 3D view, rather than the 2D window center."), 50, "zoom_to_mouse"); auto item_use_free_camera_settings = create_item_checkbox(_L("Use free camera"), page, _L("If enabled, use free camera. If not enabled, use constrained camera."), 50, "use_free_camera"); @@ -1040,6 +1043,7 @@ wxWindow* PreferencesDialog::create_general_page() sizer_page->Add(item_language, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_region, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_currency, 0, wxTOP, FromDIP(3)); + sizer_page->Add(item_default_page, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_mouse_zoom_settings, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_use_free_camera_settings, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_show_splash_screen, 0, wxTOP, FromDIP(3)); From fcb289124ec02f00b4499aa2140069638832e669 Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Thu, 2 Nov 2023 05:40:19 -0500 Subject: [PATCH 2/3] fix deadlock condition varaible use in netfabb wrapper (#2583) (cherry picked from commit prusa3d/PrusaSlicer@04ac99a54e9bc3500dbd32d94d5996798cb894f3) Co-authored-by: PavelMikus --- src/slic3r/Utils/FixModelByWin10.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/slic3r/Utils/FixModelByWin10.cpp b/src/slic3r/Utils/FixModelByWin10.cpp index 38684f2c8e..70823e23d6 100644 --- a/src/slic3r/Utils/FixModelByWin10.cpp +++ b/src/slic3r/Utils/FixModelByWin10.cpp @@ -1,3 +1,7 @@ +///|/ Copyright (c) Prusa Research 2018 - 2023 Oleksandra Iushchenko @YuSanka, Lukáš Matěna @lukasmatena, Pavel Mikuš @Godrak, Enrico Turri @enricoturri1966, Vojtěch Bubník @bubnikv +///|/ +///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher +///|/ #ifdef HAS_WIN10SDK #ifndef NOMINMAX @@ -323,9 +327,8 @@ public: // fix_result containes a message if fixing failed bool fix_model_by_win10_sdk_gui(ModelObject &model_object, int volume_idx, GUI::ProgressDialog& progress_dialog, const wxString& msg_header, std::string& fix_result) { - std::mutex mutex; - std::condition_variable condition; - std::unique_lock lock(mutex); + std::mutex mtx; + std::condition_variable condition; struct Progress { std::string message; int percent = 0; @@ -344,8 +347,8 @@ bool fix_model_by_win10_sdk_gui(ModelObject &model_object, int volume_idx, GUI:: // (It seems like wxWidgets initialize the COM contex as single threaded and we need a multi-threaded context). bool success = false; size_t ivolume = 0; - auto on_progress = [&mutex, &condition, &ivolume, &volumes, &progress](const char *msg, unsigned prcnt) { - std::lock_guard lk(mutex); + auto on_progress = [&mtx, &condition, &ivolume, &volumes, &progress](const char *msg, unsigned prcnt) { + std::unique_lock lock(mtx); progress.message = msg; progress.percent = (int)floor((float(prcnt) + float(ivolume) * 100.f) / float(volumes.size())); progress.updated = true; @@ -422,6 +425,7 @@ bool fix_model_by_win10_sdk_gui(ModelObject &model_object, int volume_idx, GUI:: } }); while (! finished) { + std::unique_lock lock(mtx); condition.wait_for(lock, std::chrono::milliseconds(250), [&progress]{ return progress.updated; }); // decrease progress.percent value to avoid closing of the progress dialog if (!progress_dialog.Update(progress.percent-1, msg_header + _(progress.message))) From cfcba09d9d13f6e220ac2a88a1ec0bc23e3cde74 Mon Sep 17 00:00:00 2001 From: Hukete <100949318+Hukete@users.noreply.github.com> Date: Thu, 2 Nov 2023 18:41:03 +0800 Subject: [PATCH 3/3] Update QIDI profiles (#2586) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 10-25 Add TPU-95A HF * 1030 Adding Introduction of Chamber Temperature Control Macros(M191) to Notes * 1102 Add ABS-GF10 profile, Remove a extra "s" from the "0.36mm Standard @Qidi XPlus3 0.6 nozzle.json" file --- resources/profiles/Qidi.json | 5 +++- .../profiles/Qidi/filament/QIDI ABS-GF10.json | 24 +++++++++++++++++++ ...36mm Standard @Qidi XPlus3 0.6 nozzle.json | 3 +-- 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 resources/profiles/Qidi/filament/QIDI ABS-GF10.json diff --git a/resources/profiles/Qidi.json b/resources/profiles/Qidi.json index 9f84a8eb78..3a8f620a4a 100644 --- a/resources/profiles/Qidi.json +++ b/resources/profiles/Qidi.json @@ -575,8 +575,11 @@ { "name": "Qidi Generic TPU", "sub_path": "filament/Qidi Generic TPU.json" + }, + { + "name": "QIDI ABS-GF10", + "sub_path": "filament/QIDI ABS-GF10.json" } - ], "machine_list": [ { diff --git a/resources/profiles/Qidi/filament/QIDI ABS-GF10.json b/resources/profiles/Qidi/filament/QIDI ABS-GF10.json new file mode 100644 index 0000000000..9a85b0da85 --- /dev/null +++ b/resources/profiles/Qidi/filament/QIDI ABS-GF10.json @@ -0,0 +1,24 @@ +{ + "type": "filament", + "filament_id": "GFB99", + "setting_id": "GFSA04", + "name": "QIDI ABS-GF10", + "from": "system", + "instantiation": "true", + "inherits": "QIDI ABS-GF25", + "filament_flow_ratio": [ + "0.94" + ], + "filament_max_volumetric_speed": [ + "14" + ], + "nozzle_temperature": [ + "280" + ], + "nozzle_temperature_range_high": [ + "280" + ], + "pressure_advance": [ + "0.02" + ] +} diff --git a/resources/profiles/Qidi/process/0.36mm Standard @Qidi XPlus3 0.6 nozzle.json b/resources/profiles/Qidi/process/0.36mm Standard @Qidi XPlus3 0.6 nozzle.json index 0b4c1b1bde..3242750466 100644 --- a/resources/profiles/Qidi/process/0.36mm Standard @Qidi XPlus3 0.6 nozzle.json +++ b/resources/profiles/Qidi/process/0.36mm Standard @Qidi XPlus3 0.6 nozzle.json @@ -8,5 +8,4 @@ "compatible_printers": [ "Qidi X-Plus 3 0.6 nozzle" ] -} -s \ No newline at end of file +} \ No newline at end of file