Merge remote-tracking branch 'origin/master' into ys_search

This commit is contained in:
YuSanka 2020-03-20 14:56:05 +01:00
commit a46a225cf1
83 changed files with 5730 additions and 4609 deletions

View file

@ -409,7 +409,7 @@ find_package(cereal REQUIRED)
# l10n
set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
add_custom_target(gettext_make_pot
COMMAND xgettext --keyword=L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --debug
COMMAND xgettext --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --debug
-f "${L10N_DIR}/list.txt"
-o "${L10N_DIR}/PrusaSlicer.pot"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}

18
deps/GMP/GMP.cmake vendored
View file

@ -17,11 +17,27 @@ if (MSVC)
add_custom_target(dep_GMP SOURCES ${_output})
else ()
set(_gmp_ccflags "-O2 -DNDEBUG -fPIC -DPIC -Wall -Wmissing-prototypes -Wpointer-arith -pedantic -fomit-frame-pointer -fno-common")
set(_gmp_build_tgt "${CMAKE_SYSTEM_PROCESSOR}")
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
set(_gmp_ccflags "${_gmp_ccflags} -march=armv7-a") # Works on RPi-4
set(_gmp_build_tgt armv7)
endif()
if (APPLE)
set(_gmp_ccflags "${_gmp_ccflags} -mmacosx-version-min=${DEP_OSX_TARGET}")
set(_gmp_build_tgt "--build=${_gmp_build_tgt}-apple-darwin")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(_gmp_build_tgt "--build=${_gmp_build_tgt}-pc-linux-gnu")
else ()
set(_gmp_build_tgt "") # let it guess
endif()
ExternalProject_Add(dep_GMP
# URL https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
URL https://gmplib.org/download/gmp/gmp-6.2.0.tar.lz
BUILD_IN_SOURCE ON
CONFIGURE_COMMAND ./configure --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" --with-pic
CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" ${_gmp_build_tgt}
BUILD_COMMAND make -j
INSTALL_COMMAND make install
)

View file

