Merge branch 'main' into plugin-ui-1

This commit is contained in:
Ian Chua
2026-09-11 11:19:23 +08:00
committed by GitHub
45 changed files with 78 additions and 465 deletions
-4
View File
@@ -2293,8 +2293,6 @@ msgstr ""
msgid "%s has been removed." msgid "%s has been removed."
msgstr "" msgstr ""
msgid "Switching application language"
msgstr ""
msgid "Select the language" msgid "Select the language"
msgstr "" msgstr ""
@@ -8294,8 +8292,6 @@ msgstr ""
msgid "Language selection" msgid "Language selection"
msgstr "" msgstr ""
msgid "Switching application language while some presets are modified."
msgstr ""
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "" msgstr ""
-4
View File
@@ -2522,8 +2522,6 @@ msgstr "Hi ha una actualització disponible. Obriu el quadre de diàleg del paqu
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s s'ha eliminat." msgstr "%s s'ha eliminat."
msgid "Switching application language"
msgstr "Canvi d'idioma de l'aplicació"
msgid "Select the language" msgid "Select the language"
msgstr "Seleccioneu l'idioma" msgstr "Seleccioneu l'idioma"
@@ -8924,8 +8922,6 @@ msgstr "Voleu continuar?"
msgid "Language selection" msgid "Language selection"
msgstr "Selecció d'idiomes" msgstr "Selecció d'idiomes"
msgid "Switching application language while some presets are modified."
msgstr "Canviant l'idioma de l'aplicació mentre es modifiquen alguns perfils."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Àsia-Pacífic" msgstr "Àsia-Pacífic"
-4
View File
@@ -2482,8 +2482,6 @@ msgstr "Je k dispozici aktualizace. Otevřete dialog balíčku předvoleb a prov
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s bylo odstraněno." msgstr "%s bylo odstraněno."
msgid "Switching application language"
msgstr "Přepnutí jazyka aplikace"
msgid "Select the language" msgid "Select the language"
msgstr "Zvolte jazyk" msgstr "Zvolte jazyk"
@@ -8882,8 +8880,6 @@ msgstr "Chcete pokračovat?"
msgid "Language selection" msgid "Language selection"
msgstr "Výběr jazyka" msgstr "Výběr jazyka"
msgid "Switching application language while some presets are modified."
msgstr "Přepnutí jazyka aplikace, když jsou některé předvolby upraveny."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Asie-Pacifik" msgstr "Asie-Pacifik"
-4
View File
@@ -2430,8 +2430,6 @@ msgstr "Es ist ein Update verfügbar. Öffnen Sie den Profilbündel-Dialog, um e
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s wurde entfernt." msgstr "%s wurde entfernt."
msgid "Switching application language"
msgstr "Wechsel der Sprache"
msgid "Select the language" msgid "Select the language"
msgstr "Sprache wählen" msgstr "Sprache wählen"
@@ -8754,8 +8752,6 @@ msgstr "Möchten Sie fortfahren?"
msgid "Language selection" msgid "Language selection"
msgstr "Sprachauswahl" msgstr "Sprachauswahl"
msgid "Switching application language while some presets are modified."
msgstr "Umschalten der Anwendungssprache, während einige Profile geändert werden."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Asien-Pazifik" msgstr "Asien-Pazifik"
-4
View File
@@ -2289,8 +2289,6 @@ msgstr ""
msgid "%s has been removed." msgid "%s has been removed."
msgstr "" msgstr ""
msgid "Switching application language"
msgstr ""
msgid "Select the language" msgid "Select the language"
msgstr "" msgstr ""
@@ -8290,8 +8288,6 @@ msgstr ""
msgid "Language selection" msgid "Language selection"
msgstr "" msgstr ""
msgid "Switching application language while some presets are modified."
msgstr ""
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "" msgstr ""
-4
View File
@@ -2356,8 +2356,6 @@ msgstr "Hay una actualización disponible. Abra el cuadro de diálogo del paquet
msgid "%s has been removed." msgid "%s has been removed."
msgstr "Se ha eliminado %s." msgstr "Se ha eliminado %s."
msgid "Switching application language"
msgstr "Cambiando el idioma de la aplicación"
msgid "Select the language" msgid "Select the language"
msgstr "Seleccionar el idioma" msgstr "Seleccionar el idioma"
@@ -8529,8 +8527,6 @@ msgstr "¿Quieres continuar?"
msgid "Language selection" msgid "Language selection"
msgstr "Selección de idiomas" msgstr "Selección de idiomas"
msgid "Switching application language while some presets are modified."
msgstr "Cambiando idioma de la aplicación mientras se modifican algunos perfiles."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Asia-Pacífico" msgstr "Asia-Pacífico"
-4
View File
@@ -2390,8 +2390,6 @@ msgstr "Eguneratze bat dago erabilgarri. Ireki aurrezarpen-paketeen elkarrizketa
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s kendu da." msgstr "%s kendu da."
msgid "Switching application language"
msgstr "Aplikazioaren hizkuntza aldatzen"
msgid "Select the language" msgid "Select the language"
msgstr "Hautatu hizkuntza" msgstr "Hautatu hizkuntza"
@@ -8610,8 +8608,6 @@ msgstr "Jarraitu nahi duzu?"
msgid "Language selection" msgid "Language selection"
msgstr "Hizkuntza-hautaketa" msgstr "Hizkuntza-hautaketa"
msgid "Switching application language while some presets are modified."
msgstr "Aplikazioaren hizkuntza aldatzen ari da aurrezarpen batzuk aldatuta dauden bitartean."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Asia-Pazifikoa" msgstr "Asia-Pazifikoa"
-4
View File
@@ -2414,8 +2414,6 @@ msgstr "Une mise à jour est disponible. Ouvrez la boîte de dialogue du paquet
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s a été supprimé." msgstr "%s a été supprimé."
msgid "Switching application language"
msgstr "Changer la langue de l'application"
msgid "Select the language" msgid "Select the language"
msgstr "Sélectionner la langue" msgstr "Sélectionner la langue"
@@ -8678,8 +8676,6 @@ msgstr "Voulez-vous continuer ?"
msgid "Language selection" msgid "Language selection"
msgstr "Sélection de la langue" msgstr "Sélection de la langue"
msgid "Switching application language while some presets are modified."
msgstr "Changement de langue de l’application alors que certains préréglages sont modifiés."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Asie-Pacifique" msgstr "Asie-Pacifique"
-4
View File
@@ -2460,8 +2460,6 @@ msgstr "Frissítés érhető el. Nyisd meg a beállításcsomag párbeszédablak
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s eltávolítva." msgstr "%s eltávolítva."
msgid "Switching application language"
msgstr "Alkalmazás nyelvének váltása"
msgid "Select the language" msgid "Select the language"
msgstr "Válaszd ki a nyelvet" msgstr "Válaszd ki a nyelvet"
@@ -8806,8 +8804,6 @@ msgstr "Szeretnéd folytatni?"
msgid "Language selection" msgid "Language selection"
msgstr "Nyelv kiválasztása" msgstr "Nyelv kiválasztása"
msgid "Switching application language while some presets are modified."
msgstr "Alkalmazás nyelvének átváltása, miközben egyes beállítások módosultak."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Ázsia-Csendes-óceáni térség" msgstr "Ázsia-Csendes-óceáni térség"
-4
View File
@@ -2466,8 +2466,6 @@ msgstr "È disponibile un aggiornamento. Apri la finestra di dialogo del bundle
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s è stato rimosso." msgstr "%s è stato rimosso."
msgid "Switching application language"
msgstr "Cambio lingua applicazione"
msgid "Select the language" msgid "Select the language"
msgstr "Seleziona la lingua" msgstr "Seleziona la lingua"
@@ -8807,8 +8805,6 @@ msgstr "Vuoi continuare?"
msgid "Language selection" msgid "Language selection"
msgstr "Selezione lingua" msgstr "Selezione lingua"
msgid "Switching application language while some presets are modified."
msgstr "Cambio lingua applicazione durante la modifica di alcuni profili."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Asia-Pacifico" msgstr "Asia-Pacifico"
-4
View File
@@ -2473,8 +2473,6 @@ msgstr "アップデートが利用可能です。プリセットバンドルの
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%sを削除しました。" msgstr "%sを削除しました。"
msgid "Switching application language"
msgstr "アプリケーション言語の切り替え"
msgid "Select the language" msgid "Select the language"
msgstr "言語を選択" msgstr "言語を選択"
@@ -8825,8 +8823,6 @@ msgstr "続行しますか?"
msgid "Language selection" msgid "Language selection"
msgstr "言語選択" msgstr "言語選択"
msgid "Switching application language while some presets are modified."
msgstr "アプリケーション言語を切り替える時に、プリセットの変更があります"
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "アジア太平洋地域" msgstr "アジア太平洋地域"
-4
View File
@@ -2481,8 +2481,6 @@ msgstr "사용 가능한 업데이트가 있습니다. 사전 설정 번들 대
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s이(가) 제거되었습니다." msgstr "%s이(가) 제거되었습니다."
msgid "Switching application language"
msgstr "응용 프로그램 언어 전환"
msgid "Select the language" msgid "Select the language"
msgstr "언어 선택" msgstr "언어 선택"
@@ -8860,8 +8858,6 @@ msgstr "계속하시겠습니까?"
msgid "Language selection" msgid "Language selection"
msgstr "언어 선택" msgstr "언어 선택"
msgid "Switching application language while some presets are modified."
msgstr "일부 사전 설정이 수정되는 동안 응용 프로그램 언어를 전환합니다."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "아시아 태평양" msgstr "아시아 태평양"
-4
View File
@@ -2449,8 +2449,6 @@ msgstr "Yra prieinamas atnaujinimas. Atidarykite profilių paketo dialogo langą
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s buvo pašalintas." msgstr "%s buvo pašalintas."
msgid "Switching application language"
msgstr "Perjungiama programos kalba"
msgid "Select the language" msgid "Select the language"
msgstr "Pasirinkite kalbą" msgstr "Pasirinkite kalbą"
@@ -8797,8 +8795,6 @@ msgstr "Ar norite tęsti?"
msgid "Language selection" msgid "Language selection"
msgstr "Kalbos pasirinkimas" msgstr "Kalbos pasirinkimas"
msgid "Switching application language while some presets are modified."
msgstr "Keičiama programos kalba, kai yra pakeistų profilių."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Azija-Ramusis vandenynas" msgstr "Azija-Ramusis vandenynas"
-4
View File
@@ -2679,8 +2679,6 @@ msgstr "Er is een update beschikbaar. Open het dialoogvenster voor de voorinstel
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s is verwijderd." msgstr "%s is verwijderd."
msgid "Switching application language"
msgstr "De taal van de applicatie wordt aangepast"
msgid "Select the language" msgid "Select the language"
msgstr "Kies de taal" msgstr "Kies de taal"
@@ -9602,8 +9600,6 @@ msgstr "Wilt u doorgaan?"
msgid "Language selection" msgid "Language selection"
msgstr "Taal selectie" msgstr "Taal selectie"
msgid "Switching application language while some presets are modified."
msgstr "De taal van de toepassing aanpaasen terwijl sommige voorinstellingen zijn aangepast."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Azië-Pacific" msgstr "Azië-Pacific"
-4
View File
@@ -2512,8 +2512,6 @@ msgstr "Dostępna jest aktualizacja. Otwórz okno pakietu profili, aby ją zains
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s został usunięty." msgstr "%s został usunięty."
msgid "Switching application language"
msgstr "Zmiana języka aplikacji"
msgid "Select the language" msgid "Select the language"
msgstr "Wybierz język" msgstr "Wybierz język"
@@ -9016,8 +9014,6 @@ msgstr "Czy kontynuować?"
msgid "Language selection" msgid "Language selection"
msgstr "Wybór języka" msgstr "Wybór języka"
msgid "Switching application language while some presets are modified."
msgstr "Zmiana języka aplikacji przy jednoczesnym istniejących zmodyfikowanych ustawieniach."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Azja i Pacyfik" msgstr "Azja i Pacyfik"
@@ -2356,8 +2356,6 @@ msgstr "Há uma atualização disponível. Abra a caixa de diálogo do pacote de
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s foi removido." msgstr "%s foi removido."
msgid "Switching application language"
msgstr "Alternando o idioma do aplicativo"
msgid "Select the language" msgid "Select the language"
msgstr "Selecione o idioma" msgstr "Selecione o idioma"
@@ -8572,8 +8570,6 @@ msgstr "Você deseja continuar?"
msgid "Language selection" msgid "Language selection"
msgstr "Seleção de idioma" msgstr "Seleção de idioma"
msgid "Switching application language while some presets are modified."
msgstr "Alternando idioma do aplicativo enquanto algumas predefinições são modificadas."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Ásia-Pacífico" msgstr "Ásia-Pacífico"
-4
View File
@@ -2431,8 +2431,6 @@ msgstr "Доступно обновление. Проверьте меню па
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s был удалён." msgstr "%s был удалён."
msgid "Switching application language"
msgstr "Изменение языка приложения"
msgid "Select the language" msgid "Select the language"
msgstr "Выбор языка" msgstr "Выбор языка"
@@ -8852,8 +8850,6 @@ msgstr "Хотите продолжить?"
msgid "Language selection" msgid "Language selection"
msgstr "Выбор языка" msgstr "Выбор языка"
msgid "Switching application language while some presets are modified."
msgstr "Смена языка приложения при изменении некоторых профилей."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Азиатско-Тихоокеанский" msgstr "Азиатско-Тихоокеанский"
-4
View File
@@ -2767,8 +2767,6 @@ msgstr "Det finns en uppdatering tillgänglig. Öppna dialogrutan för förinst
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s har tagits bort." msgstr "%s har tagits bort."
msgid "Switching application language"
msgstr "Byt applikationsspråk"
msgid "Select the language" msgid "Select the language"
msgstr "Välj språk" msgstr "Välj språk"
@@ -9694,8 +9692,6 @@ msgstr "Fortsätta?"
msgid "Language selection" msgid "Language selection"
msgstr "Språkval" msgstr "Språkval"
msgid "Switching application language while some presets are modified."
msgstr "Byter språk medans inställningarna ändras."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Asien-Stillahavsområdet" msgstr "Asien-Stillahavsområdet"
-4
View File
@@ -2456,8 +2456,6 @@ msgstr "มีอัปเดตพร้อมใช้งาน เปิด
msgid "%s has been removed." msgid "%s has been removed."
msgstr "ลบ %s แล้ว" msgstr "ลบ %s แล้ว"
msgid "Switching application language"
msgstr "การเปลี่ยนภาษาของแอปพลิเคชัน"
msgid "Select the language" msgid "Select the language"
msgstr "เลือกภาษา" msgstr "เลือกภาษา"
@@ -8758,8 +8756,6 @@ msgstr "ต้องการดำเนินการต่อหรือไ
msgid "Language selection" msgid "Language selection"
msgstr "การเลือกภาษา" msgstr "การเลือกภาษา"
msgid "Switching application language while some presets are modified."
msgstr "การสลับภาษาของแอปพลิเคชันในขณะที่มีการแก้ไขค่าที่ตั้งไว้บางส่วน"
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "เอเชียแปซิฟิก" msgstr "เอเชียแปซิฟิก"
-4
View File
@@ -2480,8 +2480,6 @@ msgstr "Kullanılabilir bir güncelleme var. Güncellemek için ön ayar paketi
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s kaldırıldı." msgstr "%s kaldırıldı."
msgid "Switching application language"
msgstr "Uygulama dilini değiştirme"
msgid "Select the language" msgid "Select the language"
msgstr "Dili seçin" msgstr "Dili seçin"
@@ -8860,8 +8858,6 @@ msgstr "Devam etmek istiyor musun?"
msgid "Language selection" msgid "Language selection"
msgstr "Dil seçimi" msgstr "Dil seçimi"
msgid "Switching application language while some presets are modified."
msgstr "Bazı ön ayarlar değiştirilirken uygulama dilinin değiştirilmesi."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Asya Pasifik" msgstr "Asya Pasifik"
-4
View File
@@ -2424,8 +2424,6 @@ msgstr "Доступне оновлення. Відкрийте вікно на
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s вилучено." msgstr "%s вилучено."
msgid "Switching application language"
msgstr "Зміна мови програми"
msgid "Select the language" msgid "Select the language"
msgstr "Вибрати мову" msgstr "Вибрати мову"
@@ -8874,8 +8872,6 @@ msgstr "Ви хочете продовжувати?"
msgid "Language selection" msgid "Language selection"
msgstr "Вибір мови" msgstr "Вибір мови"
msgid "Switching application language while some presets are modified."
msgstr "Зміна мови програми при зміні деяких профілів."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Азіатсько-Тихоокеанський регіон" msgstr "Азіатсько-Тихоокеанський регіон"
-4
View File
@@ -2568,8 +2568,6 @@ msgstr "Có bản cập nhật khả dụng. Hãy mở hộp thoại gói cài
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s đã bị xóa." msgstr "%s đã bị xóa."
msgid "Switching application language"
msgstr "Đang chuyển ngôn ngữ ứng dụng"
msgid "Select the language" msgid "Select the language"
msgstr "Chọn ngôn ngữ" msgstr "Chọn ngôn ngữ"
@@ -9309,8 +9307,6 @@ msgstr "Bạn có muốn tiếp tục?"
msgid "Language selection" msgid "Language selection"
msgstr "Chọn ngôn ngữ" msgstr "Chọn ngôn ngữ"
msgid "Switching application language while some presets are modified."
msgstr "Đang chuyển đổi ngôn ngữ ứng dụng trong khi một số preset đã được chỉnh sửa."
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "Châu Á-Thái Bình Dương" msgstr "Châu Á-Thái Bình Dương"
@@ -2361,8 +2361,6 @@ msgstr "有更新可用。打开预设包对话框进行更新。"
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s 已被移除。" msgstr "%s 已被移除。"
msgid "Switching application language"
msgstr "切换应用程序语言"
msgid "Select the language" msgid "Select the language"
msgstr "选择语言" msgstr "选择语言"
@@ -8587,8 +8585,6 @@ msgstr "是否继续?"
msgid "Language selection" msgid "Language selection"
msgstr "语言选择" msgstr "语言选择"
msgid "Switching application language while some presets are modified."
msgstr "在切换应用语言之前发现某些参数预设有更改。"
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "亚太" msgstr "亚太"
@@ -2425,8 +2425,6 @@ msgstr "有可用的更新。請開啟預設組合對話框進行更新。"
msgid "%s has been removed." msgid "%s has been removed."
msgstr "%s 已移除。" msgstr "%s 已移除。"
msgid "Switching application language"
msgstr "切換應用程式語言"
msgid "Select the language" msgid "Select the language"
msgstr "選擇語言" msgstr "選擇語言"
@@ -8753,8 +8751,6 @@ msgstr "是否繼續?"
msgid "Language selection" msgid "Language selection"
msgstr "語言選擇" msgstr "語言選擇"
msgid "Switching application language while some presets are modified."
msgstr "在切換應用程式語言之前發現某些參數預設有更改。"
msgid "Asia-Pacific" msgid "Asia-Pacific"
msgstr "亞太" msgstr "亞太"
+6
View File
@@ -558,6 +558,12 @@ if (_opts)
target_compile_options(libslic3r_cgal PRIVATE "${_opts_bad}") target_compile_options(libslic3r_cgal PRIVATE "${_opts_bad}")
endif() endif()
if (IS_CLANG_CL)
# CGAL passes /fp:strict /fp:except-. clang-cl reports the second as overriding part of
# the first; the settings cc1 receives are the same ones MSVC produces from that pair.
target_compile_options(libslic3r_cgal PRIVATE -Wno-overriding-option)
endif ()
target_link_libraries(libslic3r_cgal PRIVATE ${_cgal_tgt} admesh libigl mcut boost_libs) target_link_libraries(libslic3r_cgal PRIVATE ${_cgal_tgt} admesh libigl mcut boost_libs)
if (MSVC AND "${CMAKE_SIZEOF_VOID_P}" STREQUAL "4") # 32 bit MSVC workaround if (MSVC AND "${CMAKE_SIZEOF_VOID_P}" STREQUAL "4") # 32 bit MSVC workaround
+5 -5
View File
@@ -968,10 +968,10 @@ EmbossStyles Emboss::get_font_list_by_register() {
} }
// TODO: Fix global function // TODO: Fix global function
bool CALLBACK EnumFamCallBack(LPLOGFONT lplf, int CALLBACK EnumFamCallBack(const LOGFONT *lplf,
LPNEWTEXTMETRIC lpntm, const TEXTMETRIC *lpntm,
DWORD FontType, DWORD FontType,
LPVOID aFontList) LPARAM aFontList)
{ {
std::vector<std::wstring> *fontList = std::vector<std::wstring> *fontList =
(std::vector<std::wstring> *) (aFontList); (std::vector<std::wstring> *) (aFontList);
@@ -988,7 +988,7 @@ EmbossStyles Emboss::get_font_list_by_enumeration() {
HDC hDC = GetDC(NULL); HDC hDC = GetDC(NULL);
std::vector<std::wstring> font_names; std::vector<std::wstring> font_names;
EnumFontFamilies(hDC, (LPCTSTR) NULL, (FONTENUMPROC) EnumFamCallBack, EnumFontFamilies(hDC, (LPCTSTR) NULL, EnumFamCallBack,
(LPARAM) &font_names); (LPARAM) &font_names);
EmbossStyles font_list; EmbossStyles font_list;
+2 -2
View File
@@ -1395,8 +1395,8 @@ void Filler::_fill_surface_single(
} }
#endif /* ADAPTIVE_CUBIC_INFILL_DEBUG_OUTPUT */ #endif /* ADAPTIVE_CUBIC_INFILL_DEBUG_OUTPUT */
const auto hook_length = coordf_t(std::min<float>(std::numeric_limits<coord_t>::max(), scale_(params.anchor_length))); const auto hook_length = coordf_t(scale_(params.anchor_length));
const auto hook_length_max = coordf_t(std::min<float>(std::numeric_limits<coord_t>::max(), scale_(params.anchor_length_max))); const auto hook_length_max = coordf_t(scale_(params.anchor_length_max));
Polylines all_polylines_with_hooks = all_polylines.size() > 1 ? connect_lines_using_hooks(std::move(all_polylines), expolygon, this->spacing, hook_length, hook_length_max) : std::move(all_polylines); Polylines all_polylines_with_hooks = all_polylines.size() > 1 ? connect_lines_using_hooks(std::move(all_polylines), expolygon, this->spacing, hook_length, hook_length_max) : std::move(all_polylines);
+1 -1
View File
@@ -910,7 +910,7 @@ namespace Slic3r
unsigned int iterations = (1 << all_extruders.size()); unsigned int iterations = (1 << all_extruders.size());
unsigned int final_state = iterations - 1; unsigned int final_state = iterations - 1;
std::vector<std::vector<float>>cache(iterations, std::vector<float>(all_extruders.size(), 0x7fffffff)); std::vector<std::vector<float>>cache(iterations, std::vector<float>(all_extruders.size(), std::numeric_limits<float>::max()));
std::vector<std::vector<int>>prev(iterations, std::vector<int>(all_extruders.size(), -1)); std::vector<std::vector<int>>prev(iterations, std::vector<int>(all_extruders.size(), -1));
cache[1][0] = 0.; cache[1][0] = 0.;
for (unsigned int state = 0; state < iterations; ++state) { for (unsigned int state = 0; state < iterations; ++state) {
+2 -2
View File
@@ -30,8 +30,8 @@ bool Line::intersection_infinite(const Line &other, Point* point) const
return false; return false;
double t1 = cross2(v12, v2) / denom; double t1 = cross2(v12, v2) / denom;
Vec2d result = (a1 + t1 * v1); Vec2d result = (a1 + t1 * v1);
if (result.x() > std::numeric_limits<coord_t>::max() || result.x() < std::numeric_limits<coord_t>::lowest() || if (result.x() > double(std::numeric_limits<coord_t>::max()) || result.x() < double(std::numeric_limits<coord_t>::lowest()) ||
result.y() > std::numeric_limits<coord_t>::max() || result.y() < std::numeric_limits<coord_t>::lowest()) { result.y() > double(std::numeric_limits<coord_t>::max()) || result.y() < double(std::numeric_limits<coord_t>::lowest())) {
// Intersection has at least one of the coordinates much bigger (or smaller) than coord_t maximum value (or minimum). // Intersection has at least one of the coordinates much bigger (or smaller) than coord_t maximum value (or minimum).
// So it can not be stored into the Point without integer overflows. That could mean that input lines are parallel or near parallel. // So it can not be stored into the Point without integer overflows. That could mean that input lines are parallel or near parallel.
return false; return false;
+6 -8
View File
@@ -1511,13 +1511,9 @@ bool PrintObject::invalidate_state_by_config_options(
steps.emplace_back(posPerimeters); steps.emplace_back(posPerimeters);
steps.emplace_back(posSupportMaterial); steps.emplace_back(posSupportMaterial);
} else if (opt_key == "bridge_flow" || opt_key == "internal_bridge_flow") { } else if (opt_key == "bridge_flow" || opt_key == "internal_bridge_flow") {
if (m_config.support_top_z_distance > 0.) { steps.emplace_back(posPerimeters);
// Only invalidate due to bridging if bridging is enabled. steps.emplace_back(posInfill);
// If later "support_top_z_distance" is modified, the complete PrintObject is invalidated anyway. steps.emplace_back(posSupportMaterial);
steps.emplace_back(posPerimeters);
steps.emplace_back(posInfill);
steps.emplace_back(posSupportMaterial);
}
} else if ( } else if (
opt_key == "wall_generator" opt_key == "wall_generator"
|| opt_key == "wall_transition_length" || opt_key == "wall_transition_length"
@@ -1635,7 +1631,9 @@ bool PrintObject::invalidate_step(PrintObjectStep step)
bool PrintObject::invalidate_all_steps() bool PrintObject::invalidate_all_steps()
{ {
// First call the "invalidate" functions, which may cancel background processing. // First call the "invalidate" functions, which may cancel background processing.
bool result = Inherited::invalidate_all_steps() | m_print->invalidate_all_steps(); const bool inherited_invalidated = Inherited::invalidate_all_steps();
const bool print_invalidated = m_print->invalidate_all_steps();
bool result = inherited_invalidated || print_invalidated;
// Then reset some of the depending values. // Then reset some of the depending values.
m_slicing_params.valid = false; m_slicing_params.valid = false;
return result; return result;
+3 -1
View File
@@ -1007,7 +1007,9 @@ bool SLAPrintObject::invalidate_step(SLAPrintObjectStep step)
bool SLAPrintObject::invalidate_all_steps() bool SLAPrintObject::invalidate_all_steps()
{ {
return Inherited::invalidate_all_steps() | m_print->invalidate_all_steps(); const bool inherited_invalidated = Inherited::invalidate_all_steps();
const bool print_invalidated = m_print->invalidate_all_steps();
return inherited_invalidated || print_invalidated;
} }
double SLAPrintObject::get_elevation() const { double SLAPrintObject::get_elevation() const {
+3 -1
View File
@@ -1,3 +1,5 @@
#include <limits>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
#include "DevMapping.h" #include "DevMapping.h"
#include "DevFilaSystem.h" #include "DevFilaSystem.h"
@@ -270,7 +272,7 @@ namespace Slic3r
std::set<int> picked_tar; std::set<int> picked_tar;
for (int k = 0; k < distance_map.size(); k++) for (int k = 0; k < distance_map.size(); k++)
{ {
float min_val = INT_MAX; float min_val = std::numeric_limits<float>::max();
int picked_src_idx = -1; int picked_src_idx = -1;
int picked_tar_idx = -1; int picked_tar_idx = -1;
for (int i = 0; i < distance_map.size(); i++) for (int i = 0; i < distance_map.size(); i++)
+15 -1
View File
@@ -5059,7 +5059,21 @@ void GLCanvas3D::do_move(const std::string& snapshot_type)
} }
//BBS: notify instance updates to part plater list //BBS: notify instance updates to part plater list
m_selection.notify_instance_update(-1, 0); // Only what moved: the selected instances, or every instance of an object one of whose
// parts moved. Notifying a plate about an instance that stayed put invalidates its slice
// result, and notifying instance 0 alone left a moved copy unregistered on its new plate.
{
std::set<std::pair<int, int>> notified;
for (unsigned int i : m_selection.get_volume_idxs()) {
const GLVolume* v = m_volumes.volumes[i];
const int object_idx = v->object_idx();
if (object_idx < 0 || object_idx >= static_cast<int>(m_model->objects.size()))
continue;
const std::pair<int, int> key(object_idx, selection_mode == Selection::Volume ? -1 : v->instance_idx());
if (notified.insert(key).second)
m_selection.notify_instance_update(key.first, key.second);
}
}
// Fixes sinking/flying instances (snaps object to buildplate) // Fixes sinking/flying instances (snaps object to buildplate)
for (const std::pair<int, int>& i : done) { for (const std::pair<int, int>& i : done) {
-221
View File
@@ -7769,21 +7769,6 @@ void GUI_App::stop_http_server()
m_http_server.stop(); m_http_server.stop();
} }
void GUI_App::switch_staff_pick(bool on)
{
mainframe->m_webview->SendDesignStaffpick(on);
}
bool GUI_App::switch_language()
{
if (select_language()) {
recreate_GUI(_L("Switching application language") + dots);
return true;
} else {
return false;
}
}
#ifdef __linux__ #ifdef __linux__
static const wxLanguageInfo* linux_get_existing_locale_language(const wxLanguageInfo* language, static const wxLanguageInfo* linux_get_existing_locale_language(const wxLanguageInfo* language,
const wxLanguageInfo* system_language) const wxLanguageInfo* system_language)
@@ -7878,72 +7863,6 @@ int GUI_App::GetSingleChoiceIndex(const wxString& message,
#endif #endif
} }
// select language from the list of installed languages
bool GUI_App::select_language()
{
wxArrayString translations = wxTranslations::Get()->GetAvailableTranslations(SLIC3R_APP_KEY);
std::vector<const wxLanguageInfo*> language_infos;
language_infos.emplace_back(wxLocale::GetLanguageInfo(wxLANGUAGE_ENGLISH));
for (size_t i = 0; i < translations.GetCount(); ++ i) {
const wxLanguageInfo *langinfo = wxLocale::FindLanguageInfo(translations[i]);
if (langinfo != nullptr)
language_infos.emplace_back(langinfo);
}
sort_remove_duplicates(language_infos);
std::sort(language_infos.begin(), language_infos.end(), [](const wxLanguageInfo* l, const wxLanguageInfo* r) { return l->Description < r->Description; });
wxArrayString names;
names.Alloc(language_infos.size());
// Some valid language should be selected since the application start up.
const wxString active_language_code = current_language_code();
const wxLanguageInfo* active_language_info = wxLocale::FindLanguageInfo(active_language_code);
const wxLanguage current_language = active_language_info != nullptr ? wxLanguage(active_language_info->Language) : wxLanguage(m_wxLocale->GetLanguage());
const wxString active_lang_prefix = active_language_code.BeforeFirst('_');
int init_selection = -1;
int init_selection_alt = -1;
int init_selection_default = -1;
for (size_t i = 0; i < language_infos.size(); ++ i) {
if (wxLanguage(language_infos[i]->Language) == current_language)
// The dictionary matches the active language and country.
init_selection = i;
else if ((language_infos[i]->CanonicalName.BeforeFirst('_') == active_lang_prefix) ||
// if the active language is Slovak, mark the Czech language as active.
(language_infos[i]->CanonicalName.BeforeFirst('_') == "cs" && active_lang_prefix == "sk"))
// The dictionary matches the active language, it does not necessarily match the country.
init_selection_alt = i;
if (language_infos[i]->CanonicalName.BeforeFirst('_') == "en")
// This will be the default selection if the active language does not match any dictionary.
init_selection_default = i;
names.Add(language_infos[i]->Description);
}
if (init_selection == -1)
// This is the dictionary matching the active language.
init_selection = init_selection_alt;
if (init_selection != -1)
// This is the language to highlight in the choice dialog initially.
init_selection_default = init_selection;
const long index = GetSingleChoiceIndex(_L("Select the language"), _L("Language"), names, init_selection_default);
// Try to load a new language.
if (index != -1 && (init_selection == -1 || init_selection != index)) {
const wxLanguageInfo *new_language_info = language_infos[index];
if (this->load_language(new_language_info->CanonicalName, false)) {
// Save language at application config.
// Which language to save as the selected dictionary language?
// 1) Hopefully the language set to wxTranslations by this->load_language(), but that API is weird and we don't want to rely on its
// stability in the future:
// wxTranslations::Get()->GetBestTranslation(SLIC3R_APP_KEY, wxLANGUAGE_ENGLISH);
// 2) Current locale language may not match the dictionary name, see GH issue #3901
// m_wxLocale->GetCanonicalName()
// 3) new_language_info->CanonicalName is a safe bet. It points to a valid dictionary name.
app_config->set("language", new_language_info->CanonicalName.ToUTF8().data());
return true;
}
}
return false;
}
// Load gettext translation files and activate them at the start of the application, // Load gettext translation files and activate them at the start of the application,
// based on the "language" key stored in the application config. // based on the "language" key stored in the application config.
@@ -8330,146 +8249,6 @@ void GUI_App::show_ip_address_enter_dialog_handler(wxCommandEvent& evt)
show_modal_ip_address_enter_dialog(mode == -1?false:true, title); show_modal_ip_address_enter_dialog(mode == -1?false:true, title);
} }
//void GUI_App::add_config_menu(wxMenuBar *menu)
//void GUI_App::add_config_menu(wxMenu *menu)
//{
// auto local_menu = new wxMenu();
// wxWindowID config_id_base = wxWindow::NewControlId(int(ConfigMenuCnt));
//
// const auto config_wizard_name = _(ConfigWizard::name(true));
// const auto config_wizard_tooltip = from_u8((boost::format(_utf8(L("Open %s"))) % config_wizard_name).str());
// // Cmd+, is standard on OS X - what about other operating systems?
// if (is_editor()) {
// local_menu->Append(config_id_base + ConfigMenuWizard, config_wizard_name + dots, config_wizard_tooltip);
// local_menu->Append(config_id_base + ConfigMenuUpdate, _L("Check for Configuration Updates"), _L("Check for configuration updates"));
// local_menu->AppendSeparator();
// }
// local_menu->Append(config_id_base + ConfigMenuPreferences, _L("Preferences") + dots +
//#ifdef __APPLE__
// "\tCtrl+,",
//#else
// "\tCtrl+P",
//#endif
// _L("Application preferences"));
// wxMenu* mode_menu = nullptr;
// if (is_editor()) {
// local_menu->AppendSeparator();
// mode_menu = new wxMenu();
// mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeSimple, _L("Simple"), _L("Simple Mode"));
// mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeAdvanced, _L("Advanced"), _L("Advanced Mode"));
// Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if (get_mode() == comSimple) evt.Check(true); }, config_id_base + ConfigMenuModeSimple);
// Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if (get_mode() == comAdvanced) evt.Check(true); }, config_id_base + ConfigMenuModeAdvanced);
//
// local_menu->AppendSubMenu(mode_menu, _L("Mode"), wxString::Format(_L("%s Mode"), SLIC3R_APP_NAME));
// }
// local_menu->AppendSeparator();
// local_menu->Append(config_id_base + ConfigMenuLanguage, _L("Language"));
// if (is_editor()) {
// local_menu->AppendSeparator();
// }
//
// local_menu->Bind(wxEVT_MENU, [this, config_id_base](wxEvent &event) {
// switch (event.GetId() - config_id_base) {
// case ConfigMenuWizard:
// run_wizard(ConfigWizard::RR_USER);
// break;
// case ConfigMenuUpdate:
// check_updates(true);
// break;
//#ifdef __linux__
// case ConfigMenuDesktopIntegration:
// show_desktop_integration_dialog();
// break;
//#endif
// case ConfigMenuSnapshots:
// //BBS do not support task snapshot
// break;
// case ConfigMenuPreferences:
// {
// //BBS GUI refactor: remove unuse layout logic
// //bool app_layout_changed = false;
// {
// // the dialog needs to be destroyed before the call to recreate_GUI()
// // or sometimes the application crashes into wxDialogBase() destructor
// // so we put it into an inner scope
// PreferencesDialog dlg(mainframe);
// dlg.ShowModal();
// //BBS GUI refactor: remove unuse layout logic
// //app_layout_changed = dlg.settings_layout_changed();
// if (dlg.seq_top_layer_only_changed())
// this->plater_->refresh_print();
//
// if (dlg.recreate_GUI()) {
// recreate_GUI(_L("Restart application") + dots);
// return;
// }
//#ifdef _WIN32
// if (is_editor()) {
// if (app_config->get("associate_3mf") == "true")
// associate_3mf_files();
// if (app_config->get("associate_stl") == "true")
// associate_stl_files();
// }
// else {
// if (app_config->get("associate_gcode") == "true")
// associate_gcode_files();
// }
//#endif // _WIN32
// }
// //BBS GUI refactor: remove unuse layout logic
// /*if (app_layout_changed) {
// // hide full main_sizer for mainFrame
// mainframe->GetSizer()->Show(false);
// mainframe->update_layout();
// mainframe->select_tab(size_t(0));
// }*/
// break;
// }
// case ConfigMenuLanguage:
// {
// /* Before change application language, let's check unsaved changes on 3D-Scene
// * and draw user's attention to the application restarting after a language change
// */
// {
// // the dialog needs to be destroyed before the call to switch_language()
// // or sometimes the application crashes into wxDialogBase() destructor
// // so we put it into an inner scope
// wxString title = is_editor() ? wxString(SLIC3R_APP_NAME) : wxString(GCODEVIEWER_APP_NAME);
// title += " - " + _L("Choose language");
// //wxMessageDialog dialog(nullptr,
// MessageDialog dialog(nullptr,
// _L("Switching the language requires application restart.\n") + "\n\n" +
// _L("Do you want to continue?"),
// title,
// wxICON_QUESTION | wxOK | wxCANCEL);
// if (dialog.ShowModal() == wxID_CANCEL)
// return;
// }
//
// switch_language();
// break;
// }
// case ConfigMenuFlashFirmware:
// //BBS FirmwareDialog::run(mainframe);
// break;
// default:
// break;
// }
// });
//
// using std::placeholders::_1;
//
// if (mode_menu != nullptr) {
// auto modfn = [this](int mode, wxCommandEvent&) { if (get_mode() != mode) save_mode(mode); };
// mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comSimple, _1), config_id_base + ConfigMenuModeSimple);
// mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comAdvanced, _1), config_id_base + ConfigMenuModeAdvanced);
// }
//
// // BBS
// //menu->Append(local_menu, _L("Configuration"));
// menu->AppendSubMenu(local_menu, _L("Configuration"));
//}
void GUI_App::open_presetbundledialog(size_t open_on_tab, const std::string& highlight_option) void GUI_App::open_presetbundledialog(size_t open_on_tab, const std::string& highlight_option)
{ {
bool app_layout_changed = false; bool app_layout_changed = false;
-3
View File
@@ -569,7 +569,6 @@ public:
void start_http_server(const std::string& provider = ORCA_CLOUD_PROVIDER); void start_http_server(const std::string& provider = ORCA_CLOUD_PROVIDER);
void start_http_server(int port, const std::string& provider = ORCA_CLOUD_PROVIDER); void start_http_server(int port, const std::string& provider = ORCA_CLOUD_PROVIDER);
void stop_http_server(); void stop_http_server();
void switch_staff_pick(bool on);
void on_show_check_privacy_dlg(int online_login = 0, const std::string& provider = ORCA_CLOUD_PROVIDER); void on_show_check_privacy_dlg(int online_login = 0, const std::string& provider = ORCA_CLOUD_PROVIDER);
void show_check_privacy_dlg(wxCommandEvent& evt); void show_check_privacy_dlg(wxCommandEvent& evt);
@@ -583,7 +582,6 @@ public:
void persist_window_geometry(wxTopLevelWindow *window, bool default_maximized = false); void persist_window_geometry(wxTopLevelWindow *window, bool default_maximized = false);
void update_ui_from_settings(); void update_ui_from_settings();
bool switch_language();
bool load_language(wxString language, bool initial); bool load_language(wxString language, bool initial);
Tab* get_tab(Preset::Type type); Tab* get_tab(Preset::Type type);
@@ -801,7 +799,6 @@ private:
bool window_pos_restore(wxTopLevelWindow* window, const std::string &name, bool default_maximized = false); bool window_pos_restore(wxTopLevelWindow* window, const std::string &name, bool default_maximized = false);
void window_pos_sanitize(wxTopLevelWindow* window); void window_pos_sanitize(wxTopLevelWindow* window);
void window_pos_center(wxTopLevelWindow *window); void window_pos_center(wxTopLevelWindow *window);
bool select_language();
// Dynamic printer agent selection - internal helpers for switch_printer_agent // Dynamic printer agent selection - internal helpers for switch_printer_agent
// and the plugin load/unload callbacks (init_plugin_gui_wiring). // and the plugin load/unload callbacks (init_plugin_gui_wiring).
-89
View File
@@ -3275,98 +3275,9 @@ void MainFrame::init_menubar_as_editor()
auto preference_item = new wxMenuItem(parent_menu, ConfigMenuPreferences + config_id_base, _L("Preferences") + "\t" + ctrl + "P", ""); auto preference_item = new wxMenuItem(parent_menu, ConfigMenuPreferences + config_id_base, _L("Preferences") + "\t" + ctrl + "P", "");
#endif #endif
//auto printer_item = new wxMenuItem(parent_menu, ConfigMenuPrinter + config_id_base, _L("Printer"), "");
//auto language_item = new wxMenuItem(parent_menu, ConfigMenuLanguage + config_id_base, _L("Switch Language"), "");
// parent_menu->Bind(wxEVT_MENU, [this, config_id_base](wxEvent& event) {
// switch (event.GetId() - config_id_base) {
// //case ConfigMenuLanguage:
// //{
// // /* Before change application language, let's check unsaved changes on 3D-Scene
// // * and draw user's attention to the application restarting after a language change
// // */
// // {
// // // the dialog needs to be destroyed before the call to switch_language()
// // // or sometimes the application crashes into wxDialogBase() destructor
// // // so we put it into an inner scope
// // wxString title = _L("Language selection");
// // wxMessageDialog dialog(nullptr,
// // _L("Switching the language requires application restart.\n") + "\n\n" +
// // _L("Do you want to continue?"),
// // title,
// // wxICON_QUESTION | wxOK | wxCANCEL);
// // if (dialog.ShowModal() == wxID_CANCEL)
// // return;
// // }
//
// // wxGetApp().switch_language();
// // break;
// //}
// //case ConfigMenuWizard:
// //{
// // wxGetApp().run_wizard(ConfigWizard::RR_USER);
// // break;
// //}
// case ConfigMenuPrinter:
// {
// wxGetApp().params_dialog()->Popup();
// wxGetApp().get_tab(Preset::TYPE_PRINTER)->restore_last_select_item();
// break;
// }
// case ConfigMenuPreferences:
// {
// CallAfter([this] {
// PreferencesDialog dlg(this);
// dlg.ShowModal();
//#if ENABLE_GCODE_LINES_ID_IN_H_SLIDER
// if (dlg.seq_top_layer_only_changed() || dlg.seq_seq_top_gcode_indices_changed())
//#else
// if (dlg.seq_top_layer_only_changed())
//#endif // ENABLE_GCODE_LINES_ID_IN_H_SLIDER
// plater()->refresh_print();
//#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
//#ifdef _WIN32
// /*
// if (wxGetApp().app_config()->get("associate_3mf") == "true")
// wxGetApp().associate_3mf_files();
// if (wxGetApp().app_config()->get("associate_stl") == "true")
// wxGetApp().associate_stl_files();
// /*if (wxGetApp().app_config()->get("associate_step") == "true")
// wxGetApp().associate_step_files();*/
//#endif // _WIN32
//#endif
// });
// break;
// }
// default:
// break;
// }
// });
#ifdef __APPLE__ #ifdef __APPLE__
wxString about_title = wxString::Format(_L("&About %s"), SLIC3R_APP_FULL_NAME); wxString about_title = wxString::Format(_L("&About %s"), SLIC3R_APP_FULL_NAME);
//auto about_item = new wxMenuItem(parent_menu, OrcaSlicerMenuAbout + bambu_studio_id_base, about_title, "");
//parent_menu->Bind(wxEVT_MENU, [this, bambu_studio_id_base](wxEvent& event) {
// switch (event.GetId() - bambu_studio_id_base) {
// case OrcaSlicerMenuAbout:
// Slic3r::GUI::about();
// break;
// case OrcaSlicerMenuPreferences:
// CallAfter([this] {
// PreferencesDialog dlg(this);
// dlg.ShowModal();
//#if ENABLE_GCODE_LINES_ID_IN_H_SLIDER
// if (dlg.seq_top_layer_only_changed() || dlg.seq_seq_top_gcode_indices_changed())
//#else
// if (dlg.seq_top_layer_only_changed())
//#endif // ENABLE_GCODE_LINES_ID_IN_H_SLIDER
// plater()->refresh_print();
// });
// break;
// default:
// break;
// }
//});
//parent_menu->Insert(0, about_item);
append_menu_item( append_menu_item(
parent_menu, wxID_ANY, _L(about_title), "", parent_menu, wxID_ANY, _L(about_title), "",
[](wxCommandEvent &) { Slic3r::GUI::about();}, [](wxCommandEvent &) { Slic3r::GUI::about();},
+2 -2
View File
@@ -297,7 +297,7 @@ void MeshClipper::recalculate_triangles()
// it so it lies on our line. This will be the figure to subtract // it so it lies on our line. This will be the figure to subtract
// from the cut. The coordinates must not overflow after the transform, // from the cut. The coordinates must not overflow after the transform,
// make the rectangle a bit smaller. // make the rectangle a bit smaller.
const coord_t size = (std::numeric_limits<coord_t>::max()/2 - scale_(std::max(std::abs(e * a), std::abs(e * b)))) / 4; const coord_t size = (double(std::numeric_limits<coord_t>::max()/2) - scale_(std::max(std::abs(e * a), std::abs(e * b)))) / 4;
Polygons ep {Polygon({Point(-size, 0), Point(size, 0), Point(size, 2*size), Point(-size, 2*size)})}; Polygons ep {Polygon({Point(-size, 0), Point(size, 0), Point(size, 2*size), Point(-size, 2*size)})};
ep.front().rotate(angle); ep.front().rotate(angle);
ep.front().translate(scale_(-e * a), scale_(-e * b)); ep.front().translate(scale_(-e * a), scale_(-e * b));
@@ -352,7 +352,7 @@ void MeshClipper::recalculate_triangles()
// To prevent overflow after scaling, downscale the input if needed: // To prevent overflow after scaling, downscale the input if needed:
double extra_scale = 1.; double extra_scale = 1.;
coord_t limit = coord_t(std::min(std::numeric_limits<coord_t>::max() / (2. * std::max(1., scale_x)), std::numeric_limits<coord_t>::max() / (2. * std::max(1., scale_y)))); coord_t limit = coord_t(std::min(double(std::numeric_limits<coord_t>::max()) / (2. * std::max(1., scale_x)), double(std::numeric_limits<coord_t>::max()) / (2. * std::max(1., scale_y))));
coord_t max_coord = 0; coord_t max_coord = 0;
for (const Point& pt : exp.contour) for (const Point& pt : exp.contour)
max_coord = std::max(max_coord, std::max(std::abs(pt.x()), std::abs(pt.y()))); max_coord = std::max(max_coord, std::max(std::abs(pt.x()), std::abs(pt.y())));
+3 -3
View File
@@ -1917,7 +1917,7 @@ std::vector<int> PartPlate::get_extruders_without_support(bool conside_custom_gc
const DynamicPrintConfig& glb_config = wxGetApp().preset_bundle->prints.get_edited_preset().config; const DynamicPrintConfig& glb_config = wxGetApp().preset_bundle->prints.get_edited_preset().config;
for (int obj_idx = 0; obj_idx < m_model->objects.size(); obj_idx++) { for (int obj_idx = 0; obj_idx < m_model->objects.size(); obj_idx++) {
if (!contain_instance_totally(obj_idx, 0)) if (!contain_any_instance_totally(obj_idx))
continue; continue;
ModelObject* mo = m_model->objects[obj_idx]; ModelObject* mo = m_model->objects[obj_idx];
@@ -2088,7 +2088,7 @@ bool PartPlate::check_single_extruder_mixed_filament_risk(const DynamicPrintConf
"which may significantly increase waste and the risk of nozzle / waste-chute clogging."); "which may significantly increase waste and the risk of nozzle / waste-chute clogging.");
for (int obj_idx = 0; obj_idx < (int)m_model->objects.size(); ++obj_idx) { for (int obj_idx = 0; obj_idx < (int)m_model->objects.size(); ++obj_idx) {
if (!contain_instance_totally(obj_idx, 0)) if (!contain_any_instance_totally(obj_idx))
continue; continue;
ModelObject *mo = m_model->objects[obj_idx]; ModelObject *mo = m_model->objects[obj_idx];
int obj_ext = mo->config.has("extruder") ? mo->config.extruder() : 1; int obj_ext = mo->config.has("extruder") ? mo->config.extruder() : 1;
@@ -2307,7 +2307,7 @@ bool PartPlate::check_compatible_of_nozzle_and_filament(const DynamicPrintConfig
return wipe_tower_size; return wipe_tower_size;
for (int obj_idx = 0; obj_idx < m_model->objects.size(); obj_idx++) { for (int obj_idx = 0; obj_idx < m_model->objects.size(); obj_idx++) {
if (!use_global_objects && !contain_instance_totally(obj_idx, 0)) if (!use_global_objects && !contain_any_instance_totally(obj_idx))
continue; continue;
BoundingBoxf3 bbox = m_model->objects[obj_idx]->bounding_box(); BoundingBoxf3 bbox = m_model->objects[obj_idx]->bounding_box();
+7 -1
View File
@@ -17839,6 +17839,10 @@ void Plater::increase_instances(size_t num)
model_object->add_instance(offset_vec, model_instance->get_scaling_factor(), model_instance->get_rotation(), model_instance->get_mirror()); model_object->add_instance(offset_vec, model_instance->get_scaling_factor(), model_instance->get_rotation(), model_instance->get_mirror());
// p->print.get_object(obj_idx)->add_copy(Slic3r::to_2d(offset_vec)); // p->print.get_object(obj_idx)->add_copy(Slic3r::to_2d(offset_vec));
} }
// Register the copies with the plate they land on before the scene reloads: the plate's
// filament list and wipe tower preview are read from that registry.
for (size_t i = model_object->instances.size() - num; i < model_object->instances.size(); ++i)
p->partplate_list.notify_instance_update(obj_idx, static_cast<int>(i));
#ifdef SUPPORT_AUTO_CENTER #ifdef SUPPORT_AUTO_CENTER
if (p->get_config("autocenter") == "true") if (p->get_config("autocenter") == "true")
@@ -17869,8 +17873,10 @@ void Plater::decrease_instances(size_t num)
ModelObject* model_object = p->model.objects[obj_idx]; ModelObject* model_object = p->model.objects[obj_idx];
if (model_object->instances.size() > num) { if (model_object->instances.size() > num) {
for (size_t i = 0; i < num; ++ i) for (size_t i = 0; i < num; ++ i) {
p->partplate_list.notify_instance_removed(obj_idx, static_cast<int>(model_object->instances.size()) - 1);
model_object->delete_last_instance(); model_object->delete_last_instance();
}
p->update(); p->update();
// Delete object from Sidebar list. Do it after update, so that the GLScene selection is updated with the modified model. // Delete object from Sidebar list. Do it after update, so that the GLScene selection is updated with the modified model.
sidebar().obj_list()->decrease_object_instances(obj_idx, num); sidebar().obj_list()->decrease_object_instances(obj_idx, num);
+3 -20
View File
@@ -507,26 +507,14 @@ wxBoxSizer *PreferencesDialog::create_item_language_combobox(wxString title, wxS
} }
} }
MessageDialog msg_window(nullptr, _L("Switching languages requires the application to restart.\n") + "\n" + _L("Do you want to continue?"),
// the dialog needs to be destroyed before the call to switch_language() _L("Language selection"), wxICON_QUESTION | wxOK | wxCANCEL);
// or sometimes the application crashes into wxDialogBase() destructor if (msg_window.ShowModal() == wxID_CANCEL) {
// so we put it into an inner scope
MessageDialog msg_wingow(nullptr, _L("Switching languages requires the application to restart.\n") + "\n" + _L("Do you want to continue?"),
L("Language selection"), wxICON_QUESTION | wxOK | wxCANCEL);
if (msg_wingow.ShowModal() == wxID_CANCEL) {
combobox->SetSelection(m_current_language_selected); combobox->SetSelection(m_current_language_selected);
return; return;
} }
} }
auto check = [](bool yes_or_no) {
// if (yes_or_no)
// return true;
int act_btns = ActionButtons::SAVE;
return wxGetApp().check_and_keep_current_preset_changes(_L("Switching application language"),
_L("Switching application language while some presets are modified."), act_btns);
};
m_current_language_selected = combobox->GetSelection(); m_current_language_selected = combobox->GetSelection();
if (m_current_language_selected >= 0 && m_current_language_selected < vlist.size()) { if (m_current_language_selected >= 0 && m_current_language_selected < vlist.size()) {
m_pending_language = vlist[m_current_language_selected]->CanonicalName.ToUTF8().data(); m_pending_language = vlist[m_current_language_selected]->CanonicalName.ToUTF8().data();
@@ -1031,11 +1019,6 @@ wxBoxSizer *PreferencesDialog::create_item_checkbox(wxString title, wxString too
app_config->set_bool(param, checkbox->GetValue()); app_config->set_bool(param, checkbox->GetValue());
app_config->save(); app_config->save();
// if (param == "staff_pick_switch") {
// bool pbool = app_config->get("staff_pick_switch") == "true";
// wxGetApp().switch_staff_pick(pbool);
// }
if (param == "sync_user_preset") { if (param == "sync_user_preset") {
bool sync = app_config->get("sync_user_preset") == "true" ? true : false; bool sync = app_config->get("sync_user_preset") == "true" ? true : false;
if (sync) { if (sync) {
+1 -1
View File
@@ -1803,7 +1803,7 @@ static void* get_function(const char* name)
return function; return function;
#if defined(_MSC_VER) || defined(_WIN32) #if defined(_MSC_VER) || defined(_WIN32)
function = GetProcAddress(module, name); function = reinterpret_cast<void*>(GetProcAddress(module, name));
#else #else
function = dlsym(module, name); function = dlsym(module, name);
#endif #endif
+1 -1
View File
@@ -995,7 +995,7 @@ void FanControlPopupNew::init_names(MachineObject* obj) {
radio_btn_name[AIR_DUCT::AIR_DUCT_HEATING_INTERNAL_FILT] = _L("Heating"); radio_btn_name[AIR_DUCT::AIR_DUCT_HEATING_INTERNAL_FILT] = _L("Heating");
radio_btn_name[AIR_DUCT::AIR_DUCT_EXHAUST] = _L("Exhaust"); radio_btn_name[AIR_DUCT::AIR_DUCT_EXHAUST] = _L("Exhaust");
radio_btn_name[AIR_DUCT::AIR_DUCT_FULL_COOLING] = _L("Full Cooling"); radio_btn_name[AIR_DUCT::AIR_DUCT_FULL_COOLING] = _L("Full Cooling");
radio_btn_name[AIR_DUCT::AIR_DUCT_INIT] = L("Init"); radio_btn_name[AIR_DUCT::AIR_DUCT_INIT] = _L("Init");
air_door_func_name[AIR_DOOR::AIR_DOOR_FUNC_CHAMBER] = _L("Chamber"); air_door_func_name[AIR_DOOR::AIR_DOOR_FUNC_CHAMBER] = _L("Chamber");
air_door_func_name[AIR_DOOR::AIR_DOOR_FUNC_INNERLOOP] = _L("Innerloop"); air_door_func_name[AIR_DOOR::AIR_DOOR_FUNC_INNERLOOP] = _L("Innerloop");
+1 -1
View File
@@ -349,7 +349,7 @@ void* BBLNetworkPlugin::get_function(const char* name)
return function; return function;
#if defined(_MSC_VER) || defined(_WIN32) #if defined(_MSC_VER) || defined(_WIN32)
function = GetProcAddress(m_networking_module, name); function = reinterpret_cast<void*>(GetProcAddress(m_networking_module, name));
#else #else
function = dlsym(m_networking_module, name); function = dlsym(m_networking_module, name);
#endif #endif
+16 -5
View File
@@ -8,6 +8,7 @@
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
using json = nlohmann::json; using json = nlohmann::json;
#include <type_traits>
#include <unordered_map> #include <unordered_map>
namespace Slic3r { namespace Slic3r {
@@ -90,6 +91,16 @@ OnMessageFn to_orca_messages(OnMessageFn fn)
return [fn = std::move(fn)](std::string dev_id, std::string msg) { fn(std::move(dev_id), BBLPrinterAgent::to_orca_payload(std::move(msg))); }; return [fn = std::move(fn)](std::string dev_id, std::string msg) { fn(std::move(dev_id), BBLPrinterAgent::to_orca_payload(std::move(msg))); };
} }
// Retypes a plug-in entry point for an older plug-in generation. The detour through the
// generic function pointer marks the signature change as deliberate, which a direct cast
// between two signatures does not.
template <typename To, typename From>
To as_abi(From fn)
{
static_assert(std::is_function_v<std::remove_pointer_t<From>>, "as_abi retypes a function pointer");
return reinterpret_cast<To>(reinterpret_cast<void (*)()>(fn));
}
} // namespace } // namespace
std::string BBLPrinterAgent::to_orca_filament_id(const std::string& printer_filament_id) const std::string BBLPrinterAgent::to_orca_filament_id(const std::string& printer_filament_id) const
@@ -141,7 +152,7 @@ int BBLPrinterAgent::send_message(std::string dev_id, std::string json_str, int
// series through the legacy form would silently drop MessageFlag sign/encrypt. // series through the legacy form would silently drop MessageFlag sign/encrypt.
switch (plugin.network_abi()) { switch (plugin.network_abi()) {
case NetworkAbi::Legacy: { case NetworkAbi::Legacy: {
auto legacy_func = reinterpret_cast<func_send_message_legacy>(func); auto legacy_func = as_abi<func_send_message_legacy>(func);
return legacy_func(agent, std::move(dev_id), std::move(json_str), qos); return legacy_func(agent, std::move(dev_id), std::move(json_str), qos);
} }
case NetworkAbi::V0203: case NetworkAbi::V0203:
@@ -185,7 +196,7 @@ int BBLPrinterAgent::send_message_to_printer(std::string dev_id, std::string jso
if (func && agent) { if (func && agent) {
switch (plugin.network_abi()) { switch (plugin.network_abi()) {
case NetworkAbi::Legacy: { case NetworkAbi::Legacy: {
auto legacy_func = reinterpret_cast<func_send_message_to_printer_legacy>(func); auto legacy_func = as_abi<func_send_message_to_printer_legacy>(func);
return legacy_func(agent, std::move(dev_id), std::move(json_str), qos); return legacy_func(agent, std::move(dev_id), std::move(json_str), qos);
} }
case NetworkAbi::V0203: case NetworkAbi::V0203:
@@ -275,7 +286,7 @@ int BBLPrinterAgent::bind(std::string dev_ip, std::string dev_id, std::string de
switch (plugin.network_abi()) { switch (plugin.network_abi()) {
case NetworkAbi::Legacy: case NetworkAbi::Legacy:
case NetworkAbi::V0203: { case NetworkAbi::V0203: {
auto older_func = reinterpret_cast<func_bind_pre0208>(func); auto older_func = as_abi<func_bind_pre0208>(func);
return older_func(agent, dev_ip, dev_id, sec_link, timezone, improved, update_fn); return older_func(agent, dev_ip, dev_id, sec_link, timezone, improved, update_fn);
} }
case NetworkAbi::Current: case NetworkAbi::Current:
@@ -436,9 +447,9 @@ int dispatch_start(CurrentFn func, PrintParams& params, const CallbackFns&... ca
params.ams_mapping_info = BBLPrinterAgent::from_orca_payload(std::move(params.ams_mapping_info)); params.ams_mapping_info = BBLPrinterAgent::from_orca_payload(std::move(params.ams_mapping_info));
switch (plugin.network_abi()) { switch (plugin.network_abi()) {
case NetworkAbi::Legacy: case NetworkAbi::Legacy:
return reinterpret_cast<LegacyFn>(func)(agent, BBLNetworkPlugin::as_legacy(params), callbacks...); return as_abi<LegacyFn>(func)(agent, BBLNetworkPlugin::as_legacy(params), callbacks...);
case NetworkAbi::V0203: case NetworkAbi::V0203:
return reinterpret_cast<Fn0203>(func)(agent, BBLNetworkPlugin::as_0203(params), callbacks...); return as_abi<Fn0203>(func)(agent, BBLNetworkPlugin::as_0203(params), callbacks...);
case NetworkAbi::Current: case NetworkAbi::Current:
return func(agent, std::move(params), callbacks...); return func(agent, std::move(params), callbacks...);
default: default:
+1 -1
View File
@@ -1620,7 +1620,7 @@ void PresetUpdater::priv::check_new_vendors(const std::set<std::string>& system_
Http::get(download_url_str) Http::get(download_url_str)
.timeout_connect(5) .timeout_connect(5)
.on_progress(check_cancel) .on_progress(check_cancel)
.on_error([&vendor_id, &retry_count, max_retries](std::string body, std::string error, unsigned http_status) { .on_error([&vendor_id, &retry_count](std::string body, std::string error, unsigned http_status) {
BOOST_LOG_TRIVIAL(warning) << "[Orca Updater] download failed for new vendor " << vendor_id BOOST_LOG_TRIVIAL(warning) << "[Orca Updater] download failed for new vendor " << vendor_id
<< " (attempt " << retry_count << "/" << max_retries << "): " << error; << " (attempt " << retry_count << "/" << max_retries << "): " << error;
}) })