@ -21,7 +21,7 @@ else ()
ExternalProject_Add(dep_MPFR
URL http://ftp.vim.org/ftp/gnu/mpfr/mpfr-3.1.6.tar.bz2 https://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.bz2 # mirrors are allowed
BUILD_IN_SOURCE ON
CONFIGURE_COMMAND ./configure --prefix=${DESTDIR}/usr/local --enable-shared=no --enable-static=yes --with-gmp=${DESTDIR}/usr/local --with-pic
CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure --prefix=${DESTDIR}/usr/local --enable-shared=no --enable-static=yes --with-gmp=${DESTDIR}/usr/local ${_gmp_build_tgt}
BUILD_COMMAND make -j
INSTALL_COMMAND make install
DEPENDS dep_GMP

View file

@ -31,6 +31,7 @@ ExternalProject_Add(dep_libopenssl
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ./config
"--prefix=${DESTDIR}/usr/local"
"--libdir=lib"
no-shared
no-ssl3-method
no-dynamic-engine
@ -46,6 +47,7 @@ ExternalProject_Add(dep_libcurl
URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ./configure
"--libdir=${DESTDIR}/usr/local/lib"
--enable-static
--disable-shared
"--with-ssl=${DESTDIR}/usr/local"

File diff suppressed because it is too large Load diff

View file

@ -337,6 +337,10 @@ msgstr "Logický výraz může používat konfigurační hodnoty aktivního prof
msgid "A boolean expression using the configuration values of an active printer profile. If this expression evaluates to true, this profile is considered compatible with the active printer profile."
msgstr "Logický výraz může používat konfigurační hodnoty aktivního profilu tiskárny. Pokud je tento logický výraz pravdivý, potom je tento profil považován za kompatibilní s aktivním profilem tiskárny."
#: src/slic3r/GUI/Tab.cpp:975
msgid "A copy of the current system preset will be created, which will be detached from the system preset."
msgstr "Bude vytvořena oddělená kopie aktuálního systémového přednastavení."
#: src/slic3r/GUI/ConfigWizard.cpp:1034
msgid "A rule of thumb is 160 to 230 °C for PLA, and 215 to 250 °C for ABS."
msgstr "Obecným pravidlem je 160 až 230 °C pro PLA a 215 až 250 °C pro ABS."
@ -1088,6 +1092,34 @@ msgstr "Ukončování..."
msgid "Cannot calculate extrusion width for %1%: Variable \"%2%\" not accessible."
msgstr "Nelze vypočítat šířku extrudování pro %1%: Proměnná \"%2%\" není dostupná."
#: src/slic3r/GUI/GUI_ObjectList.cpp:3017
msgid ""
"Cannot insert a new layer range after the current layer range.\n"
"Current layer range overlaps with the next layer range."
msgstr ""
"Nelze vložit nový rozsah vrstev za aktuální rozsah vrstev.\n"
"Aktuální rozsah vrstev se překrývá s dalším rozsahem vrstev."
#: src/slic3r/GUI/GUI_ObjectList.cpp:3008
msgid ""
"Cannot insert a new layer range after the current layer range.\n"
"The next layer range is too thin to be split to two\n"
"without violating the minimum layer height."
msgstr ""
"Nelze vložit nový rozsah vrstev za aktuální rozsah vrstev.\n"
"Další rozsah vrstev je příliš tenký na to, aby byl rozdělen na dva\n"
"bez porušení minimální výšky vrstvy."
#: src/slic3r/GUI/GUI_ObjectList.cpp:3012
msgid ""
"Cannot insert a new layer range between the current and the next layer range.\n"
"The gap between the current layer range and the next layer range\n"
"is thinner than the minimum layer height allowed."
msgstr ""
"Nelze vložit nový rozsah vrstev mezi aktuální a následující rozsah vrstev.\n"
"Mezera mezi aktuálním rozsahem vrstev a dalším rozsahem vrstev\n"
"je tenčí, než je minimální povolená výška vrstvy."
#: src/slic3r/GUI/Tab.cpp:3073
msgid "Cannot overwrite a system profile."
msgstr "Nelze přepsat systémový profil."
@ -1569,15 +1601,6 @@ msgstr "Aktuální nastavení je zděděné od"
msgid "Current preset is inherited from the default preset."
msgstr "Aktuální nastavení je zděděno z výchozího nastavení."
#: src/slic3r/GUI/Tab.cpp:960
#, c-format
msgid ""
"Current preset is inherited from:\n"
"\t%s"
msgstr ""
"Aktuální nastavení je zděděné od:\n"
"%s"
#: src/slic3r/GUI/UpdateDialogs.cpp:43
msgid "Current version:"
msgstr "Aktuální verze:"
@ -1877,6 +1900,18 @@ msgstr "Odznačit obdélníkovým výběrem myši"
msgid "Deselects all objects"
msgstr "Odznačit všechny objekty"
#: src/slic3r/GUI/Tab.cpp:963
msgid "Detach from system preset"
msgstr "Oddělit od systémového přednastavení"
#: src/slic3r/GUI/Tab.cpp:984
msgid "Detach preset"
msgstr "Oddělení přednastavení"
#: src/slic3r/GUI/Tab.cpp:3029
msgid "Detached"
msgstr "Odpojeno"
#: src/libslic3r/PrintConfig.cpp:1373
msgid "Detect bridging perimeters"
msgstr "Detekovat perimetry přemostění"
@ -2025,14 +2060,6 @@ msgstr ""
"Vyberte ANO, pokud chcete změnit tuto hodnotu na %s%%,\n"
"nebo NE, pokud jste si jisti, že %s %s je správná hodnota."
#: src/slic3r/GUI/ConfigWizard.cpp:1761
msgid "Do you want to automatic select default filaments?"
msgstr "Chcete automaticky vybrat výchozí filamenty?"
#: src/slic3r/GUI/ConfigWizard.cpp:1772
msgid "Do you want to automatic select default materials?"
msgstr "Chcete automaticky vybrat výchozí materiály?"
#: src/slic3r/GUI/DoubleSlider.cpp:1920
msgid "Do you want to delete all saved tool changes?"
msgstr "Opravdu chcete odstranit všechny uložené změny nástrojů?"
@ -2049,6 +2076,14 @@ msgstr "Chcete to zkusit znovu"
msgid "Do you want to save your manually edited support points?"
msgstr "Chcete uložit ručně upravené podpěrné body?"
#: src/slic3r/GUI/ConfigWizard.cpp:1834
msgid "Do you want to select default filaments for these FFF printer models?"
msgstr "Chcete pro tyto modely FFF tiskáren vybrat výchozí filamenty?"
#: src/slic3r/GUI/ConfigWizard.cpp:1852
msgid "Do you want to select default SLA materials for these printer models?"
msgstr "Chcete pro tyto modely tiskáren vybrat výchozí SLA materiály?"
#: src/libslic3r/PrintConfig.cpp:3429
msgid "Don't arrange"
msgstr "Neuspořádávat"
@ -2065,6 +2100,10 @@ msgstr "Nevytvářet podpěry pod mosty"
msgid "Downgrade"
msgstr "Downgrade"
#: src/libslic3r/PrintConfig.cpp:1695
msgid "Draft shield"
msgstr "Ochranný štít"
#: src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:1365
#: src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:1368
#: src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:1369
@ -2152,6 +2191,11 @@ msgstr "Vysunout SD kartu / Flash disk"
msgid "Eject SD card / Flash drive after the G-code was exported to it."
msgstr "Vysunout SD kartu / Flash disk po vyexportování G-codu."
#: src/slic3r/GUI/Plater.cpp:2202
#, c-format
msgid "Ejecting of device %s(%s) has failed."
msgstr "Vysunutí zařízení %s(%s) se nezdařilo."
#: src/libslic3r/PrintConfig.cpp:118
msgid "Elephant foot compensation"
msgstr "Kompenzace rozplácnutí první vrstvy"
@ -2971,15 +3015,6 @@ msgstr "Pro více informací prosím navštivte naší wiki stránku:"
msgid "For support enforcers only"
msgstr "Pouze pro vynucené podpěry"
#. TRN Description for "WHITE BULLET"
#: src/slic3r/GUI/Tab.cpp:3265
msgid ""
"for the left button: \tindicates a non-system (or non-default) preset,\n"
"for the right button: \tindicates that the settings hasn't been modified."
msgstr ""
"na levé straně: indikuje nesystémové (jiné než výchozí) přednastavení,\n"
"na pravé straně: indikuje, že nastavení nebylo změněno."
#. TRN Description for "WHITE BULLET"
#: src/slic3r/GUI/Tab.cpp:3267
msgid ""
@ -3401,16 +3436,6 @@ msgstr "Soubor HTTPS CA"
msgid "HTTPS CA file is optional. It is only needed if you use HTTPS with a self-signed certificate."
msgstr "Soubor HTTPS CA je volitelný. Je nutný pouze pokud použijte HTTPS certifikát s vlastním podpisem."
#: src/slic3r/GUI/Tab.cpp:1757
#, c-format
msgid ""
"HTTPS CA File:\n"
" \tOn this system, %s uses HTTPS certificates from the system Certificate Store or Keychain.\n"
" \tTo use a custom CA file, please import your CA file into Certificate Store / Keychain."
msgstr ""
"Soubor HTTPS CA:\n"
"V tomto systému používá %s certifikáty HTTPS ze systému Certificate Store nebo Keychain. Chcete-li použít vlastní soubor CA, importujte soubor CA do Certificate Store / Keychain."
#: src/slic3r/GUI/Preferences.cpp:222
msgid "Icon size in a respect to the default size"
msgstr "Velikost ikon vůči výchozí velikosti"
@ -3461,6 +3486,10 @@ msgstr "Pokud je povoleno, stáhne Slic3r na pozadí aktualizace vestavěných s
msgid "If enabled, the 3D scene will be rendered in Retina resolution. If you are experiencing 3D performance problems, disabling this option may help."
msgstr "Pokud je tato volba povolena, bude 3D scéna vykreslena v rozlišení Retina. Pokud dochází k potížím s výkonem, zkuste tuto volbu vypnout."
#: src/libslic3r/PrintConfig.cpp:1696
msgid "If enabled, the skirt will be as tall as a highest printed object. This is useful to protect an ABS or ASA print from warping and detaching from print bed due to wind draft."
msgstr "Pokud je tato možnost povolena, bude obrys (skirt) stejně vysoký jako nejvyšší tištěný objekt. To je užitečné k ochraně modelu při tisku z ABS nebo ASA před deformací a odlepením od tiskové podložky v důsledku průvanu."
#: src/libslic3r/PrintConfig.cpp:1858
msgid "If enabled, the wipe tower will not be printed on layers with no toolchanges. On layers with a toolchange, extruder will travel downward to print the wipe tower. User is responsible for ensuring there is no collision with the print."
msgstr "Pokud je tato možnost povolena, nebude čistící věž vytištěna ve vrstvách bez změny barvy. U vrstev s výměnou sjede extruder směrem dolů a vytiskne vrstvu čistící věže. Uživatel je odpovědný za to, že nedojde ke kolizi tiskové hlavy s tiskem."
@ -4627,6 +4656,10 @@ msgstr "Oprava modelu byla dokončena"
msgid "Model repaired successfully"
msgstr "Model byl úspěšně opraven"
#: src/slic3r/GUI/Tab.cpp:979
msgid "Modifications to the current profile will be saved."
msgstr "Úpravy aktuálního profilu budou uloženy."
#: src/slic3r/GUI/Preset.cpp:247
msgid "modified"
msgstr "upraveno"
@ -5425,10 +5458,10 @@ msgstr "Přednastavení (%s)"
msgid "Preset with name \"%1%\" already exists."
msgstr "Přednastavení s názvem \"%1%\" již existuje."
#: src/slic3r/GUI/Tab.cpp:3045
#: src/slic3r/GUI/Tab.cpp:3029
msgctxt "PresetName"
msgid "%1% - Copy"
msgstr "%1% - Kopie"
msgid "Copy"
msgstr "Kopie"
#: src/slic3r/GUI/KBShortcutsDialog.cpp:163
msgid "Press to activate deselection rectangle"
@ -5947,9 +5980,9 @@ msgstr "Odebrat označené body"
msgid "Remove the selected object"
msgstr "Odstranit vybraný objekt"
#: src/slic3r/GUI/ConfigWizard.cpp:438
msgid "Remove user profiles - install from scratch (a snapshot will be taken beforehand)"
msgstr "Odstranit uživatelské profily - čistá instalace (nejprve bude provedena záloha)"
#: src/slic3r/GUI/ConfigWizard.cpp:453
msgid "Remove user profiles (a snapshot will be taken beforehand)"
msgstr "Odstranit uživatelské profily (předtím bude proveden snapshot)"
#: src/slic3r/GUI/GUI_ObjectList.cpp:1636
msgid "Rename"
@ -6468,16 +6501,6 @@ msgstr "Vyberte, jaký typ podložky potřebujete"
msgid "Select what kind of support do you need"
msgstr "Vyberte typ podpěr, které potřebujete"
#: src/slic3r/GUI/DoubleSlider.cpp:1917
msgid ""
"Select YES if you want to delete all saved tool changes, \n"
"\tNO if you want all tool changes switch to color changes, \n"
"\tor CANCEL to leave it unchanged."
msgstr ""
"Vyberte ANO, pokud chcete odstranit všechny uložené změny nástroje,\n"
"NE, pokud chcete, aby se všechny změny nástroje přepnout na změny barev,\n"
"nebo ZRUŠIT pro ponechání beze změny."
#: src/slic3r/GUI/DoubleSlider.cpp:1917
msgid ""
"Select YES if you want to delete all saved tool changes, \n"
@ -7641,6 +7664,10 @@ msgid ""
"If the device is connected, please press the Reset button next to the USB connector ..."
msgstr "Zařízení %s nebylo nalezeno. Pokud je zařízení připojeno, stiskněte tlačítko Reset vedle USB konektoru ..."
#: src/slic3r/GUI/Tab.cpp:976
msgid "The current custom preset will be detached from the parent system preset."
msgstr "Aktuální vlastní přednastavení bude odděleno od rodičovského systémového přednastavení."
#: src/slic3r/GUI/GUI_ObjectManipulation.cpp:875
msgid ""
"The currently manipulated object is tilted (rotation angles are not multiples of 90°).\n"
@ -7701,6 +7728,14 @@ msgstr "První vrstva bude v rovině XY zmenšena nakonfigurovanou hodnotou, kte
msgid "the following characters are not allowed:"
msgstr "následující znaky nejsou povolené:"
#: src/slic3r/GUI/ConfigWizard.cpp:1830
msgid "The following FFF printer models have no filament selected:"
msgstr "Následující modely FFF tiskáren nemají vybraný filament:"
#: src/slic3r/GUI/ConfigWizard.cpp:1848
msgid "The following SLA printer models have no materials selected:"
msgstr "Následující modely SLA tiskáren nemají vybrané žádné materiály:"
#: src/slic3r/GUI/Tab.cpp:3461
msgid "the following suffix is not allowed:"
msgstr "následující přípona není povolená:"
@ -7795,7 +7830,7 @@ msgstr "Vybraný objekt nemůže být rozdělen, protože obsahuje více než je
msgid "The selected object couldn't be split because it contains only one part."
msgstr "Vybraný objekt nemůže být rozdělen, protože obsahuje pouze jednu část."
#: src/slic3r/GUI/MainFrame.cpp:432
#: src/slic3r/GUI/MainFrame.cpp:461
msgid ""
"The selected project is no longer available.\n"
"Do you want to remove it from the recent projects list?"
@ -7803,10 +7838,6 @@ msgstr ""
"Vybraný projekt již není k dispozici.\n"
"Chcete ho odstranit ze seznamu posledních projektů?"
#: src/slic3r/GUI/MainFrame.cpp:422
msgid "The selected project is no more available"
msgstr "Vybraný projekt již není dostupný"
#: src/slic3r/GUI/DoubleSlider.cpp:998
msgid ""
"The sequential print is on.\n"
@ -7982,6 +8013,14 @@ msgstr ""
msgid "This %s version: %s"
msgstr "Tento %s verze: %s"
#: src/slic3r/GUI/Tab.cpp:982
msgid ""
"This action is not revertable.\n"
"Do you want to proceed?"
msgstr ""
"Tato akce je nevratná.\n"
"Chcete pokračovat?"
#: src/libslic3r/PrintConfig.cpp:165
msgid "This code is inserted between objects when using sequential printing. By default extruder and bed temperature are reset using non-wait command; however if M104, M109, M140 or M190 are detected in this custom code, Slic3r will not add temperature commands. Note that you can use placeholder variables for all Slic3r settings, so you can put a \"M109 S[first_layer_temperature]\" command wherever you want."
msgstr "Tento kód je vložen mezi objekty, pokud je použit sekvenční tisk. Ve výchozím nastavení je resetován extruder a tisková podložka pomocí non-wait (nečekacím) příkazem; nicméně pokud jsou příkazy M104, M109, 140 nebo M190 detekovány v tomto vlastním kódu, Slic3r nebude přidávat teplotní příkazy. Můžete přidávat zástupné proměnné pro veškeré nastavení Slic3ru, takže můžete vložit příkaz “M109 S[first_layer_temperature]” kamkoliv chcete."
@ -8153,10 +8192,6 @@ msgstr "Nejmenší tisknutelná výška vrstvy pro tento extruder. Omezuje rozli
msgid "This is usually caused by negligibly small extrusions or by a faulty model. Try to repair the model or change its orientation on the bed."
msgstr "To je obvykle způsobeno zanedbatelně malým množstvím extrudovaného materiálu nebo chybným modelem. Zkuste model opravit nebo změnit jeho orientaci na podložce."
#: src/libslic3r/GCode.cpp:639
msgid "This is usually caused by negligibly small extrusions or by a faulty model. Try to repair the model or change its orientation on the bed."
msgstr "To je obvykle způsobeno zanedbatelně malým množstvím extrudovaného materiálu nebo chybným modelem. Zkuste model opravit nebo změnit jeho orientaci na podložce."
#: src/libslic3r/PrintConfig.cpp:2215
msgid "This matrix describes volumes (in cubic milimetres) required to purge the new filament on the wipe tower for any given pair of tools."
msgstr "Tato matice popisuje objemy (v kubických milimetrech) nutné k vyčištění nového filamentu na čistící věži pro danou dvojici nástrojů."
@ -9056,14 +9091,6 @@ msgstr "Nelze načíst SLA projekt s objektem na podložce, který je složený
msgid "You cannot use non-uniform scaling mode for multiple objects/parts selection"
msgstr "Nemůžete použít nestejnoměrnou změnu měřítka pro více vybraných objektů/částí"
#: src/slic3r/GUI/ConfigWizard.cpp:1760
msgid "You have to select at least one filament for selected printers"
msgstr "Pro vybrané tiskárny musíte vybrat alespoň jeden filament"
#: src/slic3r/GUI/ConfigWizard.cpp:1771
msgid "You have to select at least one material for selected printers"
msgstr "Pro vybrané tiskárny musíte vybrat alespoň jeden materiál"
#: src/slic3r/GUI/GLCanvas3DManager.cpp:287
msgid "You may need to update your graphics card driver."
msgstr "Možná budete muset aktualizovat ovladač grafické karty."

View file

@ -337,6 +337,10 @@ msgstr "Ein boolescher Ausdruck, der die Konfigurationswerte eines aktiven Druck
msgid "A boolean expression using the configuration values of an active printer profile. If this expression evaluates to true, this profile is considered compatible with the active printer profile."
msgstr "Ein boolescher Ausdruck, der die Konfigurationswerte eines aktiven Druckerprofils verwendet. Wenn dieser Ausdruck als wahr bewertet wird, wird dieses Profil als kompatibel mit dem aktiven Druckerprofil angesehen."
#: src/slic3r/GUI/Tab.cpp:975
msgid "A copy of the current system preset will be created, which will be detached from the system preset."
msgstr "Es wird eine Kopie der aktuellen Systemvoreinstellung erstellt, die von der Systemvoreinstellung gelöst wird."
#: src/slic3r/GUI/ConfigWizard.cpp:1034
msgid "A rule of thumb is 160 to 230 °C for PLA, and 215 to 250 °C for ABS."
msgstr "Ein Daumenwert ist 160 bis 230 °C für PLA, und 215 bis 250 °C für ABS."
@ -1084,6 +1088,32 @@ msgstr "Abbrechen..."
msgid "Cannot calculate extrusion width for %1%: Variable \"%2%\" not accessible."
msgstr "Kann die Extrusionsbreite für %1% nicht berechnen: Variable \"%2%\" nicht zugänglich."
#: src/slic3r/GUI/GUI_ObjectList.cpp:3017
msgid ""
"Cannot insert a new layer range after the current layer range.\n"
"Current layer range overlaps with the next layer range."
msgstr ""
"Es kann kein neuer Schichtenbereich nach dem aktuellen Schichtenbereich eingefügt werden.\n"
"Der aktuelle Schichtenbereich überschneidet sich mit dem nächsten Schichtenbereich."
#: src/slic3r/GUI/GUI_ObjectList.cpp:3008
msgid ""
"Cannot insert a new layer range after the current layer range.\n"
"The next layer range is too thin to be split to two\n"
"without violating the minimum layer height."
msgstr ""
"Es kann kein neuer Schichtenbereich nach dem aktuellen Schichtenbereich eingefügt werden.\n"
"Der nächste Schichtenbereich ist zu schmal, um auf zwei Schichten aufgeteilt zu werden ohne die Mindestschichthöhe zu verletzen."
#: src/slic3r/GUI/GUI_ObjectList.cpp:3012
msgid ""
"Cannot insert a new layer range between the current and the next layer range.\n"
"The gap between the current layer range and the next layer range\n"
"is thinner than the minimum layer height allowed."
msgstr ""
"Es kann kein neuer Schichtenbereich zwischen dem aktuellen und dem nächsten Schichtenbereich eingefügt werden.\n"
"Die Lücke zwischen dem aktuellen und dem nächsten Schichtenbereich ist ist schmaler als die minimal zulässige Schichthöhe."
#: src/slic3r/GUI/Tab.cpp:3073
msgid "Cannot overwrite a system profile."
msgstr "Systemprofil kann nicht überschrieben werden."
@ -1565,15 +1595,6 @@ msgstr "Aktuelle Voreinstellung ist abgeleitet von"
msgid "Current preset is inherited from the default preset."
msgstr "Aktuelle Voreinstellung ist abgeleitet von der Standardvoreinstellung."
#: src/slic3r/GUI/Tab.cpp:960
#, c-format
msgid ""
"Current preset is inherited from:\n"
"\t%s"
msgstr ""
"Aktuelle Voreinstellung ist abgeleitet von:\n"
"%s"
#: src/slic3r/GUI/UpdateDialogs.cpp:43
msgid "Current version:"
msgstr "Aktuelle Version:"
@ -1873,6 +1894,18 @@ msgstr "Abwahl über Rechteck"
msgid "Deselects all objects"
msgstr "Alle Objekte abwählen"
#: src/slic3r/GUI/Tab.cpp:963
msgid "Detach from system preset"
msgstr "Lösen von der Systemvoreinstellung"
#: src/slic3r/GUI/Tab.cpp:984
msgid "Detach preset"
msgstr "Lösen der Voreinstellugen"
#: src/slic3r/GUI/Tab.cpp:3029
msgid "Detached"
msgstr "Losgelöst"
#: src/libslic3r/PrintConfig.cpp:1373
msgid "Detect bridging perimeters"
msgstr "Umfangbrücken entdecken"
@ -2021,14 +2054,6 @@ msgstr ""
"Wählen Sie JA, wenn Sie diesen Wert auf %s%% ändern möchten, \n"
"oder NEIN, wenn Sie sicher sind, dass %s %s ein korrekter Wert ist."
#: src/slic3r/GUI/ConfigWizard.cpp:1761
msgid "Do you want to automatic select default filaments?"
msgstr "Möchten Sie die Standardfilamente automatisch auswählen?"
#: src/slic3r/GUI/ConfigWizard.cpp:1772
msgid "Do you want to automatic select default materials?"
msgstr "Möchten Sie automatisch Standardmaterialien auswählen?"
#: src/slic3r/GUI/DoubleSlider.cpp:1920
msgid "Do you want to delete all saved tool changes?"
msgstr "Möchten Sie alle gespeicherten Werkzeugänderungen löschen?"
@ -2045,6 +2070,14 @@ msgstr "Möchten Sie es erneut versuchen"
msgid "Do you want to save your manually edited support points?"
msgstr "Möchten Sie Ihre manuell bearbeiteten Stützpunkte speichern?"
#: src/slic3r/GUI/ConfigWizard.cpp:1834
msgid "Do you want to select default filaments for these FFF printer models?"
msgstr "Möchten Sie Standardfilamente für diese FFF-Druckermodelle auswählen?"
#: src/slic3r/GUI/ConfigWizard.cpp:1852
msgid "Do you want to select default SLA materials for these printer models?"
msgstr "Möchten Sie Standard-SLA-Materialien für diese Druckermodelle auswählen?"
#: src/libslic3r/PrintConfig.cpp:3429
msgid "Don't arrange"
msgstr "Nicht Anordnen"
@ -2061,6 +2094,10 @@ msgstr "Brücken nicht unterstützen"
msgid "Downgrade"
msgstr "Downgrade"
#: src/libslic3r/PrintConfig.cpp:1695
msgid "Draft shield"
msgstr "Windschutz"
#: src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:1365
#: src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:1368
#: src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:1369
@ -2136,6 +2173,23 @@ msgstr "Häkchen bearbeiten - Rechtsklick"
msgid "Editing"
msgstr "Bearbeitung"
#: src/slic3r/GUI/MainFrame.cpp:547
msgid "Ejec&t SD card / Flash drive"
msgstr "SD-Kar&te/Flash-Laufwerk auswerfen"
#: src/slic3r/GUI/KBShortcutsDialog.cpp:126
msgid "Eject SD card / Flash drive"
msgstr "SD-Karte/Flash-Laufwerk auswerfen"
#: src/slic3r/GUI/MainFrame.cpp:547
msgid "Eject SD card / Flash drive after the G-code was exported to it."
msgstr "SD-Karte / Flash-Laufwerk auswerfen, nachdem der G-Code dorthin exportiert wurde."
#: src/slic3r/GUI/Plater.cpp:2202
#, c-format
msgid "Ejecting of device %s(%s) has failed."
msgstr "Das Auswerfen von Gerät %s(%s) ist fehlgeschlagen."
#: src/libslic3r/PrintConfig.cpp:118
msgid "Elephant foot compensation"
msgstr "Elefantenfußkompensation"
@ -2426,6 +2480,10 @@ msgstr "Exportiere die aktuelle Plattenbelegung als AMF"
msgid "Export current plate as G-code"
msgstr "Exportiere die aktuelle Plattenbelegung als G-Code"
#: src/slic3r/GUI/MainFrame.cpp:521
msgid "Export current plate as G-code to SD card / Flash drive"
msgstr "Aktuelle Druckplatte als G-Code auf SD-Karte/Flash-Laufwerk exportieren"
#: src/slic3r/GUI/MainFrame.cpp:486
msgid "Export current plate as STL"
msgstr "Exportiere die aktuelle Plattenbelegung als STL"
@ -2447,6 +2505,10 @@ msgstr "Exportieren Sie die vollständigen Pfadnamen der Modelle und Teilequelle
msgid "Export G-code"
msgstr "Export G-Code"
#: src/slic3r/GUI/MainFrame.cpp:521
msgid "Export G-code to SD card / Flash drive"
msgstr "G-Code auf SD-Karte/Flash-Laufwerk exportieren"
#: src/libslic3r/PrintConfig.cpp:3320
msgid "Export OBJ"
msgstr "Exportiere OBJ"
@ -2947,15 +3009,6 @@ msgstr "Für weitere Informationen besuchen Sie bitte unsere Wiki-Seite:"
msgid "For support enforcers only"
msgstr "Nur für Stützverstärker"
#. TRN Description for "WHITE BULLET"
#: src/slic3r/GUI/Tab.cpp:3265
msgid ""
"for the left button: \tindicates a non-system (or non-default) preset,\n"
"for the right button: \tindicates that the settings hasn't been modified."
msgstr ""
"Beim linken Knopf: zeigt eine Nicht-System- (oder Nicht-Standard-) Einstellung an.\n"
"Beim rechten Knopf: zeigt an, dass die Einstellung nicht geändert wurde."
#. TRN Description for "WHITE BULLET"
#: src/slic3r/GUI/Tab.cpp:3267
msgid ""
@ -3373,16 +3426,6 @@ msgstr "HTTPS CA Datei"
msgid "HTTPS CA file is optional. It is only needed if you use HTTPS with a self-signed certificate."
msgstr "HTTPS-CA-Datei ist optional. Sie wird nur benötigt, wenn Sie HTTPS mit einem selbstsignierten Zertifikat verwenden."
#: src/slic3r/GUI/Tab.cpp:1757
#, c-format
msgid ""
"HTTPS CA File:\n"
" \tOn this system, %s uses HTTPS certificates from the system Certificate Store or Keychain.\n"
" \tTo use a custom CA file, please import your CA file into Certificate Store / Keychain."
msgstr ""
"HTTPS CA-Datei:\n"
"Auf diesem System verwendet %s HTTPS-Zertifikate aus dem System Zertifikatsspeicher oder Schlüsselbund. Um eine benutzerdefinierte CA-Datei zu verwenden, importieren Sie bitte Ihre CA-Datei in den Zertifikatsspeicher / Schlüsselbund."
#: src/slic3r/GUI/Preferences.cpp:222
msgid "Icon size in a respect to the default size"
msgstr "Symbolgröße in Bezug auf die Standardgröße"
@ -3433,6 +3476,10 @@ msgstr "Wenn aktiviert, lädt Slic3r Updates der eingebauten Systemvoreinstellun
msgid "If enabled, the 3D scene will be rendered in Retina resolution. If you are experiencing 3D performance problems, disabling this option may help."
msgstr "Wenn aktiviert, wird die 3D-Szene in Retina-Auflösung gerendert. Wenn Sie Probleme mit der 3D-Leistung haben, kann es hilfreich sein, diese Option zu deaktivieren."
#: src/libslic3r/PrintConfig.cpp:1696
msgid "If enabled, the skirt will be as tall as a highest printed object. This is useful to protect an ABS or ASA print from warping and detaching from print bed due to wind draft."
msgstr "Wenn diese Option aktiviert ist, wird die Schürze so hoch wie das höchste gedruckte Objekt sein. Dies ist nützlich, um einen ABS- oder ASA-Druck vor dem Verziehen und Ablösen vom Druckbett aufgrund von Zugluft zu schützen."
#: src/libslic3r/PrintConfig.cpp:1858
msgid "If enabled, the wipe tower will not be printed on layers with no toolchanges. On layers with a toolchange, extruder will travel downward to print the wipe tower. User is responsible for ensuring there is no collision with the print."
msgstr "Wenn aktiviert, wird der Reinigungsturm nicht auf Schichten ohne Werkzeugwechsel gedruckt. Bei Schichten mit Werkzeugwechsel fährt der Extruder nach unten, um den Reinigungsturm zu drucken. Der Benutzer ist dafür verantwortlich, dass es nicht zu einer Kollision mit dem Druck kommt."
@ -4599,6 +4646,10 @@ msgstr "Modellreparatur beendet"
msgid "Model repaired successfully"
msgstr "Modellreparatur erfolgreich"
#: src/slic3r/GUI/Tab.cpp:979
msgid "Modifications to the current profile will be saved."
msgstr "Änderungen am aktuellen Profil werden gespeichert."
#: src/slic3r/GUI/Preset.cpp:247
msgid "modified"
msgstr "geändert"
@ -5397,10 +5448,10 @@ msgstr "Voreinstellung (%s)"
msgid "Preset with name \"%1%\" already exists."
msgstr "Eine Voreinstellung mit dem Namen \"%1%\" existiert bereits."
#: src/slic3r/GUI/Tab.cpp:3045
#: src/slic3r/GUI/Tab.cpp:3029
msgctxt "PresetName"
msgid "%1% - Copy"
msgstr "%1% - Kopieren"
msgid "Copy"
msgstr "Kopieren"
#: src/slic3r/GUI/KBShortcutsDialog.cpp:163
msgid "Press to activate deselection rectangle"
@ -5918,9 +5969,9 @@ msgstr "Ausgewählte Punkte entfernen"
msgid "Remove the selected object"
msgstr "Ausgewähltes Objekt entfernen"
#: src/slic3r/GUI/ConfigWizard.cpp:438
msgid "Remove user profiles - install from scratch (a snapshot will be taken beforehand)"
msgstr "Benutzerprofile entfernen - von Grund auf neu installieren (eine Momentaufnahme wird vorab erstellt)"
#: src/slic3r/GUI/ConfigWizard.cpp:453
msgid "Remove user profiles (a snapshot will be taken beforehand)"
msgstr "Benutzerprofile entfernen (eine Momentaufnahme wird vorab erstellt)"
#: src/slic3r/GUI/GUI_ObjectList.cpp:1636
msgid "Rename"
@ -6437,16 +6488,6 @@ msgstr "Wählen Sie aus, welche Art von Grundschicht Sie benötigen"
msgid "Select what kind of support do you need"
msgstr "Wählen Sie aus, welche Art von Unterstützung Sie benötigen"
#: src/slic3r/GUI/DoubleSlider.cpp:1917
msgid ""
"Select YES if you want to delete all saved tool changes, \n"
"\tNO if you want all tool changes switch to color changes, \n"
"\tor CANCEL to leave it unchanged."
msgstr ""
"Wählen Sie JA, wenn Sie alle gespeicherten Werkzeugänderungen löschen möchten, \n"
"NEIN, wenn Sie möchten, dass alle Werkzeugänderungen auf Farbwechsel umgestellt werden, \n"
"oder ABBRECHEN, um sie unverändert zu lassen."
#: src/slic3r/GUI/DoubleSlider.cpp:1917
msgid ""
"Select YES if you want to delete all saved tool changes, \n"
@ -7612,6 +7653,10 @@ msgstr ""
"Das %s-Gerät wurde nicht gefunden.\n"
"Wenn das Gerät angeschlossen ist, drücken Sie bitte die Reset-Taste neben dem USB-Anschluss...."
#: src/slic3r/GUI/Tab.cpp:976
msgid "The current custom preset will be detached from the parent system preset."
msgstr "Die aktuelle benutzerdefinierte Voreinstellung wird von der Voreinstellung des übergeordneten Systems gelöst."
#: src/slic3r/GUI/GUI_ObjectManipulation.cpp:875
msgid ""
"The currently manipulated object is tilted (rotation angles are not multiples of 90°).\n"
@ -7675,6 +7720,14 @@ msgstr "Die erste Schicht wird in der XY-Ebene um den vorgegebenen Wert verklein
msgid "the following characters are not allowed:"
msgstr "die folgenden Zeichen sind nicht erlaubt:"
#: src/slic3r/GUI/ConfigWizard.cpp:1830
msgid "The following FFF printer models have no filament selected:"
msgstr "Bei den folgenden FFF-Druckermodellen wurde kein Filament ausgewählt:"
#: src/slic3r/GUI/ConfigWizard.cpp:1848
msgid "The following SLA printer models have no materials selected:"
msgstr "Bei den folgenden SLA-Druckermodellen wurden keine Materialien ausgewählt:"
#: src/slic3r/GUI/Tab.cpp:3461
msgid "the following suffix is not allowed:"
msgstr "das folgenden Suffix ist nicht erlaubt:"
@ -7769,7 +7822,7 @@ msgstr "Das ausgewählte Objekt konnte nicht getrennt werden, weil es aus mehr a
msgid "The selected object couldn't be split because it contains only one part."
msgstr "Das ausgewählte Objekt konnte nicht getrennt werden, da es nur aus einem Teil besteht."
#: src/slic3r/GUI/MainFrame.cpp:432
#: src/slic3r/GUI/MainFrame.cpp:461
msgid ""
"The selected project is no longer available.\n"
"Do you want to remove it from the recent projects list?"
@ -7777,10 +7830,6 @@ msgstr ""
"Das ausgewählte Projekt ist nicht mehr verfügbar.\n"
"Wollen Sie es aus der Liste der letzten Projekte entfernen?"
#: src/slic3r/GUI/MainFrame.cpp:422
msgid "The selected project is no more available"
msgstr "Das ausgewählte Projekt ist nicht mehr verfügbar"
#: src/slic3r/GUI/DoubleSlider.cpp:998
msgid ""
"The sequential print is on.\n"
@ -7952,6 +8001,14 @@ msgstr ""
msgid "This %s version: %s"
msgstr "Diese %s Version: %s"
#: src/slic3r/GUI/Tab.cpp:982
msgid ""
"This action is not revertable.\n"
"Do you want to proceed?"
msgstr ""
"Diese Aktion ist nicht umkehrbar.\n"
"Wollen Sie fortfahren?"
#: src/libslic3r/PrintConfig.cpp:165
msgid "This code is inserted between objects when using sequential printing. By default extruder and bed temperature are reset using non-wait command; however if M104, M109, M140 or M190 are detected in this custom code, Slic3r will not add temperature commands. Note that you can use placeholder variables for all Slic3r settings, so you can put a \"M109 S[first_layer_temperature]\" command wherever you want."
msgstr "Dieser Code wird beim sequentiellen Drucken zwischen Objekten eingefügt. Standardmäßig werden Extruder- und Betttemperatur mit dem Befehl, der nicht auf die Änderung wartet, zurückgesetzt. Wenn jedoch M104, M109, M140 oder M190 in diesem benutzerdefinierten Code erkannt werden, fügt Slic3r keine Temperaturbefehle hinzu. Beachten Sie, dass Sie Platzhaltervariablen für alle PrusaSlicer-Einstellungen verwenden können, so dass Sie einen \"M109 S[first_layer_temperature]\"-Befehl an beliebiger Stelle platzieren können."
@ -8121,10 +8178,6 @@ msgstr "Dies ist die niedrigste druckbare Schichthöhe für diesen Extruder und
msgid "This is usually caused by negligibly small extrusions or by a faulty model. Try to repair the model or change its orientation on the bed."
msgstr "Dies wird in der Regel durch vernachlässigbar kleine Extrusionen oder durch ein fehlerhaftes Modell verursacht. Versuchen Sie, das Modell zu reparieren oder seine Ausrichtung auf dem Druckbett zu ändern."
#: src/libslic3r/GCode.cpp:639
msgid "This is usually caused by negligibly small extrusions or by a faulty model. Try to repair the model or change its orientation on the bed."
msgstr "Dies wird in der Regel durch vernachlässigbar kleine Extrusionen oder durch ein fehlerhaftes Modell verursacht. Versuchen Sie, das Modell zu reparieren oder seine Ausrichtung auf dem Druckbett zu ändern."
#: src/libslic3r/PrintConfig.cpp:2215
msgid "This matrix describes volumes (in cubic milimetres) required to purge the new filament on the wipe tower for any given pair of tools."
msgstr "Diese Matrix beschreibt die Volumina (in Kubikmillimetern), die benötigt werden, um das neue Filament auf dem Reinigungsturm für ein bestimmtes Werkzeugpaar zu reinigen."
@ -9025,14 +9078,6 @@ msgstr "Sie können kein SLA-Projekt mit einem mehrteiligen Objekt auf das Druck
msgid "You cannot use non-uniform scaling mode for multiple objects/parts selection"
msgstr "Sie können den nichtgleichmäßigen Skalierungsmodus nicht für mehrere Objekte/Teileauswahlen verwenden"
#: src/slic3r/GUI/ConfigWizard.cpp:1760
msgid "You have to select at least one filament for selected printers"
msgstr "Sie müssen mindestens ein Filament für die ausgewählten Drucker auswählen"
#: src/slic3r/GUI/ConfigWizard.cpp:1771
msgid "You have to select at least one material for selected printers"
msgstr "Sie müssen mindestens ein Material für die ausgewählten Drucker auswählen"
#: src/slic3r/GUI/GLCanvas3DManager.cpp:287
msgid "You may need to update your graphics card driver."
msgstr "Möglicherweise müssen Sie Ihren Grafikkartentreiber aktualisieren."

Binary file not shown.

View file

@ -0,0 +1,155 @@
msgid ""
msgstr ""
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"X-Generator: Poedit 2.3\n"
#: src/slic3r/GUI/UpdateDialogs.cpp:71
msgid "Don't notify about new releases any more"
msgstr "Don't notify about new releases anymore"
#: src/libslic3r/PrintConfig.cpp:287
msgid "A boolean expression using the configuration values of an active print profile. If this expression evaluates to true, this profile is considered compatible with the active print profile."
msgstr "A Boolean expression using the configuration values of an active print profile. If this expression evaluates to true, this profile is considered compatible with the active print profile."
#: src/libslic3r/PrintConfig.cpp:272
msgid "A boolean expression using the configuration values of an active printer profile. If this expression evaluates to true, this profile is considered compatible with the active printer profile."
msgstr "A Boolean expression using the configuration values of an active printer profile. If this expression evaluates to true, this profile is considered compatible with the active printer profile."
#: src/libslic3r/PrintConfig.cpp:409
msgid "Add solid infill near sloping surfaces to guarantee the vertical shell thickness (top+bottom solid layers)."
msgstr "Add solid infill near sloping surfaces to guarantee the vertical shell thickness (top + bottom solid layers)."
#: src/slic3r/GUI/ConfigWizard.cpp:791
msgid "Additionally a backup snapshot of the whole configuration is created before an update is applied."
msgstr "Additionally, a backup snapshot of the whole configuration is created before an update is applied."
#: src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:1268
msgid "Autogeneration will erase all manually edited points."
msgstr "Auto Generation will erase all manually edited points."
#: src/slic3r/GUI/Tab.cpp:1171
msgid "Autospeed (advanced)"
msgstr "Auto Speed (advanced)"
#: src/slic3r/GUI/ConfigSnapshotDialog.cpp:22
msgid "Before roll back"
msgstr "Before rollback"
#: src/slic3r/GUI/ButtonsDescription.cpp:16
msgid "Buttons And Text Colors Description"
msgstr "Buttons and Text Colors Description"
#: src/libslic3r/PrintConfig.cpp:791
msgid "Density of internal infill, expressed in the range 0% - 100%."
msgstr "Density of internal infill, expressed in the range 0 % - 100 %."
#: src/slic3r/GUI/ConfigWizard.cpp:773
#, c-format
msgid "If enabled, %s checks for new application versions online. When a new version becomes available, a notification is displayed at the next application startup (never during program usage). This is only a notification mechanisms, no automatic installation is done."
msgstr "If enabled, %s checks for new application versions online. When a new version becomes available, a notification is displayed at the next application startup (never during program usage). This is only a notification mechanism, no automatic installation is done."
#: src/slic3r/GUI/ConfigWizard.cpp:783
#, c-format
msgid "If enabled, %s downloads updates of built-in system presets in the background.These updates are downloaded into a separate temporary location.When a new preset version becomes available it is offered at application startup."
msgstr "If enabled, %s downloads updates of built-in system presets in the background. These updates are downloaded into a separate temporary location. When a new preset version becomes available it is offered at application startup."
#: src/slic3r/GUI/Preferences.cpp:66
msgid "If enabled, PrusaSlicer will check for the new versions of itself online. When a new version becomes available a notification is displayed at the next application startup (never during program usage). This is only a notification mechanisms, no automatic installation is done."
msgstr "If enabled, PrusaSlicer will check for the new versions of itself online. When a new version becomes available a notification is displayed at the next application startup (never during program usage). This is only a notification mechanism, no automatic installation is done."
#: src/libslic3r/PrintConfig.cpp:1858
msgid "If enabled, the wipe tower will not be printed on layers with no toolchanges. On layers with a toolchange, extruder will travel downward to print the wipe tower. User is responsible for ensuring there is no collision with the print."
msgstr "If enabled, the wipe tower will not be printed on layers with no tool changes. On layers with a tool change, extruder will travel downward to print the wipe tower. User is responsible for ensuring there is no collision with the print."
#: src/libslic3r/PrintConfig.cpp:2262
msgid "Object will be used to purge the nozzle after a toolchange to save material that would otherwise end up in the wipe tower and decrease print time. Colours of the objects will be mixed as a result."
msgstr "Object will be used to purge the nozzle after a tool change to save material that would otherwise end up in the wipe tower and decrease print time. Colours of the objects will be mixed as a result."
#: src/libslic3r/Print.cpp:1365
msgid "One or more object were assigned an extruder that the printer does not have."
msgstr "One or more objects were assigned an extruder that the printer does not have."
#: src/libslic3r/PrintConfig.cpp:2254
msgid "Purging after toolchange will done inside this object's infills. This lowers the amount of waste but may result in longer print time due to additional travel moves."
msgstr "Purging after tool change will done inside this object's infills. This lowers the amount of waste but may result in longer print time due to additional travel moves."
#: src/libslic3r/PrintConfig.cpp:1552
msgid "Retraction Length (Toolchange)"
msgstr "Retraction Length (Tool change)"
#: src/libslic3r/PrintConfig.cpp:556
msgid "Set this to a non-zero value to allow a manual extrusion width. If left to zero, Slic3r derives extrusion widths from the nozzle diameter (see the tooltips for perimeter extrusion width, infill extrusion width etc). If expressed as percentage (for example: 230%), it will be computed over layer height."
msgstr "Set this to a non-zero value to allow a manual extrusion width. If left to zero, Slic3r derives extrusion widths from the nozzle diameter (see the tooltips for perimeter extrusion width, infill extrusion width etc.). If expressed as percentage (for example: 230%), it will be computed over layer height."
#: src/libslic3r/PrintConfig.cpp:2824
msgid "Some objects can get along with a few smaller pads instead of a single big one. This parameter defines how far the center of two smaller pads should be. If theyare closer, they will get merged into one pad."
msgstr "Some objects can get along with a few smaller pads instead of a single big one. This parameter defines how far the center of two smaller pads should be. If they are closer, they will get merged into one pad."
#: src/libslic3r/PrintConfig.cpp:624
msgid "Speed used for unloading the filament on the wipe tower (does not affect initial part of unloading just after ramming)."
msgstr "Speed used for unloading the filament on the wipe tower (does not affect initial part of unloading just after ramming)."
#: src/libslic3r/PrintConfig.cpp:2044
msgid "Support material will not be generated for overhangs whose slope angle (90° = vertical) is above the given threshold. In other words, this value represent the most horizontal slope (measured from the horizontal plane) that you can print without support material. Set to zero for automatic detection (recommended)."
msgstr "Support material will not be generated for overhangs whose slope angle (90° = vertical) is above the given threshold. In other words, this value represents the most horizontal slope (measured from the horizontal plane) that you can print without support material. Set to zero for automatic detection (recommended)."
#: src/slic3r/GUI/DoubleSlider.cpp:998
msgid ""
"The sequential print is on.\n"
"It's impossible to apply any custom G-code for objects printing sequentually.\n"
"This code won't be processed during G-code generation."
msgstr ""
"The sequential print is on.\n"
"It's impossible to apply any custom G-code for objects printing sequentially.\n"
"This code won't be processed during G-code generation."
#: src/libslic3r/PrintConfig.cpp:2094
msgid "This custom code is inserted before every toolchange. Placeholder variables for all PrusaSlicer settings as well as {previous_extruder} and {next_extruder} can be used. When a tool-changing command which changes to the correct extruder is included (such as T{next_extruder}), PrusaSlicer will emit no other such command. It is therefore possible to script custom behaviour both before and after the toolchange."
msgstr "This custom code is inserted before every tool change. Placeholder variables for all PrusaSlicer settings as well as {previous_extruder} and {next_extruder} can be used. When a tool-changing command which changes to the correct extruder is included (such as T{next_extruder}), PrusaSlicer will emit no other such command. It is therefore possible to script custom behaviour both before and after the tool change."
#: src/libslic3r/PrintConfig.cpp:396
msgid "This end procedure is inserted at the end of the output file, before the printer end gcode (and before any toolchange from this filament in case of multimaterial printers). Note that you can use placeholder variables for all PrusaSlicer settings. If you have multiple extruders, the gcode is processed in extruder order."
msgstr "This end procedure is inserted at the end of the output file, before the printer end gcode (and before any tool change from this filament in case of multimaterial printers). Note that you can use placeholder variables for all PrusaSlicer settings. If you have multiple extruders, the gcode is processed in extruder order."
#: src/libslic3r/PrintConfig.cpp:2215
msgid "This matrix describes volumes (in cubic milimetres) required to purge the new filament on the wipe tower for any given pair of tools."
msgstr "This matrix describes volumes (in cubic millimetres) required to purge the new filament on the wipe tower for any given pair of tools."
#: src/libslic3r/PrintConfig.cpp:1829
msgid "This start procedure is inserted at the beginning, after any printer start gcode (and after any toolchange to this filament in case of multi-material printers). This is used to override settings for a specific filament. If PrusaSlicer detects M104, M109, M140 or M190 in your custom codes, such commands will not be prepended automatically so you're free to customize the order of heating commands and other custom actions. Note that you can use placeholder variables for all PrusaSlicer settings, so you can put a \"M109 S[first_layer_temperature]\" command wherever you want. If you have multiple extruders, the gcode is processed in extruder order."
msgstr "This start procedure is inserted at the beginning, after any printer start gcode (and after any tool change to this filament in case of multi-material printers). This is used to override settings for a specific filament. If PrusaSlicer detects M104, M109, M140 or M190 in your custom codes, such commands will not be prepended automatically so you're free to customize the order of heating commands and other custom actions. Note that you can use placeholder variables for all PrusaSlicer settings, so you can put a \"M109 S[first_layer_temperature]\" command wherever you want. If you have multiple extruders, the gcode is processed in extruder order."
#: src/libslic3r/PrintConfig.cpp:641
msgid "Time to wait after the filament is unloaded. May help to get reliable toolchanges with flexible materials that may need more time to shrink to original dimensions."
msgstr "Time to wait after the filament is unloaded. May help to get reliable tool changes with flexible materials that may need more time to shrink to original dimensions."
#: src/slic3r/GUI/Tab.cpp:1491
msgid "Toolchange parameters with single extruder MM printers"
msgstr "Toolchange parameters with single extruder MM printers"
#: src/slic3r/Utils/Duet.cpp:82 src/slic3r/Utils/Duet.cpp:137
#: src/slic3r/Utils/FlashAir.cpp:119 src/slic3r/Utils/FlashAir.cpp:140
#: src/slic3r/Utils/FlashAir.cpp:156
msgid "Unknown error occured"
msgstr "Unknown error occurred"
#: src/libslic3r/PrintConfig.cpp:253
msgid "When printing multi-material objects, this settings will make Slic3r to clip the overlapping object parts one by the other (2nd part will be clipped by the 1st, 3rd part will be clipped by the 1st and 2nd etc)."
msgstr "When printing multi-material objects, this settings will make Slic3r to clip the overlapping object parts one by the other (2nd part will be clipped by the 1st, 3rd part will be clipped by the 1st and 2nd etc.)."
#: src/libslic3r/PrintConfig.cpp:1391
msgid "When set to zero, the distance the filament is moved from parking position during load is exactly the same as it was moved back during unload. When positive, it is loaded further, if negative, the loading move is shorter than unloading."
msgstr "When set to zero, the distance the filament is moved from parking position during load is exactly the same as it was moved back during unload. When positive, it is loaded further, if negative, the loading move is shorter than unloading."
#: src/slic3r/GUI/Tab.cpp:3285
msgid "WHITE BULLET icon indicates a non system (or non default) preset."
msgstr "WHITE BULLET icon indicates a non-system (or non-default) preset."

File diff suppressed because it is too large Load diff

View file

@ -337,6 +337,10 @@ msgstr "Une expression booléenne utilisant les valeurs de configuration d'un pr
msgid "A boolean expression using the configuration values of an active printer profile. If this expression evaluates to true, this profile is considered compatible with the active printer profile."
msgstr "Une expression booléenne utilisant les valeurs de configuration d'un profil d'imprimante actif. Si cette expression est évaluée comme vraie, ce profil est considéré comme compatible avec le profil d'imprimante actif."
#: src/slic3r/GUI/Tab.cpp:975
msgid "A copy of the current system preset will be created, which will be detached from the system preset."
msgstr "Une copie du préréglage système actuel sera créé, et il sera détaché du préréglage système."
#: src/slic3r/GUI/ConfigWizard.cpp:1034
msgid "A rule of thumb is 160 to 230 °C for PLA, and 215 to 250 °C for ABS."
msgstr "La règle générale est 160 à 230 °C pour le PLA et 215 à 250 °C pour l'ABS."
@ -1088,6 +1092,32 @@ msgstr "Annulation..."
msgid "Cannot calculate extrusion width for %1%: Variable \"%2%\" not accessible."
msgstr "Impossible de calculer la largeur d'extrusion pour %1% : la variable \"%2%\" n'est pas accessible."
#: src/slic3r/GUI/GUI_ObjectList.cpp:3017
msgid ""
"Cannot insert a new layer range after the current layer range.\n"
"Current layer range overlaps with the next layer range."
msgstr ""
"Impossible d'insérer une nouvelle zone de couche après la zone de couche actuelle.\n"
"La zone de couche actuelle chevauche la prochaine zone de couche."
#: src/slic3r/GUI/GUI_ObjectList.cpp:3008
msgid ""
"Cannot insert a new layer range after the current layer range.\n"
"The next layer range is too thin to be split to two\n"
"without violating the minimum layer height."
msgstr ""
"Impossible d'insérer une nouvelle zone de couche après la zone de couche actuelle.\n"
"La zone de couche suivante est trop fine pour être séparée en deux sans enfreindre la hauteur de couche minimum."
#: src/slic3r/GUI/GUI_ObjectList.cpp:3012
msgid ""
"Cannot insert a new layer range between the current and the next layer range.\n"
"The gap between the current layer range and the next layer range\n"
"is thinner than the minimum layer height allowed."
msgstr ""
"Impossible d'insérer une nouvelle zone de couche entre l'actuelle et la prochaine.\n"
"L'espace entre la zone de couche actuelle et la prochaine est inférieur à la hauteur de couche minimum autorisée."
#: src/slic3r/GUI/Tab.cpp:3073
msgid "Cannot overwrite a system profile."
msgstr "Impossible d'écraser un profil système."
@ -1569,15 +1599,6 @@ msgstr "Le préréglage actuel est hérité de"
msgid "Current preset is inherited from the default preset."
msgstr "Le préréglage actuel est hérité du préréglage par défaut."
#: src/slic3r/GUI/Tab.cpp:960
#, c-format
msgid ""
"Current preset is inherited from:\n"
"\t%s"
msgstr ""
"Le préréglage actuel est hérité de :\n"
"%s"
#: src/slic3r/GUI/UpdateDialogs.cpp:43
msgid "Current version:"
msgstr "Version actuelle :"
@ -1877,6 +1898,18 @@ msgstr "Désélectionner par rectangle"
msgid "Deselects all objects"
msgstr "Désélectionner tous les objets"
#: src/slic3r/GUI/Tab.cpp:963
msgid "Detach from system preset"
msgstr "Détacher du préréglage système"
#: src/slic3r/GUI/Tab.cpp:984
msgid "Detach preset"
msgstr "Détacher le préréglage"
#: src/slic3r/GUI/Tab.cpp:3029
msgid "Detached"
msgstr "Détaché"
#: src/libslic3r/PrintConfig.cpp:1373
msgid "Detect bridging perimeters"
msgstr "Détecter les périmètres faisant des ponts"
@ -2025,14 +2058,6 @@ msgstr ""
"Sélectionnez OUI si vous voulez changer cette valeur pour %s%%,\n"
"ou NON si vous êtes certain que %s%s est une valeur correcte."
#: src/slic3r/GUI/ConfigWizard.cpp:1761
msgid "Do you want to automatic select default filaments?"
msgstr "Voulez-vous sélectionner automatiquement les filaments par défaut ?"
#: src/slic3r/GUI/ConfigWizard.cpp:1772
msgid "Do you want to automatic select default materials?"
msgstr "Voulez-vous sélectionner automatiquement les matériaux par défaut ?"
#: src/slic3r/GUI/DoubleSlider.cpp:1920
msgid "Do you want to delete all saved tool changes?"
msgstr "Voulez-vous supprimer tous les changements d'outils enregistrés ?"
@ -2049,6 +2074,14 @@ msgstr "Voulez-vous réessayer"
msgid "Do you want to save your manually edited support points?"
msgstr "Voulez-vous sauvegarder vos points de support édités manuellement ?"
#: src/slic3r/GUI/ConfigWizard.cpp:1834
msgid "Do you want to select default filaments for these FFF printer models?"
msgstr "Voulez-vous sélectionner les filaments par défaut pour ces modèles d'imprimantes FFF ?"
#: src/slic3r/GUI/ConfigWizard.cpp:1852
msgid "Do you want to select default SLA materials for these printer models?"
msgstr "Voulez-vous sélectionner les matériaux SLA par défaut pour ces modèles d'imprimantes ?"
#: src/libslic3r/PrintConfig.cpp:3429
msgid "Don't arrange"
msgstr "Ne pas agencer"
@ -2065,6 +2098,10 @@ msgstr "Ne pas supporter les ponts"
msgid "Downgrade"
msgstr "Rétrograder"
#: src/libslic3r/PrintConfig.cpp:1695
msgid "Draft shield"
msgstr "Bouclier contre les flux d'air"
#: src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:1365
#: src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:1368
#: src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:1369
@ -2140,6 +2177,23 @@ msgstr "Modifier la coche - Clic droit"
msgid "Editing"
msgstr "Édition"
#: src/slic3r/GUI/MainFrame.cpp:547
msgid "Ejec&t SD card / Flash drive"
msgstr "Éjec&ter la carte SD / la clef USB"
#: src/slic3r/GUI/KBShortcutsDialog.cpp:126
msgid "Eject SD card / Flash drive"
msgstr "Éjecter la carte SD / la clef USB"
#: src/slic3r/GUI/MainFrame.cpp:547
msgid "Eject SD card / Flash drive after the G-code was exported to it."
msgstr "Éjecter la carte SD / la clef USB une fois que la G-code y a été exporté."
#: src/slic3r/GUI/Plater.cpp:2202
#, c-format
msgid "Ejecting of device %s(%s) has failed."
msgstr "L'éjection de l'appareil %s(%s) a échoué."
#: src/libslic3r/PrintConfig.cpp:118
msgid "Elephant foot compensation"
msgstr "Compensation de l'effet patte d'éléphant"
@ -2430,6 +2484,10 @@ msgstr "Exporter le plateau courant en AMF"
msgid "Export current plate as G-code"
msgstr "Exporter le plateau courant en G-code"
#: src/slic3r/GUI/MainFrame.cpp:521
msgid "Export current plate as G-code to SD card / Flash drive"
msgstr "Exporter le plateau actuel en tant que G-code vers la carte SD / la clef USB"
#: src/slic3r/GUI/MainFrame.cpp:486
msgid "Export current plate as STL"
msgstr "Exporter le plateau courant en STL"
@ -2451,6 +2509,10 @@ msgstr "Exportez les chemins d'accès complets des modèles et des sources de pi
msgid "Export G-code"
msgstr "Exporter le G-code"
#: src/slic3r/GUI/MainFrame.cpp:521
msgid "Export G-code to SD card / Flash drive"
msgstr "Exporter le G-code vers la carte SD / la clef USB"
#: src/libslic3r/PrintConfig.cpp:3320
msgid "Export OBJ"
msgstr "Exporter OBJ"
@ -2951,15 +3013,6 @@ msgstr "Pour plus d'informations, merci de visiter notre page wiki :"
msgid "For support enforcers only"
msgstr "Seulement pour les générateur de supports"
#. TRN Description for "WHITE BULLET"
#: src/slic3r/GUI/Tab.cpp:3265
msgid ""
"for the left button: \tindicates a non-system (or non-default) preset,\n"
"for the right button: \tindicates that the settings hasn't been modified."
msgstr ""
"pour le bouton gauche : indique un préréglage non-système (ou non par défaut),\n"
"pour le bouton droit : indique que le réglage n'a pas été modifié."
#. TRN Description for "WHITE BULLET"
#: src/slic3r/GUI/Tab.cpp:3267
msgid ""
@ -3381,17 +3434,6 @@ msgstr "HTTPS CA Fichier"
msgid "HTTPS CA file is optional. It is only needed if you use HTTPS with a self-signed certificate."
msgstr "Le fichier HTTPS CA est optionnel. Il est uniquement requis si vous utilisez le HTTPS avec un certificat auto-signé."
#: src/slic3r/GUI/Tab.cpp:1757
#, c-format
msgid ""
"HTTPS CA File:\n"
" \tOn this system, %s uses HTTPS certificates from the system Certificate Store or Keychain.\n"
" \tTo use a custom CA file, please import your CA file into Certificate Store / Keychain."
msgstr ""
"Fichier HTTPS CA :\n"
"\tDans ce système, %s utilise des certificats HTTPS issus du système Magasin de Certificats ou Trousseau.\n"
"\tPour utiliser un fichier CA personnalisé, veuillez importer votre fichier CA dans le Magasin de Certificats / Trousseau."
#: src/slic3r/GUI/Preferences.cpp:222
msgid "Icon size in a respect to the default size"
msgstr "Taille de l'icône par rapport à la taille par défaut"
@ -3442,6 +3484,10 @@ msgstr "Si activé, Slic3r télécharge les mises à jours des préréglages sys
msgid "If enabled, the 3D scene will be rendered in Retina resolution. If you are experiencing 3D performance problems, disabling this option may help."
msgstr "Si ceci est activé, la scène 3D sera affichée avec la résolution Retina. Si vous rencontrez des problèmes de performance 3D, le fait de désactiver cette option vous aidera peut-être."
#: src/libslic3r/PrintConfig.cpp:1696
msgid "If enabled, the skirt will be as tall as a highest printed object. This is useful to protect an ABS or ASA print from warping and detaching from print bed due to wind draft."
msgstr "Si elle est activée, la jupe sera aussi haute que l'objet imprimé le plus haut. Cela sert à protéger les impressions ABS ou ASA des phénomènes de déformation ou de décollement du plateau d'impression liés au flux d'air."
#: src/libslic3r/PrintConfig.cpp:1858
msgid "If enabled, the wipe tower will not be printed on layers with no toolchanges. On layers with a toolchange, extruder will travel downward to print the wipe tower. User is responsible for ensuring there is no collision with the print."
msgstr "Si elle est activée, la tour de nettoyage ne sera pas imprimée sur des couches sans changement d'outil. Sur les couches avec un changement d'outil, l'extrudeur se déplacera vers le bas pour imprimer la tour de nettoyage. C'est à l'utilisateur de s'assurer qu'il n'y a pas de collision avec l'impression."
@ -4608,6 +4654,10 @@ msgstr "Réparation du modèle terminée"
msgid "Model repaired successfully"
msgstr "Réparation du modèle réussie"
#: src/slic3r/GUI/Tab.cpp:979
msgid "Modifications to the current profile will be saved."
msgstr "Les modifications du profil actuel vont être sauvegardées."
#: src/slic3r/GUI/Preset.cpp:247
msgid "modified"
msgstr "modifié"
@ -5406,10 +5456,10 @@ msgstr "Préréglage (%s)"
msgid "Preset with name \"%1%\" already exists."
msgstr "Un préréglage avec le nom \"%1%\" existe déjà."
#: src/slic3r/GUI/Tab.cpp:3045
#: src/slic3r/GUI/Tab.cpp:3029
msgctxt "PresetName"
msgid "%1% - Copy"
msgstr "%1% - Copie"
msgid "Copy"
msgstr "Copie"
#: src/slic3r/GUI/KBShortcutsDialog.cpp:163
msgid "Press to activate deselection rectangle"
@ -5931,9 +5981,9 @@ msgstr "Retirer les points sélectionnés"
msgid "Remove the selected object"
msgstr "Retirer l'objet sélectionné"
#: src/slic3r/GUI/ConfigWizard.cpp:438
msgid "Remove user profiles - install from scratch (a snapshot will be taken beforehand)"
msgstr "Supprimer les profils d'utilisateur - installation à partir de zéro (un instantané des réglages sera pris)"
#: src/slic3r/GUI/ConfigWizard.cpp:453
msgid "Remove user profiles (a snapshot will be taken beforehand)"
msgstr "Supprimer les profils utilisateurs (un instantané sera pris au préalable)"
#: src/slic3r/GUI/GUI_ObjectList.cpp:1636
msgid "Rename"
@ -6452,16 +6502,6 @@ msgstr "Choisissez le type de socle dont vous avez besoin"
msgid "Select what kind of support do you need"
msgstr "Choisissez le type de support dont vous avez besoin"
#: src/slic3r/GUI/DoubleSlider.cpp:1917
msgid ""
"Select YES if you want to delete all saved tool changes, \n"
"\tNO if you want all tool changes switch to color changes, \n"
"\tor CANCEL to leave it unchanged."
msgstr ""
"Sélectionnez OUI si vous souhaitez supprimer tous les changements d'outil enregistrées, \n"
"NON si vous souhaitez que tous les changements d'outil soient remplacés par des modifications de couleur, \n"
"ou ANNULER pour ne pas les modifier."
#: src/slic3r/GUI/DoubleSlider.cpp:1917
msgid ""
"Select YES if you want to delete all saved tool changes, \n"
@ -7626,6 +7666,10 @@ msgstr ""
"L'équipement %s n'a pas été trouvé.\n"
"Si l'équipement est connecté, veuillez appuyer sur le bouton Reset à côté du connecteur USB ..."
#: src/slic3r/GUI/Tab.cpp:976
msgid "The current custom preset will be detached from the parent system preset."
msgstr "Le préréglage personnalisé actuel sera détaché du préréglage système parent."
#: src/slic3r/GUI/GUI_ObjectManipulation.cpp:875
msgid ""
"The currently manipulated object is tilted (rotation angles are not multiples of 90°).\n"
@ -7686,6 +7730,14 @@ msgstr "La première couche sera réduite sur le plan XY selon la valeur configu
msgid "the following characters are not allowed:"
msgstr "les caractères suivant ne sont pas autorisés :"
#: src/slic3r/GUI/ConfigWizard.cpp:1830
msgid "The following FFF printer models have no filament selected:"
msgstr "Les modèles d'imprimantes FFF suivants n'ont aucun filament sélectionné :"
#: src/slic3r/GUI/ConfigWizard.cpp:1848
msgid "The following SLA printer models have no materials selected:"
msgstr "Les modèles d'imprimantes SLA suivants n'ont aucun matériau sélectionné :"
#: src/slic3r/GUI/Tab.cpp:3461
msgid "the following suffix is not allowed:"
msgstr "le suffixe suivant n'est pas autorisé :"
@ -7780,7 +7832,7 @@ msgstr "L'objet sélectionné ne peut être scindé car il contient plus d'un vo
msgid "The selected object couldn't be split because it contains only one part."
msgstr "L'objet sélectionné n'a pu être scindé car il ne contient qu'une seule pièce."
#: src/slic3r/GUI/MainFrame.cpp:432
#: src/slic3r/GUI/MainFrame.cpp:461
msgid ""
"The selected project is no longer available.\n"
"Do you want to remove it from the recent projects list?"
@ -7788,10 +7840,6 @@ msgstr ""
"Le projet sélectionné n'est plus disponible.\n"
"Voulez-vous le retirer de la liste des projets récents?"
#: src/slic3r/GUI/MainFrame.cpp:422
msgid "The selected project is no more available"
msgstr "Le projet sélectionné n'est plus disponible"
#: src/slic3r/GUI/DoubleSlider.cpp:998
msgid ""
"The sequential print is on.\n"
@ -7964,6 +8012,14 @@ msgstr ""
msgid "This %s version: %s"
msgstr "Version de ce %s : %s"
#: src/slic3r/GUI/Tab.cpp:982
msgid ""
"This action is not revertable.\n"
"Do you want to proceed?"
msgstr ""
"Cette action n'est pas réversible.\n"
"Voulez-vous continuer ?"
#: src/libslic3r/PrintConfig.cpp:165
msgid "This code is inserted between objects when using sequential printing. By default extruder and bed temperature are reset using non-wait command; however if M104, M109, M140 or M190 are detected in this custom code, Slic3r will not add temperature commands. Note that you can use placeholder variables for all Slic3r settings, so you can put a \"M109 S[first_layer_temperature]\" command wherever you want."
msgstr "Ce code est inséré entre des objets lorsque vous utilisez l'impression séquentielle. Par défaut la température de l'extrudeur et du plateau est réinitialisée et utilise la commande sans-attente ; toutefois si des commandes M104, M109, M140 ou M190 sont détectées dans ce code personnalisé, Slic3r n'ajoutera pas de commandes de température. Notez que vous pouvez utiliser des variables génériques pour tous les réglages de Slic3r, donc vous pouvez entrer une commande \"M109S[first_layer_temperature]\" où vous le souhaitez."
@ -8135,10 +8191,6 @@ msgstr "Cette valeur est la hauteur de couche imprimable minimum pour cet extrud
msgid "This is usually caused by negligibly small extrusions or by a faulty model. Try to repair the model or change its orientation on the bed."
msgstr "Ceci est généralement provoqué par de petites extrusions négligeables ou par un modèle défectueux. Essayez de réparer le modèle ou de changer son orientation sur le lit."
#: src/libslic3r/GCode.cpp:639
msgid "This is usually caused by negligibly small extrusions or by a faulty model. Try to repair the model or change its orientation on the bed."
msgstr "Ceci est généralement provoqué par de petites extrusions négligeables ou par un modèle défectueux. Essayez de réparer le modèle ou de changer son orientation sur le lit."
#: src/libslic3r/PrintConfig.cpp:2215
msgid "This matrix describes volumes (in cubic milimetres) required to purge the new filament on the wipe tower for any given pair of tools."
msgstr "Cette matrice décrit les volumes (en millimètres cube) nécessaires pour purger le nouveau filament dans la tour de nettoyage pour une paire d'outils donnée."
@ -9039,14 +9091,6 @@ msgstr "Vous ne pouvez pas charger un projet SLA avec un objet en plusieurs part
msgid "You cannot use non-uniform scaling mode for multiple objects/parts selection"
msgstr "Vous ne pouvez pas utiliser un mode de redimensionnement non-uniforme pour une sélection d'objets/de parties multiples"
#: src/slic3r/GUI/ConfigWizard.cpp:1760
msgid "You have to select at least one filament for selected printers"
msgstr "Vous devez sélectionner au moins un filament pour les imprimantes sélectionnées"
#: src/slic3r/GUI/ConfigWizard.cpp:1771
msgid "You have to select at least one material for selected printers"
msgstr "Vous devez sélectionner au moins un matériau pour les imprimantes sélectionnées"
#: src/slic3r/GUI/GLCanvas3DManager.cpp:287
msgid "You may need to update your graphics card driver."
msgstr "Vous avez peut-être besoin de mettre à jour le pilote de votre carte graphique."

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -337,6 +337,10 @@ msgstr "Wyrażenie logiczne (Boole'owskie) używające wartości konfiguracji ak
msgid "A boolean expression using the configuration values of an active printer profile. If this expression evaluates to true, this profile is considered compatible with the active printer profile."
msgstr "Wyrażenie logiczne (Boole'owskie) używające wartości konfiguracji aktywnego profilu drukarki. Jeśli to wyrażenie jest prawdziwe to znaczy, że aktywny profil jest kompatybilny z drukarką."
#: src/slic3r/GUI/Tab.cpp:975
msgid "A copy of the current system preset will be created, which will be detached from the system preset."
msgstr "Zostanie utworzona kopia obecnego zestawu ustawień i odłączona od ustawień systemowych."
#: src/slic3r/GUI/ConfigWizard.cpp:1034
msgid "A rule of thumb is 160 to 230 °C for PLA, and 215 to 250 °C for ABS."
msgstr "Generalną zasadą jest 160 do 230 °C dla PLA i 215 do 250 °C dla ABS."
@ -1088,6 +1092,34 @@ msgstr "Anulowanie..."
msgid "Cannot calculate extrusion width for %1%: Variable \"%2%\" not accessible."
msgstr "Nie można przeliczyć szerokości ekstruzji dla %1%: zmienna \"%2%\" jest niedostępna."
#: src/slic3r/GUI/GUI_ObjectList.cpp:3017
msgid ""
"Cannot insert a new layer range after the current layer range.\n"
"Current layer range overlaps with the next layer range."
msgstr ""
"Nie można wstawić nowego zakresu wysokości po obecnym.\n"
"Zakres pokrywałby się z kolejnym."
#: src/slic3r/GUI/GUI_ObjectList.cpp:3008
msgid ""
"Cannot insert a new layer range after the current layer range.\n"
"The next layer range is too thin to be split to two\n"
"without violating the minimum layer height."
msgstr ""
"Nie można wstawić nowego zakresu wysokości po obecnym.\n"
"Kolejny zakres jest zbyt niski, aby można było go podzielić\n"
"z powodu minimalnej grubości warstwy."
#: src/slic3r/GUI/GUI_ObjectList.cpp:3012
msgid ""
"Cannot insert a new layer range between the current and the next layer range.\n"
"The gap between the current layer range and the next layer range\n"
"is thinner than the minimum layer height allowed."
msgstr ""
"Nie można wstawić nowego zakresu wysokości pomiędzy obecne.\n"
"Odstęp pomiędzy zakresami jest niższy \n"
"niż dozwolona minimalna wysokość warstwy."
#: src/slic3r/GUI/Tab.cpp:3073
msgid "Cannot overwrite a system profile."
msgstr "Nie można nadpisać profilu systemowego."
@ -1569,15 +1601,6 @@ msgstr "Obecny zestaw ustawień jest dziedziczony z"
msgid "Current preset is inherited from the default preset."
msgstr "Obecny zestaw ustawień jest dziedziczony z zestawu domyślnego."
#: src/slic3r/GUI/Tab.cpp:960
#, c-format
msgid ""
"Current preset is inherited from:\n"
"\t%s"
msgstr ""
"Obecny zestaw ustawień jest dziedziczony z:\n"
"%s"
#: src/slic3r/GUI/UpdateDialogs.cpp:43
msgid "Current version:"
msgstr "Obecna wersja:"
@ -1877,6 +1900,18 @@ msgstr "Odznaczenie prostokątem"
msgid "Deselects all objects"
msgstr "Odznacza wszystkie modele"
#: src/slic3r/GUI/Tab.cpp:963
msgid "Detach from system preset"
msgstr "Odłącz od ustawień systemowych"
#: src/slic3r/GUI/Tab.cpp:984
msgid "Detach preset"
msgstr "Odłącz zestaw ustawień"
#: src/slic3r/GUI/Tab.cpp:3029
msgid "Detached"
msgstr "Odłączono"
#: src/libslic3r/PrintConfig.cpp:1373
msgid "Detect bridging perimeters"
msgstr "Wykrywanie mostów przy obrysach"
@ -2025,14 +2060,6 @@ msgstr ""
"Kliknij TAK, jeśli chcesz zmienić wartość na %s %%,\n"
"lub NIE, jeśli masz pewność, że %s %s jest prawidłową wartością."
#: src/slic3r/GUI/ConfigWizard.cpp:1761
msgid "Do you want to automatic select default filaments?"
msgstr "Czy chcesz automatycznie wybrać domyślne filamenty?"
#: src/slic3r/GUI/ConfigWizard.cpp:1772
msgid "Do you want to automatic select default materials?"
msgstr "Czy chcesz automatycznie wybrać domyślne materiały?"
#: src/slic3r/GUI/DoubleSlider.cpp:1920
msgid "Do you want to delete all saved tool changes?"
msgstr "Czy chcesz usunąć wszystkie zmiany narzędzi?"
@ -2049,6 +2076,14 @@ msgstr "Czy chcesz spróbować ponownie"
msgid "Do you want to save your manually edited support points?"
msgstr "Czy chcesz zapisać ręcznie edytowane punkty podpór?"
#: src/slic3r/GUI/ConfigWizard.cpp:1834
msgid "Do you want to select default filaments for these FFF printer models?"
msgstr "Czy chcesz ustawić domyślne filamenty dla tych modeli drukarek FFF?"
#: src/slic3r/GUI/ConfigWizard.cpp:1852
msgid "Do you want to select default SLA materials for these printer models?"
msgstr "Czy chcesz ustawić domyślne materiały SLA dla tych modeli drukarek?"
#: src/libslic3r/PrintConfig.cpp:3429
msgid "Don't arrange"
msgstr "Nie układaj"
@ -2065,6 +2100,10 @@ msgstr "Nie używaj podpór pod mostami"
msgid "Downgrade"
msgstr "Deaktualizacja"
#: src/libslic3r/PrintConfig.cpp:1695
msgid "Draft shield"
msgstr "Draft shield"
#: src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:1365
#: src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:1368
#: src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp:1369
@ -2140,6 +2179,23 @@ msgstr "Edytuj zaznaczenie - kliknij prawym przyciskiem"
msgid "Editing"
msgstr "Edytowanie"
#: src/slic3r/GUI/MainFrame.cpp:547
msgid "Ejec&t SD card / Flash drive"
msgstr "Wysuń kar&tę SD / pamięć flash"
#: src/slic3r/GUI/KBShortcutsDialog.cpp:126
msgid "Eject SD card / Flash drive"
msgstr "Wysuń kartę SD / pamięć flash"
#: src/slic3r/GUI/MainFrame.cpp:547
msgid "Eject SD card / Flash drive after the G-code was exported to it."
msgstr "Wysuń kartę SD / pamięć flash po wyeksportowaniu na nią G-code."
#: src/slic3r/GUI/Plater.cpp:2202
#, c-format
msgid "Ejecting of device %s(%s) has failed."
msgstr "Wysuwanie urządzenia %s(%s) nie powiodło się."
#: src/libslic3r/PrintConfig.cpp:118
msgid "Elephant foot compensation"
msgstr "Kompensacja \"stopy słonia\""
@ -2430,6 +2486,10 @@ msgstr "Eksport zawartości stołu jako AMF"
msgid "Export current plate as G-code"
msgstr "Eksport zawartości stołu jako G-code"
#: src/slic3r/GUI/MainFrame.cpp:521
msgid "Export current plate as G-code to SD card / Flash drive"
msgstr "Eksport zawartości stołu jako G-gode na kartę SD / pamięć flash"
#: src/slic3r/GUI/MainFrame.cpp:486
msgid "Export current plate as STL"
msgstr "Eksport zawartości stołu jako STL"
@ -2451,6 +2511,10 @@ msgstr "Eksport pełnych ścieżek źródłowych modeli i części do plików 3M
msgid "Export G-code"
msgstr "Eksport G-code"
#: src/slic3r/GUI/MainFrame.cpp:521
msgid "Export G-code to SD card / Flash drive"
msgstr "Eksport G-gode na kartę SD / pamięć flash"
#: src/libslic3r/PrintConfig.cpp:3320
msgid "Export OBJ"
msgstr "Eksport OBJ"
@ -2951,15 +3015,6 @@ msgstr "Aby uzyskać więcej informacji odwiedź naszą wiki:"
msgid "For support enforcers only"
msgstr "Tylko dla wymuszania podpór"
#. TRN Description for "WHITE BULLET"
#: src/slic3r/GUI/Tab.cpp:3265
msgid ""
"for the left button: \tindicates a non-system (or non-default) preset,\n"
"for the right button: \tindicates that the settings hasn't been modified."
msgstr ""
"dla lewego przycisku: wskazuje na niesystemowy (lub inny niż domyślny) zestaw ustawień,\n"
"dla prawego przycisku: wskazuje, że ustawienia nie zostały zmodyfikowane."
#. TRN Description for "WHITE BULLET"
#: src/slic3r/GUI/Tab.cpp:3267
msgid ""
@ -3377,16 +3432,6 @@ msgstr "Plik certyfikatu HTTPS CA"
msgid "HTTPS CA file is optional. It is only needed if you use HTTPS with a self-signed certificate."
msgstr "Plik HTTPS CA jest opcjonalny. Jest potrzebny jedynie w sytuacji, gdy używasz HTTPS z certyfikatem samopodpisanym."
#: src/slic3r/GUI/Tab.cpp:1757
#, c-format
msgid ""
"HTTPS CA File:\n"
" \tOn this system, %s uses HTTPS certificates from the system Certificate Store or Keychain.\n"
" \tTo use a custom CA file, please import your CA file into Certificate Store / Keychain."
msgstr ""
"Plik certyfikatu HTTPS:\n"
"W tym systemie, %s używa certyfikatu HTTPS z magazynu systemowego (Certificate Store) lub Keychain. Aby użyć własnego certyfikatu, zaimportuj plik do Certificate Store / Keychain."
#: src/slic3r/GUI/Preferences.cpp:222
msgid "Icon size in a respect to the default size"
msgstr "Rozmiar ikon w odniesieniu do domyślnego"
@ -3437,6 +3482,10 @@ msgstr "Włączenie powoduje pobieranie wbudowanych systemowych zestawów ustawi
msgid "If enabled, the 3D scene will be rendered in Retina resolution. If you are experiencing 3D performance problems, disabling this option may help."
msgstr "Po włączeniu podgląd 3D będzie renderowany w rozdzielczości Retina. Wyłącz tę opcję w przypadku wystąpienia problemów z wydajnością 3D."
#: src/libslic3r/PrintConfig.cpp:1696
msgid "If enabled, the skirt will be as tall as a highest printed object. This is useful to protect an ABS or ASA print from warping and detaching from print bed due to wind draft."
msgstr "Po włączeniu, wysokość skirt będzie taka sama, jak najwyższego modelu. Przydaje się podczas druku z ABS lub ASA - chroni wydruk przed podwijaniem się i odklejaniem od stołu przez przeciąg."
#: src/libslic3r/PrintConfig.cpp:1858
msgid "If enabled, the wipe tower will not be printed on layers with no toolchanges. On layers with a toolchange, extruder will travel downward to print the wipe tower. User is responsible for ensuring there is no collision with the print."
msgstr "Po włączeniu wieża czyszcząca nie będzie drukowana na warstwach, na których nie ma zmian koloru. Na kolejnych warstwach ze zmianami koloru ekstruder zjedzie w dół, aby kontynuować czyszczenie na wieży. Użytkownik musi upewnić się, że nie nastąpi kolizja głowicy z wydrukiem."
@ -4016,7 +4065,7 @@ msgstr "Wczytaj kształt z STL..."
#: src/slic3r/GUI/BedShapeDialog.cpp:182 src/slic3r/GUI/BedShapeDialog.cpp:261
msgid "Load..."
msgstr "Załaduje..."
msgstr "Otwórz..."
#: src/slic3r/GUI/WipeTowerDialog.cpp:264
msgid "loaded"
@ -4603,6 +4652,10 @@ msgstr "Ukończono naprawę modelu"
msgid "Model repaired successfully"
msgstr "Model naprawiono pomyślnie"
#: src/slic3r/GUI/Tab.cpp:979
msgid "Modifications to the current profile will be saved."
msgstr "Modyfikacje zostaną zapisane na obecnym profilu."
#: src/slic3r/GUI/Preset.cpp:247
msgid "modified"
msgstr "zmodyfikowano"
@ -5400,10 +5453,10 @@ msgstr "Zestaw ustawień (%s)"
msgid "Preset with name \"%1%\" already exists."
msgstr "Zestaw ustawień o nazwie \"%1%\" już istnieje."
#: src/slic3r/GUI/Tab.cpp:3045
#: src/slic3r/GUI/Tab.cpp:3029
msgctxt "PresetName"
msgid "%1% - Copy"
msgstr "%1% - Kopia"
msgid "Copy"
msgstr "Kopia"
#: src/slic3r/GUI/KBShortcutsDialog.cpp:163
msgid "Press to activate deselection rectangle"
@ -5878,7 +5931,7 @@ msgstr "Niższa szczegółowość"
#: src/slic3r/GUI/Plater.cpp:879
msgid "Remove device"
msgstr "Usuń urządzenie"
msgstr "Odłącz urządzenie"
#: src/slic3r/GUI/ExtruderSequenceDialog.cpp:182
msgid "Remove extruder from sequence"
@ -5925,9 +5978,9 @@ msgstr "Usuń zaznaczone punkty"
msgid "Remove the selected object"
msgstr "Usuń wybrany model"
#: src/slic3r/GUI/ConfigWizard.cpp:438
msgid "Remove user profiles - install from scratch (a snapshot will be taken beforehand)"
msgstr "Usuń profile użytkownika - czysta instalacja (najpierw zostanie wykonany zrzut)"
#: src/slic3r/GUI/ConfigWizard.cpp:453
msgid "Remove user profiles (a snapshot will be taken beforehand)"
msgstr "Usuń profile użytkownika (zostanie wykonany zrzut)"
#: src/slic3r/GUI/GUI_ObjectList.cpp:1636
msgid "Rename"
@ -6446,16 +6499,6 @@ msgstr "Wybierz rodzaj wymaganej podkładki"
msgid "Select what kind of support do you need"
msgstr "Wybierz rodzaj potrzebnych podpór"
#: src/slic3r/GUI/DoubleSlider.cpp:1917
msgid ""
"Select YES if you want to delete all saved tool changes, \n"
"\tNO if you want all tool changes switch to color changes, \n"
"\tor CANCEL to leave it unchanged."
msgstr ""
"Wybierz TAK, jeśli chcesz usunąć wszystkie zapisane zmiany narzędzi,\n"
"NIE, jeśli chcesz przełączyć zmiany narzędzi na zmiany koloru lub\n"
"ANULUJ, aby pozostawić bez zmian."
#: src/slic3r/GUI/DoubleSlider.cpp:1917
msgid ""
"Select YES if you want to delete all saved tool changes, \n"
@ -7618,6 +7661,10 @@ msgstr ""
"Nie znaleziono urządzenia %s .\n"
"Jeśli urządzenie jest podłączone, to naciśnij przycisk Reset obok złącza USB ..."
#: src/slic3r/GUI/Tab.cpp:976
msgid "The current custom preset will be detached from the parent system preset."
msgstr "Obecny niestandardowy zestaw ustawień zostanie odłączony od dziedziczącego zestawu systemowego."
#: src/slic3r/GUI/GUI_ObjectManipulation.cpp:875
msgid ""
"The currently manipulated object is tilted (rotation angles are not multiples of 90°).\n"
@ -7680,6 +7727,14 @@ msgstr "Pierwsza warstwa zostanie zmniejszona o tą wartość w osiach X i Y aby
msgid "the following characters are not allowed:"
msgstr "następujące znaki nie są dozwolone:"
#: src/slic3r/GUI/ConfigWizard.cpp:1830
msgid "The following FFF printer models have no filament selected:"
msgstr "Następujące modele drukarek FFF nie mają przypisanych filamentów:"
#: src/slic3r/GUI/ConfigWizard.cpp:1848
msgid "The following SLA printer models have no materials selected:"
msgstr "Następujące modele drukarek SLA nie mają przypisanych materiałów:"
#: src/slic3r/GUI/Tab.cpp:3461
msgid "the following suffix is not allowed:"
msgstr "następujący sufiks nie jest dozwolony:"
@ -7774,7 +7829,7 @@ msgstr "Wybrany model nie może być podzielony ponieważ składa się z więcej
msgid "The selected object couldn't be split because it contains only one part."
msgstr "Wybrany model nie może być rozdzielony ponieważ zawiera tylko jedną część."
#: src/slic3r/GUI/MainFrame.cpp:432
#: src/slic3r/GUI/MainFrame.cpp:461
msgid ""
"The selected project is no longer available.\n"
"Do you want to remove it from the recent projects list?"
@ -7782,10 +7837,6 @@ msgstr ""
"Wybrany obiekt nie jest już dostępny.\n"
"Czy chcesz usunąć go z listy niedawno używanych projektów?"
#: src/slic3r/GUI/MainFrame.cpp:422
msgid "The selected project is no more available"
msgstr "Wybrany projekt nie jest dostępny"
#: src/slic3r/GUI/DoubleSlider.cpp:998
msgid ""
"The sequential print is on.\n"
@ -7955,6 +8006,14 @@ msgstr ""
msgid "This %s version: %s"
msgstr "%s wersja: %s"
#: src/slic3r/GUI/Tab.cpp:982
msgid ""
"This action is not revertable.\n"
"Do you want to proceed?"
msgstr ""
"Tej czynności nie można odwrócić.\n"
"Czy chcesz kontynuować?"
#: src/libslic3r/PrintConfig.cpp:165
msgid "This code is inserted between objects when using sequential printing. By default extruder and bed temperature are reset using non-wait command; however if M104, M109, M140 or M190 are detected in this custom code, Slic3r will not add temperature commands. Note that you can use placeholder variables for all Slic3r settings, so you can put a \"M109 S[first_layer_temperature]\" command wherever you want."
msgstr "Ten kod jest wykonywany pomiędzy drukiem poszczególnych modeli w trybie druku sekwencyjnego. Domyślnie przy komendzie non-wait temperatury dyszy i stołu są resetowane; jednakże jeśli przy tej opcji zostaną użyte komendy M104, M109, M140 lub M190 to Slic3r nie doda własnych komend do kontroli temperatury. Pamiętaj, że możesz używać zmiennych typu placeholder, więc np. komendę \"M109 S[first_layer_temperature]\" (temperatura pierwszej warstwy) możesz umieścić gdzie chcesz."
@ -8127,10 +8186,6 @@ msgstr "To jest najniższa możliwa do wydrukowania wysokość warstwy dla tego
msgid "This is usually caused by negligibly small extrusions or by a faulty model. Try to repair the model or change its orientation on the bed."
msgstr "Dzieje się to zazwyczaj z powodu zbyt małych odcinków ekstruzji (są one pomijane) lub uszkodzenia modelu. Spróbuj naprawić model lub zmienić jego orientację na stole."
#: src/libslic3r/GCode.cpp:639
msgid "This is usually caused by negligibly small extrusions or by a faulty model. Try to repair the model or change its orientation on the bed."
msgstr "Dzieje się to zazwyczaj z powodu zbyt małych odcinków ekstruzji (są one pomijane) lub uszkodzenia modelu. Spróbuj naprawić model lub zmienić jego orientację na stole."
#: src/libslic3r/PrintConfig.cpp:2215
msgid "This matrix describes volumes (in cubic milimetres) required to purge the new filament on the wipe tower for any given pair of tools."
msgstr "Ta formuła określa objętość (w milimetrach sześciennych) wymaganą do wyczyszczenia filamentu na wieży czyszczącej dla danej pary narzędzi (filamentów)."
@ -9033,14 +9088,6 @@ msgstr "Nie możesz wczytać projektu SLA mając na stole wieloczęściowy model
msgid "You cannot use non-uniform scaling mode for multiple objects/parts selection"
msgstr "Nie możesz używać skalowania nierównomiernego dla kliku modeli/części"
#: src/slic3r/GUI/ConfigWizard.cpp:1760
msgid "You have to select at least one filament for selected printers"
msgstr "Musisz wybrać co najmniej jeden filament dla zaznaczonych drukarek"
#: src/slic3r/GUI/ConfigWizard.cpp:1771
msgid "You have to select at least one material for selected printers"
msgstr "Musisz wybrać co najmniej jeden materiał dla zaznaczonych drukarek"
#: src/slic3r/GUI/GLCanvas3DManager.cpp:287
msgid "You may need to update your graphics card driver."
msgstr "Może być wymagana aktualizacja sterowników karty graficznej."

View file

@ -1,4 +1,5 @@
min_slic3r_version = 2.2.0-alpha3
1.1.2 Added renamed_from fields for PETG filaments to indicate that they were renamed from PET.
1.1.1 Added Verbatim and Fiberlogy PETG filament profiles. Updated auto cooling settings for ABS.
1.1.1-beta Updated for PrusaSlicer 2.2.0-beta
1.1.1-alpha4 Extended list of default filaments to be installed, top/bottom_solid_min_thickness defined, infill_acceleration changed etc

View file

@ -5,7 +5,7 @@
name = Prusa Research
# Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the PrusaSlicer configuration to be downgraded.
config_version = 1.1.1
config_version = 1.1.2
# Where to get the updates from?
config_update_url = http://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/PrusaResearch/
changelog_url = http://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
@ -148,7 +148,7 @@ external_fill_pattern = rectilinear
external_perimeters_first = 0
external_perimeter_extrusion_width = 0.45
extra_perimeters = 0
extruder_clearance_height = 25
extruder_clearance_height = 20
extruder_clearance_radius = 45
extrusion_width = 0.45
fill_angle = 45
@ -1874,6 +1874,7 @@ filament_density = 1.04
[filament:Generic PETG]
inherits = *PET*
renamed_from = "Generic PET"
filament_vendor = Generic
filament_cost = 27.82
filament_density = 1.27
@ -2076,6 +2077,7 @@ temperature = 230
[filament:Prusa PETG]
inherits = *PET*
renamed_from = "Prusa PET"
filament_vendor = Made for Prusa
filament_cost = 27.82
filament_density = 1.27
@ -2107,6 +2109,7 @@ compatible_printers_condition = nozzle_diameter[0]!=0.6 and printer_model!="MK2S
[filament:Prusa PETG @0.6 nozzle]
inherits = *PET06*
renamed_from = "Prusa PET 0.6 nozzle"; "Prusa PETG 0.6 nozzle"
filament_vendor = Made for Prusa
filament_cost = 27.82
filament_density = 1.27
@ -2172,6 +2175,7 @@ filament_max_volumetric_speed = 13
[filament:Generic PETG @MMU2]
inherits = *PET MMU2*
renamed_from = "Generic PET MMU2"; "Generic PETG MMU2"
filament_vendor = Generic
[filament:Plasty Mladec PETG @MMU2]
@ -2180,6 +2184,7 @@ filament_vendor = Plasty Mladec
[filament:Prusa PETG @MMU2]
inherits = *PET MMU2*
renamed_from = "Prusa PET MMU2"; "Prusa PETG MMU2"
filament_vendor = Made for Prusa
[filament:Prusament PETG @MMU2]
@ -2189,10 +2194,12 @@ filament_vendor = Prusa Polymers
[filament:Generic PETG @MMU2 0.6 nozzle]
inherits = *PET MMU2 06*
renamed_from = "Generic PET MMU2 0.6 nozzle"; "Generic PETG MMU2 0.6 nozzle"
filament_vendor = Generic
[filament:Prusa PETG @MMU2 0.6 nozzle]
inherits = *PET MMU2 06*
renamed_from = "Prusa PET MMU2 0.6 nozzle"; "Prusa PETG MMU2 0.6 nozzle"
filament_vendor = Made for Prusa
[filament:Prusament PETG @MMU2 0.6 nozzle]
@ -2525,6 +2532,7 @@ temperature = 275
[filament:Generic PETG @MMU1]
inherits = *PETMMU1*
renamed_from = "Generic PET MMU1"; "Generic PETG MMU1"
filament_vendor = Generic
filament_cost = 27.82
filament_density = 1.27
@ -2549,6 +2557,7 @@ filament_density = 1.27
[filament:Prusa PETG @MMU1]
inherits = *PETMMU1*
renamed_from = "Prusa PET MMU1"; "Prusa PETG MMU1"
filament_vendor = Made for Prusa
filament_cost = 27.82
filament_density = 1.27
@ -2602,6 +2611,7 @@ compatible_printers_condition = printer_model=="MK2SMM"
[filament:Generic PETG @MINI]
inherits = Generic PETG; *PETMINI*
renamed_from = "Generic PET MINI"; "Generic PETG MINI"
filament_vendor = Generic
filament_cost = 27.82
filament_density = 1.27
@ -2702,6 +2712,7 @@ filament_cost = 24.99
[filament:Generic PETG @0.6 nozzle MINI]
inherits = Generic PETG; *PETMINI06*
renamed_from = "Generic PET 0.6 nozzle MINI"; "Generic PETG 0.6 nozzle MINI"
[filament:Plasty Mladec PETG @0.6 nozzle MINI]
inherits = Generic PETG; *PETMINI06*
@ -2983,6 +2994,7 @@ filament_type = EDGE
[filament:Prusa PETG @MINI]
inherits = *PETMINI*
renamed_from = "Prusa PET MINI"; "Prusa PETG MINI"
filament_vendor = Made for Prusa
filament_cost = 27.82
filament_density = 1.27
@ -2990,6 +3002,7 @@ compatible_printers_condition = printer_model=="MINI" and nozzle_diameter[0]!=0.
[filament:Prusa PETG @0.6 nozzle MINI]
inherits = *PETMINI06*
renamed_from = "Prusa PET 0.6 nozzle MINI"; "Prusa PETG 0.6 nozzle MINI"
filament_vendor = Made for Prusa
filament_cost = 27.82
filament_density = 1.27

5
src/imgui/README.md Normal file
View file

@ -0,0 +1,5 @@
** Dear ImGui is a bloat-free graphical user interface library for C++.**
For more information go to https://github.com/ocornut/imgui
THIS DIRECTORY CONTAINS THE imgui-1.66 da3c433 SOURCE DISTRIBUTION.

View file

@ -43,7 +43,10 @@ protected:
Placer p{bin};
p.configure(pcfg);
if (itm.area() <= 0 || !p.pack(cpy)) it = c.erase(it);
if (itm.area() <= 0 || !p.pack(cpy)) {
static_cast<Item&>(*it).binId(BIN_ID_UNSET);
it = c.erase(it);
}
else it++;
}
}

View file

@ -577,7 +577,7 @@ void _arrange(
std::function<bool()> stopfn)
{
// Integer ceiling the min distance from the bed perimeters
coord_t md = minobjd - 2 * scaled(0.1 + EPSILON);
coord_t md = minobjd;
md = (md % 2) ? md / 2 + 1 : md / 2;
auto corrected_bin = bin;

View file

@ -114,7 +114,7 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
if (surface.surface_type == stInternalVoid)
has_internal_voids = true;
else {
FlowRole extrusion_role = (surface.surface_type == stTop) ? frTopSolidInfill : (surface.is_solid() ? frSolidInfill : frInfill);
FlowRole extrusion_role = surface.is_top() ? frTopSolidInfill : (surface.is_solid() ? frSolidInfill : frInfill);
bool is_bridge = layer.id() > 0 && surface.is_bridge();
params.extruder = layerm.region()->extruder(extrusion_role);
params.pattern = layerm.region()->config().fill_pattern.value;
@ -132,7 +132,7 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
is_bridge ?
erBridgeInfill :
(surface.is_solid() ?
((surface.surface_type == stTop) ? erTopSolidInfill : erSolidInfill) :
(surface.is_top() ? erTopSolidInfill : erSolidInfill) :
erInternalInfill);
params.bridge_angle = float(surface.bridge_angle);
params.angle = float(Geometry::deg2rad(layerm.region()->config().fill_angle.value));

View file

@ -2880,7 +2880,8 @@ std::string GCode::extrude_path(ExtrusionPath path, std::string description, dou
std::string GCode::extrude_perimeters(const Print &print, const std::vector<ObjectByExtruder::Island::Region> &by_region, std::unique_ptr<EdgeGrid::Grid> &lower_layer_edge_grid)
{
std::string gcode;
for (const ObjectByExtruder::Island::Region &region : by_region) {
for (const ObjectByExtruder::Island::Region &region : by_region)
if (! region.perimeters.empty()) {
m_config.apply(print.regions()[&region - &by_region.front()]->config());
for (const ExtrusionEntity *ee : region.perimeters)
gcode += this->extrude_entity(*ee, "perimeter", -1., &lower_layer_edge_grid);
@ -2892,7 +2893,8 @@ std::string GCode::extrude_perimeters(const Print &print, const std::vector<Obje
std::string GCode::extrude_infill(const Print &print, const std::vector<ObjectByExtruder::Island::Region> &by_region)
{
std::string gcode;
for (const ObjectByExtruder::Island::Region &region : by_region) {
for (const ObjectByExtruder::Island::Region &region : by_region)
if (! region.infills.empty()) {
m_config.apply(print.regions()[&region - &by_region.front()]->config());
ExtrusionEntitiesPtr extrusions { region.infills };
chain_and_reorder_extrusion_entities(extrusions, &m_last_pos);
@ -3370,17 +3372,18 @@ const std::vector<GCode::ObjectByExtruder::Island::Region>& GCode::ObjectByExtru
has_overrides = true;
break;
}
// Data is cleared, but the memory is not.
by_region_per_copy_cache.clear();
if (! has_overrides)
// Simple case. No need to copy the regions.
return this->by_region;
return wiping_entities ? by_region_per_copy_cache : this->by_region;
// Complex case. Some of the extrusions of some object instances are to be printed first - those are the wiping extrusions.
// Some of the extrusions of some object instances are printed later - those are the clean print extrusions.
// Filter out the extrusions based on the infill_overrides / perimeter_overrides:
// Data is cleared, but the memory is not.
by_region_per_copy_cache.clear();
for (const auto& reg : by_region) {
by_region_per_copy_cache.emplace_back(); // creates a region in the newly created Island
@ -3441,15 +3444,17 @@ void GCode::ObjectByExtruder::Island::Region::append(const Type type, const Extr
// First we append the entities, there are eec->entities.size() of them:
size_t old_size = perimeters_or_infills->size();
perimeters_or_infills->reserve(perimeters_or_infills->size() + eec->entities.size());
size_t new_size = old_size + eec->entities.size();
perimeters_or_infills->reserve(new_size);
for (auto* ee : eec->entities)
perimeters_or_infills->emplace_back(ee);
if (copies_extruder != nullptr) {
perimeters_or_infills_overrides->reserve(old_size + eec->entities.size());
// Don't reallocate overrides if not needed.
// Missing overrides are implicitely considered non-overridden.
perimeters_or_infills_overrides->reserve(new_size);
perimeters_or_infills_overrides->resize(old_size, nullptr);
for (unsigned int i = 0; i < eec->entities.size(); ++ i)
perimeters_or_infills_overrides->emplace_back(copies_extruder);
perimeters_or_infills_overrides->resize(new_size, copies_extruder);
}
}

View file

@ -241,6 +241,7 @@ void GCodePreviewData::reset()
ranges.width.reset();
ranges.height.reset();
ranges.feedrate.reset();
ranges.fan_speed.reset();
ranges.volumetric_rate.reset();
extrusion.layers.clear();
travel.polylines.clear();

View file

@ -112,7 +112,12 @@ void Layer::make_perimeters()
// keep track of regions whose perimeters we have already generated
std::vector<unsigned char> done(m_regions.size(), false);
for (LayerRegionPtrs::iterator layerm = m_regions.begin(); layerm != m_regions.end(); ++ layerm) {
for (LayerRegionPtrs::iterator layerm = m_regions.begin(); layerm != m_regions.end(); ++ layerm)
if ((*layerm)->slices.empty()) {
(*layerm)->perimeters.clear();
(*layerm)->fills.clear();
(*layerm)->thin_fills.clear();
} else {
size_t region_id = layerm - m_regions.begin();
if (done[region_id])
continue;
@ -123,7 +128,8 @@ void Layer::make_perimeters()
// find compatible regions
LayerRegionPtrs layerms;
layerms.push_back(*layerm);
for (LayerRegionPtrs::const_iterator it = layerm + 1; it != m_regions.end(); ++it) {
for (LayerRegionPtrs::const_iterator it = layerm + 1; it != m_regions.end(); ++it)
if (! (*it)->slices.empty()) {
LayerRegion* other_layerm = *it;
const PrintRegionConfig &other_config = other_layerm->region()->config();
if (config.perimeter_extruder == other_config.perimeter_extruder
@ -135,7 +141,11 @@ void Layer::make_perimeters()
&& config.opt_serialize("perimeter_extrusion_width") == other_config.opt_serialize("perimeter_extrusion_width")
&& config.thin_walls == other_config.thin_walls
&& config.external_perimeters_first == other_config.external_perimeters_first
&& config.infill_overlap == other_config.infill_overlap) {
&& config.infill_overlap == other_config.infill_overlap)
{
other_layerm->perimeters.clear();
other_layerm->fills.clear();
other_layerm->thin_fills.clear();
layerms.push_back(other_layerm);
done[it - m_regions.begin()] = true;
}

View file

@ -117,7 +117,7 @@ void LayerRegion::process_external_surfaces(const Layer *lower_layer, const Poly
// Voids are sparse infills if infill rate is zero.
Polygons voids;
for (const Surface &surface : this->fill_surfaces.surfaces) {
if (surface.surface_type == stTop) {
if (surface.is_top()) {
// Collect the top surfaces, inflate them and trim them by the bottom surfaces.
// This gives the priority to bottom surfaces.
surfaces_append(top, offset_ex(surface.expolygon, margin, EXTERNAL_SURFACES_OFFSET_PARAMETERS), surface);
@ -313,7 +313,7 @@ void LayerRegion::process_external_surfaces(const Layer *lower_layer, const Poly
s2.clear();
}
}
if (s1.surface_type == stTop)
if (s1.is_top())
// Trim the top surfaces by the bottom surfaces. This gives the priority to the bottom surfaces.
polys = diff(polys, bottom_polygons);
surfaces_append(

View file

@ -161,6 +161,7 @@ bool Print::invalidate_state_by_config_options(const std::vector<t_config_option
} else if (
opt_key == "skirts"
|| opt_key == "skirt_height"
|| opt_key == "draft_shield"
|| opt_key == "skirt_distance"
|| opt_key == "min_skirt_length"
|| opt_key == "ooze_prevention"
@ -1146,14 +1147,12 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_
bool Print::has_infinite_skirt() const
{
return (m_config.skirt_height == -1 && m_config.skirts > 0)
|| (m_config.ooze_prevention && this->extruders().size() > 1);
return (m_config.draft_shield && m_config.skirts > 0) || (m_config.ooze_prevention && this->extruders().size() > 1);
}
bool Print::has_skirt() const
{
return (m_config.skirt_height > 0 && m_config.skirts > 0)
|| this->has_infinite_skirt();
return (m_config.skirt_height > 0 && m_config.skirts > 0) || this->has_infinite_skirt();
}
static inline bool sequential_print_horizontal_clearance_valid(const Print &print)

View file

@ -1691,6 +1691,13 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionInt(1));
def = this->add("draft_shield", coBool);
def->label = L("Draft shield");
def->tooltip = L("If enabled, the skirt will be as tall as a highest printed object. "
"This is useful to protect an ABS or ASA print from warping and detaching from print bed due to wind draft.");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("skirts", coInt);
def->label = L("Loops (minimum)");
def->full_label = L("Skirt Loops");
@ -2998,6 +3005,11 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
} else if (opt_key == "support_material_pattern" && value == "pillars") {
// Slic3r PE does not support the pillars. They never worked well.
value = "rectilinear";
} else if (opt_key == "skirt_height" && value == "-1") {
// PrusaSlicer no more accepts skirt_height == -1 to print a draft shield to the top of the highest object.
// A new "draft_shield" boolean config value is used instead.
opt_key = "draft_shield";
value = "1";
} else if (opt_key == "octoprint_host") {
opt_key = "print_host";
} else if (opt_key == "octoprint_cafile") {
@ -3206,7 +3218,7 @@ std::string FullPrintConfig::validate()
return "Invalid value for --infill-every-layers";
// --skirt-height
if (this->skirt_height < -1) // -1 means as tall as the object
if (this->skirt_height < 0)
return "Invalid value for --skirt-height";
// --bridge-flow-ratio

View file

@ -800,6 +800,7 @@ public:
ConfigOptionBools retract_layer_change;
ConfigOptionFloat skirt_distance;
ConfigOptionInt skirt_height;
ConfigOptionBool draft_shield;
ConfigOptionInt skirts;
ConfigOptionInts slowdown_below_layer_time;
ConfigOptionBool spiral_vase;
@ -872,6 +873,7 @@ protected:
OPT_PTR(retract_layer_change);
OPT_PTR(skirt_distance);
OPT_PTR(skirt_height);
OPT_PTR(draft_shield);
OPT_PTR(skirts);
OPT_PTR(slowdown_below_layer_time);
OPT_PTR(spiral_vase);

View file

@ -817,11 +817,12 @@ void PrintObject::detect_surfaces_type()
m_layers[idx_layer]->m_regions[idx_region]->slices.surfaces = std::move(surfaces_new[idx_layer]);
}
if (spiral_vase && num_layers > 1) {
if (spiral_vase) {
if (num_layers > 1)
// Turn the last bottom layer infill to a top infill, so it will be extruded with a proper pattern.
Surfaces &surfaces = m_layers[num_layers - 1]->m_regions[idx_region]->slices.surfaces;
for (Surface &surface : surfaces)
surface.surface_type = stTop;
m_layers[num_layers - 1]->m_regions[idx_region]->slices.set_type(stTop);
for (size_t i = num_layers; i < m_layers.size(); ++ i)
m_layers[i]->m_regions[idx_region]->slices.set_type(stInternal);
}
BOOST_LOG_TRIVIAL(debug) << "Detecting solid surfaces for region " << idx_region << " - clipping in parallel - start";

View file

@ -34,6 +34,10 @@ public:
void remove_type(const SurfaceType type);
void remove_types(const SurfaceType *types, int ntypes);
void filter_by_type(SurfaceType type, Polygons* polygons);
void set_type(SurfaceType type) {
for (Surface &surface : this->surfaces)
surface.surface_type = type;
}
void clear() { surfaces.clear(); }
bool empty() const { return surfaces.empty(); }

View file

@ -42,12 +42,42 @@
#define ENABLE_THUMBNAIL_GENERATOR_DEBUG (0 && ENABLE_THUMBNAIL_GENERATOR)
//==================
//================
// 2.2.0.rc1 techs
//==================
//================
#define ENABLE_2_2_0_RC1 1
// Enable hack to remove crash when closing on OSX 10.9.5
#define ENABLE_HACK_CLOSING_ON_OSX_10_9_5 (1 && ENABLE_2_2_0_RC1)
//============
// 2.2.0 techs
//============
#define ENABLE_2_2_0 1
// Enable automatic switch to constrained camera when manipulating the scene using regular mouse
// while 3D mouse is connected and free camera is not selected
#define ENABLE_AUTO_CONSTRAINED_CAMERA (1 && ENABLE_2_2_0)
//==================
// 2.2.0.final techs
//==================
#define ENABLE_2_2_0_FINAL 1
// Enable tooltips for GLCanvas3D using ImGUI
#define ENABLE_CANVAS_TOOLTIP_USING_IMGUI (1 && ENABLE_2_2_0_FINAL)
// Enable constraining tooltips for GLCanvas3D using ImGUI into canvas area
#define ENABLE_CANVAS_CONSTRAINED_TOOLTIP_USING_IMGUI (1 && ENABLE_CANVAS_TOOLTIP_USING_IMGUI)
// Enable delay for showing tooltips for GLCanvas3D using ImGUI
#define ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI (1 && ENABLE_CANVAS_TOOLTIP_USING_IMGUI)
// Enable modified mouse events handling for toolbars
#define ENABLE_MODIFIED_TOOLBAR_MOUSE_EVENT_HANDLING (1 && ENABLE_CANVAS_TOOLTIP_USING_IMGUI)
// Enable modified mouse events handling for gizmobar
#define ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING (1 && ENABLE_CANVAS_TOOLTIP_USING_IMGUI)
// Enable fix for dragging mouse event handling for gizmobar
#define ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX (1 && ENABLE_2_2_0_FINAL)
#endif // _technologies_h_

View file

@ -268,8 +268,9 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config)
"bridge_acceleration", "first_layer_acceleration" })
toggle_field(el, have_default_acceleration);
bool have_skirt = config->opt_int("skirts") > 0 || config->opt_float("min_skirt_length") > 0;
for (auto el : { "skirt_distance", "skirt_height" })
bool have_skirt = config->opt_int("skirts") > 0;
toggle_field("skirt_height", have_skirt && !config->opt_bool("draft_shield"));
for (auto el : { "skirt_distance", "draft_shield", "min_skirt_length" })
toggle_field(el, have_skirt);
bool have_brim = config->opt_float("brim_width") > 0;

View file

@ -450,7 +450,7 @@ PageWelcome::PageWelcome(ConfigWizard *parent)
% _utf8(ConfigWizard::name())).str())
))
, cbox_reset(append(
new wxCheckBox(this, wxID_ANY, _(L("Remove user profiles - install from scratch (a snapshot will be taken beforehand)")))
new wxCheckBox(this, wxID_ANY, _(L("Remove user profiles (a snapshot will be taken beforehand)")))
))
{
welcome_text->Hide();
@ -1473,13 +1473,42 @@ void ConfigWizard::priv::load_vendors()
pair.second.preset_bundle->load_installed_printers(appconfig_new);
}
if (app_config->has_section(AppConfig::SECTION_FILAMENTS)) {
appconfig_new.set_section(AppConfig::SECTION_FILAMENTS, app_config->get_section(AppConfig::SECTION_FILAMENTS));
// Copy installed filaments and SLA material names from app_config to appconfig_new
// while resolving current names of profiles, which were renamed in the meantime.
for (PrinterTechnology technology : { ptFFF, ptSLA }) {
const std::string &section_name = (technology == ptFFF) ? AppConfig::SECTION_FILAMENTS : AppConfig::SECTION_MATERIALS;
std::map<std::string, std::string> section_new;
if (app_config->has_section(section_name)) {
const std::map<std::string, std::string> &section_old = app_config->get_section(section_name);
for (const std::pair<std::string, std::string> &material_name_and_installed : section_old)
if (material_name_and_installed.second == "1") {
// Material is installed. Resolve it in bundles.
size_t num_found = 0;
const std::string &material_name = material_name_and_installed.first;
for (auto &bundle : bundles) {
const PresetCollection &materials = bundle.second.preset_bundle->materials(technology);
const Preset *preset = materials.find_preset(material_name);
if (preset == nullptr) {
// Not found. Maybe the material preset is there, bu it was was renamed?
const std::string *new_name = materials.get_preset_name_renamed(material_name);
if (new_name != nullptr)
preset = materials.find_preset(*new_name);
}
if (app_config->has_section(AppConfig::SECTION_MATERIALS)) {
appconfig_new.set_section(AppConfig::SECTION_MATERIALS, app_config->get_section(AppConfig::SECTION_MATERIALS));
if (preset != nullptr) {
// Materal preset was found, mark it as installed.
section_new[preset->name] = "1";
++ num_found;
}
}
if (num_found == 0)
BOOST_LOG_TRIVIAL(error) << boost::format("Profile %1% was not found in installed vendor Preset Bundles.") % material_name;
else if (num_found > 1)
BOOST_LOG_TRIVIAL(error) << boost::format("Profile %1% was found in %2% vendor Preset Bundles.") % material_name % num_found;
}
}
appconfig_new.set_section(section_name, section_new);
};
}
void ConfigWizard::priv::add_page(ConfigWizardPage *page)
{
@ -1642,9 +1671,9 @@ void ConfigWizard::priv::on_printer_pick(PagePrinters *page, const PrinterPicker
}
}
// if at list one printer is selected but there in no one selected material,
// select materials which is default for selected printer(s)
select_default_materials_if_needed(pair.second.vendor_profile, page->technology, evt.model_id);
// When a printer model is picked, but there is no material installed compatible with this printer model,
// install default materials for selected printer model silently.
check_and_install_missing_materials(page->technology, evt.model_id);
}
if (page->technology & T_FFF) {
@ -1654,41 +1683,26 @@ void ConfigWizard::priv::on_printer_pick(PagePrinters *page, const PrinterPicker
}
}
void ConfigWizard::priv::select_default_materials_for_printer_model(const std::vector<VendorProfile::PrinterModel>& models, Technology technology, const std::string& model_id)
void ConfigWizard::priv::select_default_materials_for_printer_model(const VendorProfile::PrinterModel &printer_model, Technology technology)
{
PageMaterials* page_materials = technology & T_FFF ? page_filaments : page_sla_materials;
auto it = std::find_if(models.begin(), models.end(), [model_id](VendorProfile::PrinterModel model) {return model_id == model.id; });
if (it != models.end())
for (const std::string& material : it->default_materials)
for (const std::string& material : printer_model.default_materials)
appconfig_new.set(page_materials->materials->appconfig_section(), material, "1");
}
void ConfigWizard::priv::select_default_materials_if_needed(VendorProfile* vendor_profile, Technology technology, const std::string& model_id)
void ConfigWizard::priv::select_default_materials_for_printer_models(Technology technology, const std::set<const VendorProfile::PrinterModel*> &printer_models)
{
if ((technology & T_FFF && !any_fff_selected) ||
(technology & T_SLA && !any_sla_selected) ||
check_materials_in_config(technology, false))
return;
PageMaterials *page_materials = technology & T_FFF ? page_filaments : page_sla_materials;
const std::string &appconfig_section = page_materials->materials->appconfig_section();
select_default_materials_for_printer_model(vendor_profile->models, technology, model_id);
}
void ConfigWizard::priv::selected_default_materials(Technology technology)
auto select_default_materials_for_printer_page = [this, appconfig_section, printer_models](PagePrinters *page_printers, Technology technology)
{
auto select_default_materials_for_printer_page = [this](PagePrinters * page_printers, Technology technology)
{
std::set<std::string> selected_models = page_printers->get_selected_models();
const std::string vendor_id = page_printers->get_vendor_id();
for (auto& pair : bundles)
{
if (pair.first != vendor_id)
continue;
for (const std::string& model_id : selected_models)
select_default_materials_for_printer_model(pair.second.vendor_profile->models, technology, model_id);
}
if (pair.first == vendor_id)
for (const VendorProfile::PrinterModel *printer_model : printer_models)
for (const std::string &material : printer_model->default_materials)
appconfig_new.set(appconfig_section, material, "1");
};
PagePrinters* page_printers = technology & T_FFF ? page_fff : page_msla;
@ -1702,7 +1716,7 @@ void ConfigWizard::priv::selected_default_materials(Technology technology)
}
update_materials(technology);
(technology& T_FFF ? page_filaments : page_sla_materials)->reload_presets();
((technology & T_FFF) ? page_filaments : page_sla_materials)->reload_presets();
}
void ConfigWizard::priv::on_3rdparty_install(const VendorProfile *vendor, bool install)
@ -1743,52 +1757,106 @@ bool ConfigWizard::priv::on_bnt_finish()
// theres no need to check that filament is selected if we have only custom printer
if (custom_printer_selected && !any_fff_selected && !any_sla_selected) return true;
// check, that there is selected at least one filament/material
return check_materials_in_config(T_ANY);
return check_and_install_missing_materials(T_ANY);
}
bool ConfigWizard::priv::check_materials_in_config(Technology technology, bool show_info_msg)
// This allmighty method verifies, whether there is at least a single compatible filament or SLA material installed
// for each Printer preset of each Printer Model installed.
//
// In case only_for_model_id is set, then the test is done for that particular printer model only, and the default materials are installed silently.
// Otherwise the user is quieried whether to install the missing default materials or not.
//
// Return true if the tested Printer Models already had materials installed.
// Return false if there were some Printer Models with missing materials, independent from whether the defaults were installed for these
// respective Printer Models or not.
bool ConfigWizard::priv::check_and_install_missing_materials(Technology technology, const std::string &only_for_model_id)
{
const auto exist_preset = [this](const std::string& section, const Materials& materials)
// Walk over all installed Printer presets and verify whether there is a filament or SLA material profile installed at the same PresetBundle,
// which is compatible with it.
const auto printer_models_missing_materials = [this, only_for_model_id](PrinterTechnology technology, const std::string &section)
{
if (appconfig_new.has_section(section) &&
!appconfig_new.get_section(section).empty())
{
const std::map<std::string, std::string>& appconfig_presets = appconfig_new.get_section(section);
for (const auto& preset : appconfig_presets)
if (materials.exist_preset(preset.first))
return true;
const std::map<std::string, std::string> &appconfig_presets = appconfig_new.has_section(section) ? appconfig_new.get_section(section) : std::map<std::string, std::string>();
std::set<const VendorProfile::PrinterModel*> printer_models_without_material;
for (const auto &pair : bundles) {
const PresetCollection &materials = pair.second.preset_bundle->materials(technology);
for (const auto &printer : pair.second.preset_bundle->printers) {
if (printer.is_visible && printer.printer_technology() == technology) {
const VendorProfile::PrinterModel *printer_model = PresetUtils::system_printer_model(printer);
assert(printer_model != nullptr);
if ((only_for_model_id.empty() || only_for_model_id == printer_model->id) &&
printer_models_without_material.find(printer_model) == printer_models_without_material.end()) {
bool has_material = false;
for (const std::pair<std::string, std::string> &preset : appconfig_presets) {
if (preset.second == "1") {
const Preset *material = materials.find_preset(preset.first, false);
if (material != nullptr && is_compatible_with_printer(PresetWithVendorProfile(*material, nullptr), PresetWithVendorProfile(printer, nullptr))) {
has_material = true;
break;
}
return false;
}
}
if (! has_material)
printer_models_without_material.insert(printer_model);
}
}
}
}
assert(printer_models_without_material.empty() || only_for_model_id.empty() || only_for_model_id == (*printer_models_without_material.begin())->id);
return printer_models_without_material;
};
const auto ask_and_selected_default_materials = [this](wxString message, Technology technology)
const auto ask_and_select_default_materials = [this](const wxString &message, const std::set<const VendorProfile::PrinterModel*> &printer_models, Technology technology)
{
wxMessageDialog msg(q, message, _(L("Notice")), wxYES_NO);
if (msg.ShowModal() == wxID_YES)
selected_default_materials(technology);
select_default_materials_for_printer_models(technology, printer_models);
};
if (any_fff_selected && technology & T_FFF && !exist_preset(AppConfig::SECTION_FILAMENTS, filaments))
{
if (show_info_msg)
{
wxString message = _(L("You have to select at least one filament for selected printers")) + "\n\n\t" +
_(L("Do you want to automatic select default filaments?"));
ask_and_selected_default_materials(message, T_FFF);
const auto printer_model_list = [](const std::set<const VendorProfile::PrinterModel*> &printer_models) -> wxString {
wxString out;
for (const VendorProfile::PrinterModel *printer_model : printer_models) {
out += "\t\t";
out += from_u8(printer_model->name);
out += "\n";
}
return out;
};
if (any_fff_selected && (technology & T_FFF)) {
std::set<const VendorProfile::PrinterModel*> printer_models_without_material = printer_models_missing_materials(ptFFF, AppConfig::SECTION_FILAMENTS);
if (! printer_models_without_material.empty()) {
if (only_for_model_id.empty())
ask_and_select_default_materials(
_L("The following FFF printer models have no filament selected:") +
"\n\n\t" +
printer_model_list(printer_models_without_material) +
"\n\n\t" +
_L("Do you want to select default filaments for these FFF printer models?"),
printer_models_without_material,
T_FFF);
else
select_default_materials_for_printer_model(**printer_models_without_material.begin(), T_FFF);
return false;
}
}
if (any_sla_selected && technology & T_SLA && !exist_preset(AppConfig::SECTION_MATERIALS, sla_materials))
{
if (show_info_msg)
{
wxString message = _(L("You have to select at least one material for selected printers")) + "\n\n\t" +
_(L("Do you want to automatic select default materials?"));
ask_and_selected_default_materials(message, T_SLA);
}
if (any_sla_selected && (technology & T_SLA)) {
std::set<const VendorProfile::PrinterModel*> printer_models_without_material = printer_models_missing_materials(ptSLA, AppConfig::SECTION_MATERIALS);
if (! printer_models_without_material.empty()) {
if (only_for_model_id.empty())
ask_and_select_default_materials(
_L("The following SLA printer models have no materials selected:") +
"\n\n\t" +
printer_model_list(printer_models_without_material) +
"\n\n\t" +
_L("Do you want to select default SLA materials for these printer models?"),
printer_models_without_material,
T_SLA);
else
select_default_materials_for_printer_model(**printer_models_without_material.begin(), T_SLA);
return false;
}
}
return true;
}
@ -2062,8 +2130,11 @@ ConfigWizard::ConfigWizard(wxWindow *parent)
{
// check, that there is selected at least one filament/material
ConfigWizardPage* active_page = this->p->index->active_page();
if ( (active_page == p->page_filaments || active_page == p->page_sla_materials)
&& !p->check_materials_in_config(dynamic_cast<PageMaterials*>(active_page)->materials->technology))
if (// Leaving the filaments or SLA materials page and
(active_page == p->page_filaments || active_page == p->page_sla_materials) &&
// some Printer models had no filament or SLA material selected.
! p->check_and_install_missing_materials(dynamic_cast<PageMaterials*>(active_page)->materials->technology))
// In that case don't leave the page and the function above queried the user whether to install default materials.
return;
this->p->index->go_next();
});

View file

@ -82,14 +82,6 @@ struct Materials
}
}
bool exist_preset(const std::string& preset_name) const
{
for (const Preset* preset : presets)
if (preset->name == preset_name)
return true;
return false;
}
static const std::string UNKNOWN;
static const std::string& get_filament_type(const Preset *preset);
static const std::string& get_filament_vendor(const Preset *preset);
@ -503,17 +495,12 @@ struct ConfigWizard::priv
void on_custom_setup(const bool custom_wanted);
void on_printer_pick(PagePrinters *page, const PrinterPickerEvent &evt);
void select_default_materials_for_printer_model(const std::vector<VendorProfile::PrinterModel> &models,
Technology technology,
const std::string & model_id);
void select_default_materials_if_needed(VendorProfile* vendor_profile,
Technology technology,
const std::string &model_id);
void selected_default_materials(Technology technology);
void select_default_materials_for_printer_model(const VendorProfile::PrinterModel &printer_model, Technology technology);
void select_default_materials_for_printer_models(Technology technology, const std::set<const VendorProfile::PrinterModel*> &printer_models);
void on_3rdparty_install(const VendorProfile *vendor, bool install);
bool on_bnt_finish();
bool check_materials_in_config(Technology technology, bool show_info_msg = true);
bool check_and_install_missing_materials(Technology technology, const std::string &only_for_model_id = std::string());
void apply_config(AppConfig *app_config, PresetBundle *preset_bundle, const PresetUpdater *updater);
// #ys_FIXME_alise
void update_presets_in_config(const std::string& section, const std::string& alias_key, bool add);

View file

@ -61,9 +61,11 @@
#include <algorithm>
#include <cmath>
#include "DoubleSlider.hpp"
#if !ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
#if ENABLE_RENDER_STATISTICS
#include <chrono>
#endif // ENABLE_RENDER_STATISTICS
#endif // !ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
#include <imgui/imgui_internal.h>
@ -663,7 +665,7 @@ void GLCanvas3D::WarningTexture::activate(WarningTexture::Warning warning, bool
if (it != m_warnings.end()) // this warning is already set to be shown
return;
m_warnings.push_back(warning);
m_warnings.emplace_back(warning);
std::sort(m_warnings.begin(), m_warnings.end());
}
else {
@ -1289,7 +1291,7 @@ void GLCanvas3D::Labels::render(const std::vector<const ModelInstance*>& sorted_
if (model_object->instances.size() > 1)
owner.label += " (" + std::to_string(inst_idx + 1) + ")";
owner.selected = volume->selected;
owners.push_back(owner);
owners.emplace_back(owner);
}
}
}
@ -1370,6 +1372,88 @@ void GLCanvas3D::Labels::render(const std::vector<const ModelInstance*>& sorted_
}
}
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
#if ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
void GLCanvas3D::Tooltip::set_text(const std::string& text)
{
// If the mouse is inside an ImGUI dialog, then the tooltip is suppressed.
const std::string &new_text = m_in_imgui ? std::string() : text;
if (m_text != new_text)
{
if (m_text.empty())
m_start_time = std::chrono::steady_clock::now();
m_text = new_text;
}
}
#endif // ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
#if ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
void GLCanvas3D::Tooltip::render(const Vec2d& mouse_position, GLCanvas3D& canvas) const
#else
void GLCanvas3D::Tooltip::render(const Vec2d& mouse_position) const
#endif // ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
{
#if ENABLE_CANVAS_CONSTRAINED_TOOLTIP_USING_IMGUI
static ImVec2 size(0.0f, 0.0f);
auto validate_position = [](const Vec2d& position, const GLCanvas3D& canvas, const ImVec2& wnd_size) {
Size cnv_size = canvas.get_canvas_size();
float x = std::clamp((float)position(0), 0.0f, (float)cnv_size.get_width() - wnd_size.x);
float y = std::clamp((float)position(1) + 16, 0.0f, (float)cnv_size.get_height() - wnd_size.y);
return Vec2f(x, y);
};
#endif // ENABLE_CANVAS_CONSTRAINED_TOOLTIP_USING_IMGUI
#if ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
if (m_text.empty())
return;
// draw the tooltip as hidden until the delay is expired
float alpha = (std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - m_start_time).count() < 500) ? 0.0f : 1.0;
#else
if (m_text.empty())
return;
#endif // ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
#if ENABLE_CANVAS_CONSTRAINED_TOOLTIP_USING_IMGUI
Vec2f position = validate_position(mouse_position, canvas, size);
#endif // ENABLE_CANVAS_CONSTRAINED_TOOLTIP_USING_IMGUI
ImGuiWrapper& imgui = *wxGetApp().imgui();
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
#if ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, alpha);
#endif // ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
#if ENABLE_CANVAS_CONSTRAINED_TOOLTIP_USING_IMGUI
imgui.set_next_window_pos(position(0), position(1), ImGuiCond_Always, 0.0f, 0.0f);
#else
imgui.set_next_window_pos(mouse_position(0), mouse_position(1) + 16, ImGuiCond_Always, 0.0f, 0.0f);
#endif // ENABLE_CANVAS_CONSTRAINED_TOOLTIP_USING_IMGUI
imgui.begin(_(L("canvas_tooltip")), ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoFocusOnAppearing);
ImGui::BringWindowToDisplayFront(ImGui::GetCurrentWindow());
ImGui::TextUnformatted(m_text.c_str());
#if ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
// force re-render while the windows gets to its final size (it may take several frames) or while hidden
if (alpha == 0.0f || ImGui::GetWindowContentRegionWidth() + 2.0f * ImGui::GetStyle().WindowPadding.x != ImGui::CalcWindowExpectedSize(ImGui::GetCurrentWindow()).x)
canvas.request_extra_frame();
#endif // ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
#if ENABLE_CANVAS_CONSTRAINED_TOOLTIP_USING_IMGUI
size = ImGui::GetWindowSize();
#endif // ENABLE_CANVAS_CONSTRAINED_TOOLTIP_USING_IMGUI
imgui.end();
#if ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
ImGui::PopStyleVar(2);
#else
ImGui::PopStyleVar();
#endif // ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
}
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
wxDEFINE_EVENT(EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS, SimpleEvent);
wxDEFINE_EVENT(EVT_GLCANVAS_OBJECT_SELECT, SimpleEvent);
wxDEFINE_EVENT(EVT_GLCANVAS_RIGHT_CLICK, RBtnEvent);
@ -1941,6 +2025,38 @@ void GLCanvas3D::render()
m_camera.debug_render();
#endif // ENABLE_CAMERA_STATISTICS
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
std::string tooltip;
// Negative coordinate means out of the window, likely because the window was deactivated.
// In that case the tooltip should be hidden.
if (m_mouse.position.x() >= 0. && m_mouse.position.y() >= 0.)
{
if (tooltip.empty())
tooltip = m_layers_editing.get_tooltip(*this);
if (tooltip.empty())
tooltip = m_gizmos.get_tooltip();
if (tooltip.empty())
tooltip = m_main_toolbar.get_tooltip();
if (tooltip.empty())
tooltip = m_undoredo_toolbar.get_tooltip();
if (tooltip.empty())
tooltip = m_view_toolbar.get_tooltip();
}
set_tooltip(tooltip);
#if ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
m_tooltip.render(m_mouse.position, *this);
#else
m_tooltip.render(m_mouse.position);
#endif // ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
wxGetApp().plater()->get_mouse3d_controller().render_settings_dialog(*this);
wxGetApp().imgui()->render();
@ -1951,6 +2067,27 @@ void GLCanvas3D::render()
auto end_time = std::chrono::high_resolution_clock::now();
m_render_stats.last_frame = std::chrono::duration_cast<std::chrono::milliseconds>(end_time - start_time).count();
#endif // ENABLE_RENDER_STATISTICS
#if !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
std::string tooltip = "";
if (tooltip.empty())
tooltip = m_layers_editing.get_tooltip(*this);
if (tooltip.empty())
tooltip = m_gizmos.get_tooltip();
if (tooltip.empty())
tooltip = m_main_toolbar.get_tooltip();
if (tooltip.empty())
tooltip = m_undoredo_toolbar.get_tooltip();
if (tooltip.empty())
tooltip = m_view_toolbar.get_tooltip();
set_tooltip(tooltip);
#endif // !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
}
#if ENABLE_THUMBNAIL_GENERATOR
@ -2029,7 +2166,7 @@ std::vector<int> GLCanvas3D::load_object(const ModelObject& model_object, int ob
{
for (unsigned int i = 0; i < model_object.instances.size(); ++i)
{
instance_idxs.push_back(i);
instance_idxs.emplace_back(i);
}
}
return m_volumes.load_object(&model_object, obj_idx, instance_idxs, m_color_by, m_initialized);
@ -2469,9 +2606,9 @@ static void load_gcode_retractions(const GCodePreviewData::Retraction& retractio
for (const GCodePreviewData::Retraction::Position& position : copy)
{
volume->print_zs.push_back(unscale<double>(position.position(2)));
volume->offsets.push_back(volume->indexed_vertex_array.quad_indices.size());
volume->offsets.push_back(volume->indexed_vertex_array.triangle_indices.size());
volume->print_zs.emplace_back(unscale<double>(position.position(2)));
volume->offsets.emplace_back(volume->indexed_vertex_array.quad_indices.size());
volume->offsets.emplace_back(volume->indexed_vertex_array.triangle_indices.size());
_3DScene::point3_to_verts(position.position, position.width, position.height, *volume);
@ -3203,12 +3340,20 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
Point pos(evt.GetX(), evt.GetY());
ImGuiWrapper* imgui = wxGetApp().imgui();
m_tooltip.set_in_imgui(false);
if (imgui->update_mouse_data(evt)) {
m_mouse.position = evt.Leaving() ? Vec2d(-1.0, -1.0) : pos.cast<double>();
m_tooltip.set_in_imgui(true);
render();
#ifdef SLIC3R_DEBUG_MOUSE_EVENTS
printf((format_mouse_event_debug_message(evt) + " - Consumed by ImGUI\n").c_str());
#endif /* SLIC3R_DEBUG_MOUSE_EVENTS */
// do not return if dragging or tooltip not empty to allow for tooltip update
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
if (!m_mouse.dragging && m_tooltip.is_empty())
#else
if (!m_mouse.dragging && m_canvas->GetToolTipText().empty())
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
return;
}
@ -3260,6 +3405,9 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
mouse_up_cleanup();
m_mouse.set_start_position_3D_as_invalid();
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
m_mouse.position = pos.cast<double>();
#endif /// ENABLE_CANVAS_TOOLTIP_USING_IMGUI
return;
}
@ -3466,11 +3614,26 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
if (m_hover_volume_idxs.empty() && m_mouse.is_start_position_3D_defined())
{
const Vec3d rot = (Vec3d(pos.x(), pos.y(), 0.) - m_mouse.drag.start_position_3D) * (PI * TRACKBALLSIZE / 180.);
#if ENABLE_AUTO_CONSTRAINED_CAMERA
if (wxGetApp().app_config->get("use_free_camera") == "1")
// Virtual track ball (similar to the 3DConnexion mouse).
m_camera.rotate_local_around_target(Vec3d(rot.y(), rot.x(), 0.));
else
{
// Forces camera right vector to be parallel to XY plane in case it has been misaligned using the 3D mouse free rotation.
// It is cheaper to call this function right away instead of testing wxGetApp().plater()->get_mouse3d_controller().connected(),
// which checks an atomics (flushes CPU caches).
// See GH issue #3816.
m_camera.recover_from_free_camera();
m_camera.rotate_on_sphere(rot.x(), rot.y(), wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() != ptSLA);
}
#else
if (wxGetApp().plater()->get_mouse3d_controller().connected() || (wxGetApp().app_config->get("use_free_camera") == "1"))
// Virtual track ball (similar to the 3DConnexion mouse).
m_camera.rotate_local_around_target(Vec3d(rot.y(), rot.x(), 0.));
else
m_camera.rotate_on_sphere(rot.x(), rot.y(), wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() != ptSLA);
#endif // ENABLE_AUTO_CONSTRAINED_CAMERA
m_dirty = true;
}
@ -3485,6 +3648,15 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
float z = 0.0f;
const Vec3d& cur_pos = _mouse_to_3d(pos, &z);
Vec3d orig = _mouse_to_3d(m_mouse.drag.start_position_2D, &z);
#if ENABLE_AUTO_CONSTRAINED_CAMERA
if (wxGetApp().app_config->get("use_free_camera") != "1")
// Forces camera right vector to be parallel to XY plane in case it has been misaligned using the 3D mouse free rotation.
// It is cheaper to call this function right away instead of testing wxGetApp().plater()->get_mouse3d_controller().connected(),
// which checks an atomics (flushes CPU caches).
// See GH issue #3816.
m_camera.recover_from_free_camera();
#endif // ENABLE_AUTO_CONSTRAINED_CAMERA
m_camera.set_target(m_camera.get_target() + orig - cur_pos);
m_dirty = true;
}
@ -3563,24 +3735,6 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
else if (evt.Moving())
{
m_mouse.position = pos.cast<double>();
std::string tooltip = "";
if (tooltip.empty())
tooltip = m_layers_editing.get_tooltip(*this);
if (tooltip.empty())
tooltip = m_gizmos.get_tooltip();
if (tooltip.empty())
tooltip = m_main_toolbar.get_tooltip();
if (tooltip.empty())
tooltip = m_undoredo_toolbar.get_tooltip();
if (tooltip.empty())
tooltip = m_view_toolbar.get_tooltip();
set_tooltip(tooltip);
// updates gizmos overlay
if (m_selection.is_empty())
@ -3655,19 +3809,26 @@ void GLCanvas3D::set_tooltip(const std::string& tooltip) const
{
if (m_canvas != nullptr)
{
wxToolTip* t = m_canvas->GetToolTip();
if (t != nullptr)
{
if (tooltip.empty())
m_canvas->UnsetToolTip();
else
t->SetTip(wxString::FromUTF8(tooltip.data()));
}
else if (!tooltip.empty()) // Avoid "empty" tooltips => unset of the empty tooltip leads to application crash under OSX
m_canvas->SetToolTip(wxString::FromUTF8(tooltip.data()));
}
}
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
m_tooltip.set_text(tooltip);
#else
wxString txt = wxString::FromUTF8(tooltip.data());
if (m_canvas->GetToolTipText() != txt)
m_canvas->SetToolTip(txt);
// wxToolTip* t = m_canvas->GetToolTip();
// if (t != nullptr)
// {
// if (tooltip.empty())
// m_canvas->UnsetToolTip();
// else
// t->SetTip(wxString::FromUTF8(tooltip.data()));
// }
// else if (!tooltip.empty()) // Avoid "empty" tooltips => unset of the empty tooltip leads to application crash under OSX
// m_canvas->SetToolTip(wxString::FromUTF8(tooltip.data()));
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
}
}
void GLCanvas3D::do_move(const std::string& snapshot_type)
{
@ -4109,7 +4270,7 @@ void GLCanvas3D::_render_thumbnail_internal(ThumbnailData& thumbnail_data, bool
if (!vol->is_modifier && !vol->is_wipe_tower && (!parts_only || (vol->composite_id.volume_id >= 0)))
{
if (!printable_only || is_visible(*vol))
visible_volumes.push_back(vol);
visible_volumes.emplace_back(vol);
}
}
@ -4813,7 +4974,7 @@ void GLCanvas3D::_picking_pass() const
}
if ((0 <= volume_id) && (volume_id < (int)m_volumes.volumes.size()))
{
m_hover_volume_idxs.push_back(volume_id);
m_hover_volume_idxs.emplace_back(volume_id);
m_gizmos.set_hover_id(-1);
}
else
@ -5057,7 +5218,7 @@ void GLCanvas3D::_render_overlays() const
if (sequential_print) {
for (ModelObject* model_object : m_model->objects)
for (ModelInstance* model_instance : model_object->instances) {
sorted_instances.push_back(model_instance);
sorted_instances.emplace_back(model_instance);
}
}
m_labels.render(sorted_instances);
@ -5515,29 +5676,26 @@ void GLCanvas3D::_load_print_toolpaths()
if ((skirt_height == 0) && (print->config().brim_width.value > 0))
skirt_height = 1;
// get first skirt_height layers (maybe this should be moved to a PrintObject method?)
const PrintObject* object0 = print->objects().front();
// Get first skirt_height layers.
//FIXME This code is fishy. It may not work for multiple objects with different layering due to variable layer height feature.
// This is not critical as this is just an initial preview.
const PrintObject* highest_object = *std::max_element(print->objects().begin(), print->objects().end(), [](auto l, auto r){ return l->layers().size() < r->layers().size(); });
std::vector<float> print_zs;
print_zs.reserve(skirt_height * 2);
for (size_t i = 0; i < std::min(skirt_height, object0->layers().size()); ++i)
{
print_zs.push_back(float(object0->layers()[i]->print_z));
}
//FIXME why there are support layers?
for (size_t i = 0; i < std::min(skirt_height, object0->support_layers().size()); ++i)
{
print_zs.push_back(float(object0->support_layers()[i]->print_z));
}
for (size_t i = 0; i < std::min(skirt_height, highest_object->layers().size()); ++ i)
print_zs.emplace_back(float(highest_object->layers()[i]->print_z));
// Only add skirt for the raft layers.
for (size_t i = 0; i < std::min(skirt_height, std::min(highest_object->slicing_parameters().raft_layers(), highest_object->support_layers().size())); ++ i)
print_zs.emplace_back(float(highest_object->support_layers()[i]->print_z));
sort_remove_duplicates(print_zs);
if (print_zs.size() > skirt_height)
skirt_height = std::min(skirt_height, print_zs.size());
print_zs.erase(print_zs.begin() + skirt_height, print_zs.end());
GLVolume *volume = m_volumes.new_toolpath_volume(color, VERTEX_BUFFER_RESERVE_SIZE);
for (size_t i = 0; i < skirt_height; ++ i) {
volume->print_zs.push_back(print_zs[i]);
volume->offsets.push_back(volume->indexed_vertex_array.quad_indices.size());
volume->offsets.push_back(volume->indexed_vertex_array.triangle_indices.size());
volume->print_zs.emplace_back(print_zs[i]);
volume->offsets.emplace_back(volume->indexed_vertex_array.quad_indices.size());
volume->offsets.emplace_back(volume->indexed_vertex_array.triangle_indices.size());
if (i == 0)
_3DScene::extrusionentity_to_verts(print->brim(), print_zs[i], Point(0, 0), *volume);
_3DScene::extrusionentity_to_verts(print->skirt(), print_zs[i], Point(0, 0), *volume);
@ -5703,10 +5861,10 @@ void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, c
}
if (ctxt.has_perimeters || ctxt.has_infill)
for (const Layer *layer : print_object.layers())
ctxt.layers.push_back(layer);
ctxt.layers.emplace_back(layer);
if (ctxt.has_support)
for (const Layer *layer : print_object.support_layers())
ctxt.layers.push_back(layer);
ctxt.layers.emplace_back(layer);
std::sort(ctxt.layers.begin(), ctxt.layers.end(), [](const Layer *l1, const Layer *l2) { return l1->print_z < l2->print_z; });
// Maximum size of an allocation block: 32MB / sizeof(float)
@ -5775,9 +5933,9 @@ void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, c
for (GLVolume *vol : vols)
if (vol->print_zs.empty() || vol->print_zs.back() != layer->print_z) {
vol->print_zs.push_back(layer->print_z);
vol->offsets.push_back(vol->indexed_vertex_array.quad_indices.size());
vol->offsets.push_back(vol->indexed_vertex_array.triangle_indices.size());
vol->print_zs.emplace_back(layer->print_z);
vol->offsets.emplace_back(vol->indexed_vertex_array.quad_indices.size());
vol->offsets.emplace_back(vol->indexed_vertex_array.triangle_indices.size());
}
for (const PrintInstance &instance : *ctxt.shifted_copies) {
const Point &copy = instance.shift;
@ -5933,9 +6091,9 @@ void GLCanvas3D::_load_wipe_tower_toolpaths(const std::vector<std::string>& str_
for (size_t i = 0; i < vols.size(); ++i) {
GLVolume &vol = *vols[i];
if (vol.print_zs.empty() || vol.print_zs.back() != layer.front().print_z) {
vol.print_zs.push_back(layer.front().print_z);
vol.offsets.push_back(vol.indexed_vertex_array.quad_indices.size());
vol.offsets.push_back(vol.indexed_vertex_array.triangle_indices.size());
vol.print_zs.emplace_back(layer.front().print_z);
vol.offsets.emplace_back(vol.indexed_vertex_array.quad_indices.size());
vol.offsets.emplace_back(vol.indexed_vertex_array.triangle_indices.size());
}
}
for (const WipeTower::ToolChangeResult &extrusions : layer) {
@ -6148,9 +6306,9 @@ void GLCanvas3D::_load_gcode_extrusion_paths(const GCodePreviewData& preview_dat
assert(it_filter != filters.end() && key.first == it_filter->first);
GLVolume& vol = *it_filter->second;
vol.print_zs.push_back(layer.z);
vol.offsets.push_back(vol.indexed_vertex_array.quad_indices.size());
vol.offsets.push_back(vol.indexed_vertex_array.triangle_indices.size());
vol.print_zs.emplace_back(layer.z);
vol.offsets.emplace_back(vol.indexed_vertex_array.quad_indices.size());
vol.offsets.emplace_back(vol.indexed_vertex_array.triangle_indices.size());
_3DScene::extrusionentity_to_verts(path.polyline, path.width, path.height, layer.z, vol);
}
@ -6222,9 +6380,9 @@ inline void travel_paths_internal(
assert(it != by_type.end() && it->first == func_value(polyline));
GLVolume& vol = *it->second;
vol.print_zs.push_back(unscale<double>(polyline.polyline.bounding_box().min(2)));
vol.offsets.push_back(vol.indexed_vertex_array.quad_indices.size());
vol.offsets.push_back(vol.indexed_vertex_array.triangle_indices.size());
vol.print_zs.emplace_back(unscale<double>(polyline.polyline.bounding_box().min(2)));
vol.offsets.emplace_back(vol.indexed_vertex_array.quad_indices.size());
vol.offsets.emplace_back(vol.indexed_vertex_array.triangle_indices.size());
_3DScene::polyline3_to_verts(polyline.polyline, preview_data.travel.width, preview_data.travel.height, vol);

View file

@ -3,6 +3,9 @@
#include <stddef.h>
#include <memory>
#if ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
#include <chrono>
#endif // ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
#include "3DScene.hpp"
#include "GLToolbar.hpp"
@ -389,6 +392,30 @@ private:
void render(const std::vector<const ModelInstance*>& sorted_instances) const;
};
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
class Tooltip
{
std::string m_text;
#if ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
std::chrono::steady_clock::time_point m_start_time;
#endif // ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
// Indicator that the mouse is inside an ImGUI dialog, therefore the tooltip should be suppressed.
bool m_in_imgui = false;
public:
bool is_empty() const { return m_text.empty(); }
#if ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
void set_text(const std::string& text);
void render(const Vec2d& mouse_position, GLCanvas3D& canvas) const;
#else
void set_text(const std::string& text) { m_text = text; }
void render(const Vec2d& mouse_position) const;
#endif // ENABLE_CANVAS_DELAYED_TOOLTIP_USING_IMGUI
// Indicates that the mouse is inside an ImGUI dialog, therefore the tooltip should be suppressed.
void set_in_imgui(bool b) { m_in_imgui = b; }
};
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
public:
enum ECursorType : unsigned char
{
@ -467,6 +494,9 @@ private:
int m_selected_extruder;
Labels m_labels;
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
mutable Tooltip m_tooltip;
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
public:
GLCanvas3D(wxGLCanvas* canvas, Bed3D& bed, Camera& camera, GLToolbar& view_toolbar);

View file

@ -421,14 +421,60 @@ bool GLToolbar::on_mouse(wxMouseEvent& evt, GLCanvas3D& parent)
// mouse anywhere
if (!evt.Dragging() && !evt.Leaving() && !evt.Entering() && (m_mouse_capture.parent != nullptr))
{
if (m_mouse_capture.any() && (evt.LeftUp() || evt.MiddleUp() || evt.RightUp()))
if (m_mouse_capture.any() && (evt.LeftUp() || evt.MiddleUp() || evt.RightUp())) {
// prevents loosing selection into the scene if mouse down was done inside the toolbar and mouse up was down outside it,
// as when switching between views
processed = true;
m_mouse_capture.reset();
if (contains_mouse(mouse_pos, parent) == -1)
// mouse is outside the toolbar
m_tooltip.clear();
return true;
}
m_mouse_capture.reset();
}
#if ENABLE_MODIFIED_TOOLBAR_MOUSE_EVENT_HANDLING
if (evt.Moving())
m_tooltip = update_hover_state(mouse_pos, parent);
else if (evt.LeftUp())
{
if (m_mouse_capture.left)
{
processed = true;
m_mouse_capture.left = false;
}
else
return false;
}
else if (evt.MiddleUp())
{
if (m_mouse_capture.middle)
{
processed = true;
m_mouse_capture.middle = false;
}
else
return false;
}
else if (evt.RightUp())
{
if (m_mouse_capture.right)
{
processed = true;
m_mouse_capture.right = false;
}
else
return false;
}
else if (evt.Dragging())
{
if (m_mouse_capture.any())
// if the button down was done on this toolbar, prevent from dragging into the scene
processed = true;
else
return false;
}
#else
if (evt.Moving())
m_tooltip = update_hover_state(mouse_pos, parent);
else if (evt.LeftUp())
@ -440,6 +486,7 @@ bool GLToolbar::on_mouse(wxMouseEvent& evt, GLCanvas3D& parent)
else if (evt.Dragging() && m_mouse_capture.any())
// if the button down was done on this toolbar, prevent from dragging into the scene
processed = true;
#endif // ENABLE_MODIFIED_TOOLBAR_MOUSE_EVENT_HANDLING
int item_id = contains_mouse(mouse_pos, parent);
if (item_id == -1)
@ -479,8 +526,10 @@ bool GLToolbar::on_mouse(wxMouseEvent& evt, GLCanvas3D& parent)
parent.set_as_dirty();
}
}
#if !ENABLE_MODIFIED_TOOLBAR_MOUSE_EVENT_HANDLING
else if (evt.LeftUp())
processed = true;
#endif // !ENABLE_MODIFIED_TOOLBAR_MOUSE_EVENT_HANDLING
}
return processed;

View file

@ -10,6 +10,7 @@
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/log/trivial.hpp>
#include <boost/nowide/convert.hpp>
#include <wx/stdpaths.h>
#include <wx/imagpng.h>
@ -50,6 +51,7 @@
#ifdef __WXMSW__
#include <Shlobj.h>
#include <dbt.h>
#endif // __WXMSW__
#if ENABLE_THUMBNAIL_GENERATOR_DEBUG
@ -60,6 +62,7 @@
namespace Slic3r {
namespace GUI {
class MainFrame;
wxString file_wildcards(FileType file_type, const std::string &custom_extension)
{
@ -96,9 +99,9 @@ wxString file_wildcards(FileType file_type, const std::string &custom_extension)
static std::string libslic3r_translate_callback(const char *s) { return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str().data(); }
static void register_dpi_event()
{
#ifdef WIN32
static void register_win32_dpi_event()
{
enum { WM_DPICHANGED_ = 0x02e0 };
wxWindow::MSWRegisterMessageHandler(WM_DPICHANGED_, [](wxWindow *win, WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) {
@ -111,9 +114,52 @@ static void register_dpi_event()
return true;
});
#endif
}
static GUID GUID_DEVINTERFACE_HID = { 0x4D1E55B2, 0xF16F, 0x11CF, 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30 };
static void register_win32_device_notification_event()
{
enum { WM_DPICHANGED_ = 0x02e0 };
wxWindow::MSWRegisterMessageHandler(WM_DEVICECHANGE, [](wxWindow *win, WXUINT /* nMsg */, WXWPARAM wParam, WXLPARAM lParam) {
// Some messages are sent to top level windows by default, some messages are sent to only registered windows, and we explictely register on MainFrame only.
auto main_frame = dynamic_cast<MainFrame*>(win);
auto plater = (main_frame == nullptr) ? nullptr : main_frame->plater();
if (plater == nullptr)
// Maybe some other top level window like a dialog or maybe a pop-up menu?
return true;
PDEV_BROADCAST_HDR lpdb = (PDEV_BROADCAST_HDR)lParam;
switch (wParam) {
case DBT_DEVICEARRIVAL:
if (lpdb->dbch_devicetype == DBT_DEVTYP_VOLUME)
plater->GetEventHandler()->AddPendingEvent(VolumeAttachedEvent(EVT_VOLUME_ATTACHED));
else if (lpdb->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) {
PDEV_BROADCAST_DEVICEINTERFACE lpdbi = (PDEV_BROADCAST_DEVICEINTERFACE)lpdb;
// if (lpdbi->dbcc_classguid == GUID_DEVINTERFACE_VOLUME) {
// printf("DBT_DEVICEARRIVAL %d - Media has arrived: %ws\n", msg_count, lpdbi->dbcc_name);
if (lpdbi->dbcc_classguid == GUID_DEVINTERFACE_HID)
plater->GetEventHandler()->AddPendingEvent(HIDDeviceAttachedEvent(EVT_HID_DEVICE_ATTACHED, boost::nowide::narrow(lpdbi->dbcc_name)));
}
break;
case DBT_DEVICEREMOVECOMPLETE:
if (lpdb->dbch_devicetype == DBT_DEVTYP_VOLUME)
plater->GetEventHandler()->AddPendingEvent(VolumeDetachedEvent(EVT_VOLUME_DETACHED));
else if (lpdb->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) {
PDEV_BROADCAST_DEVICEINTERFACE lpdbi = (PDEV_BROADCAST_DEVICEINTERFACE)lpdb;
// if (lpdbi->dbcc_classguid == GUID_DEVINTERFACE_VOLUME)
// printf("DBT_DEVICEARRIVAL %d - Media was removed: %ws\n", msg_count, lpdbi->dbcc_name);
if (lpdbi->dbcc_classguid == GUID_DEVINTERFACE_HID)
plater->GetEventHandler()->AddPendingEvent(HIDDeviceDetachedEvent(EVT_HID_DEVICE_DETACHED, boost::nowide::narrow(lpdbi->dbcc_name)));
}
break;
default:
break;
}
return true;
});
}
#endif // WIN32
static void generic_exception_handle()
{
@ -248,7 +294,10 @@ bool GUI_App::on_init_inner()
show_error(nullptr, ex.what());
}
register_dpi_event();
#ifdef WIN32
register_win32_dpi_event();
register_win32_device_notification_event();
#endif // WIN32
// Let the libslic3r know the callback, which will translate messages on demand.
Slic3r::I18N::set_translate_callback(libslic3r_translate_callback);

View file

@ -156,8 +156,11 @@ void ObjectLayers::create_layers_list()
const t_layer_height_range& range = layer.first;
auto del_btn = new PlusMinusButton(m_parent, m_bmp_delete, range);
del_btn->SetToolTip(_(L("Remove layer range")));
auto add_btn = new PlusMinusButton(m_parent, m_bmp_add, range);
add_btn->SetToolTip(_(L("Add layer range")));
wxString tooltip = wxGetApp().obj_list()->can_add_new_range_after_current(range);
add_btn->SetToolTip(tooltip.IsEmpty() ? _(L("Add layer range")) : tooltip);
add_btn->Enable(tooltip.IsEmpty());
auto sizer = create_layer(range, del_btn, add_btn);
sizer->Add(del_btn, 0, wxRIGHT | wxLEFT, em_unit(m_parent));

View file

@ -118,13 +118,20 @@ ObjectList::ObjectList(wxWindow* parent) :
// detect the current mouse position here, to pass it to list_manipulation() method
// if we detect it later, the user may have moved the mouse pointer while calculations are performed, and this would mess-up the HitTest() call performed into list_manipulation()
// see: https://github.com/prusa3d/PrusaSlicer/issues/3802
const wxPoint mouse_pos = get_mouse_position_in_control();
const wxPoint mouse_pos = this->get_mouse_position_in_control();
#ifndef __APPLE__
// On Windows and Linux, forces a kill focus emulation on the object manipulator fields because this event handler is called
// before the kill focus event handler on the object manipulator when changing selection in the list, invalidating the object
// manipulator cache with the following call to selection_changed()
wxGetApp().obj_manipul()->emulate_kill_focus();
// wxGetApp().obj_manipul()->emulate_kill_focus(); // It's not necessury anymore #ys_FIXME delete after testing
// On Windows and Linux:
// It's not invoked KillFocus event for "temporary" panels (like "Manipulation panel", "Settings", "Layer ranges"),
// if we change selection in object list.
// see https://github.com/prusa3d/PrusaSlicer/issues/3303
// But, if we call SetFocus() for ObjectList it will cause an invoking of a KillFocus event for "temporary" panels
this->SetFocus();
#else
// To avoid selection update from SetSelection() and UnselectAll() under osx
if (m_prevent_list_events)
@ -155,7 +162,7 @@ ObjectList::ObjectList(wxWindow* parent) :
// Workaround for entering the column editing mode on Windows. Simulate keyboard enter when another column of the active line is selected.
wxDataViewItem item;
wxDataViewColumn *col;
this->HitTest(get_mouse_position_in_control(), item, col);
this->HitTest(this->get_mouse_position_in_control(), item, col);
new_selected_column = (col == nullptr) ? -1 : (int)col->GetModelColumn();
if (new_selected_item == m_last_selected_item && m_last_selected_column != -1 && m_last_selected_column != new_selected_column) {
// Mouse clicked on another column of the active row. Simulate keyboard enter to enter the editing mode of the current column.
@ -171,7 +178,7 @@ ObjectList::ObjectList(wxWindow* parent) :
selection_changed();
#ifndef __WXMSW__
set_tooltip_for_item(get_mouse_position_in_control());
set_tooltip_for_item(this->get_mouse_position_in_control());
#endif //__WXMSW__
#ifndef __WXOSX__
@ -211,7 +218,7 @@ ObjectList::ObjectList(wxWindow* parent) :
#ifdef __WXMSW__
GetMainWindow()->Bind(wxEVT_MOTION, [this](wxMouseEvent& event) {
set_tooltip_for_item(get_mouse_position_in_control());
set_tooltip_for_item(this->get_mouse_position_in_control());
event.Skip();
});
#endif //__WXMSW__
@ -419,14 +426,6 @@ void ObjectList::set_tooltip_for_item(const wxPoint& pt)
GetMainWindow()->SetToolTip(tooltip);
}
wxPoint ObjectList::get_mouse_position_in_control()
{
const wxPoint& pt = wxGetMousePosition();
// wxWindow* win = GetMainWindow();
// wxPoint screen_pos = win->GetScreenPosition();
return wxPoint(pt.x - /*win->*/GetScreenPosition().x, pt.y - /*win->*/GetScreenPosition().y);
}
int ObjectList::get_selected_obj_idx() const
{
if (GetSelectedItemsCount() == 1)
@ -792,13 +791,7 @@ void ObjectList::OnChar(wxKeyEvent& event)
void ObjectList::OnContextMenu(wxDataViewEvent& evt)
{
// The mouse position returned by get_mouse_position_in_control() here is the one at the time the mouse button is released (mouse up event)
wxPoint mouse_pos = get_mouse_position_in_control();
// We check if the mouse down event was over the "Editing" column, if not, we change the mouse position so that the following call to list_simulation() does not show any context menu
// see: https://github.com/prusa3d/PrusaSlicer/issues/3802
wxDataViewColumn* column = evt.GetDataViewColumn();
if (column == nullptr || column->GetTitle() != _("Editing"))
mouse_pos.x = 0;
wxPoint mouse_pos = this->get_mouse_position_in_control();
// Do not show the context menu if the user pressed the right mouse button on the 3D scene and released it on the objects list
GLCanvas3D* canvas = wxGetApp().plater()->canvas3D();
@ -811,6 +804,12 @@ void ObjectList::OnContextMenu(wxDataViewEvent& evt)
void ObjectList::list_manipulation(const wxPoint& mouse_pos, bool evt_context_menu/* = false*/)
{
// Interesting fact: when mouse_pos.x < 0, HitTest(mouse_pos, item, col) returns item = null, but column = last column.
// So, when mouse was moved to scene immediately after clicking in ObjectList, in the scene will be shown context menu for the Editing column.
// see: https://github.com/prusa3d/PrusaSlicer/issues/3802
if (mouse_pos.x < 0)
return;
wxDataViewItem item;
wxDataViewColumn* col = nullptr;
HitTest(mouse_pos, item, col);
@ -925,7 +924,7 @@ void ObjectList::extruder_editing()
const int column_width = GetColumn(colExtruder)->GetWidth() + wxSystemSettings::GetMetric(wxSYS_VSCROLL_X) + 5;
wxPoint pos = get_mouse_position_in_control();
wxPoint pos = this->get_mouse_position_in_control();
wxSize size = wxSize(column_width, -1);
pos.x = GetColumn(colName)->GetWidth() + GetColumn(colPrint)->GetWidth() + 5;
pos.y -= GetTextExtent("m").y;
@ -2880,13 +2879,13 @@ void ObjectList::del_layer_range(const t_layer_height_range& range)
static double get_min_layer_height(const int extruder_idx)
{
const DynamicPrintConfig& config = wxGetApp().preset_bundle->printers.get_edited_preset().config;
return config.opt_float("min_layer_height", extruder_idx <= 0 ? 0 : extruder_idx-1);
return config.opt_float("min_layer_height", std::max(0, extruder_idx - 1));
}
static double get_max_layer_height(const int extruder_idx)
{
const DynamicPrintConfig& config = wxGetApp().preset_bundle->printers.get_edited_preset().config;
int extruder_idx_zero_based = extruder_idx <= 0 ? 0 : extruder_idx-1;
int extruder_idx_zero_based = std::max(0, extruder_idx - 1);
double max_layer_height = config.opt_float("max_layer_height", extruder_idx_zero_based);
// In case max_layer_height is set to zero, it should default to 75 % of nozzle diameter:
@ -2896,9 +2895,11 @@ static double get_max_layer_height(const int extruder_idx)
return max_layer_height;
}
// When editing this function, please synchronize the conditions with can_add_new_range_after_current().
void ObjectList::add_layer_range_after_current(const t_layer_height_range current_range)
{
const int obj_idx = get_selected_obj_idx();
assert(obj_idx >= 0);
if (obj_idx < 0)
// This should not happen.
return;
@ -2932,12 +2933,18 @@ void ObjectList::add_layer_range_after_current(const t_layer_height_range curren
{
if (current_range.second == next_range.first)
{
// Splitting the currnet layer heigth range to two.
// Splitting the next layer height range to two.
const auto old_config = ranges.at(next_range);
const coordf_t delta = (next_range.second - next_range.first);
if (delta >= get_min_layer_height(old_config.opt_int("extruder"))/*0.05f*/) {
const coordf_t midl_layer = next_range.first + 0.5 * delta;
t_layer_height_range new_range = { midl_layer, next_range.second };
const coordf_t delta = next_range.second - next_range.first;
// Layer height of the current layer.
const coordf_t old_min_layer_height = get_min_layer_height(old_config.opt_int("extruder"));
// Layer height of the layer to be inserted.
const coordf_t new_min_layer_height = get_min_layer_height(0);
if (delta >= old_min_layer_height + new_min_layer_height - EPSILON) {
const coordf_t middle_layer_z = (new_min_layer_height > 0.5 * delta) ?
next_range.second - new_min_layer_height :
next_range.first + std::max(old_min_layer_height, 0.5 * delta);
t_layer_height_range new_range = { middle_layer_z, next_range.second };
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _(L("Add Height Range")));
changed = true;
@ -2951,12 +2958,12 @@ void ObjectList::add_layer_range_after_current(const t_layer_height_range curren
ranges[new_range] = old_config;
add_layer_item(new_range, layers_item, layer_idx);
new_range = { current_range.second, midl_layer };
new_range = { current_range.second, middle_layer_z };
ranges[new_range] = get_default_layer_config(obj_idx);
add_layer_item(new_range, layers_item, layer_idx);
}
}
else
else if (next_range.first - current_range.second >= get_min_layer_height(0) - EPSILON)
{
// Filling in a gap between the current and a new layer height range with a new one.
take_snapshot(_(L("Add Height Range")));
@ -2978,6 +2985,49 @@ void ObjectList::add_layer_range_after_current(const t_layer_height_range curren
select_item(layers_item);
}
// Returning an empty string means that the layer could be added after the current layer.
// Otherwise an error tooltip is returned.
// When editing this function, please synchronize the conditions with add_layer_range_after_current().
wxString ObjectList::can_add_new_range_after_current(const t_layer_height_range current_range)
{
const int obj_idx = get_selected_obj_idx();
assert(obj_idx >= 0);
if (obj_idx < 0)
// This should not happen.
return "ObjectList assert";
t_layer_config_ranges& ranges = object(obj_idx)->layer_config_ranges;
auto it_range = ranges.find(current_range);
assert(it_range != ranges.end());
if (it_range == ranges.end())
// This shoudl not happen.
return "ObjectList assert";
auto it_next_range = it_range;
if (++ it_next_range == ranges.end())
// Adding a layer after the last layer is always possible.
return "";
if (const std::pair<coordf_t, coordf_t>& next_range = it_next_range->first; current_range.second <= next_range.first)
{
if (current_range.second == next_range.first) {
if (next_range.second - next_range.first < get_min_layer_height(it_next_range->second.opt_int("extruder")) + get_min_layer_height(0) - EPSILON)
return _(L("Cannot insert a new layer range after the current layer range.\n"
"The next layer range is too thin to be split to two\n"
"without violating the minimum layer height."));
} else if (next_range.first - current_range.second < get_min_layer_height(0) - EPSILON) {
return _(L("Cannot insert a new layer range between the current and the next layer range.\n"
"The gap between the current layer range and the next layer range\n"
"is thinner than the minimum layer height allowed."));
}
} else
return _(L("Cannot insert a new layer range after the current layer range.\n"
"Current layer range overlaps with the next layer range."));
// All right, new layer height range could be inserted.
return "";
}
void ObjectList::add_layer_item(const t_layer_height_range& range,
const wxDataViewItem layers_item,
const int layer_idx /* = -1*/)
@ -2998,7 +3048,10 @@ void ObjectList::add_layer_item(const t_layer_height_range& range,
bool ObjectList::edit_layer_range(const t_layer_height_range& range, coordf_t layer_height)
{
const int obj_idx = get_selected_obj_idx();
// Use m_selected_object_id instead of get_selected_obj_idx()
// because of get_selected_obj_idx() return obj_idx for currently selected item.
// But edit_layer_range(...) function can be called, when Selection in ObjectList could be changed
const int obj_idx = m_selected_object_id ;
if (obj_idx < 0)
return false;
@ -3021,7 +3074,10 @@ bool ObjectList::edit_layer_range(const t_layer_height_range& range, coordf_t la
bool ObjectList::edit_layer_range(const t_layer_height_range& range, const t_layer_height_range& new_range, bool dont_update_ui)
{
const int obj_idx = get_selected_obj_idx();
// Use m_selected_object_id instead of get_selected_obj_idx()
// because of get_selected_obj_idx() return obj_idx for currently selected item.
// But edit_layer_range(...) function can be called, when Selection in ObjectList could be changed
const int obj_idx = m_selected_object_id;
if (obj_idx < 0) return false;
take_snapshot(_(L("Edit Height Range")));
@ -3048,12 +3104,13 @@ bool ObjectList::edit_layer_range(const t_layer_height_range& range, const t_lay
add_layer_item(r.first, root_item);
}
if (dont_update_ui)
return true;
// if this function was invoked from wxEVT_CHANGE_SELECTION selected item could be other than itLayer or itLayerRoot
if (!dont_update_ui && (sel_type & (itLayer | itLayerRoot)))
select_item(sel_type&itLayer ? m_objects_model->GetItemByLayerRange(obj_idx, new_range) : root_item);
Expand(root_item);
m_prevent_list_events = false;
return true;
}

View file

@ -284,7 +284,7 @@ public:
bool selected_instances_of_same_object();
bool can_split_instances();
wxPoint get_mouse_position_in_control();
wxPoint get_mouse_position_in_control() const { return wxGetMousePosition() - this->GetScreenPosition(); }
wxBoxSizer* get_sizer() {return m_sizer;}
int get_selected_obj_idx() const;
DynamicPrintConfig& get_item_config(const wxDataViewItem& item) const;
@ -327,6 +327,7 @@ public:
// may have been postponed from the "kill focus" event of a text field, if the focus was lost for the "add layer" button.
// Rather providing the range by a value than by a reference, so that the memory referenced cannot be invalidated.
void add_layer_range_after_current(const t_layer_height_range current_range);
wxString can_add_new_range_after_current( t_layer_height_range current_range);
void add_layer_item (const t_layer_height_range& range,
const wxDataViewItem layers_item,
const int layer_idx = -1);

View file

@ -21,6 +21,12 @@
namespace Slic3r {
namespace GUI {
#ifdef _WIN32
wxDEFINE_EVENT(EVT_HID_DEVICE_ATTACHED, HIDDeviceAttachedEvent);
wxDEFINE_EVENT(EVT_HID_DEVICE_DETACHED, HIDDeviceDetachedEvent);
wxDEFINE_EVENT(EVT_VOLUME_ATTACHED, VolumeAttachedEvent);
wxDEFINE_EVENT(EVT_VOLUME_DETACHED, VolumeDetachedEvent);
#endif // _WIN32
wxTopLevelWindow* find_toplevel_parent(wxWindow *window)
{

View file

@ -18,6 +18,8 @@
#include <wx/debug.h>
#include <wx/settings.h>
#include "Event.hpp"
class wxCheckBox;
class wxTopLevelWindow;
class wxRect;
@ -26,6 +28,19 @@ class wxRect;
namespace Slic3r {
namespace GUI {
#ifdef _WIN32
// USB HID attach / detach events from Windows OS.
using HIDDeviceAttachedEvent = Event<std::string>;
using HIDDeviceDetachedEvent = Event<std::string>;
wxDECLARE_EVENT(EVT_HID_DEVICE_ATTACHED, HIDDeviceAttachedEvent);
wxDECLARE_EVENT(EVT_HID_DEVICE_DETACHED, HIDDeviceDetachedEvent);
// Disk aka Volume attach / detach events from Windows OS.
using VolumeAttachedEvent = SimpleEvent;
using VolumeDetachedEvent = SimpleEvent;
wxDECLARE_EVENT(EVT_VOLUME_ATTACHED, VolumeAttachedEvent);
wxDECLARE_EVENT(EVT_VOLUME_DETACHED, VolumeDetachedEvent);
#endif /* _WIN32 */
wxTopLevelWindow* find_toplevel_parent(wxWindow *window);

View file

@ -262,12 +262,6 @@ void GLGizmoBase::render_grabbers_for_picking(const BoundingBoxf3& box) const
}
}
void GLGizmoBase::set_tooltip(const std::string& tooltip) const
{
m_parent.set_tooltip(tooltip);
}
std::string GLGizmoBase::format(float value, unsigned int decimals) const
{
return Slic3r::string_printf("%.*f", decimals, value);

View file

@ -100,6 +100,7 @@ protected:
mutable std::vector<Grabber> m_grabbers;
ImGuiWrapper* m_imgui;
bool m_first_input_window_render;
mutable std::string m_tooltip;
public:
GLGizmoBase(GLCanvas3D& parent,
@ -145,10 +146,12 @@ public:
void update(const UpdateData& data);
void render() const { on_render(); }
void render() const { m_tooltip.clear(); on_render(); }
void render_for_picking() const { on_render_for_picking(); }
void render_input_window(float x, float y, float bottom_limit);
virtual std::string get_tooltip() const { return ""; }
protected:
virtual bool on_init() = 0;
virtual void on_load(cereal::BinaryInputArchive& ar) {}
@ -174,7 +177,6 @@ protected:
void render_grabbers(float size) const;
void render_grabbers_for_picking(const BoundingBoxf3& box) const;
void set_tooltip(const std::string& tooltip) const;
std::string format(float value, unsigned int decimals) const;
};

View file

@ -30,6 +30,11 @@ GLGizmoCut::GLGizmoCut(GLCanvas3D& parent, const std::string& icon_filename, uns
, m_rotate_lower(false)
{}
std::string GLGizmoCut::get_tooltip() const
{
return (m_hover_id == 0 || m_grabbers[0].dragging) ? "Z: " + format(m_cut_z, 2) : "";
}
bool GLGizmoCut::on_init()
{
m_grabbers.emplace_back();
@ -79,10 +84,6 @@ void GLGizmoCut::on_update(const UpdateData& data)
void GLGizmoCut::on_render() const
{
if (m_grabbers[0].dragging) {
set_tooltip("Z: " + format(m_cut_z, 2));
}
const Selection& selection = m_parent.get_selection();
update_max_z(selection);

View file

@ -28,6 +28,8 @@ public:
double get_cut_z() const { return m_cut_z; }
void set_cut_z(double cut_z) const;
std::string get_tooltip() const override;
protected:
virtual bool on_init();
virtual void on_load(cereal::BinaryInputArchive& ar) { ar(m_cut_z, m_keep_upper, m_keep_lower, m_rotate_lower); }

View file

@ -31,6 +31,22 @@ GLGizmoMove3D::~GLGizmoMove3D()
::gluDeleteQuadric(m_quadric);
}
std::string GLGizmoMove3D::get_tooltip() const
{
const Selection& selection = m_parent.get_selection();
bool show_position = selection.is_single_full_instance();
const Vec3d& position = selection.get_bounding_box().center();
if (m_hover_id == 0 || m_grabbers[0].dragging)
return "X: " + format(show_position ? position(0) : m_displacement(0), 2);
else if (m_hover_id == 1 || m_grabbers[1].dragging)
return "Y: " + format(show_position ? position(1) : m_displacement(1), 2);
else if (m_hover_id == 2 || m_grabbers[2].dragging)
return "Z: " + format(show_position ? position(2) : m_displacement(2), 2);
else
return "";
}
bool GLGizmoMove3D::on_init()
{
for (int i = 0; i < 3; ++i)
@ -85,22 +101,6 @@ void GLGizmoMove3D::on_render() const
{
const Selection& selection = m_parent.get_selection();
bool show_position = selection.is_single_full_instance();
const Vec3d& position = selection.get_bounding_box().center();
if ((show_position && (m_hover_id == 0)) || m_grabbers[0].dragging)
set_tooltip("X: " + format(show_position ? position(0) : m_displacement(0), 2));
else if (!m_grabbers[0].dragging && (m_hover_id == 0))
set_tooltip("X");
else if ((show_position && (m_hover_id == 1)) || m_grabbers[1].dragging)
set_tooltip("Y: " + format(show_position ? position(1) : m_displacement(1), 2));
else if (!m_grabbers[1].dragging && (m_hover_id == 1))
set_tooltip("Y");
else if ((show_position && (m_hover_id == 2)) || m_grabbers[2].dragging)
set_tooltip("Z: " + format(show_position ? position(2) : m_displacement(2), 2));
else if (!m_grabbers[2].dragging && (m_hover_id == 2))
set_tooltip("Z");
glsafe(::glClear(GL_DEPTH_BUFFER_BIT));
glsafe(::glEnable(GL_DEPTH_TEST));

View file

@ -30,6 +30,8 @@ public:
const Vec3d& get_displacement() const { return m_displacement; }
std::string get_tooltip() const override;
protected:
virtual bool on_init();
virtual std::string on_get_name() const;

View file

@ -67,6 +67,18 @@ void GLGizmoRotate::set_angle(double angle)
m_angle = angle;
}
std::string GLGizmoRotate::get_tooltip() const
{
std::string axis;
switch (m_axis)
{
case X: { axis = "X"; break; }
case Y: { axis = "Y"; break; }
case Z: { axis = "Z"; break; }
}
return (m_hover_id == 0 || m_grabbers[0].dragging) ? axis + ": " + format((float)Geometry::rad2deg(m_angle), 4) : "";
}
bool GLGizmoRotate::on_init()
{
m_grabbers.push_back(Grabber());
@ -127,19 +139,7 @@ void GLGizmoRotate::on_render() const
const Selection& selection = m_parent.get_selection();
const BoundingBoxf3& box = selection.get_bounding_box();
std::string axis;
switch (m_axis)
{
case X: { axis = "X"; break; }
case Y: { axis = "Y"; break; }
case Z: { axis = "Z"; break; }
}
if (!m_dragging && (m_hover_id == 0))
set_tooltip(axis);
else if (m_dragging)
set_tooltip(axis + ": " + format((float)Geometry::rad2deg(m_angle), 4) + "\u00B0");
else
if (m_hover_id != 0 && !m_grabbers[0].dragging)
{
m_center = box.center();
m_radius = Offset + box.radius();

View file

@ -49,6 +49,8 @@ public:
double get_angle() const { return m_angle; }
void set_angle(double angle);
std::string get_tooltip() const override;
protected:
virtual bool on_init();
virtual std::string on_get_name() const { return ""; }
@ -81,6 +83,16 @@ public:
Vec3d get_rotation() const { return Vec3d(m_gizmos[X].get_angle(), m_gizmos[Y].get_angle(), m_gizmos[Z].get_angle()); }
void set_rotation(const Vec3d& rotation) { m_gizmos[X].set_angle(rotation(0)); m_gizmos[Y].set_angle(rotation(1)); m_gizmos[Z].set_angle(rotation(2)); }
std::string get_tooltip() const override
{
std::string tooltip = m_gizmos[X].get_tooltip();
if (tooltip.empty())
tooltip = m_gizmos[Y].get_tooltip();
if (tooltip.empty())
tooltip = m_gizmos[Z].get_tooltip();
return tooltip;
}
protected:
virtual bool on_init();
virtual std::string on_get_name() const;

View file

@ -20,6 +20,38 @@ GLGizmoScale3D::GLGizmoScale3D(GLCanvas3D& parent, const std::string& icon_filen
{
}
std::string GLGizmoScale3D::get_tooltip() const
{
const Selection& selection = m_parent.get_selection();
bool single_instance = selection.is_single_full_instance();
bool single_volume = selection.is_single_modifier() || selection.is_single_volume();
bool single_selection = single_instance || single_volume;
Vec3f scale = 100.0f * Vec3f::Ones();
if (single_instance)
scale = 100.0f * selection.get_volume(*selection.get_volume_idxs().begin())->get_instance_scaling_factor().cast<float>();
else if (single_volume)
scale = 100.0f * selection.get_volume(*selection.get_volume_idxs().begin())->get_volume_scaling_factor().cast<float>();
if (m_hover_id == 0 || m_hover_id == 1 || m_grabbers[0].dragging || m_grabbers[1].dragging)
return "X: " + format(scale(0), 4) + "%";
else if (m_hover_id == 2 || m_hover_id == 3 || m_grabbers[2].dragging || m_grabbers[3].dragging)
return "Y: " + format(scale(1), 4) + "%";
else if (m_hover_id == 4 || m_hover_id == 5 || m_grabbers[4].dragging || m_grabbers[5].dragging)
return "Z: " + format(scale(2), 4) + "%";
else if (m_hover_id == 6 || m_hover_id == 7 || m_hover_id == 8 || m_hover_id == 9 ||
m_grabbers[6].dragging || m_grabbers[7].dragging || m_grabbers[8].dragging || m_grabbers[9].dragging)
{
std::string tooltip = "X: " + format(scale(0), 4) + "%\n";
tooltip += "Y: " + format(scale(1), 4) + "%\n";
tooltip += "Z: " + format(scale(2), 4) + "%";
return tooltip;
}
else
return "";
}
bool GLGizmoScale3D::on_init()
{
for (int i = 0; i < 10; ++i)
@ -89,37 +121,6 @@ void GLGizmoScale3D::on_render() const
bool single_instance = selection.is_single_full_instance();
bool single_volume = selection.is_single_modifier() || selection.is_single_volume();
bool single_selection = single_instance || single_volume;
Vec3f scale = 100.0f * Vec3f::Ones();
if (single_instance)
scale = 100.0f * selection.get_volume(*selection.get_volume_idxs().begin())->get_instance_scaling_factor().cast<float>();
else if (single_volume)
scale = 100.0f * selection.get_volume(*selection.get_volume_idxs().begin())->get_volume_scaling_factor().cast<float>();
if ((single_selection && ((m_hover_id == 0) || (m_hover_id == 1))) || m_grabbers[0].dragging || m_grabbers[1].dragging)
set_tooltip("X: " + format(scale(0), 4) + "%");
else if (!m_grabbers[0].dragging && !m_grabbers[1].dragging && ((m_hover_id == 0) || (m_hover_id == 1)))
set_tooltip("X");
else if ((single_selection && ((m_hover_id == 2) || (m_hover_id == 3))) || m_grabbers[2].dragging || m_grabbers[3].dragging)
set_tooltip("Y: " + format(scale(1), 4) + "%");
else if (!m_grabbers[2].dragging && !m_grabbers[3].dragging && ((m_hover_id == 2) || (m_hover_id == 3)))
set_tooltip("Y");
else if ((single_selection && ((m_hover_id == 4) || (m_hover_id == 5))) || m_grabbers[4].dragging || m_grabbers[5].dragging)
set_tooltip("Z: " + format(scale(2), 4) + "%");
else if (!m_grabbers[4].dragging && !m_grabbers[5].dragging && ((m_hover_id == 4) || (m_hover_id == 5)))
set_tooltip("Z");
else if ((single_selection && ((m_hover_id == 6) || (m_hover_id == 7) || (m_hover_id == 8) || (m_hover_id == 9)))
|| m_grabbers[6].dragging || m_grabbers[7].dragging || m_grabbers[8].dragging || m_grabbers[9].dragging)
{
std::string tooltip = "X: " + format(scale(0), 4) + "%\n";
tooltip += "Y: " + format(scale(1), 4) + "%\n";
tooltip += "Z: " + format(scale(2), 4) + "%";
set_tooltip(tooltip);
}
else if (!m_grabbers[6].dragging && !m_grabbers[7].dragging && !m_grabbers[8].dragging && !m_grabbers[9].dragging &&
((m_hover_id == 6) || (m_hover_id == 7) || (m_hover_id == 8) || (m_hover_id == 9)))
set_tooltip("X/Y/Z");
glsafe(::glClear(GL_DEPTH_BUFFER_BIT));
glsafe(::glEnable(GL_DEPTH_TEST));

View file

@ -42,6 +42,8 @@ public:
const Vec3d& get_offset() const { return m_offset; }
std::string get_tooltip() const override;
protected:
virtual bool on_init();
virtual std::string on_get_name() const;

View file

@ -225,7 +225,7 @@ void GLGizmosManager::update_data()
set_scale(Vec3d::Ones());
set_rotation(Vec3d::Zero());
set_flattening_data(selection.is_from_single_object() ? selection.get_model()->objects[selection.get_object_idx()] : nullptr);
set_sla_support_data(nullptr);
set_sla_support_data(selection.is_from_single_instance() ? selection.get_model()->objects[selection.get_object_idx()] : nullptr);
}
}
@ -422,6 +422,15 @@ void GLGizmosManager::render_overlay() const
do_render_overlay();
}
std::string GLGizmosManager::get_tooltip() const
{
if (!m_tooltip.empty())
return m_tooltip;
const GLGizmoBase* curr = get_current();
return (curr != nullptr) ? curr->get_tooltip() : "";
}
bool GLGizmosManager::on_mouse_wheel(wxMouseEvent& evt)
{
bool processed = false;
@ -447,6 +456,7 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
int selected_object_idx = selection.get_object_idx();
bool processed = false;
#if !ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
// mouse anywhere
if (!evt.Dragging() && !evt.Leaving() && !evt.Entering() && (m_mouse_capture.parent != nullptr))
{
@ -456,10 +466,81 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
m_mouse_capture.reset();
}
#endif // !ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
// mouse anywhere
if (evt.Moving())
m_tooltip = update_hover_state(mouse_pos);
#if ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
else if (evt.LeftUp())
{
if (m_mouse_capture.left)
{
processed = true;
m_mouse_capture.left = false;
}
else if (is_dragging())
{
switch (m_current) {
case Move: m_parent.do_move(L("Gizmo-Move")); break;
case Scale: m_parent.do_scale(L("Gizmo-Scale")); break;
case Rotate: m_parent.do_rotate(L("Gizmo-Rotate")); break;
default: break;
}
stop_dragging();
update_data();
wxGetApp().obj_manipul()->set_dirty();
// Let the plater know that the dragging finished, so a delayed refresh
// of the scene with the background processing data should be performed.
m_parent.post_event(SimpleEvent(EVT_GLCANVAS_MOUSE_DRAGGING_FINISHED));
// updates camera target constraints
m_parent.refresh_camera_scene_box();
processed = true;
}
// else
// return false;
}
else if (evt.MiddleUp())
{
if (m_mouse_capture.middle)
{
processed = true;
m_mouse_capture.middle = false;
}
else
return false;
}
else if (evt.RightUp())
{
if (pending_right_up)
{
pending_right_up = false;
return true;
}
if (m_mouse_capture.right)
{
processed = true;
m_mouse_capture.right = false;
}
else
return false;
}
#if ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX
else if (evt.Dragging() && !is_dragging())
#else
else if (evt.Dragging()))
#endif // ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX
{
if (m_mouse_capture.any())
// if the button down was done on this toolbar, prevent from dragging into the scene
processed = true;
// else
// return false;
}
#else
else if (evt.LeftUp())
m_mouse_capture.left = false;
else if (evt.MiddleUp())
@ -476,48 +557,8 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
else if (evt.Dragging() && m_mouse_capture.any())
// if the button down was done on this toolbar, prevent from dragging into the scene
processed = true;
if (get_gizmo_idx_from_mouse(mouse_pos) == Undefined)
{
// mouse is outside the toolbar
m_tooltip = "";
if (evt.LeftDown())
{
if ((m_current == SlaSupports || m_current == Hollow) && gizmo_event(SLAGizmoEventType::LeftDown, mouse_pos, evt.ShiftDown(), evt.AltDown(), evt.ControlDown()))
// the gizmo got the event and took some action, there is no need to do anything more
processed = true;
else if (!selection.is_empty() && grabber_contains_mouse()) {
update_data();
selection.start_dragging();
start_dragging();
if (m_current == Flatten) {
// Rotate the object so the normal points downward:
m_parent.do_flatten(get_flattening_normal(), L("Gizmo-Place on Face"));
wxGetApp().obj_manipul()->set_dirty();
}
m_parent.set_as_dirty();
processed = true;
}
}
else if (evt.RightDown() && (selected_object_idx != -1) && (m_current == SlaSupports || m_current == Hollow) && gizmo_event(SLAGizmoEventType::RightDown))
{
// we need to set the following right up as processed to avoid showing the context menu if the user release the mouse over the object
pending_right_up = true;
// event was taken care of by the SlaSupports gizmo
processed = true;
}
else if (evt.Dragging() && (m_parent.get_move_volume_id() != -1) && (m_current == SlaSupports || m_current == Hollow))
// don't allow dragging objects with the Sla gizmo on
processed = true;
else if (evt.Dragging() && (m_current == SlaSupports || m_current == Hollow) && gizmo_event(SLAGizmoEventType::Dragging, mouse_pos, evt.ShiftDown(), evt.AltDown(), evt.ControlDown()))
{
// the gizmo got the event and took some action, no need to do anything more here
m_parent.set_as_dirty();
processed = true;
}
#endif // ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
#if ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX
else if (evt.Dragging() && is_dragging())
{
if (!m_parent.get_wxglcanvas()->HasCapture())
@ -564,6 +605,98 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
m_parent.set_as_dirty();
processed = true;
}
#endif // ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX
if (get_gizmo_idx_from_mouse(mouse_pos) == Undefined)
{
// mouse is outside the toolbar
m_tooltip = "";
if (evt.LeftDown())
{
if ((m_current == SlaSupports || m_current == Hollow) && gizmo_event(SLAGizmoEventType::LeftDown, mouse_pos, evt.ShiftDown(), evt.AltDown(), evt.ControlDown()))
// the gizmo got the event and took some action, there is no need to do anything more
processed = true;
else if (!selection.is_empty() && grabber_contains_mouse()) {
update_data();
selection.start_dragging();
start_dragging();
if (m_current == Flatten) {
// Rotate the object so the normal points downward:
m_parent.do_flatten(get_flattening_normal(), L("Gizmo-Place on Face"));
wxGetApp().obj_manipul()->set_dirty();
}
m_parent.set_as_dirty();
processed = true;
}
}
else if (evt.RightDown() && (selected_object_idx != -1) && (m_current == SlaSupports || m_current == Hollow) && gizmo_event(SLAGizmoEventType::RightDown))
{
// we need to set the following right up as processed to avoid showing the context menu if the user release the mouse over the object
pending_right_up = true;
// event was taken care of by the SlaSupports gizmo
processed = true;
}
else if (evt.Dragging() && (m_parent.get_move_volume_id() != -1) && (m_current == SlaSupports || m_current == Hollow))
// don't allow dragging objects with the Sla gizmo on
processed = true;
else if (evt.Dragging() && (m_current == SlaSupports || m_current == Hollow) && gizmo_event(SLAGizmoEventType::Dragging, mouse_pos, evt.ShiftDown(), evt.AltDown(), evt.ControlDown()))
{
// the gizmo got the event and took some action, no need to do anything more here
m_parent.set_as_dirty();
processed = true;
}
#if !ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX
else if (evt.Dragging() && is_dragging())
{
if (!m_parent.get_wxglcanvas()->HasCapture())
m_parent.get_wxglcanvas()->CaptureMouse();
m_parent.set_mouse_as_dragging();
update(m_parent.mouse_ray(pos), pos);
switch (m_current)
{
case Move:
{
// Apply new temporary offset
selection.translate(get_displacement());
wxGetApp().obj_manipul()->set_dirty();
break;
}
case Scale:
{
// Apply new temporary scale factors
TransformationType transformation_type(TransformationType::Local_Absolute_Joint);
if (evt.AltDown())
transformation_type.set_independent();
selection.scale(get_scale(), transformation_type);
if (evt.ControlDown())
selection.translate(get_scale_offset(), true);
wxGetApp().obj_manipul()->set_dirty();
break;
}
case Rotate:
{
// Apply new temporary rotations
TransformationType transformation_type(TransformationType::World_Relative_Joint);
if (evt.AltDown())
transformation_type.set_independent();
selection.rotate(get_rotation(), transformation_type);
wxGetApp().obj_manipul()->set_dirty();
break;
}
default:
break;
}
m_parent.set_as_dirty();
processed = true;
}
#endif // !ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX
#if !ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
else if (evt.LeftUp() && is_dragging())
{
switch (m_current) {
@ -585,6 +718,7 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
processed = true;
}
#endif // !ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
else if (evt.LeftUp() && (m_current == SlaSupports || m_current == Hollow) && !m_parent.is_mouse_dragging())
{
// in case SLA gizmo is selected, we just pass the LeftUp event and stop processing - neither
@ -623,8 +757,10 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
m_mouse_capture.right = true;
m_mouse_capture.parent = &m_parent;
}
#if !ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
else if (evt.LeftUp())
processed = true;
#endif // !ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
}
return processed;

View file

@ -204,7 +204,7 @@ public:
void render_overlay() const;
const std::string& get_tooltip() const { return m_tooltip; }
std::string get_tooltip() const;
bool on_mouse(wxMouseEvent& evt);
bool on_mouse_wheel(wxMouseEvent& evt);

View file

@ -1,6 +1,8 @@
#ifndef _
#define _(s) Slic3r::GUI::I18N::translate((s))
#define _L(s) Slic3r::GUI::I18N::translate((s))
#define _utf8(s) Slic3r::GUI::I18N::translate_utf8((s))
#define _u8L(s) Slic3r::GUI::I18N::translate_utf8((s))
#endif /* _ */
#ifndef _CTX

View file

@ -441,15 +441,37 @@ bool ImGuiWrapper::want_any_input() const
return io.WantCaptureMouse || io.WantCaptureKeyboard || io.WantTextInput;
}
#ifdef __APPLE__
static const ImWchar ranges_keyboard_shortcuts[] =
{
0x21E7, 0x21E7, // OSX Shift Key symbol
0x2318, 0x2318, // OSX Command Key symbol
0x2325, 0x2325, // OSX Option Key symbol
0,
};
#endif // __APPLE__
void ImGuiWrapper::init_font(bool compress)
{
destroy_font();
ImGuiIO& io = ImGui::GetIO();
io.Fonts->Clear();
//FIXME replace with io.Fonts->AddFontFromMemoryTTF(buf_decompressed_data, (int)buf_decompressed_size, m_font_size, nullptr, m_glyph_ranges);
// Create ranges of characters from m_glyph_ranges, possibly adding some OS specific special characters.
ImVector<ImWchar> ranges;
ImFontAtlas::GlyphRangesBuilder builder;
builder.AddRanges(m_glyph_ranges);
#ifdef __APPLE__
if (m_font_cjk)
// Apple keyboard shortcuts are only contained in the CJK fonts.
builder.AddRanges(ranges_keyboard_shortcuts);
#endif
builder.BuildRanges(&ranges); // Build the final result (ordered ranges with all the unique characters submitted)
//FIXME replace with io.Fonts->AddFontFromMemoryTTF(buf_decompressed_data, (int)buf_decompressed_size, m_font_size, nullptr, ranges.Data);
//https://github.com/ocornut/imgui/issues/220
ImFont* font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + (m_font_cjk ? "NotoSansCJK-Regular.ttc" : "NotoSans-Regular.ttf")).c_str(), m_font_size, nullptr, m_glyph_ranges);
ImFont* font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/" + (m_font_cjk ? "NotoSansCJK-Regular.ttc" : "NotoSans-Regular.ttf")).c_str(), m_font_size, nullptr, ranges.Data);
if (font == nullptr) {
font = io.Fonts->AddFontDefault();
if (font == nullptr) {
@ -457,6 +479,16 @@ void ImGuiWrapper::init_font(bool compress)
}
}
#ifdef __APPLE__
ImFontConfig config;
config.MergeMode = true;
if (! m_font_cjk) {
// Apple keyboard shortcuts are only contained in the CJK fonts.
ImFont *font_cjk = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/NotoSansCJK-Regular.ttc").c_str(), m_font_size, &config, ranges_keyboard_shortcuts);
assert(font_cjk != nullptr);
}
#endif
// Build texture atlas
unsigned char* pixels;
int width, height;

View file

@ -144,9 +144,7 @@ void KBShortcutsDialog::fill_shortcuts()
{ ctrl + "J", L("Print host upload queue") },
// View
{ "0-6", L("Camera view") },
#if ENABLE_SHOW_SCENE_LABELS
{ "E", L("Show/Hide object/instance labels") },
#endif // ENABLE_SHOW_SCENE_LABELS
// Configuration
{ ctrl + "P", L("Preferences") },
// Help

View file

@ -31,6 +31,10 @@
#include <fstream>
#include "GUI_App.hpp"
#ifdef _WIN32
#include <dbt.h>
#endif // _WIN32
namespace Slic3r {
namespace GUI {
@ -104,6 +108,31 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
update_title();
// declare events
Bind(wxEVT_CREATE, [this](wxWindowCreateEvent& event) {
#ifdef _WIN32
//static GUID GUID_DEVINTERFACE_USB_DEVICE = { 0xA5DCBF10, 0x6530, 0x11D2, 0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED };
//static GUID GUID_DEVINTERFACE_DISK = { 0x53f56307, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b };
//static GUID GUID_DEVINTERFACE_VOLUME = { 0x71a27cdd, 0x812a, 0x11d0, 0xbe, 0xc7, 0x08, 0x00, 0x2b, 0xe2, 0x09, 0x2f };
static GUID GUID_DEVINTERFACE_HID = { 0x4D1E55B2, 0xF16F, 0x11CF, 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30 };
// Register USB HID (Human Interface Devices) notifications to trigger the 3DConnexion enumeration.
DEV_BROADCAST_DEVICEINTERFACE NotificationFilter = { 0 };
NotificationFilter.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE);
NotificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
NotificationFilter.dbcc_classguid = GUID_DEVINTERFACE_HID;
m_hDeviceNotify = ::RegisterDeviceNotification(this->GetHWND(), &NotificationFilter, DEVICE_NOTIFY_WINDOW_HANDLE);
// or register for file handle change?
// DEV_BROADCAST_HANDLE NotificationFilter = { 0 };
// NotificationFilter.dbch_size = sizeof(DEV_BROADCAST_HANDLE);
// NotificationFilter.dbch_devicetype = DBT_DEVTYP_HANDLE;
#endif // _WIN32
// propagate event
event.Skip();
});
Bind(wxEVT_CLOSE_WINDOW, [this](wxCloseEvent& event) {
if (event.CanVeto() && !wxGetApp().check_unsaved_changes()) {
event.Veto();
@ -131,6 +160,11 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
// Called when closing the application and when switching the application language.
void MainFrame::shutdown()
{
#ifdef _WIN32
::UnregisterDeviceNotification(HDEVNOTIFY(m_hDeviceNotify));
m_hDeviceNotify = nullptr;
#endif // _WIN32
if (m_plater)
m_plater->stop_jobs();

View file

@ -141,6 +141,10 @@ public:
wxNotebook* m_tabpanel { nullptr };
wxProgressDialog* m_progress_dialog { nullptr };
std::shared_ptr<ProgressStatusBar> m_statusbar;
#ifdef _WIN32
void* m_hDeviceNotify { nullptr };
#endif // _WIN32
};
} // GUI

View file

@ -99,6 +99,25 @@ void Mouse3DController::State::append_button(unsigned int id, size_t /* input_qu
}
#ifdef WIN32
// Called by Win32 HID enumeration callback.
void Mouse3DController::device_attached(const std::string &device)
{
int vid = 0;
int pid = 0;
if (sscanf(device.c_str(), "\\\\?\\HID#VID_%x&PID_%x&", &vid, &pid) == 2) {
// BOOST_LOG_TRIVIAL(trace) << boost::format("Mouse3DController::device_attached(VID_%04xxPID_%04x)") % vid % pid;
// BOOST_LOG_TRIVIAL(trace) << "Mouse3DController::device_attached: " << device;
if (std::find(_3DCONNEXION_VENDORS.begin(), _3DCONNEXION_VENDORS.end(), vid) != _3DCONNEXION_VENDORS.end()) {
// Signal the worker thread to wake up and enumerate HID devices, if not connected at the moment.
// The message may come multiple times per each USB device. For example, some USB wireless dongles register as multiple HID sockets
// for multiple devices to connect to.
// Never mind, enumeration will be performed until connected.
m_wakeup = true;
m_stop_condition.notify_all();
}
}
}
// Filter out mouse scroll events produced by the 3DConnexion driver.
bool Mouse3DController::State::process_mouse_wheel()
{
@ -388,9 +407,13 @@ void Mouse3DController::disconnected()
m_params_by_device[m_device_str] = m_params_ui;
m_device_str.clear();
m_connected = false;
wxGetApp().plater()->get_camera().recover_from_free_camera();
wxGetApp().plater()->set_current_canvas_as_dirty();
wxWakeUpIdle();
wxGetApp().plater()->CallAfter([]() {
Plater *plater = wxGetApp().plater();
if (plater != nullptr) {
plater->get_camera().recover_from_free_camera();
plater->set_current_canvas_as_dirty();
}
});
}
}
@ -486,6 +509,11 @@ void Mouse3DController::run()
return;
}
#ifdef _WIN32
// Enumerate once just after thread start.
m_wakeup = true;
#endif // _WIN32
for (;;) {
{
tbb::mutex::scoped_lock lock(m_params_ui_mutex);
@ -518,7 +546,13 @@ bool Mouse3DController::connect_device()
{
// Wait for 2 seconds, but cancellable by m_stop.
std::unique_lock<std::mutex> lock(m_stop_condition_mutex);
m_stop_condition.wait_for(lock, std::chrono::seconds(2), [this]{ return this->m_stop; });
#ifdef _WIN32
// Wait indifinetely for the stop signal.
m_stop_condition.wait(lock, [this]{ return m_stop || m_wakeup; });
m_wakeup = false;
#else
m_stop_condition.wait_for(lock, std::chrono::seconds(2), [this]{ return m_stop; });
#endif
}
if (m_stop)
@ -528,10 +562,14 @@ bool Mouse3DController::connect_device()
hid_device_info* devices = hid_enumerate(0, 0);
if (devices == nullptr)
{
BOOST_LOG_TRIVIAL(error) << "Unable to enumerate HID devices";
BOOST_LOG_TRIVIAL(trace) << "Mouse3DController::connect_device() - no HID device enumerated.";
return false;
}
#ifdef _WIN32
BOOST_LOG_TRIVIAL(trace) << "Mouse3DController::connect_device() - enumerating HID devices.";
#endif // _WIN32
// Searches for 1st connected 3Dconnexion device
struct DeviceData
{
@ -785,9 +823,17 @@ void Mouse3DController::disconnect_device()
}
m_device_str.clear();
m_connected = false;
wxGetApp().plater()->get_camera().recover_from_free_camera();
wxGetApp().plater()->set_current_canvas_as_dirty();
wxWakeUpIdle();
#ifdef _WIN32
// Enumerate once immediately after disconnect.
m_wakeup = true;
#endif // _WIN32
wxGetApp().plater()->CallAfter([]() {
Plater *plater = wxGetApp().plater();
if (plater != nullptr) {
plater->get_camera().recover_from_free_camera();
plater->set_current_canvas_as_dirty();
}
});
}
}

View file

@ -148,6 +148,9 @@ class Mouse3DController
hid_device* m_device { nullptr };
// Using m_stop_condition_mutex to synchronize m_stop.
bool m_stop { false };
#ifdef _WIN32
std::atomic<bool> m_wakeup { false };
#endif /* _WIN32 */
// Mutex and condition variable for sleeping during the detection of 3DConnexion devices by polling while allowing
// cancellation before the end of the polling interval.
std::mutex m_stop_condition_mutex;
@ -185,6 +188,9 @@ public:
#endif // __APPLE__
#ifdef WIN32
// Called by Win32 HID enumeration callback.
void device_attached(const std::string &device);
// On Windows, the 3DConnexion driver sends out mouse wheel rotation events to an active application
// if the application does not register at the driver. This is a workaround to ignore these superfluous
// mouse wheel events.

View file

@ -2016,6 +2016,7 @@ struct Plater::priv
mutable bool ready_to_slice = { false };
// Flag indicating that the G-code export targets a removable device, therefore the show_action_buttons() needs to be called at any case when the background processing finishes.
bool writing_to_removable_device = { false };
bool inside_snapshot_capture() { return m_prevent_snapshots != 0; }
private:
bool init_object_menu();
@ -2214,8 +2215,14 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
// Start the background thread to detect and connect to a HID device (Windows and Linux).
// Connect to a 3DConnextion driver (OSX).
mouse3d_controller.init();
#ifdef _WIN32
// Register an USB HID (Human Interface Device) attach event. evt contains Win32 path to the USB device containing VID, PID and other info.
// This event wakes up the Mouse3DController's background thread to enumerate HID devices, if the VID of the callback event
// is one of the 3D Mouse vendors (3DConnexion or Logitech).
this->q->Bind(EVT_HID_DEVICE_ATTACHED, [this](HIDDeviceAttachedEvent &evt) {
mouse3d_controller.device_attached(evt.data);
});
#endif /* _WIN32 */
this->q->Bind(EVT_REMOVABLE_DRIVE_EJECTED, [this](RemovableDriveEjectEvent &evt) {
if (evt.data.second) {
@ -2229,6 +2236,11 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
this->q->Bind(EVT_REMOVABLE_DRIVES_CHANGED, [this](RemovableDrivesChangedEvent &) { this->show_action_buttons(this->ready_to_slice); });
// Start the background thread and register this window as a target for update events.
wxGetApp().removable_drive_manager()->init(this->q);
#ifdef _WIN32
// Trigger enumeration of removable media on Win32 notification.
this->q->Bind(EVT_VOLUME_ATTACHED, [this](VolumeAttachedEvent &evt) { wxGetApp().removable_drive_manager()->volumes_changed(); });
this->q->Bind(EVT_VOLUME_DETACHED, [this](VolumeDetachedEvent &evt) { wxGetApp().removable_drive_manager()->volumes_changed(); });
#endif /* _WIN32 */
// Initialize the Undo / Redo stack with a first snapshot.
this->take_snapshot(_(L("New Project")));
@ -2298,13 +2310,6 @@ void Plater::priv::reset_all_gizmos()
// Update the UI based on the current preferences.
void Plater::priv::update_ui_from_settings()
{
// TODO: (?)
// my ($self) = @_;
// if (defined($self->{btn_reslice}) && $self->{buttons_sizer}->IsShown($self->{btn_reslice}) != (! wxTheApp->{app_config}->get("background_processing"))) {
// $self->{buttons_sizer}->Show($self->{btn_reslice}, ! wxTheApp->{app_config}->get("background_processing"));
// $self->{buttons_sizer}->Layout;
// }
camera.set_type(wxGetApp().app_config->get("use_perspective_camera"));
if (wxGetApp().app_config->get("use_free_camera") != "1")
camera.recover_from_free_camera();
@ -2521,7 +2526,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
selection.add_object((unsigned int)idx, false);
}
if (view3D->get_canvas3d()->get_gizmos_manager().is_running())
if (view3D->get_canvas3d()->get_gizmos_manager().is_enabled())
// this is required because the selected object changed and the flatten on face an sla support gizmos need to be updated accordingly
view3D->get_canvas3d()->update_gizmos_on_off_state();
}
@ -3655,8 +3660,8 @@ void Plater::priv::on_select_preset(wxCommandEvent &evt)
//! instead of
//! combo->GetStringSelection().ToUTF8().data());
const std::string& selected_string = combo->GetString(combo->GetSelection()).ToUTF8().data();
const std::string preset_name = wxGetApp().preset_bundle->get_preset_name_by_alias(preset_type, selected_string);
const std::string preset_name = wxGetApp().preset_bundle->get_preset_name_by_alias(preset_type,
Preset::remove_suffix_modified(combo->GetString(combo->GetSelection()).ToUTF8().data()));
if (preset_type == Preset::TYPE_FILAMENT) {
wxGetApp().preset_bundle->set_filament_preset(idx, preset_name);
@ -5761,6 +5766,7 @@ bool Plater::can_reload_from_disk() const { return p->can_reload_from_disk(); }
const UndoRedo::Stack& Plater::undo_redo_stack_main() const { return p->undo_redo_stack_main(); }
void Plater::enter_gizmos_stack() { p->enter_gizmos_stack(); }
void Plater::leave_gizmos_stack() { p->leave_gizmos_stack(); }
bool Plater::inside_snapshot_capture() { return p->inside_snapshot_capture(); }
// Wrapper around wxWindow::PopupMenu to suppress error messages popping out while tracking the popup menu.
bool Plater::PopupMenu(wxMenu *menu, const wxPoint& pos)

View file

@ -320,6 +320,8 @@ public:
Plater *m_plater;
};
bool inside_snapshot_capture();
// Wrapper around wxWindow::PopupMenu to suppress error messages popping out while tracking the popup menu.
bool PopupMenu(wxMenu *menu, const wxPoint& pos = wxDefaultPosition);
bool PopupMenu(wxMenu *menu, int x, int y) { return this->PopupMenu(menu, wxPoint(x, y)); }

View file

@ -381,7 +381,7 @@ void Preset::set_visible_from_appconfig(const AppConfig &app_config)
return;
is_visible = app_config.get_variant(vendor->id, model, variant);
} else if (type == TYPE_FILAMENT || type == TYPE_SLA_MATERIAL) {
const char *section_name = (type == TYPE_FILAMENT) ? "filaments" : "sla_materials";
const std::string &section_name = (type == TYPE_FILAMENT) ? AppConfig::SECTION_FILAMENTS : AppConfig::SECTION_MATERIALS;
if (app_config.has_section(section_name)) {
// Check whether this profile is marked as "installed" in PrusaSlicer.ini,
// or whether a profile is marked as "installed", which this profile may have been renamed from.
@ -413,7 +413,7 @@ const std::vector<std::string>& Preset::print_options()
"perimeter_speed", "small_perimeter_speed", "external_perimeter_speed", "infill_speed", "solid_infill_speed",
"top_solid_infill_speed", "support_material_speed", "support_material_xy_spacing", "support_material_interface_speed",
"bridge_speed", "gap_fill_speed", "travel_speed", "first_layer_speed", "perimeter_acceleration", "infill_acceleration",
"bridge_acceleration", "first_layer_acceleration", "default_acceleration", "skirts", "skirt_distance", "skirt_height",
"bridge_acceleration", "first_layer_acceleration", "default_acceleration", "skirts", "skirt_distance", "skirt_height", "draft_shield",
"min_skirt_length", "brim_width", "support_material", "support_material_auto", "support_material_threshold", "support_material_enforce_layers",
"raft_layers", "support_material_pattern", "support_material_with_sheath", "support_material_spacing",
"support_material_synchronize_layers", "support_material_angle", "support_material_interface_layers",
@ -1032,6 +1032,14 @@ const std::string& PresetCollection::get_preset_name_by_alias(const std::string&
return alias;
}
const std::string* PresetCollection::get_preset_name_renamed(const std::string &old_name) const
{
auto it_renamed = m_map_system_profile_renamed.find(old_name);
if (it_renamed != m_map_system_profile_renamed.end())
return &it_renamed->second;
return nullptr;
}
const std::string& PresetCollection::get_suffix_modified() {
return g_suffix_modified;
}

View file

@ -237,6 +237,7 @@ public:
static void update_suffix_modified();
static const std::string& suffix_modified();
static std::string remove_suffix_modified(const std::string& name);
static void normalize(DynamicPrintConfig &config);
// Report configuration fields, which are misplaced into a wrong group, remove them from the config.
static std::string remove_invalid_keys(DynamicPrintConfig &config, const DynamicPrintConfig &default_config);
@ -244,7 +245,6 @@ public:
protected:
friend class PresetCollection;
friend class PresetBundle;
static std::string remove_suffix_modified(const std::string &name);
};
bool is_compatible_with_print (const PresetWithVendorProfile &preset, const PresetWithVendorProfile &active_print, const PresetWithVendorProfile &active_printer);
@ -362,6 +362,7 @@ public:
PresetWithVendorProfile get_edited_preset_with_vendor_profile() const { return this->get_preset_with_vendor_profile(this->get_edited_preset()); }
const std::string& get_preset_name_by_alias(const std::string& alias) const;
const std::string* get_preset_name_renamed(const std::string &old_name) const;
// used to update preset_choice from Tab
const std::deque<Preset>& get_presets() const { return m_presets; }

View file

@ -289,17 +289,7 @@ std::string PresetBundle::load_system_presets()
this->reset(false);
}
this->prints .update_map_system_profile_renamed();
this->sla_prints .update_map_system_profile_renamed();
this->filaments .update_map_system_profile_renamed();
this->sla_materials.update_map_system_profile_renamed();
this->printers .update_map_system_profile_renamed();
this->prints .update_map_alias_to_profile_name();
this->sla_prints .update_map_alias_to_profile_name();
this->filaments .update_map_alias_to_profile_name();
this->sla_materials.update_map_alias_to_profile_name();
this->update_system_maps();
return errors_cummulative;
}
@ -324,6 +314,20 @@ std::vector<std::string> PresetBundle::merge_presets(PresetBundle &&other)
return duplicate_prints;
}
void PresetBundle::update_system_maps()
{
this->prints .update_map_system_profile_renamed();
this->sla_prints .update_map_system_profile_renamed();
this->filaments .update_map_system_profile_renamed();
this->sla_materials.update_map_system_profile_renamed();
this->printers .update_map_system_profile_renamed();
this->prints .update_map_alias_to_profile_name();
this->sla_prints .update_map_alias_to_profile_name();
this->filaments .update_map_alias_to_profile_name();
this->sla_materials.update_map_alias_to_profile_name();
}
static inline std::string remove_ini_suffix(const std::string &name)
{
std::string out = name;
@ -337,10 +341,10 @@ static inline std::string remove_ini_suffix(const std::string &name)
// If the "vendor" section is missing, enable all models and variants of the particular vendor.
void PresetBundle::load_installed_printers(const AppConfig &config)
{
for (auto &preset : printers) {
this->update_system_maps();
for (auto &preset : printers)
preset.set_visible_from_appconfig(config);
}
}
const std::string& PresetBundle::get_preset_name_by_alias( const Preset::Type& preset_type, const std::string& alias) const
{
@ -367,7 +371,7 @@ void PresetBundle::load_installed_filaments(AppConfig &config)
if (printer.is_visible && printer.printer_technology() == ptFFF) {
const PresetWithVendorProfile printer_with_vendor_profile = printers.get_preset_with_vendor_profile(printer);
for (const Preset &filament : filaments)
if (is_compatible_with_printer(filaments.get_preset_with_vendor_profile(filament), printer_with_vendor_profile))
if (filament.is_system && is_compatible_with_printer(filaments.get_preset_with_vendor_profile(filament), printer_with_vendor_profile))
compatible_filaments.insert(&filament);
}
// and mark these filaments as installed, therefore this code will not be executed at the next start of the application.
@ -390,7 +394,7 @@ void PresetBundle::load_installed_sla_materials(AppConfig &config)
if (printer.is_visible && printer.printer_technology() == ptSLA) {
const PresetWithVendorProfile printer_with_vendor_profile = printers.get_preset_with_vendor_profile(printer);
for (const Preset &material : sla_materials)
if (is_compatible_with_printer(sla_materials.get_preset_with_vendor_profile(material), printer_with_vendor_profile))
if (material.is_system && is_compatible_with_printer(sla_materials.get_preset_with_vendor_profile(material), printer_with_vendor_profile))
comp_sla_materials.insert(&material);
}
// and mark these SLA materials as installed, therefore this code will not be executed at the next start of the application.
@ -1069,7 +1073,11 @@ static void flatten_configbundle_hierarchy(boost::property_tree::ptree &tree, co
// Iterate in a reverse order, so the last change will be placed first in merged.
for (auto it_inherits = prst->inherits.rbegin(); it_inherits != prst->inherits.rend(); ++ it_inherits)
for (auto it = (*it_inherits)->node->begin(); it != (*it_inherits)->node->end(); ++ it)
if (prst->node->find(it->first) == prst->node->not_found())
if (it->first == "renamed_from") {
// Don't inherit "renamed_from" flag, it does not make sense. The "renamed_from" flag only makes sense for a concrete preset.
if (boost::starts_with((*it_inherits)->name, "*"))
BOOST_LOG_TRIVIAL(error) << boost::format("Nonpublic intermediate preset %1% contains a \"renamed_from\" field, which is ignored") % (*it_inherits)->name;
} else if (prst->node->find(it->first) == prst->node->not_found())
prst->node->add_child(it->first, it->second);
}

View file

@ -42,6 +42,8 @@ public:
PresetCollection sla_prints;
PresetCollection filaments;
PresetCollection sla_materials;
PresetCollection& materials(PrinterTechnology pt) { return pt == ptFFF ? this->filaments : this->sla_materials; }
const PresetCollection& materials(PrinterTechnology pt) const { return pt == ptFFF ? this->filaments : this->sla_materials; }
PrinterPresetCollection printers;
// Filament preset names for a multi-extruder or multi-material print.
// extruders.size() should be the same as printers.get_edited_preset().config.nozzle_diameter.size()
@ -144,6 +146,8 @@ private:
std::string load_system_presets();
// Merge one vendor's presets with the other vendor's presets, report duplicates.
std::vector<std::string> merge_presets(PresetBundle &&other);
// Update renamed_from and alias maps of system profiles.
void update_system_maps();
// Set the is_visible flag for filaments and sla materials,
// apply defaults based on enabled printers when no filaments/materials are installed.

View file

@ -56,7 +56,7 @@ std::vector<DriveData> RemovableDriveManager::search_for_removable_drives() cons
volume_name.erase(volume_name.begin() + wcslen(volume_name.c_str()), volume_name.end());
if (! file_system_name.empty()) {
ULARGE_INTEGER free_space;
::GetDiskFreeSpaceExA(path.c_str(), &free_space, nullptr, nullptr);
::GetDiskFreeSpaceExW(wpath.c_str(), &free_space, nullptr, nullptr);
if (free_space.QuadPart > 0) {
path += "\\";
current_drives.emplace_back(DriveData{ boost::nowide::narrow(volume_name), path });
@ -86,7 +86,7 @@ void RemovableDriveManager::eject_drive()
// get handle to device
std::string mpath = "\\\\.\\" + m_last_save_path;
mpath = mpath.substr(0, mpath.size() - 1);
HANDLE handle = CreateFileA(mpath.c_str(), GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, nullptr, OPEN_EXISTING, 0, nullptr);
HANDLE handle = CreateFileW(boost::nowide::widen(mpath).c_str(), GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, nullptr, OPEN_EXISTING, 0, nullptr);
if (handle == INVALID_HANDLE_VALUE) {
std::cerr << "Ejecting " << mpath << " failed " << GetLastError() << " \n";
assert(m_callback_evt_handler);
@ -128,7 +128,7 @@ std::string RemovableDriveManager::get_removable_drive_path(const std::string &p
return std::string();
std::size_t found = path.find_last_of("\\");
std::string new_path = path.substr(0, found);
int letter = PathGetDriveNumberA(new_path.c_str());
int letter = PathGetDriveNumberW(boost::nowide::widen(new_path).c_str());
for (const DriveData &drive_data : m_current_drives) {
char drive = drive_data.path[0];
if (drive == 'A' + letter)
@ -142,7 +142,7 @@ std::string RemovableDriveManager::get_removable_drive_from_path(const std::stri
tbb::mutex::scoped_lock lock(m_drives_mutex);
std::size_t found = path.find_last_of("\\");
std::string new_path = path.substr(0, found);
int letter = PathGetDriveNumberA(new_path.c_str());
int letter = PathGetDriveNumberW(boost::nowide::widen(new_path).c_str());
for (const DriveData &drive_data : m_current_drives) {
assert(! drive_data.path.empty());
if (drive_data.path.front() == 'A' + letter)
@ -151,92 +151,15 @@ std::string RemovableDriveManager::get_removable_drive_from_path(const std::stri
return std::string();
}
#if 0
// currently not used, left for possible future use
INT_PTR WINAPI WinProcCallback(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
// Called by Win32 Volume arrived / detached callback.
void RemovableDriveManager::volumes_changed()
{
// here we need to catch messeges about device removal
// problem is that when ejecting usb (how is it implemented above) there is no messege dispached. Only after physical removal of the device.
//uncomment register_window() in init() to register and comment update() in GUI_App.cpp (only for windows!) to stop recieving periodical updates
LRESULT lRet = 1;
static HDEVNOTIFY hDeviceNotify;
static constexpr GUID WceusbshGUID = { 0x25dbce51, 0x6c8f, 0x4a72, 0x8a,0x6d,0xb5,0x4c,0x2b,0x4f,0xc8,0x35 };
switch (message)
{
case WM_CREATE:
DEV_BROADCAST_DEVICEINTERFACE NotificationFilter;
ZeroMemory(&NotificationFilter, sizeof(NotificationFilter));
NotificationFilter.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE);
NotificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
NotificationFilter.dbcc_classguid = WceusbshGUID;
hDeviceNotify = RegisterDeviceNotification(hWnd, &NotificationFilter, DEVICE_NOTIFY_WINDOW_HANDLE);
break;
case WM_DEVICECHANGE:
{
// here is the important
if(wParam == DBT_DEVICEREMOVECOMPLETE)
{
RemovableDriveManager::get_instance().update(0, true);
if (m_initialized) {
// Signal the worker thread to wake up and enumerate removable drives.
m_wakeup = true;
m_thread_stop_condition.notify_all();
}
}
break;
default:
// Send all other messages on to the default windows handler.
lRet = DefWindowProc(hWnd, message, wParam, lParam);
break;
}
return lRet;
}
void RemovableDriveManager::register_window()
{
//creates new unvisible window that is recieving callbacks from system
// structure to register
// currently not used, left for possible future use
WNDCLASSEX wndClass;
wndClass.cbSize = sizeof(WNDCLASSEX);
wndClass.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
wndClass.hInstance = reinterpret_cast<HINSTANCE>(GetModuleHandle(0));
wndClass.lpfnWndProc = reinterpret_cast<WNDPROC>(WinProcCallback);//this is callback
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = 0;
wndClass.hIcon = LoadIcon(0, IDI_APPLICATION);
wndClass.hbrBackground = CreateSolidBrush(RGB(192, 192, 192));
wndClass.hCursor = LoadCursor(0, IDC_ARROW);
wndClass.lpszClassName = L"PrusaSlicer_aux_class";
wndClass.lpszMenuName = NULL;
wndClass.hIconSm = wndClass.hIcon;
if(!RegisterClassEx(&wndClass))
{
DWORD err = GetLastError();
return;
}
HWND hWnd = CreateWindowEx(
WS_EX_NOACTIVATE,
L"PrusaSlicer_aux_class",
L"PrusaSlicer_aux_wnd",
WS_DISABLED, // style
CW_USEDEFAULT, 0,
640, 480,
NULL, NULL,
GetModuleHandle(NULL),
NULL);
if(hWnd == NULL)
{
DWORD err = GetLastError();
}
//ShowWindow(hWnd, SW_SHOWNORMAL);
UpdateWindow(hWnd);
}
#endif
#else
@ -424,9 +347,7 @@ void RemovableDriveManager::init(wxEvtHandler *callback_evt_handler)
m_initialized = true;
m_callback_evt_handler = callback_evt_handler;
#if _WIN32
//this->register_window_msw();
#elif __APPLE__
#if __APPLE__
this->register_window_osx();
#endif
@ -440,6 +361,10 @@ void RemovableDriveManager::init(wxEvtHandler *callback_evt_handler)
void RemovableDriveManager::shutdown()
{
#if __APPLE__
this->unregister_window_osx();
#endif
#ifndef REMOVABLE_DRIVE_MANAGER_OS_CALLBACKS
if (m_thread.joinable()) {
// Stop the worker thread, if running.
@ -455,12 +380,6 @@ void RemovableDriveManager::shutdown()
}
#endif // REMOVABLE_DRIVE_MANAGER_OS_CALLBACKS
#if _WIN32
//this->unregister_window_msw();
#elif __APPLE__
this->unregister_window_osx();
#endif
m_initialized = false;
m_callback_evt_handler = nullptr;
}
@ -493,6 +412,10 @@ RemovableDriveManager::RemovableDrivesStatus RemovableDriveManager::status()
void RemovableDriveManager::update()
{
tbb::mutex::scoped_lock inside_update_lock;
#ifdef _WIN32
// All wake up calls up to now are now consumed when the drive enumeration starts.
m_wakeup = false;
#endif // _WIN32
if (inside_update_lock.try_acquire(m_inside_update_mutex)) {
// Got the lock without waiting. That means, the update was not running.
// Run the update.
@ -516,12 +439,28 @@ void RemovableDriveManager::update()
#ifndef REMOVABLE_DRIVE_MANAGER_OS_CALLBACKS
void RemovableDriveManager::thread_proc()
{
// Signal the worker thread to update initially.
#ifdef _WIN32
m_wakeup = true;
#endif // _WIN32
for (;;) {
// Wait for 2 seconds before running the disk enumeration.
// Cancellable.
{
std::unique_lock<std::mutex> lck(m_thread_stop_mutex);
#ifdef _WIN32
// Windows do not send an update on insert / eject of an SD card into an external SD card reader.
// Windows also do not send an update on software eject of a FLASH drive.
// We can likely use the Windows WMI API, but it will be quite time consuming to implement.
// https://www.codeproject.com/Articles/10539/Making-WMI-Queries-In-C
// https://docs.microsoft.com/en-us/windows/win32/wmisdk/wmi-start-page
// https://docs.microsoft.com/en-us/windows/win32/wmisdk/com-api-for-wmi
// https://docs.microsoft.com/en-us/windows/win32/wmisdk/example--receiving-event-notifications-through-wmi-
m_thread_stop_condition.wait_for(lck, std::chrono::seconds(2), [this]{ return m_stop || m_wakeup; });
#else
m_thread_stop_condition.wait_for(lck, std::chrono::seconds(2), [this]{ return m_stop; });
#endif
}
if (m_stop)
// Stop the worker thread.

View file

@ -84,6 +84,11 @@ public:
// It would be better to make this method private and friend to RemovableDriveManagerMM, but RemovableDriveManagerMM is an ObjectiveC class.
void update();
#ifdef _WIN32
// Called by Win32 Volume arrived / detached callback.
void volumes_changed();
#endif // _WIN32
private:
bool m_initialized { false };
wxEvtHandler* m_callback_evt_handler { nullptr };
@ -95,6 +100,9 @@ private:
std::condition_variable m_thread_stop_condition;
mutable std::mutex m_thread_stop_mutex;
bool m_stop { false };
#ifdef _WIN32
std::atomic<bool> m_wakeup { false };
#endif /* _WIN32 */
#endif // REMOVABLE_DRIVE_MANAGER_OS_CALLBACKS
// Called from update() to enumerate removable drives.
@ -114,10 +122,7 @@ private:
// Set with set_and_verify_last_save_path() to a removable drive path to be ejected.
std::string m_last_save_path;
#if _WIN32
//registers for notifications by creating invisible window
//void register_window_msw();
#elif __APPLE__
#if __APPLE__
void register_window_osx();
void unregister_window_osx();
void list_devices(std::vector<DriveData> &out) const;

View file

@ -129,8 +129,10 @@ void RemovableDriveManager::register_window_osx()
void RemovableDriveManager::unregister_window_osx()
{
if (m_impl_osx)
if (m_impl_osx) {
[m_impl_osx release];
m_impl_osx = nullptr;
}
}
namespace search_for_drives_internal

View file

@ -1231,6 +1231,7 @@ void TabPrint::build()
optgroup->append_single_option_line("skirts");
optgroup->append_single_option_line("skirt_distance");
optgroup->append_single_option_line("skirt_height");
optgroup->append_single_option_line("draft_shield");
optgroup->append_single_option_line("min_skirt_length");
optgroup = page->new_optgroup(_(L("Brim")));
@ -1417,6 +1418,9 @@ void TabPrint::update()
if (m_update_cnt==0) {
m_config_manipulation.toggle_print_fff_options(m_config);
// update() could be called during undo/redo execution
// Update of objectList can cause a crash in this case (because m_objects doesn't match ObjectList)
if (!wxGetApp().plater()->inside_snapshot_capture())
wxGetApp().obj_list()->update_and_show_object_settings_item();
wxGetApp().mainframe->on_config_changed(m_config);
@ -3819,6 +3823,9 @@ void TabSLAPrint::update()
if (m_update_cnt == 0) {
m_config_manipulation.toggle_print_sla_options(m_config);
// update() could be called during undo/redo execution
// Update of objectList can cause a crash in this case (because m_objects doesn't match ObjectList)
if (!wxGetApp().plater()->inside_snapshot_capture())
wxGetApp().obj_list()->update_and_show_object_settings_item();
wxGetApp().mainframe->on_config_changed(m_config);

View file

@ -3,7 +3,7 @@
set(SLIC3R_APP_NAME "PrusaSlicer")
set(SLIC3R_APP_KEY "PrusaSlicer")
set(SLIC3R_VERSION "2.2.0-rc3")
set(SLIC3R_VERSION "2.2.0-rc4")
set(SLIC3R_BUILD_ID "PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN")
set(SLIC3R_RC_VERSION "2,2,0,0")
set(SLIC3R_RC_VERSION_DOTS "2.2.0.0")