diff --git a/.claude/skills/orca-wxwidgets/references/platforms.md b/.claude/skills/orca-wxwidgets/references/platforms.md index 0ec78aaa43..673f58357f 100644 --- a/.claude/skills/orca-wxwidgets/references/platforms.md +++ b/.claude/skills/orca-wxwidgets/references/platforms.md @@ -574,7 +574,8 @@ DMABUF workaround and then branches on `GDK_BACKEND` (an `x11` prefix means the paths, when `/proc/driver/nvidia/version` exists and the linked WebKitGTK honours the switch (>= 2.44, `WebView::SupportsForceSharedMemory()`), it sets `WEBKIT_DMABUF_RENDERER_FORCE_SHM=1` and `WEBKIT_FORCE_DMABUF_RENDERER=1` (non-replacing): the proprietary driver cannot back WebKit's hardware -DMABUF renderer. On the default path it forces `GDK_BACKEND=x11` when wx lacks EGL and `WAYLAND_DISPLAY` +DMABUF renderer. On a hypervisor guest (`/proc/cpuinfo` `hypervisor` flag) and WebKitGTK >= 2.44 it sets +`WEBKIT_DMABUF_RENDERER_FORCE_SHM=1` alone, since virtual GPUs cannot back the hardware path either. On the default path it forces `GDK_BACKEND=x11` when wx lacks EGL and `WAYLAND_DISPLAY` is set, and sets `WEBKIT_DISABLE_COMPOSITING_MODE=1` (non-replacing) inside that branch when the linked WebKitGTK is older than 2.42: a forced X11 backend in a Wayland session is the only default-path case that runs through XWayland, which `DISPLAY` and `WAYLAND_DISPLAY` alone do not tell you (a native diff --git a/.claude/skills/orca-wxwidgets/references/webview-gl-aui-media.md b/.claude/skills/orca-wxwidgets/references/webview-gl-aui-media.md index e7ff4fadde..e707c99ebd 100644 --- a/.claude/skills/orca-wxwidgets/references/webview-gl-aui-media.md +++ b/.claude/skills/orca-wxwidgets/references/webview-gl-aui-media.md @@ -568,13 +568,18 @@ vue-resize workaround script and sets a persistent SQLite cookie store on the vi ## WebKitGTK on Linux sessions **Mechanism.** `CLI::run` (`src/OrcaSlicer.cpp`, under `#ifdef __WXGTK__`, before GTK initialises) -sets the NVIDIA DMABUF workaround and then branches on `GDK_BACKEND`: +sets the DMABUF workarounds and then branches on `GDK_BACKEND`: - **Both paths**, before the split: when `/proc/driver/nvidia/version` exists and the linked WebKitGTK honours the switch (>= 2.44, `WebView::SupportsForceSharedMemory()`), it sets `WEBKIT_DMABUF_RENDERER_FORCE_SHM=1` and `WEBKIT_FORCE_DMABUF_RENDERER=1` non-replacing. The proprietary driver cannot back WebKit's hardware DMABUF renderer, so the shared-memory transport keeps accelerated compositing instead of dropping it; `WEBKIT_FORCE_DMABUF_RENDERER` clears the Debian/Ubuntu/openSUSE `isNVIDIA()` early return, which otherwise returns before the FORCE_SHM check. +- **Hypervisor guests**, same position: when `is_hypervisor_guest()` (the `hypervisor` flag in + `/proc/cpuinfo`) and WebKitGTK >= 2.44, it sets `WEBKIT_DMABUF_RENDERER_FORCE_SHM=1` non-replacing. + Virtual GPUs (VirtualBox VMSVGA, VMware, QEMU) cannot back the hardware DMABUF path either, and + FORCE_SHM alone was confirmed to fix web views in VirtualBox; the `WEBKIT_FORCE_DMABUF_RENDERER` pair + is not needed without the Debian `isNVIDIA()` patch. The flag is x86-only, so ARM guests are not covered. - **Default path** (`GDK_BACKEND` unset or not starting with `x11`): if wx lacks EGL (`!wxHAS_EGL`) and `WAYLAND_DISPLAY` is set, it forces `GDK_BACKEND=x11`, and in that same branch it sets `WEBKIT_DISABLE_COMPOSITING_MODE=1` non-replacing when the linked WebKitGTK predates 2.42 @@ -590,9 +595,9 @@ Runtime backend detection elsewhere uses Orca's `is_running_on_wayland()` / `is_ (see `references/platforms.md`), not these environment variables. **Pitfall.** -- **Rule:** On NVIDIA reach for `WEBKIT_DMABUF_RENDERER_FORCE_SHM` before - `WEBKIT_DISABLE_COMPOSITING_MODE`. **Why:** the proprietary driver cannot back WebKit's hardware - DMABUF renderer, leaving web views blank or slow; FORCE_SHM keeps accelerated compositing and only +- **Rule:** On NVIDIA and hypervisor guests reach for `WEBKIT_DMABUF_RENDERER_FORCE_SHM` before + `WEBKIT_DISABLE_COMPOSITING_MODE`. **Why:** the proprietary driver and virtual GPUs cannot back WebKit's + hardware DMABUF renderer, leaving web views blank or slow; FORCE_SHM keeps accelerated compositing and only skips the hardware path, while disabling compositing drops it. Threaded scrolling is a separate, release-dependent default (off in 2.44/2.45, on from 2.46). `WEBKIT_DISABLE_DMABUF_RENDERER` is not a substitute — it is read first, leaves the transport set empty (no compositing from 2.44 on, where the diff --git a/.github/workflows/check_profiles.yml b/.github/workflows/check_profiles.yml index 4167cc705b..0b29732fc8 100644 --- a/.github/workflows/check_profiles.yml +++ b/.github/workflows/check_profiles.yml @@ -232,6 +232,31 @@ jobs: mkdir -p ${{ runner.temp }}/profile-check-results echo "${{ github.event.pull_request.number }}" > ${{ runner.temp }}/profile-check-results/pr_number.txt + # Builds a readable diff of the custom G-code the PR changes, which GitHub shows as + # one long line per setting, for check_profiles_comment.yml to post. + - name: Diff custom G-code + if: ${{ always() && github.event_name == 'pull_request' }} + continue-on-error: true + env: + PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + run: | + git fetch --no-tags --depth=2 origin "$(git rev-parse HEAD)" + results=${{ runner.temp }}/profile-check-results + diff=${{ runner.temp }}/gcode_diff.md + # HEAD is the PR's merge commit, so HEAD^1 is the base it merges onto. + python3 ./scripts/orca_profile_tool.py gcode-diff --base HEAD^1 --head HEAD > "$diff" + if [ -s "$diff" ]; then + { + echo "" + cat "$diff" + echo "" + # The comment workflow finds this line as the only one starting with . + echo "For commit ${PR_HEAD_SHA} of this PR." + } > "$results/gcode_diff.md" + fi + # Tells the comment workflow that a missing gcode_diff.md means no G-code changed. + touch "$results/gcode_diff_done.txt" + - name: Prepare comment artifact if: ${{ always() && github.event_name == 'pull_request' && (steps.profile_tool.outcome == 'failure' || steps.legacy_compat.outcome == 'failure' || steps.validate_system.outcome == 'failure' || steps.validate_slice.outcome == 'failure' || steps.validate_filament_subtypes.outcome == 'failure' || steps.validate_custom.outcome == 'failure') }} run: | diff --git a/.github/workflows/check_profiles_comment.yml b/.github/workflows/check_profiles_comment.yml index 21098cc467..bd42b8622d 100644 --- a/.github/workflows/check_profiles_comment.yml +++ b/.github/workflows/check_profiles_comment.yml @@ -38,6 +38,7 @@ jobs: env: GH_TOKEN: ${{ github.token }} GH_REPO: ${{ github.repository }} + HEAD_SHA: ${{ github.event.workflow_run.head_sha }} run: | if [ ! -f pr_number.txt ]; then echo "No pr_number.txt in artifact, skipping." @@ -49,18 +50,72 @@ jobs: echo "Invalid PR number: $PR_NUMBER" exit 1 fi + # PR code wrote the artifact, so only a run for the named PR's current head may post. + if [ -z "$HEAD_SHA" ]; then + echo "The triggering run names no head commit." + exit 1 + fi + if ! PR_HEAD=$(gh api "repos/${GH_REPO}/pulls/${PR_NUMBER}" --jq .head.sha); then + echo "Cannot look up PR #${PR_NUMBER}." + exit 1 + fi + if [ "$HEAD_SHA" != "$PR_HEAD" ]; then + echo "${HEAD_SHA} is not the head of PR #${PR_NUMBER}; skipping." + exit 0 + fi + + # Lists every bot comment on the PR, one JSON object per line. + COMMENTS=$(gh api --paginate "repos/${GH_REPO}/issues/${PR_NUMBER}/comments" \ + --jq '.[] | select(.user.login == "github-actions[bot]") | {id, body} | @json') # Delete prior comments matching the marker (from check_profiles.yml) or the legacy heading. - OLD_IDS=$(gh api --paginate "repos/${GH_REPO}/issues/${PR_NUMBER}/comments" \ - --jq '.[] | select(.user.login == "github-actions[bot]") | select((.body | startswith("")) or (.body | startswith("## :x: Profile Validation Errors"))) | .id') + OLD_IDS=$(printf '%s\n' "$COMMENTS" | jq -r 'select((.body | startswith("")) or (.body | startswith("## :x: Profile Validation Errors"))) | .id') for comment_id in $OLD_IDS; do echo "Deleting outdated profile-validation comment ${comment_id}" gh api -X DELETE "repos/${GH_REPO}/issues/comments/${comment_id}" || true done # Post a new comment only when validation failed (pr_comment.md present). + # A failed post fails the job only after the G-code diff is handled. + failed=0 if [ -f pr_comment.md ]; then - gh pr comment "$PR_NUMBER" --body-file pr_comment.md + gh pr comment "$PR_NUMBER" --body-file pr_comment.md || failed=1 else echo "Validation succeeded; cleaned up prior comments without posting." fi + + # Makes the G-code diff comment match gcode_diff.md, or deletes it if there is none. + update_gcode_diff_comment() { + if [ ! -f gcode_diff_done.txt ]; then + echo "The G-code diff step did not finish; leaving any G-code diff comment as it is." + return 0 + fi + GCODE_IDS=$(printf '%s\n' "$COMMENTS" | jq -r 'select(.body | startswith("")) | .id') + if [ -f gcode_diff.md ] && [ "$(wc -c < gcode_diff.md)" -gt 65536 ]; then + echo "gcode_diff.md is over GitHub's comment limit; not posting it." + rm gcode_diff.md + fi + if [ -f gcode_diff.md ] && [ "$(echo "$GCODE_IDS" | wc -w)" -eq 1 ]; then + OLD_BODY=$(printf '%s\n' "$COMMENTS" | jq -r --argjson id "$GCODE_IDS" 'select(.id == $id) | .body' | tr -d '\r') + NEW_BODY=$(tr -d '\r' < gcode_diff.md) + if [ "$OLD_BODY" = "$NEW_BODY" ]; then + echo "G-code diff unchanged; keeping comment ${GCODE_IDS}." + return 0 + fi + # Edits in place when only the line differs, since edits notify nobody. + if [ "$(grep -v '^' <<< "$OLD_BODY")" = "$(grep -v '^' <<< "$NEW_BODY")" ]; then + echo "G-code diff unchanged at a new commit; updating comment ${GCODE_IDS}." + gh api -X PATCH "repos/${GH_REPO}/issues/comments/${GCODE_IDS}" -F body=@gcode_diff.md > /dev/null + return 0 + fi + fi + for comment_id in $GCODE_IDS; do + echo "Deleting outdated G-code diff comment ${comment_id}" + gh api -X DELETE "repos/${GH_REPO}/issues/comments/${comment_id}" || true + done + if [ -f gcode_diff.md ]; then + gh pr comment "$PR_NUMBER" --body-file gcode_diff.md + fi + } + update_gcode_diff_comment + exit "$failed" diff --git a/CMakeLists.txt b/CMakeLists.txt index a302bb15e2..06ea0dbd6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -288,6 +288,19 @@ if (APPLE) # Type"); Ninja/-Wall does not, and under -Werror it fails Xcode builds on code CI accepts. set(CMAKE_XCODE_ATTRIBUTE_GCC_WARN_64_TO_32_BIT_CONVERSION "NO") + # The Xcode generator ignores CMAKE__COMPILER_LAUNCHER, so hand the launcher to + # Xcode's own Compiler Launcher setting, which wraps every clang compile (C, C++, + # Objective-C++ and the precompiled header) with one program: the C++ launcher wins when + # both are set. The setting takes a single program path, not a CMake launcher list. + # Xcode versions without it ignore it and build uncached. + if (CMAKE_GENERATOR STREQUAL "Xcode") + if (CMAKE_CXX_COMPILER_LAUNCHER) + set(CMAKE_XCODE_ATTRIBUTE_C_COMPILER_LAUNCHER "${CMAKE_CXX_COMPILER_LAUNCHER}") + elseif (CMAKE_C_COMPILER_LAUNCHER) + set(CMAKE_XCODE_ATTRIBUTE_C_COMPILER_LAUNCHER "${CMAKE_C_COMPILER_LAUNCHER}") + endif () + endif () + message(STATUS "Orca: IS_CROSS_COMPILE: ${IS_CROSS_COMPILE}") elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") set(CMAKE_INSTALL_RPATH "$ORIGIN") diff --git a/build_release_macos.sh b/build_release_macos.sh index 728cb8e757..cdc5dbbe3c 100755 --- a/build_release_macos.sh +++ b/build_release_macos.sh @@ -111,6 +111,54 @@ else export CMAKE_POLICY_COMPAT="" fi +# Compiler cache, as in build_linux.sh. The program comes from CMAKE_CCACHE, else from a +# launcher already set in the environment (the CI build sets ccache there), else sccache or +# ccache from PATH; one program serves both languages. Each run applies its own choice to the +# build directories, replacing a launcher an earlier run or a hand-run configure recorded. +CMAKE_CCACHE_ARGS=() +CCACHE_VAR="" +for var in CMAKE_CCACHE CMAKE_CXX_COMPILER_LAUNCHER CMAKE_C_COMPILER_LAUNCHER; do + if [ -n "${!var:-}" ]; then + CCACHE_VAR=$var + break + fi +done +if [ -n "$CCACHE_VAR" ]; then + CCACHE_PROGRAM=${!CCACHE_VAR} + echo "Checking ${CCACHE_VAR} environment variable for compiler cache program..." + CMAKE_CCACHE=$(command -v "${CCACHE_PROGRAM}") || { + echo "${CCACHE_VAR} environment variable is set to '${CCACHE_PROGRAM}' but it was not found in PATH." + CMAKE_CCACHE="" + } +elif command -v sccache >/dev/null 2>&1 ; then + CMAKE_CCACHE=$(command -v sccache) +elif command -v ccache >/dev/null 2>&1 ; then + CMAKE_CCACHE=$(command -v ccache) +fi +if [ -n "${CMAKE_CCACHE}" ] ; then + echo "${CMAKE_CCACHE} found, enabling compiler caching..." + CMAKE_CCACHE_ARGS=(-DCMAKE_C_COMPILER_LAUNCHER="${CMAKE_CCACHE}" -DCMAKE_CXX_COMPILER_LAUNCHER="${CMAKE_CCACHE}") + # The same ccache settings as the CI build. Without this sloppiness ccache refuses every + # compile that uses the precompiled header, which is most of OrcaSlicer, and skips headers + # a checkout has just written. It is added to the sloppiness already configured, and + # CCACHE_SLOPPINESS or CCACHE_(NO)DEPEND set in the environment win. + if [[ "$(basename "${CMAKE_CCACHE}")" == ccache ]] ; then + if [[ -z "${CCACHE_SLOPPINESS+x}" ]] ; then + CCACHE_SLOPPINESS=$("${CMAKE_CCACHE}" --get-config sloppiness 2>/dev/null || true) + export CCACHE_SLOPPINESS="${CCACHE_SLOPPINESS:+${CCACHE_SLOPPINESS},}pch_defines,time_macros,include_file_mtime,include_file_ctime" + fi + # Hash the includes the compiler reports instead of preprocessing every miss. + if [[ -z "${CCACHE_DEPEND+x}${CCACHE_NODEPEND+x}" ]] ; then + export CCACHE_DEPEND=1 + fi + fi +else + echo "Note: ccache or sccache are not found. Install either of them for faster rebuilds." + # Clear a launcher recorded by an earlier configure. The entries must be set empty rather + # than removed: CMake fills a missing launcher entry from the environment. + CMAKE_CCACHE_ARGS=(-DCMAKE_C_COMPILER_LAUNCHER:STRING= -DCMAKE_CXX_COMPILER_LAUNCHER:STRING=) +fi + echo "Build params:" echo " - ARCH: $ARCH" echo " - BUILD_CONFIG: $BUILD_CONFIG" @@ -162,6 +210,7 @@ function build_deps() { -DCMAKE_OSX_ARCHITECTURES:STRING="${_ARCH}" \ -DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}" \ -DCMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH}" \ + "${CMAKE_CCACHE_ARGS[@]}" \ ${CMAKE_POLICY_COMPAT} fi cmake --build . --config "$BUILD_CONFIG" --target deps @@ -264,6 +313,7 @@ function build_slicer() { -DCMAKE_OSX_ARCHITECTURES="${_ARCH}" \ -DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}" \ -DCMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH}" \ + "${CMAKE_CCACHE_ARGS[@]}" \ ${CMAKE_POLICY_COMPAT} fi cmake --build . --config "$BUILD_CONFIG" --target "$SLICER_BUILD_TARGET" diff --git a/deps/JPEG/JPEG.cmake b/deps/JPEG/JPEG.cmake index 82b0ca5565..b3e5b06acb 100644 --- a/deps/JPEG/JPEG.cmake +++ b/deps/JPEG/JPEG.cmake @@ -1,22 +1,7 @@ -if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - if (JPEG_VERSION STREQUAL "6") - message("Using Jpeg Lib 62") - set(jpeg_flag "") - elseif (JPEG_VERSION STREQUAL "7") - message("Using Jpeg Lib 70") - set(jpeg_flag "-DWITH_JPEG7=ON") - else () - message("Using Jpeg Lib 80") - set(jpeg_flag "-DWITH_JPEG8=ON") - endif () -endif() - orcaslicer_add_cmake_project(JPEG - URL https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/3.0.1.zip - URL_HASH SHA256=d6d99e693366bc03897677650e8b2dfa76b5d6c54e2c9e70c03f0af821b0a52f - DEPENDS ${ZLIB_PKG} + URL https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/3.2.0.zip + URL_HASH SHA256=1b4c2cb6cba1ca5e53b9e85eeeab02154cab4b70894c96e97a9c747a26d19d63 CMAKE_ARGS -DENABLE_SHARED=OFF -DENABLE_STATIC=ON - ${jpeg_flag} ) diff --git a/deps/OpenSSL/OpenSSL.cmake b/deps/OpenSSL/OpenSSL.cmake index 35b17ed50e..971e2f1ad8 100644 --- a/deps/OpenSSL/OpenSSL.cmake +++ b/deps/OpenSSL/OpenSSL.cmake @@ -16,6 +16,8 @@ else() endif() endif() +set(_openssl_dir ${DESTDIR}) + if(WIN32) set(_openssl_msvc_env CC=cl CXX=cl RC=rc CL=/FS) # OpenSSL's perl Configure honors the CC environment variable, but the @@ -43,6 +45,14 @@ if(WIN32) else() if(APPLE) set(_conf_cmd export MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} && ./Configure -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}) + # OPENSSLDIR is only where OpenSSL looks at runtime for cert.pem, certs/ + # and openssl.cnf; install_sw installs nothing there. Point it at the + # system CA bundle, the one libcurl already uses here, so the bundled + # Python's ssl module can verify HTTPS. Elsewhere it stays the prefix: + # Windows Python reads the system certificate store, and on Linux, where + # the bundle's location differs by distro, CurlGlobalInit points + # SSL_CERT_FILE at it at startup. + set(_openssl_dir /etc/ssl) else() # A static library that is embedded into a shared object must not export # its symbols. On Linux the running process also loads the system OpenSSL @@ -81,7 +91,7 @@ ExternalProject_Add(dep_OpenSSL # URL_HASH SHA256=8c776993154652d0bb393f506d850b811517c8bd8d24b1008aef57fbe55d3f31 DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/OpenSSL CONFIGURE_COMMAND ${_conf_cmd} ${_cross_arch} - "--openssldir=${DESTDIR}" + "--openssldir=${_openssl_dir}" "--prefix=${DESTDIR}" # OpenSSL's linux-x86_64 target sets multilib=64, so it installs to # /lib64 while every other dep uses /lib. CPython's @@ -115,12 +125,12 @@ ExternalProject_Add_Step(dep_OpenSSL install_cmake_files WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}" ) -if (NOT WIN32 AND NOT APPLE) - # OpenSSL's object rules do not depend on CFLAGS, so reconfiguring it (for - # example to add -fvisibility=hidden) relinks the archives from stale - # objects instead of recompiling them, and the change silently has no - # effect. Drop the objects whenever this recipe changes so the next build - # actually recompiles them. +if (NOT WIN32) + # OpenSSL's object rules do not depend on the configured flags or paths, so + # reconfiguring it (a new compiler flag, a different --openssldir) relinks + # the archives from stale objects instead of recompiling them, and the + # change silently has no effect. Drop the objects whenever this recipe + # changes so the next build actually recompiles them. ExternalProject_Get_Property(dep_OpenSSL SOURCE_DIR) ExternalProject_Add_Step(dep_OpenSSL clean_objects DEPENDEES configure diff --git a/deps/python3/python3.cmake b/deps/python3/python3.cmake index f520c536d5..4f60bb1b14 100644 --- a/deps/python3/python3.cmake +++ b/deps/python3/python3.cmake @@ -365,10 +365,11 @@ if(TARGET dep_ZLIB) add_dependencies(dep_python3 dep_ZLIB) endif() -if (NOT WIN32 AND NOT APPLE) - # CPython's Makefile rules for _ssl and _hashlib depend only on their own - # sources, not on the OpenSSL archives, so a rebuilt OpenSSL does not make - # them relink and they keep the previous symbols. On an incremental tree, +if (NOT WIN32) + # _ssl and _hashlib embed the static OpenSSL built in deps/ (Windows uses + # CPython's prebuilt OpenSSL instead). Their Makefile rules depend only on + # their own sources, not on the OpenSSL archives, so a rebuilt OpenSSL does + # not make them relink and they keep the previous one. On an incremental tree, # drop the built modules and relink them against the current OpenSSL; a # fresh build is left alone (its PGO target builds them). "make" alone is a # no-op once PGO has run, so sharedmods is invoked explicitly. diff --git a/docs/HLSD/keyboard-shortcuts.md b/docs/HLSD/keyboard-shortcuts.md index 7cfc72c30f..cf48a13c8d 100644 --- a/docs/HLSD/keyboard-shortcuts.md +++ b/docs/HLSD/keyboard-shortcuts.md @@ -53,6 +53,13 @@ Space counts as typing. The speed dial's default is the one bare Space, and `MainFrame` leaves it to a focused control that uses Space itself (text fields, buttons, combo boxes), so it opens the dial from the canvases and the tab strip only. +`MainFrame::handle_global_shortcut` skips a chord that `KeyChord::edits_text()` reports +while a text field has the focus (a wx text entry, spin control, web view or ImGui +InputText), and skips every chord while an ImGui modal is open, as a wx modal dialog +would. `ImGuiWrapper::owns_key()` reads the active InputText and the popup stack +directly, since `WantCaptureKeyboard` lags a frame, and is called only when the focus is on +a visible canvas from `OpenGLManager::create_wxglcanvas()`. + ## Which event a chord matches Letters, digits and special keys match on `wxEVT_KEY_DOWN`. Its key codes do not depend diff --git a/localization/i18n/OrcaSlicer.pot b/localization/i18n/OrcaSlicer.pot index b221f073b7..9c8e78446e 100644 --- a/localization/i18n/OrcaSlicer.pot +++ b/localization/i18n/OrcaSlicer.pot @@ -1637,16 +1637,16 @@ msgstr "" msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "" -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "" msgid "No embossed file" msgstr "" -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "" -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "" msgid "Face the camera" @@ -4579,7 +4579,7 @@ msgstr "" msgid "Unknown C++ exception." msgstr "" -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "" msgid "Slicing complete" @@ -10666,6 +10666,9 @@ msgstr "" msgid "Send Failed" msgstr "" +msgid "No available printers" +msgstr "" + msgid "The name length exceeds the limit." msgstr "" @@ -15706,6 +15709,12 @@ msgstr "" msgid "Enable this option to add EXCLUDE OBJECT command in G-code." msgstr "" +msgid "Outline tolerance" +msgstr "" + +msgid "Maximum deviation of the object outline written to EXCLUDE_OBJECT_DEFINE from the original outline. Larger values give fewer points, which helps firmware that stalls while parsing G-code with many objects. 0 keeps every point." +msgstr "" + msgid "Verbose G-code" msgstr "" @@ -20610,7 +20619,7 @@ msgid "test %s start..." msgstr "" #, possible-c-format, possible-boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "" #, possible-c-format, possible-boost-format @@ -30668,7 +30677,7 @@ msgstr "" #. TRN %1% is the application name. #, possible-boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "" #. TRN %1% is a tag in the G-code file that must not be translated. @@ -30756,7 +30765,7 @@ msgstr "" msgid "Failed making a temporary copy of G-code file %1% before running a post-processing script: %2%" msgstr "" -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "" #, possible-boost-format diff --git a/localization/i18n/ca/OrcaSlicer_ca.po b/localization/i18n/ca/OrcaSlicer_ca.po index 879d094a63..47a29ce82f 100644 --- a/localization/i18n/ca/OrcaSlicer_ca.po +++ b/localization/i18n/ca/OrcaSlicer_ca.po @@ -1789,7 +1789,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Traç de forma ( %1% ) conté elements no compatibles: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Estat no vàlid; informeu dels passos per reproduir-lo a GitHub" # AI Translated @@ -1797,11 +1797,11 @@ msgid "No embossed file" msgstr "No hi ha cap fitxer en relleu" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "Falta el fitxer SVG a la forma en relleu" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Falten les dades del fitxer SVG" msgid "Face the camera" @@ -5053,7 +5053,7 @@ msgstr "Deseu el projecte i reinicieu el programa." msgid "Unknown C++ exception." msgstr "Excepció de C++ desconeguda." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Processant el G-code del fitxer anterior..." msgid "Slicing complete" @@ -23505,7 +23505,7 @@ msgstr "Inici de la prova de %s..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "Prova de %s: IP resolta = %s" # AI Translated @@ -36022,7 +36022,7 @@ msgstr "No s'ha pogut carregar el fitxer de configuració \"%1%\": %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "No és un fitxer G-code generat per %1%." # AI Translated @@ -36142,7 +36142,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "No s'ha pogut fer una còpia temporal del fitxer G-code %1% abans d'executar un script de postprocessament: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "El postprocessador no troba el fitxer G-code exportat" # AI Translated @@ -36987,9 +36987,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "cap eina configurada" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "G-code Final en acabar tota la impressió" - #~ msgid "Maximum X speed" #~ msgstr "Velocitat màxima a l'eix X" @@ -37006,27 +37003,11 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Connector(s) de Python invocats a cada pas del flux de laminat per llegir i modificar dades intermèdies de laminat, incloent-hi un pas final de postprocessament del G-code. Recerca/experimental." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Quan està activat, el laminador genera G-code amb el contingut de la zona principal centrat a l'origen del llit (0,0). El firmware de la impressora s'encarrega de col·locar les còpies/miralls a la posició física de cada zona. Activeu-ho només en impressores el firmware de les quals aplica els seus propis desplaçaments de zona en mode de còpia/mirall (p. ex. el mode de duplicació IDEX de RepRapFirmware). No té cap efecte en mode Principal (Primary)." - # AI Translated # Needs human review: 'pem-inversion' is developer shorthand (inverting the physical extruder map); check the wording reads right. #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Correspondència per placa que substitueix l'assignació dels capçals físics a les ranures de filament (començant per 1). Si és buida, s'utilitzen els valors per defecte de la inversió del pem." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Eix al voltant del qual es gira la malla abans de laminar. És la inclinació de la impressora de cinta: una rotació isomètrica (sense distorsió) que també determina la representació del llit i la inclinació de la gravetat dels suports, i que la transformació inversa del G-code desfà abans del cisallament/escala i la reassignació d'eixos del sistema de coordenades de la màquina. X és la inclinació típica del pòrtic (la cinta es desplaça al llarg de Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Ajust per a experts: estableix l'angle d'inclinació del sistema de coordenades de la màquina (cisallament/escala del G-code) independentment de l'angle de rotació previ al laminat. Quan està desactivat, la transformació del sistema de coordenades de la màquina es deriva de l'angle d'inclinació de la cinta, de manera que un sol angle controla les dues etapes. Activeu-ho només per compensar una màquina la inclinació física del pòrtic de la qual difereix de la rotació de laminat." - -# AI Translated -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "La desviació màxima permesa en reduir la resolució per a l'ajustament 'Resolució màxima del perímetre'. Si l'augmenteu, la impressió serà menys precisa, però el G-Code serà més petit. La 'Desviació màxima del perímetre' limita la 'Resolució màxima del perímetre', de manera que, si totes dues entren en conflicte, preval la 'Desviació màxima del perímetre'." - #~ msgid " not in range " #~ msgstr " fora de rang " diff --git a/localization/i18n/cs/OrcaSlicer_cs.po b/localization/i18n/cs/OrcaSlicer_cs.po index c48b4716d6..682b3da229 100644 --- a/localization/i18n/cs/OrcaSlicer_cs.po +++ b/localization/i18n/cs/OrcaSlicer_cs.po @@ -1765,7 +1765,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Obrys tvaru (%1%) obsahuje nepodporované: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Neplatný stav, nahlaste prosím postup reprodukce na GitHubu" # AI Translated @@ -1773,11 +1773,11 @@ msgid "No embossed file" msgstr "Chybí soubor pro reliéf" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "V reliéfním tvaru chybí soubor SVG" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Chybí data souboru SVG" msgid "Face the camera" @@ -5022,7 +5022,7 @@ msgstr "Uložte prosím projekt a restartujte program." msgid "Unknown C++ exception." msgstr "Neznámá výjimka C++." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Zpracovávání G-code z předchozího souboru..." msgid "Slicing complete" @@ -23454,7 +23454,7 @@ msgstr "test %s spuštěn..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "test %s: IP adresa přeložena = %s" # AI Translated @@ -36103,7 +36103,7 @@ msgstr "Načtení konfiguračního souboru „%1%“ se nezdařilo: %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "Nejedná se o soubor G-code vygenerovaný aplikací %1%." # AI Translated @@ -36223,7 +36223,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "Před spuštěním post-processing skriptu se nepodařilo vytvořit dočasnou kopii G-code souboru %1%: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "Post-processor nemůže najít exportovaný G-code soubor" # AI Translated @@ -37074,9 +37074,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "žádném nakonfigurovaném nástroji" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "Koncový G-code po dokončení celého tisku." - #~ msgid "Maximum X speed" #~ msgstr "Maximální rychlost osy X" @@ -37093,25 +37090,10 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Python pluginy volané v každém kroku slicovacího řetězce, které čtou a upravují mezivýsledky slicování, včetně závěrečného kroku postprocessingu G-code. Výzkumné/experimentální." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Je-li povoleno, slicer generuje G-code s obsahem primární zóny vystředěným na počátek podložky (0,0). Za umístění kopií a zrcadlených kopií na fyzickou pozici každé zóny odpovídá firmware tiskárny. Povolte pouze u tiskáren, jejichž firmware v režimu Kopie/Zrcadlo (Copy/Mirror) používá vlastní posuny zón (např. režim duplikace IDEX v RepRapFirmware). V režimu Primární nemá žádný účinek." - # AI Translated #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Přepsání pro jednotlivé desky, které mapuje fyzické hlavy na sloty filamentů (číslováno od 1). Prázdná hodnota znamená použití výchozích hodnot z inverze pem." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Osa, kolem které se síť před slicováním otočí. Jde o naklonění pásové tiskárny: izometrická rotace (bez zkreslení), která řídí také vykreslování podložky a naklonění gravitace pro podpory a kterou zpětná transformace G-code invertuje před zkosením/změnou měřítka v souřadnicovém systému stroje a přemapováním os. Obvyklé je naklonění portálu kolem osy X (pás se pohybuje podél Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Expertní přepsání: nastaví úhel naklonění souřadnicového systému stroje (zkosení/měřítko G-code) nezávisle na úhlu rotace před slicováním. Je-li vypnuto, transformace souřadnicového systému stroje se odvozuje z úhlu naklonění pásu, takže jediný úhel řídí obě fáze. Povolte pouze pro kompenzaci stroje, jehož fyzické naklonění portálu se liší od rotace při slicování." - -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "Maximální povolená odchylka při snižování rozlišení pro nastavení „Maximální rozlišení stěny“. Pokud tuto hodnotu zvýšíte, tisk bude méně přesný, ale G-code bude menší. „Maximální odchylka stěny“ omezuje „Maximální rozlišení stěny“, takže pokud jsou tato nastavení v konfliktu, má přednost „Maximální odchylka stěny“." - #~ msgid " not in range " #~ msgstr " není v rozsahu " diff --git a/localization/i18n/de/OrcaSlicer_de.po b/localization/i18n/de/OrcaSlicer_de.po index eb14366783..9b375ba41d 100644 --- a/localization/i18n/de/OrcaSlicer_de.po +++ b/localization/i18n/de/OrcaSlicer_de.po @@ -1725,7 +1725,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Striche der Form (%1%) enthält nicht unterstützte: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Ungültiger Zustand – bitte melden Sie die Schritte zur Reproduktion auf GitHub" # AI Translated @@ -1733,11 +1733,11 @@ msgid "No embossed file" msgstr "Keine geprägte Datei" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "SVG-Datei in geprägter Form fehlt" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Daten der SVG-Datei fehlen" msgid "Face the camera" @@ -4927,7 +4927,7 @@ msgstr "Bitte speichern Sie das Projekt und starten Sie das Programm neu." msgid "Unknown C++ exception." msgstr "Unbekannte C++-Ausnahme." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Verarbeite G-Code der vorherigen Datei..." msgid "Slicing complete" @@ -23028,7 +23028,7 @@ msgstr "Test %s startet..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "Test %s IP aufgelöst = %s" # AI Translated @@ -35406,7 +35406,7 @@ msgstr "Laden der Konfigurationsdatei „%1%“ fehlgeschlagen: %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "Keine von %1% erzeugte G-Code-Datei." # AI Translated @@ -35526,7 +35526,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "Temporäre Kopie der G-Code-Datei %1% konnte vor dem Ausführen eines Nachbearbeitungsskripts nicht erstellt werden: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "Nachbearbeitung kann die exportierte G-Code-Datei nicht finden" # AI Translated @@ -36369,9 +36369,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "keinem konfigurierten Werkzeug" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "End G-Code nach dem fertigstellen des Drucks hinzufügen." - #~ msgid "Maximum X speed" #~ msgstr "Maximale Geschwindigkeit X" @@ -36388,25 +36385,10 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Python-Plugin(s), die bei jedem Schritt der Slicing-Pipeline aufgerufen werden, um Slicing-Zwischendaten zu lesen und zu ändern, einschließlich eines abschließenden G-code-Nachbearbeitungsschritts. Forschung/experimentell." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Wenn aktiviert, gibt der Slicer G-Code aus, bei dem der Inhalt der primären Zone auf den Ursprung des Druckbetts (0,0) zentriert ist. Die Drucker-Firmware ist dafür verantwortlich, Kopien/Spiegelungen an der jeweiligen physischen Zonenposition zu platzieren. Nur bei Druckern aktivieren, deren Firmware im Kopie-/Spiegelungsmodus eigene Zonenversätze anwendet (z. B. der IDEX-Duplizierungsmodus von RepRapFirmware). Hat im Modus Primär keine Wirkung." - # AI Translated #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Plattenspezifische Überschreibung, die physische Köpfe den Filament-Slots zuordnet (ab 1 gezählt). Leer bedeutet, die Standardwerte aus der pem-Umkehrung zu verwenden." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Achse, um die das Netz vor dem Slicen gedreht wird. Dies ist die Neigung des Förderbanddruckers: eine isometrische (verzerrungsfreie) Drehung, die auch die Darstellung des Druckbetts und die Schwerkraftneigung der Stützen bestimmt und die von der G-Code-Rücktransformation vor der Scherung/Skalierung und Achsenzuordnung im Maschinenkoordinatensystem umgekehrt wird. X ist die typische Portalneigung (das Förderband bewegt sich entlang Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Experten-Überschreibung: Legt den Neigungswinkel des Maschinenkoordinatensystems (G-Code-Scherung/-Skalierung) unabhängig vom Drehwinkel vor dem Slicen fest. Wenn deaktiviert, wird die Transformation ins Maschinenkoordinatensystem aus dem Neigungswinkel des Förderbands abgeleitet, sodass ein einziger Winkel beide Stufen steuert. Nur aktivieren, um eine Maschine auszugleichen, deren physische Portalneigung von der Slicing-Drehung abweicht." - -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "Die maximale Abweichung, die bei der Reduzierung der Auflösung für die Einstellung 'Maximale Wandauflösung' zulässig ist. Wenn Sie diesen Wert erhöhen, wird der Druck weniger genau, aber der G-Code wird kleiner. 'Maximale Wandabweichung' begrenzt 'Maximale Wandauflösung', so dass wenn die beiden in Konflikt stehen, 'Maximale Wandabweichung' Vorrang hat." - #~ msgid " not in range " #~ msgstr "nicht im Bereich" diff --git a/localization/i18n/en/OrcaSlicer_en.po b/localization/i18n/en/OrcaSlicer_en.po index ea45cda8c0..4b74f97b4c 100644 --- a/localization/i18n/en/OrcaSlicer_en.po +++ b/localization/i18n/en/OrcaSlicer_en.po @@ -1633,16 +1633,16 @@ msgstr "" msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "" -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "" msgid "No embossed file" msgstr "" -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "" -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "" msgid "Face the camera" @@ -4575,7 +4575,7 @@ msgstr "" msgid "Unknown C++ exception." msgstr "" -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "" msgid "Slicing complete" @@ -20536,7 +20536,7 @@ msgid "test %s start..." msgstr "" #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "" #, c-format, boost-format @@ -30594,7 +30594,7 @@ msgstr "" #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "" #. TRN %1% is a tag in the G-code file that must not be translated. @@ -30682,7 +30682,7 @@ msgstr "" msgid "Failed making a temporary copy of G-code file %1% before running a post-processing script: %2%" msgstr "" -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "" #, boost-format diff --git a/localization/i18n/es/OrcaSlicer_es.po b/localization/i18n/es/OrcaSlicer_es.po index ca65a6e16c..106bbd7d36 100644 --- a/localization/i18n/es/OrcaSlicer_es.po +++ b/localization/i18n/es/OrcaSlicer_es.po @@ -1673,7 +1673,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Trazo de forma (%1%) contiene no soportado: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Estado no válido; informe en GitHub de los pasos para reproducirlo" # AI Translated @@ -1681,11 +1681,11 @@ msgid "No embossed file" msgstr "No hay archivo en relieve" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "Falta el archivo SVG en la forma en relieve" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Faltan los datos del archivo SVG" msgid "Face the camera" @@ -4796,7 +4796,7 @@ msgstr "Guarde el proyecto y reinicie el programa." msgid "Unknown C++ exception." msgstr "Excepción de C++ desconocida." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Procesando el G-Code del archivo anterior…" msgid "Slicing complete" @@ -22631,7 +22631,7 @@ msgstr "prueba de %s iniciada..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "prueba de %s: IP resuelta = %s" # AI Translated @@ -34942,7 +34942,7 @@ msgstr "Error al cargar el archivo de configuración \"%1%\": %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "No es un archivo G-code generado por %1%." # AI Translated @@ -35061,7 +35061,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "No se pudo hacer una copia temporal del archivo G-code %1% antes de ejecutar un script de posprocesamiento: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "El posprocesador no encuentra el archivo G-code exportado" # AI Translated @@ -35897,9 +35897,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "ninguna herramienta configurada" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "G-Code ejecutado en el final de la impresión completa." - #~ msgid "Maximum X speed" #~ msgstr "Velocidad máxima en X" @@ -35915,27 +35912,11 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Plugin(s) de Python que se invocan en cada paso de la canalización de laminado para leer y modificar los datos intermedios de laminado, incluido un paso final de posprocesamiento de G-code. Investigación/experimental." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Si se activa, el laminador emite el G-Code con el contenido de la zona principal centrado en el origen de la cama (0,0). El firmware de la impresora se encarga de colocar las copias o los reflejos en la posición física de cada zona. Actívelo solo en impresoras cuyo firmware aplique sus propios desplazamientos de zona en el modo Copia/Espejo (Copy/Mirror) (p. ej., el modo de duplicación IDEX de RepRapFirmware). No tiene efecto en el modo Principal (Primary)." - # AI Translated # Needs human review: 'pem-inversion' kept verbatim; it looks like an internal term (physical extruder map inversion). Check whether users understand it or the English should be rephrased. #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Asignación por cama que sustituye la correspondencia entre los cabezales físicos y las ranuras de filamento (empezando en 1). Si está vacía, se usan los valores predeterminados de pem-inversion." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Eje alrededor del cual se gira la malla antes de laminar. Es la inclinación de la impresora de cinta: una rotación isométrica (sin distorsión) que también determina la representación de la cama y la inclinación de la gravedad de los soportes, y que la transformación inversa del G-Code deshace antes del cizallamiento/escalado y la reasignación al sistema de coordenadas de la máquina. X es la inclinación típica del pórtico (la cinta avanza a lo largo de Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Ajuste para expertos: establece el ángulo de inclinación del sistema de coordenadas de la máquina (cizallamiento/escalado del G-Code) de forma independiente del ángulo de rotación previo al laminado. Si se desactiva, la transformación del sistema de coordenadas de la máquina se deriva del ángulo de inclinación de la cinta, de modo que un único ángulo controla ambas etapas. Actívelo solo para compensar una máquina cuya inclinación física del pórtico difiera de la rotación de laminado." - -# AI Translated -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "La desviación máxima permitida al reducir la resolución para el parámetro «Resolución máxima de la pared». Si aumentas este valor, la impresión será menos precisa, pero el G-code será más pequeño. El parámetro «Desviación máxima de la pared» limita la «Resolución máxima de la pared», por lo que, si ambos entran en conflicto, prevalece el primero." - #~ msgid " not in range " #~ msgstr " fuera de rango " diff --git a/localization/i18n/eu/OrcaSlicer_eu.po b/localization/i18n/eu/OrcaSlicer_eu.po index 0482155c5a..940aa34a07 100644 --- a/localization/i18n/eu/OrcaSlicer_eu.po +++ b/localization/i18n/eu/OrcaSlicer_eu.po @@ -1710,7 +1710,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "(%1%) formaren trazuak onartzen ez direnak ditu: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Egoera baliogabea; jakinarazi erreproduzitzeko urratsak GitHub-en" # AI Translated @@ -1718,11 +1718,11 @@ msgid "No embossed file" msgstr "Ez dago erliebeko fitxategirik" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "SVG fitxategia falta da erliebeko forman" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "SVG fitxategiaren datuak falta dira" msgid "Face the camera" @@ -4849,7 +4849,7 @@ msgstr "Mesedez, gorde proiektua eta berrabiarazi programa." msgid "Unknown C++ exception." msgstr "C++ salbuespen ezezaguna." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "G-codea prozesatzen aurreko fitxategitik…" msgid "Slicing complete" @@ -22835,7 +22835,7 @@ msgstr "%s proba hasten..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "%s proba: IPa ebatzita = %s" # AI Translated @@ -35180,7 +35180,7 @@ msgstr "Huts egin du \"%1%\" konfigurazio-fitxategia kargatzeak: %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "Ez da %1% aplikazioak sortutako G-code fitxategia." # AI Translated @@ -35300,7 +35300,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "Ezin izan da %1% G-code fitxategiaren aldi baterako kopia egin post-prozesatze scripta exekutatu aurretik: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "Post-prozesadoreak ezin du esportatutako G-code fitxategia aurkitu" # AI Translated @@ -36137,9 +36137,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "konfiguratutako erremintarik ez" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "Gehitu amaierako G-codea inprimaketa osoa amaitzean." - #~ msgid "Maximum X speed" #~ msgstr "X gehieneko abiadura" @@ -36155,25 +36152,10 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Xerratze-prozesuko urrats bakoitzean deitzen diren Python pluginak, tarteko datuak irakurri eta aldatzeko; horien artean, G-codearen azken post-prozesatze fasea ere sartzen da. Ikerketa- edo esperimentazio-mailakoak." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Gaituta dagoenean, xerratzaileak eremu nagusiaren edukia ohearen jatorrian (0,0) zentratuta duen G-code sortzen du. Inprimagailuaren firmwareak kokatzen ditu kopiak/ispiluak eremu fisiko bakoitzaren posizioan. Gaitu soilik firmwareak kopia/ispilu moduan bere eremu-desplazamenduak aplikatzen dituen inprimagailuetan (adib. RepRapFirmware-ren IDEX bikoizte-modua). Ez du eraginik Nagusia (Primary) moduan." - # AI Translated #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Plaka bakoitzeko gainidazketa, buru fisikoak filamentu-zirrikituekin lotzen dituena (1etik hasita). Hutsik badago, pem-inbertsioaren balio lehenetsiak erabiltzen dira." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Xerratu aurretik sarea zein ardatzaren inguruan biratzen den. Zinta-inprimagailuaren inklinazioa da: biraketa isometriko bat (distortsiorik gabea), ohearen errendatzea eta euskarrien grabitate-inklinazioa ere gidatzen dituena, eta G-codearen alderantzizko transformazioak desegiten duena makinaren koordenatu-sistemaren zizailadura/eskala eta berresleipena aplikatu aurretik. X da atariaren ohiko inklinazioa (zinta Y ardatzean zehar mugitzen da)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Adituentzako gainidazketa: ezarri makinaren koordenatu-sistemaren inklinazio-angelua (G-codearen zizailadura/eskala) xerratu aurreko biraketa-angelutik independenteki. Desgaituta dagoenean, makinaren koordenatu-sistemaren transformazioa zintaren inklinazio-angelutik ateratzen da; beraz, angelu bakar batek gidatzen ditu bi etapak. Gaitu soilik atariaren inklinazio fisikoa xerratze-biraketatik desberdina duen makina bat konpentsatzeko." - -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "'Hormaren gehieneko bereizmena' ezarpenerako bereizmena murriztean baimendutako gehieneko desbideratzea. Handitzen baduzu, inprimaketa ez da hain zehatza izango, baina G-codea txikiagoa izango da. 'Hormaren gehieneko desbideratzeak'-ek 'Hormaren gehieneko bereizmena' mugatzen du; beraz, bien artean gatazkarik badago, 'Hormaren gehieneko desbideratzeak' izango du lehentasuna." - #~ msgid " not in range " #~ msgstr " ez dago tartean " diff --git a/localization/i18n/fr/OrcaSlicer_fr.po b/localization/i18n/fr/OrcaSlicer_fr.po index 87b8a18e88..e06e8aeb72 100644 --- a/localization/i18n/fr/OrcaSlicer_fr.po +++ b/localization/i18n/fr/OrcaSlicer_fr.po @@ -771,17 +771,20 @@ msgstr "Sélection" msgid "Plate" msgstr "Plaque" +# AI Translated msgid "Distribute" -msgstr "" +msgstr "Répartir" msgid "Coordinate system used for transform actions." msgstr "Système de coordonnées utilisé pour les actions de transformation." +# AI Translated msgid "Reference for alignment" -msgstr "" +msgstr "Référence d’alignement" +# AI Translated msgid "Select at least 3 parts or objects" -msgstr "" +msgstr "Sélectionnez au moins 3 pièces ou objets" # AI Translated msgid "Align left" @@ -834,8 +837,9 @@ msgstr "Répartir haut-bas" msgid "Drop" msgstr "Déposer" +# AI Translated msgid "Move the selection along Z so that its lowest point touches the bed." -msgstr "" +msgstr "Déplace la sélection le long de Z pour que son point le plus bas touche le plateau." msgid "Absolute" msgstr "Absolu" @@ -1723,7 +1727,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Le trait de la forme (%1%) contient un élément non pris en charge : %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "État non valide, veuillez signaler les étapes de reproduction sur GitHub" # AI Translated @@ -1731,11 +1735,11 @@ msgid "No embossed file" msgstr "Aucun fichier en relief" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "Fichier SVG manquant dans la forme en relief" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Données du fichier SVG manquantes" msgid "Face the camera" @@ -2051,22 +2055,26 @@ msgid "Face and face assembly" msgstr "Assemblage face à face" msgid "Entering Assembly gizmo" -msgstr "Entrée dans l’outil Assemblage" +msgstr "Entrée dans le gizmo Assemblage" msgid "Leaving Assembly gizmo" -msgstr "Quitter l’outil Assemblage" +msgstr "Sortie du gizmo Assemblage" +# AI Translated msgid "Parts of a cut object cannot be moved" -msgstr "" +msgstr "Les pièces d’un objet coupé ne peuvent pas être déplacées" +# AI Translated msgid "Aligning to the plate is available in X and Y only" -msgstr "" +msgstr "L’alignement sur la plaque n’est disponible qu’en X et Y" +# AI Translated msgid "Turn off Auto-Drop for the selected objects to move them in Z" -msgstr "" +msgstr "Désactivez la dépose automatique des objets sélectionnés pour les déplacer en Z" +# AI Translated msgid "All selected objects must be on the same plate" -msgstr "" +msgstr "Tous les objets sélectionnés doivent se trouver sur la même plaque" msgid "Shift+" msgstr "Maj+" @@ -4872,7 +4880,7 @@ msgstr "Veuillez enregistrer le projet et redémarrer le programme." msgid "Unknown C++ exception." msgstr "Exception C++ inconnue." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Traitement du G-Code du fichier précédent…" msgid "Slicing complete" @@ -6401,8 +6409,9 @@ msgstr "Axes" msgid "Gridlines" msgstr "Quadrillage" +# AI Translated msgid "Focus mode" -msgstr "" +msgstr "Mode focus" msgid "Labels" msgstr "Étiquettes" @@ -8234,7 +8243,7 @@ msgstr "Éjection en cours." msgid "%1$d Object has custom supports." msgid_plural "%1$d Objects have custom supports." msgstr[0] "%1$d objet a des supports personnalisés." -msgstr[1] " %1$d objets ont des supports personnalisés." +msgstr[1] "%1$d objets ont des supports personnalisés." #, c-format, boost-format msgid "%1$d Object has color painting." @@ -10706,11 +10715,13 @@ msgstr "Afficher les préréglages non pris en charge" msgid "Show incompatible/unsupported presets in the printer and filament dropdown lists. These presets cannot be selected." msgstr "Affiche les préréglages incompatibles ou non pris en charge dans les listes déroulantes d’imprimantes et de filaments. Ces préréglages ne peuvent pas être sélectionnés." +# AI Translated msgid "Export statistics with G-code" -msgstr "" +msgstr "Exporter les statistiques avec le G-code" +# AI Translated msgid "If enabled, exporting a G-code file also writes its statistics as JSON next to it, as .statistics.json, and an exported sliced 3MF file holds them inside: print time, filament and feature totals, and the same per layer and per object." -msgstr "" +msgstr "Si activé, l’export d’un fichier G-code écrit aussi ses statistiques au format JSON à côté, sous la forme .statistics.json, et un fichier 3MF découpé exporté les contient : durée d’impression, totaux du filament et par type de ligne, ainsi que les mêmes données par couche et par objet." msgid "Experimental Features" msgstr "Fonctionnalités expérimentales" @@ -11461,7 +11472,7 @@ msgid "The selected printer (%s) has an unknown model, so compatibility with the msgstr "L’imprimante sélectionnée (%s) est d’un modèle inconnu ; la compatibilité avec la configuration du fichier d’impression (%s) ne peut donc pas être vérifiée. Veuillez vérifier le préréglage d’imprimante avant l’envoi." msgid "When spiral vase mode is enabled, machines with I3 structure will not generate timelapse videos." -msgstr "Lorsque vous activez le mode vase, les machines avec une structure I3 ne généreront pas de vidéos timelapse." +msgstr "Lorsque vous activez le mode vase spirale, les machines avec une structure I3 ne généreront pas de vidéos timelapse." msgid "The current printer does not support timelapse in Traditional Mode when printing By-Object." msgstr "L'imprimante actuelle ne prend pas en charge le timelapse en mode traditionnel lors de l'impression par objet." @@ -13920,9 +13931,10 @@ msgstr "le modificateur « %1% » de « %2% » (%3% au total) n’a eu aucun eff msgid "Seam placement may differ from expected." msgstr "Le placement de la couture peut différer de celui attendu." +# AI Translated #, boost-format msgid "Failed to write the G-code statistics to %1%." -msgstr "" +msgstr "Échec de l’écriture des statistiques du G-code dans %1%." msgid "Internal Bridge" msgstr "Pont interne" @@ -18580,10 +18592,10 @@ msgid "Minimum number of segments of each scarf." msgstr "Nombre minimum de segments de chaque biseau." msgid "Scarf joint for inner walls" -msgstr "Joint en biseau pour les parois intérieures" +msgstr "Couture en biseau pour les parois intérieures" msgid "Use scarf joint for inner walls as well." -msgstr "Utiliser également un joint en biseau pour les parois intérieures." +msgstr "Utiliser également une couture en biseau pour les parois intérieures." # AI Translated msgid "Role based wipe speed" @@ -18671,7 +18683,7 @@ msgid "Single loop after first layer" msgstr "Boucle unique après la première couche" msgid "Limits the skirt/draft shield loops to one wall after the first layer. This is useful, on occasion, to conserve filament but may cause the draft shield/skirt to warp / crack." -msgstr "Limite les boucles de jupe/bouclier de courant d'air à une seule paroi après la première couche. Cela est utile, à l'occasion, pour économiser du filament mais peut provoquer le gauchissement/fissuration du bouclier de courant d'air/de la jupe." +msgstr "Limite les boucles de jupe/paravent à une seule paroi après la première couche. Cela est utile, à l'occasion, pour économiser du filament mais peut provoquer le gauchissement/fissuration du paravent/de la jupe." msgid "Draft shield" msgstr "Paravent" @@ -20466,11 +20478,13 @@ msgstr "Répertoire de sortie" msgid "This is the output directory for exported files." msgstr "Répertoire de sortie des fichiers exportés." +# AI Translated msgid "Export statistics" -msgstr "" +msgstr "Exporter les statistiques" +# AI Translated msgid "Write the statistics of each sliced plate as JSON, as plate_N.statistics.json next to its G-code in the output directory and inside the 3MF of --export-3mf: print time, filament and feature totals, and the same per layer and per object." -msgstr "" +msgstr "Écrit les statistiques de chaque plaque découpée au format JSON, sous la forme plate_N.statistics.json à côté de son G-code dans le répertoire de sortie et dans le 3MF de --export-3mf : durée d’impression, totaux du filament et par type de ligne, ainsi que les mêmes données par couche et par objet." msgid "Debug level" msgstr "Niveau de débogage" @@ -22022,7 +22036,7 @@ msgid "Flow Ratio" msgstr "Rapport de débit" msgid "Please input a valid value (0.0 < flow ratio < 2.0)" -msgstr "Veuillez saisir une valeur valide (0,0 < ratio du débit < 2,0)" +msgstr "Veuillez saisir une valeur valide (0,0 < rapport de débit < 2,0)" msgid "Please enter the name of the preset you want to save." msgstr "Veuillez saisir le nom du préréglage que vous souhaitez enregistrer." @@ -22044,7 +22058,7 @@ msgstr "Ignorer la Calibration 2" #, c-format, boost-format msgid "flow ratio : %s " -msgstr "ratio du débit : %s " +msgstr "rapport de débit : %s " msgid "Please choose a block with smoothest top surface." msgstr "Veuillez choisir un bloc avec la surface supérieure la plus lisse." @@ -22059,7 +22073,7 @@ msgid "Complete Calibration" msgstr "Calibration complète" msgid "Fine Calibration based on flow ratio" -msgstr "Calibration précise d’après le ratio du débit" +msgstr "Calibration précise d’après le rapport de débit" msgid "Title" msgstr "Titre" @@ -22807,10 +22821,10 @@ msgid "1 selected" msgstr "1 sélectionné" msgid "Part 1" -msgstr "Partie 1" +msgstr "Pièce 1" msgid "Part 2" -msgstr "Partie 2" +msgstr "Pièce 2" msgid "Delete input" msgstr "Supprimer l’objet" @@ -22859,7 +22873,7 @@ msgstr "début du test %s…" # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "test %s : IP résolue = %s" # AI Translated @@ -23175,10 +23189,10 @@ msgid "Printer presets(.zip)" msgstr "Préréglages d’imprimante(.zip)" msgid "Filament presets(.zip)" -msgstr "Présélections de filaments(.zip)" +msgstr "Préréglages de filaments(.zip)" msgid "Process presets(.zip)" -msgstr "Présélections de traitement(.zip)" +msgstr "Préréglages de traitement(.zip)" msgid "initialize fail" msgstr "échec de l’initialisation" @@ -28896,7 +28910,7 @@ msgid "Gizmo FDM paint-on seam" msgstr "Gizmo Peinture de la couture FDM" msgid "Gizmo FDM paint-on fuzzy skin" -msgstr "Outil FDM de surface irrégulière peinte" +msgstr "Gizmo Peinture de la surface irrégulière FDM" msgid "Gizmo multi-material painting" msgstr "Gizmo de peinture multi-matériaux" @@ -28942,7 +28956,7 @@ msgid "Camera view - Top" msgstr "Vue caméra - Haut" msgid "Camera view - Bottom" -msgstr "Vue caméra - Bas" +msgstr "Vue caméra - Dessous" msgid "Camera view - Front" msgstr "Vue de la caméra - Avant" @@ -29899,1231 +29913,1645 @@ msgid_plural "The current filament list does not contain %s. Project filaments r msgstr[0] "La liste de filaments actuelle ne contient pas %s. Un filament de projet requis par le filament mixte sera créé automatiquement après la décomposition." msgstr[1] "La liste de filaments actuelle ne contient pas %s. Les filaments de projet requis par le filament mixte seront créés automatiquement après la décomposition." +# AI Translated msgid "Color Picker" -msgstr "" +msgstr "Sélecteur de couleur" +# AI Translated msgid "Basic Colors" -msgstr "" +msgstr "Couleurs de base" +# AI Translated msgid "Orca Palette" -msgstr "" +msgstr "Palette Orca" +# AI Translated #. TRN: Keep the brand name "Orca" unchanged; translate only the palette descriptor. msgid "RAL Classic" -msgstr "" +msgstr "RAL Classic" +# AI Translated #. TRN: Keep the standard/brand name "RAL" unchanged. msgid "Gradients" -msgstr "" +msgstr "Dégradés" +# AI Translated msgid "Solid" -msgstr "" +msgstr "Uni" +# AI Translated msgid "Gradient" -msgstr "" +msgstr "Dégradé" +# AI Translated msgid "Gradient start" -msgstr "" +msgstr "Début du dégradé" +# AI Translated msgid "Gradient end" -msgstr "" +msgstr "Fin du dégradé" +# AI Translated msgid "Gradient color" -msgstr "" +msgstr "Couleur du dégradé" +# AI Translated msgid "Add color" -msgstr "" +msgstr "Ajouter une couleur" +# AI Translated msgid "Remove color" -msgstr "" +msgstr "Supprimer la couleur" +# AI Translated msgid "Saturation" -msgstr "" +msgstr "Saturation" +# AI Translated msgid "Original color" -msgstr "" +msgstr "Couleur d’origine" +# AI Translated #. TRN: Clicking the current color preview adds it to the saved favorites. msgid "Save current color" -msgstr "" +msgstr "Enregistrer la couleur actuelle" +# AI Translated msgid "Palettes" -msgstr "" +msgstr "Palettes" +# AI Translated msgid "Search colors" -msgstr "" +msgstr "Rechercher des couleurs" +# AI Translated msgid "Filter colors" -msgstr "" +msgstr "Filtrer les couleurs" +# AI Translated msgid "No matching colors" -msgstr "" +msgstr "Aucune couleur correspondante" +# AI Translated msgid "Hex color" -msgstr "" +msgstr "Couleur hexadécimale" # AI Translated msgid "Opacity" msgstr "Opacité" +# AI Translated msgid "Opacity percent" -msgstr "" +msgstr "Pourcentage d’opacité" +# AI Translated msgid "Save color" -msgstr "" +msgstr "Enregistrer la couleur" +# AI Translated msgid "Enter a complete hexadecimal color" -msgstr "" +msgstr "Saisissez une couleur hexadécimale complète" +# AI Translated msgid "The current multi-color selection is kept until you choose a different color." -msgstr "" +msgstr "La sélection multicolore actuelle est conservée jusqu’à ce que vous choisissiez une autre couleur." +# AI Translated #, c-format, boost-format msgid "Up to %d colors supported." -msgstr "" +msgstr "Jusqu’à %d couleurs prises en charge." +# AI Translated msgid "Crimson" -msgstr "" +msgstr "Cramoisi" +# AI Translated msgid "Orange red" -msgstr "" +msgstr "Rouge orangé" +# AI Translated msgid "Tomato" -msgstr "" +msgstr "Tomate" +# AI Translated msgid "Orange" -msgstr "" +msgstr "Orange" +# AI Translated msgid "Dark orange" -msgstr "" +msgstr "Orange foncé" +# AI Translated msgid "Gold" -msgstr "" +msgstr "Or" +# AI Translated +# Needs human review: Nom de couleur inhabituel ou source possiblement erronée : vérifier msgid "Burly wood" -msgstr "" +msgstr "Bois de santal" +# AI Translated msgid "Bisque" -msgstr "" +msgstr "Bisque" +# AI Translated msgid "Misty rose" -msgstr "" +msgstr "Rose brumeux" +# AI Translated msgid "Light yellow" -msgstr "" +msgstr "Jaune clair" +# AI Translated msgid "Lemon chiffon" -msgstr "" +msgstr "Mousseline de citron" +# AI Translated msgid "Beige" -msgstr "" +msgstr "Beige" +# AI Translated msgid "Light golden rod yellow" -msgstr "" +msgstr "Jaune verge d’or clair" +# AI Translated msgid "Pale golden rod" -msgstr "" +msgstr "Verge d’or pâle" +# AI Translated msgid "Khaki" -msgstr "" +msgstr "Kaki" +# AI Translated msgid "Dark khaki" -msgstr "" +msgstr "Kaki foncé" +# AI Translated msgid "Peach puff" -msgstr "" +msgstr "Pêche pâle" +# AI Translated msgid "Moccasin" -msgstr "" +msgstr "Mocassin" +# AI Translated msgid "Papaya whip" -msgstr "" +msgstr "Crème de papaye" +# AI Translated msgid "Blanched almond" -msgstr "" +msgstr "Amande blanchie" +# AI Translated msgid "Antique white" -msgstr "" +msgstr "Blanc antique" +# AI Translated msgid "Navajo white" -msgstr "" +msgstr "Blanc navajo" +# AI Translated msgid "Wheat" -msgstr "" +msgstr "Blé" +# AI Translated msgid "Golden rod" -msgstr "" +msgstr "Verge d’or" +# AI Translated msgid "Chocolate" -msgstr "" +msgstr "Chocolat" +# AI Translated msgid "Peru" -msgstr "" +msgstr "Pérou" +# AI Translated +# Needs human review: Nom de couleur inhabituel ou source possiblement erronée : vérifier msgid "Fire brick" -msgstr "" +msgstr "Brique réfractaire" +# AI Translated msgid "Sienna" -msgstr "" +msgstr "Terre de Sienne" +# AI Translated msgid "Saddle brown" -msgstr "" +msgstr "Brun selle" +# AI Translated msgid "Brown" -msgstr "" +msgstr "Marron" +# AI Translated msgid "Rosy brown" -msgstr "" +msgstr "Brun rosé" +# AI Translated msgid "Salmon" -msgstr "" +msgstr "Saumon" +# AI Translated msgid "Light salmon" -msgstr "" +msgstr "Saumon clair" +# AI Translated msgid "Dark salmon" -msgstr "" +msgstr "Saumon foncé" +# AI Translated msgid "Sandy brown" -msgstr "" +msgstr "Brun sableux" +# AI Translated msgid "Coral" -msgstr "" +msgstr "Corail" +# AI Translated msgid "Light coral" -msgstr "" +msgstr "Corail clair" +# AI Translated msgid "Indian red" -msgstr "" +msgstr "Rouge indien" +# AI Translated msgid "Dark red" -msgstr "" +msgstr "Rouge foncé" +# AI Translated msgid "Maroon" -msgstr "" +msgstr "Bordeaux" +# AI Translated msgid "Green yellow" -msgstr "" +msgstr "Jaune-vert" +# AI Translated msgid "Yellow green" -msgstr "" +msgstr "Vert jaune" +# AI Translated msgid "Chartreuse" -msgstr "" +msgstr "Chartreuse" +# AI Translated msgid "Lawn green" -msgstr "" +msgstr "Vert pelouse" +# AI Translated msgid "Lime green" -msgstr "" +msgstr "Vert citron vert" +# AI Translated msgid "Spring green" -msgstr "" +msgstr "Vert printemps" +# AI Translated msgid "Medium spring green" -msgstr "" +msgstr "Vert printemps moyen" +# AI Translated msgid "Lime" -msgstr "" +msgstr "Citron vert" +# AI Translated msgid "Forest green" -msgstr "" +msgstr "Vert forêt" +# AI Translated msgid "Dark green" -msgstr "" +msgstr "Vert foncé" +# AI Translated msgid "Olive drab" -msgstr "" +msgstr "Brun olive" +# AI Translated msgid "Olive" -msgstr "" +msgstr "Olive" +# AI Translated msgid "Dark olive green" -msgstr "" +msgstr "Vert olive foncé" +# AI Translated msgid "Pale green" -msgstr "" +msgstr "Vert pâle" +# AI Translated msgid "Light green" -msgstr "" +msgstr "Vert clair" +# AI Translated msgid "Medium sea green" -msgstr "" +msgstr "Vert marin moyen" +# AI Translated msgid "Sea green" -msgstr "" +msgstr "Vert marin" +# AI Translated msgid "Dark sea green" -msgstr "" +msgstr "Vert marin foncé" +# AI Translated msgid "Cadet blue" -msgstr "" +msgstr "Bleu cadet" +# AI Translated msgid "Medium aqua marine" -msgstr "" +msgstr "Aigue-marine moyen" +# AI Translated msgid "Turquoise" -msgstr "" +msgstr "Turquoise" +# AI Translated msgid "Medium turquoise" -msgstr "" +msgstr "Turquoise moyen" +# AI Translated msgid "Dark turquoise" -msgstr "" +msgstr "Turquoise foncé" +# AI Translated msgid "Pale turquoise" -msgstr "" +msgstr "Turquoise pâle" +# AI Translated msgid "Aqua" -msgstr "" +msgstr "Aqua" +# AI Translated msgid "Light cyan" -msgstr "" +msgstr "Cyan clair" +# AI Translated msgid "Mint cream" -msgstr "" +msgstr "Crème de menthe" +# AI Translated +# Needs human review: Nom de couleur inhabituel ou source possiblement erronée : vérifier msgid "Honey dew" -msgstr "" +msgstr "Miellat" +# AI Translated msgid "Aquamarine" -msgstr "" +msgstr "Aigue-marine" +# AI Translated msgid "Light sea green" -msgstr "" +msgstr "Vert marin clair" +# AI Translated msgid "Dark cyan" -msgstr "" +msgstr "Cyan foncé" +# AI Translated msgid "Teal" -msgstr "" +msgstr "Bleu sarcelle" +# AI Translated msgid "Dark slate gray" -msgstr "" +msgstr "Gris ardoise foncé" +# AI Translated msgid "Light slate gray" -msgstr "" +msgstr "Gris ardoise clair" +# AI Translated msgid "Slate gray" -msgstr "" +msgstr "Gris ardoise" +# AI Translated msgid "Deep sky blue" -msgstr "" +msgstr "Bleu ciel profond" +# AI Translated msgid "Dodger Blue" -msgstr "" +msgstr "Bleu Dodger" +# AI Translated msgid "Sky blue" -msgstr "" +msgstr "Bleu ciel" +# AI Translated msgid "Light sky blue" -msgstr "" +msgstr "Bleu ciel clair" +# AI Translated msgid "Light blue" -msgstr "" +msgstr "Bleu clair" +# AI Translated msgid "Powder blue" -msgstr "" +msgstr "Bleu poudre" +# AI Translated msgid "Light steel blue" -msgstr "" +msgstr "Bleu acier clair" +# AI Translated msgid "Steel blue" -msgstr "" +msgstr "Bleu acier" +# AI Translated msgid "Cornflower blue" -msgstr "" +msgstr "Bleu bleuet" +# AI Translated msgid "Royal blue" -msgstr "" +msgstr "Bleu roi" +# AI Translated msgid "Medium blue" -msgstr "" +msgstr "Bleu moyen" +# AI Translated msgid "Midnight blue" -msgstr "" +msgstr "Bleu nuit" +# AI Translated msgid "Dark blue" -msgstr "" +msgstr "Bleu foncé" +# AI Translated msgid "Navy" -msgstr "" +msgstr "Bleu marine" +# AI Translated msgid "Slate blue" -msgstr "" +msgstr "Bleu ardoise" +# AI Translated msgid "Dark slate blue" -msgstr "" +msgstr "Bleu ardoise foncé" +# AI Translated msgid "Medium slate blue" -msgstr "" +msgstr "Bleu ardoise moyen" +# AI Translated msgid "Blue violet" -msgstr "" +msgstr "Bleu violet" +# AI Translated msgid "Indigo" -msgstr "" +msgstr "Indigo" +# AI Translated msgid "Dark violet" -msgstr "" +msgstr "Violet foncé" +# AI Translated msgid "Dark orchid" -msgstr "" +msgstr "Orchidée foncé" +# AI Translated msgid "Medium orchid" -msgstr "" +msgstr "Orchidée moyen" +# AI Translated msgid "Orchid" -msgstr "" +msgstr "Orchidée" +# AI Translated msgid "Violet" -msgstr "" +msgstr "Violet" +# AI Translated msgid "Medium purple" -msgstr "" +msgstr "Pourpre moyen" +# AI Translated msgid "Purple" -msgstr "" +msgstr "Pourpre" +# AI Translated msgid "Rebecca purple" -msgstr "" +msgstr "Pourpre Rebecca" +# AI Translated msgid "Medium violet red" -msgstr "" +msgstr "Rouge violacé moyen" +# AI Translated +# Needs human review: Nom de couleur inhabituel ou source possiblement erronée : vérifier msgid "PaleV violet red" -msgstr "" +msgstr "Rouge violacé pâle" +# AI Translated msgid "Deep pink" -msgstr "" +msgstr "Rose profond" +# AI Translated msgid "Hot pink" -msgstr "" +msgstr "Rose vif" +# AI Translated msgid "Light pink" -msgstr "" +msgstr "Rose clair" +# AI Translated msgid "Pink" -msgstr "" +msgstr "Rose" +# AI Translated msgid "Plum" -msgstr "" +msgstr "Prune" +# AI Translated msgid "Thistle" -msgstr "" +msgstr "Chardon" +# AI Translated msgid "Fuchsia" -msgstr "" +msgstr "Fuchsia" +# AI Translated msgid "Dark magenta" -msgstr "" +msgstr "Magenta foncé" +# AI Translated msgid "Linen" -msgstr "" +msgstr "Lin" +# AI Translated msgid "Old lace" -msgstr "" +msgstr "Vieille dentelle" +# AI Translated msgid "Sea shell" -msgstr "" +msgstr "Coquillage" +# AI Translated msgid "Ivory" -msgstr "" +msgstr "Ivoire" +# AI Translated msgid "Floral white" -msgstr "" +msgstr "Blanc floral" +# AI Translated msgid "Lavender blush" -msgstr "" +msgstr "Lavande rosée" +# AI Translated msgid "Ghost white" -msgstr "" +msgstr "Blanc fantôme" +# AI Translated msgid "Alice blue" -msgstr "" +msgstr "Bleu Alice" +# AI Translated msgid "Lavender" -msgstr "" +msgstr "Lavande" +# AI Translated msgid "White smoke" -msgstr "" +msgstr "Fumée blanche" +# AI Translated msgid "Gainsboro" -msgstr "" +msgstr "Gainsboro" +# AI Translated msgid "Black" -msgstr "" +msgstr "Noir" +# AI Translated msgid "Coral fire" -msgstr "" +msgstr "Corail ardent" +# AI Translated msgid "Sea anemone" -msgstr "" +msgstr "Anémone de mer" +# AI Translated msgid "Deep abyss" -msgstr "" +msgstr "Abysse profond" +# AI Translated msgid "Lobster red" -msgstr "" +msgstr "Rouge homard" +# AI Translated msgid "Sandy clay" -msgstr "" +msgstr "Argile sableuse" +# AI Translated msgid "Driftwood" -msgstr "" +msgstr "Bois flotté" +# AI Translated msgid "Sea buckthorn" -msgstr "" +msgstr "Argousier" +# AI Translated msgid "Sunset reef" -msgstr "" +msgstr "Récif au coucher du soleil" +# AI Translated msgid "Tiger coral" -msgstr "" +msgstr "Corail tigre" +# AI Translated msgid "Pink coral" -msgstr "" +msgstr "Corail rose" +# AI Translated msgid "Seashell glow" -msgstr "" +msgstr "Éclat de coquillage" +# AI Translated msgid "Sand" -msgstr "" +msgstr "Sable" +# AI Translated msgid "Golden kelp" -msgstr "" +msgstr "Varech doré" +# AI Translated msgid "Sunlit dune" -msgstr "" +msgstr "Dune ensoleillée" +# AI Translated msgid "Amber nautilus" -msgstr "" +msgstr "Nautile ambré" +# AI Translated msgid "Sea lemon" -msgstr "" +msgstr "Citron de mer" +# AI Translated msgid "Pale starfish" -msgstr "" +msgstr "Étoile de mer pâle" +# AI Translated msgid "Spring tide" -msgstr "" +msgstr "Grande marée" +# AI Translated msgid "Lime algae" -msgstr "" +msgstr "Algue vert citron" +# AI Translated msgid "Sea grass" -msgstr "" +msgstr "Herbe marine" +# AI Translated msgid "Neon plankton" -msgstr "" +msgstr "Plancton néon" +# AI Translated msgid "Kelp forest" -msgstr "" +msgstr "Forêt de varech" +# AI Translated msgid "Emerald wave" -msgstr "" +msgstr "Vague émeraude" +# AI Translated msgid "Whale shadow" -msgstr "" +msgstr "Ombre de baleine" +# AI Translated msgid "Sea turtle" -msgstr "" +msgstr "Tortue de mer" +# AI Translated msgid "Lagoon" -msgstr "" +msgstr "Lagon" +# AI Translated msgid "Tropical current" -msgstr "" +msgstr "Courant tropical" +# AI Translated msgid "Midnight trench" -msgstr "" +msgstr "Fosse de minuit" +# AI Translated msgid "Dark kelp" -msgstr "" +msgstr "Varech foncé" +# AI Translated msgid "Crystal surf" -msgstr "" +msgstr "Surf cristallin" +# AI Translated msgid "Turquoise bay" -msgstr "" +msgstr "Baie turquoise" +# AI Translated msgid "Sky over reef" -msgstr "" +msgstr "Ciel sur le récif" +# AI Translated msgid "Shallow sky" -msgstr "" +msgstr "Ciel de lagune" +# AI Translated +# Needs human review: Nom de couleur inhabituel ou source possiblement erronée : vérifier msgid "Electric bel" -msgstr "" +msgstr "Bleu électrique" +# AI Translated msgid "Dolphin" -msgstr "" +msgstr "Dauphin" +# AI Translated msgid "Ocean depths" -msgstr "" +msgstr "Profondeurs océaniques" +# AI Translated msgid "Whale" -msgstr "" +msgstr "Baleine" +# AI Translated msgid "Indigo abyss" -msgstr "" +msgstr "Abysse indigo" +# AI Translated msgid "Sea urchin" -msgstr "" +msgstr "Oursin" +# AI Translated msgid "Lavender coral" -msgstr "" +msgstr "Corail lavande" +# AI Translated msgid "Violet tide" -msgstr "" +msgstr "Marée violette" +# AI Translated msgid "Deep sea orchid" -msgstr "" +msgstr "Orchidée des abysses" +# AI Translated msgid "Neon jelly" -msgstr "" +msgstr "Méduse néon" +# AI Translated msgid "Fuchsia coral" -msgstr "" +msgstr "Corail fuchsia" +# AI Translated msgid "Pink jellyfish" -msgstr "" +msgstr "Méduse rose" +# AI Translated msgid "Foam" -msgstr "" +msgstr "Écume" +# AI Translated msgid "Seashell white" -msgstr "" +msgstr "Blanc coquillage" +# AI Translated msgid "Pebble gray" -msgstr "" +msgstr "Gris galet" +# AI Translated msgid "Storm cloud" -msgstr "" +msgstr "Nuage d’orage" +# AI Translated msgid "Ink black" -msgstr "" +msgstr "Noir d’encre" +# AI Translated msgid "Green beige" -msgstr "" +msgstr "Beige vert" +# AI Translated msgid "Sand yellow" -msgstr "" +msgstr "Jaune sable" +# AI Translated msgid "Signal yellow" -msgstr "" +msgstr "Jaune de sécurité" +# AI Translated msgid "Golden yellow" -msgstr "" +msgstr "Jaune d’or" +# AI Translated msgid "Honey yellow" -msgstr "" +msgstr "Jaune miel" +# AI Translated msgid "Maize yellow" -msgstr "" +msgstr "Jaune maïs" +# AI Translated msgid "Dalmatian yellow" -msgstr "" +msgstr "Jaune dalmatien" +# AI Translated msgid "Brown beige" -msgstr "" +msgstr "Beige brun" +# AI Translated msgid "Lemon yellow" -msgstr "" +msgstr "Jaune citron" +# AI Translated msgid "Oyster white" -msgstr "" +msgstr "Blanc huître" +# AI Translated msgid "Light ivory" -msgstr "" +msgstr "Ivoire clair" +# AI Translated msgid "Zinc yellow" -msgstr "" +msgstr "Jaune de zinc" +# AI Translated msgid "Grey beige" -msgstr "" +msgstr "Beige gris" +# AI Translated msgid "Olive yellow" -msgstr "" +msgstr "Jaune olive" +# AI Translated msgid "Rape yellow" -msgstr "" +msgstr "Jaune colza" +# AI Translated msgid "Traffic yellow" -msgstr "" +msgstr "Jaune signalisation" +# AI Translated msgid "Ochre yellow" -msgstr "" +msgstr "Jaune ocre" +# AI Translated msgid "Traffic orange yellow" -msgstr "" +msgstr "Jaune orangé signalisation" +# AI Translated msgid "Curry" -msgstr "" +msgstr "Curry" +# AI Translated msgid "Melon yellow" -msgstr "" +msgstr "Jaune melon" +# AI Translated msgid "Broom yellow" -msgstr "" +msgstr "Jaune genêt" +# AI Translated msgid "Dahlia yellow" -msgstr "" +msgstr "Jaune dahlia" +# AI Translated msgid "Pastel yellow" -msgstr "" +msgstr "Jaune pastel" +# AI Translated msgid "Pearl beige" -msgstr "" +msgstr "Beige nacré" +# AI Translated msgid "Pearl gold" -msgstr "" +msgstr "Or nacré" +# AI Translated msgid "Sun yellow" -msgstr "" +msgstr "Jaune soleil" +# AI Translated msgid "Yellow orange" -msgstr "" +msgstr "Orange jaune" +# AI Translated msgid "Deep orange" -msgstr "" +msgstr "Orange profond" +# AI Translated msgid "Vermilion" -msgstr "" +msgstr "Vermillon" +# AI Translated msgid "Pearl orange" -msgstr "" +msgstr "Orange nacré" +# AI Translated msgid "Pure orange" -msgstr "" +msgstr "Orange pur" +# AI Translated msgid "Luminous orange" -msgstr "" +msgstr "Orange lumineux" +# AI Translated msgid "Luminous bright orange" -msgstr "" +msgstr "Orange vif lumineux" +# AI Translated msgid "Bright red orange" -msgstr "" +msgstr "Orange rouge vif" +# AI Translated msgid "Traffic orange" -msgstr "" +msgstr "Orange signalisation" +# AI Translated msgid "Signal orange" -msgstr "" +msgstr "Orange de sécurité" +# AI Translated msgid "Salmon orange" -msgstr "" +msgstr "Orange saumon" +# AI Translated msgid "Pearl pink" -msgstr "" +msgstr "Rose nacré" +# AI Translated msgid "Copper orange" -msgstr "" +msgstr "Orange cuivré" +# AI Translated msgid "Signal brown" -msgstr "" +msgstr "Brun de sécurité" +# AI Translated msgid "Fir orange" -msgstr "" +msgstr "Orange sapin" +# AI Translated msgid "Signal red" -msgstr "" +msgstr "Rouge de sécurité" +# AI Translated msgid "Luminous red" -msgstr "" +msgstr "Rouge lumineux" +# AI Translated msgid "Carmine red" -msgstr "" +msgstr "Rouge carmin" +# AI Translated msgid "Pearl carmine red" -msgstr "" +msgstr "Rouge carmin nacré" +# AI Translated msgid "Pure red" -msgstr "" +msgstr "Rouge pur" +# AI Translated msgid "Luminous deep red" -msgstr "" +msgstr "Rouge profond lumineux" +# AI Translated msgid "Currant red" -msgstr "" +msgstr "Rouge groseille" +# AI Translated msgid "Pearl ruby red" -msgstr "" +msgstr "Rouge rubis nacré" +# AI Translated msgid "Fire red" -msgstr "" +msgstr "Rouge feu" +# AI Translated msgid "Ruby red" -msgstr "" +msgstr "Rouge rubis" +# AI Translated msgid "Purple red" -msgstr "" +msgstr "Rouge pourpre" +# AI Translated msgid "Wine red" -msgstr "" +msgstr "Rouge vin" +# AI Translated msgid "Black red" -msgstr "" +msgstr "Rouge noir" +# AI Translated msgid "Oxide red" -msgstr "" +msgstr "Rouge oxyde" +# AI Translated msgid "Brown red" -msgstr "" +msgstr "Rouge brun" +# AI Translated msgid "Pine red" -msgstr "" +msgstr "Rouge pin" +# AI Translated msgid "Tomato red" -msgstr "" +msgstr "Rouge tomate" +# AI Translated msgid "Antique pink" -msgstr "" +msgstr "Rose antique" +# AI Translated msgid "Coral red" -msgstr "" +msgstr "Rouge corail" +# AI Translated msgid "Rose" -msgstr "" +msgstr "Rose" +# AI Translated msgid "Strawberry red" -msgstr "" +msgstr "Rouge fraise" +# AI Translated msgid "Traffic red" -msgstr "" +msgstr "Rouge signalisation" +# AI Translated msgid "Salmon pink" -msgstr "" +msgstr "Rose saumon" +# AI Translated msgid "Luminous rose" -msgstr "" +msgstr "Rose lumineux" +# AI Translated msgid "Luminous bright red" -msgstr "" +msgstr "Rouge vif lumineux" +# AI Translated msgid "Raspberry red" -msgstr "" +msgstr "Rouge framboise" +# AI Translated msgid "Orient red" -msgstr "" +msgstr "Rouge oriental" +# AI Translated msgid "Pearl ruby" -msgstr "" +msgstr "Rubis nacré" +# AI Translated msgid "Red purple" -msgstr "" +msgstr "Pourpre rouge" +# AI Translated msgid "Red violet" -msgstr "" +msgstr "Violet rouge" +# AI Translated msgid "Heather violet" -msgstr "" +msgstr "Violet bruyère" +# AI Translated msgid "Bordeaux violet" -msgstr "" +msgstr "Violet bordeaux" +# AI Translated msgid "Mahogany" -msgstr "" +msgstr "Acajou" +# AI Translated msgid "Grey purple" -msgstr "" +msgstr "Pourpre gris" +# AI Translated msgid "Signal violet" -msgstr "" +msgstr "Violet de sécurité" +# AI Translated msgid "Fir green" -msgstr "" +msgstr "Vert sapin" +# AI Translated msgid "Sabine grey" -msgstr "" +msgstr "Gris sabine" +# AI Translated msgid "Pearl violet" -msgstr "" +msgstr "Violet nacré" +# AI Translated msgid "Pearl blackberry" -msgstr "" +msgstr "Mûre nacrée" +# AI Translated msgid "Green blue" -msgstr "" +msgstr "Bleu vert" +# AI Translated msgid "Ultramarine blue" -msgstr "" +msgstr "Bleu outremer" +# AI Translated msgid "Sapphire blue" -msgstr "" +msgstr "Bleu saphir" +# AI Translated msgid "Black blue" -msgstr "" +msgstr "Bleu noir" +# AI Translated msgid "Signal blue" -msgstr "" +msgstr "Bleu de sécurité" +# AI Translated msgid "Brilliant blue" -msgstr "" +msgstr "Bleu brillant" +# AI Translated msgid "Grey blue" -msgstr "" +msgstr "Bleu gris" +# AI Translated msgid "Azure blue" -msgstr "" +msgstr "Bleu azur" +# AI Translated msgid "Gentian blue" -msgstr "" +msgstr "Bleu gentiane" +# AI Translated msgid "Cobalt blue" -msgstr "" +msgstr "Bleu cobalt" +# AI Translated msgid "Pigeon blue" -msgstr "" +msgstr "Bleu pigeon" +# AI Translated msgid "Traffic blue" -msgstr "" +msgstr "Bleu signalisation" +# AI Translated msgid "Turquoise blue" -msgstr "" +msgstr "Bleu turquoise" +# AI Translated +# Needs human review: Nom de couleur inhabituel ou source possiblement erronée : vérifier msgid "Capsanthin violet" -msgstr "" +msgstr "Violet capsanthine" +# AI Translated msgid "Ocean blue" -msgstr "" +msgstr "Bleu océan" +# AI Translated msgid "Water blue" -msgstr "" +msgstr "Bleu eau" +# AI Translated msgid "Night blue" -msgstr "" +msgstr "Bleu nuit" +# AI Translated msgid "Distant blue" -msgstr "" +msgstr "Bleu lointain" +# AI Translated msgid "Pastel blue" -msgstr "" +msgstr "Bleu pastel" +# AI Translated msgid "Pearl gentian blue" -msgstr "" +msgstr "Bleu gentiane nacré" +# AI Translated msgid "Pearl midnight blue" -msgstr "" +msgstr "Bleu nuit nacré" +# AI Translated msgid "Patina green" -msgstr "" +msgstr "Vert patine" +# AI Translated msgid "Emerald green" -msgstr "" +msgstr "Vert émeraude" +# AI Translated msgid "Leaf green" -msgstr "" +msgstr "Vert feuille" +# AI Translated msgid "Olive green" -msgstr "" +msgstr "Vert olive" +# AI Translated msgid "Blue green" -msgstr "" +msgstr "Vert bleu" +# AI Translated msgid "Moss green" -msgstr "" +msgstr "Vert mousse" +# AI Translated msgid "Grey olive" -msgstr "" +msgstr "Olive gris" +# AI Translated msgid "Pine green" -msgstr "" +msgstr "Vert pin" +# AI Translated msgid "Pine brown" -msgstr "" +msgstr "Brun pin" +# AI Translated msgid "Grass green" -msgstr "" +msgstr "Vert herbe" +# AI Translated msgid "Reseda green" -msgstr "" +msgstr "Vert réséda" +# AI Translated msgid "Brown green" -msgstr "" +msgstr "Vert brun" +# AI Translated msgid "Reed green" -msgstr "" +msgstr "Vert roseau" +# AI Translated msgid "Black green" -msgstr "" +msgstr "Vert noir" +# AI Translated msgid "Turquoise green" -msgstr "" +msgstr "Vert turquoise" +# AI Translated msgid "May green" -msgstr "" +msgstr "Vert mai" +# AI Translated msgid "Chrome oxide green" -msgstr "" +msgstr "Vert oxyde de chrome" +# AI Translated msgid "Traffic green" -msgstr "" +msgstr "Vert signalisation" +# AI Translated msgid "Fern green" -msgstr "" +msgstr "Vert fougère" +# AI Translated msgid "Opal green" -msgstr "" +msgstr "Vert opale" +# AI Translated msgid "Mint green" -msgstr "" +msgstr "Vert menthe" +# AI Translated msgid "Bronze green" -msgstr "" +msgstr "Vert bronze" +# AI Translated msgid "Pearl green" -msgstr "" +msgstr "Vert nacré" +# AI Translated +# Needs human review: Nom de couleur inhabituel ou source possiblement erronée : vérifier msgid "Sax turquoise" -msgstr "" +msgstr "Turquoise saxe" +# AI Translated msgid "Pearl turquoise" -msgstr "" +msgstr "Turquoise nacré" +# AI Translated msgid "Pearl jade" -msgstr "" +msgstr "Jade nacré" +# AI Translated msgid "Pure green" -msgstr "" +msgstr "Vert pur" +# AI Translated msgid "Luminous green" -msgstr "" +msgstr "Vert lumineux" +# AI Translated msgid "Squirrel grey" -msgstr "" +msgstr "Gris écureuil" +# AI Translated msgid "Silver grey" -msgstr "" +msgstr "Gris argent" +# AI Translated +# Needs human review: Nom de couleur inhabituel ou source possiblement erronée : vérifier msgid "Olivestone" -msgstr "" +msgstr "Pierre d’olive" +# AI Translated msgid "Moss grey" -msgstr "" +msgstr "Gris mousse" +# AI Translated msgid "Signal grey" -msgstr "" +msgstr "Gris de sécurité" +# AI Translated msgid "Mouse grey" -msgstr "" +msgstr "Gris souris" +# AI Translated msgid "Beige grey" -msgstr "" +msgstr "Gris beige" +# AI Translated msgid "Khaki grey" -msgstr "" +msgstr "Gris kaki" +# AI Translated msgid "Green grey" -msgstr "" +msgstr "Gris vert" +# AI Translated msgid "Tarpaulin grey" -msgstr "" +msgstr "Gris bâche" +# AI Translated msgid "Iron grey" -msgstr "" +msgstr "Gris fer" +# AI Translated msgid "Basalt grey" -msgstr "" +msgstr "Gris basalte" +# AI Translated msgid "Brown grey" -msgstr "" +msgstr "Gris brun" +# AI Translated msgid "Slate grey" -msgstr "" +msgstr "Gris ardoise" +# AI Translated msgid "Anthracite grey" -msgstr "" +msgstr "Gris anthracite" +# AI Translated msgid "Light grey" -msgstr "" +msgstr "Gris clair" +# AI Translated msgid "Umber grey" -msgstr "" +msgstr "Gris terre d’ombre" +# AI Translated msgid "Concrete grey" -msgstr "" +msgstr "Gris béton" +# AI Translated msgid "Graphite grey" -msgstr "" +msgstr "Gris graphite" +# AI Translated msgid "Granite grey" -msgstr "" +msgstr "Gris granit" +# AI Translated msgid "Stone grey" -msgstr "" +msgstr "Gris pierre" +# AI Translated msgid "Pebble grey" -msgstr "" +msgstr "Gris galet" +# AI Translated msgid "Cement grey" -msgstr "" +msgstr "Gris ciment" +# AI Translated msgid "Yellow grey" -msgstr "" +msgstr "Gris jaune" +# AI Translated msgid "Platinum grey" -msgstr "" +msgstr "Gris platine" +# AI Translated msgid "Dusty grey" -msgstr "" +msgstr "Gris poussière" +# AI Translated msgid "Agate grey" -msgstr "" +msgstr "Gris agate" +# AI Translated msgid "Quartz grey" -msgstr "" +msgstr "Gris quartz" +# AI Translated msgid "Window grey" -msgstr "" +msgstr "Gris fenêtre" +# AI Translated msgid "Traffic grey A" -msgstr "" +msgstr "Gris signalisation A" +# AI Translated msgid "Traffic grey B" -msgstr "" +msgstr "Gris signalisation B" +# AI Translated msgid "Silk grey" -msgstr "" +msgstr "Gris soie" +# AI Translated msgid "Telegrey 1" -msgstr "" +msgstr "Télégris 1" +# AI Translated msgid "Telegrey 2" -msgstr "" +msgstr "Télégris 2" +# AI Translated msgid "Telegrey 4" -msgstr "" +msgstr "Télégris 4" +# AI Translated msgid "Pearl mouse grey" -msgstr "" +msgstr "Gris souris nacré" +# AI Translated msgid "Green brown" -msgstr "" +msgstr "Brun vert" +# AI Translated msgid "Ochre brown" -msgstr "" +msgstr "Brun ocre" +# AI Translated msgid "Clay brown" -msgstr "" +msgstr "Brun argile" +# AI Translated msgid "Copper brown" -msgstr "" +msgstr "Brun cuivré" +# AI Translated msgid "Chocolate brown" -msgstr "" +msgstr "Brun chocolat" +# AI Translated msgid "Olive brown" -msgstr "" +msgstr "Brun olive" +# AI Translated msgid "Nut brown" -msgstr "" +msgstr "Brun noisette" +# AI Translated msgid "Red brown" -msgstr "" +msgstr "Brun rouge" +# AI Translated msgid "Sepia brown" -msgstr "" +msgstr "Brun sépia" +# AI Translated msgid "Chestnut brown" -msgstr "" +msgstr "Brun châtaigne" +# AI Translated msgid "Mahogany brown" -msgstr "" +msgstr "Brun acajou" +# AI Translated msgid "Grey brown" -msgstr "" +msgstr "Brun gris" +# AI Translated msgid "Pearl copper" -msgstr "" +msgstr "Cuivre nacré" +# AI Translated msgid "Beige brown" -msgstr "" +msgstr "Brun beige" +# AI Translated msgid "Pearl mocha brown" -msgstr "" +msgstr "Brun moka nacré" +# AI Translated msgid "Earth brown" -msgstr "" +msgstr "Brun terre" +# AI Translated msgid "Pearl brown" -msgstr "" +msgstr "Brun nacré" +# AI Translated msgid "Cream" -msgstr "" +msgstr "Crème" +# AI Translated msgid "Grey white" -msgstr "" +msgstr "Blanc gris" +# AI Translated msgid "Signal white" -msgstr "" +msgstr "Blanc de sécurité" +# AI Translated msgid "Signal black" -msgstr "" +msgstr "Noir de sécurité" +# AI Translated msgid "Jet black" -msgstr "" +msgstr "Noir profond" +# AI Translated msgid "White aluminium" -msgstr "" +msgstr "Aluminium blanc" +# AI Translated msgid "Grey aluminium" -msgstr "" +msgstr "Aluminium gris" +# AI Translated msgid "Pure white" -msgstr "" +msgstr "Blanc pur" +# AI Translated msgid "Graphite black" -msgstr "" +msgstr "Noir graphite" +# AI Translated msgid "Traffic white" -msgstr "" +msgstr "Blanc signalisation" +# AI Translated msgid "Traffic black" -msgstr "" +msgstr "Noir signalisation" +# AI Translated msgid "Papyrus white" -msgstr "" +msgstr "Blanc papyrus" +# AI Translated msgid "Pearl light grey" -msgstr "" +msgstr "Gris clair nacré" +# AI Translated msgid "Metal: Silver" -msgstr "" +msgstr "Métal : argent" +# AI Translated msgid "Metal: Brass" -msgstr "" +msgstr "Métal : laiton" +# AI Translated msgid "Metal: Gold" -msgstr "" +msgstr "Métal : or" +# AI Translated msgid "Metal: Copper" -msgstr "" +msgstr "Métal : cuivre" +# AI Translated msgid "Metal: Bronze" -msgstr "" +msgstr "Métal : bronze" +# AI Translated msgid "Nature: Pearl" -msgstr "" +msgstr "Nature : perle" +# AI Translated msgid "Nature: Rainbow" -msgstr "" +msgstr "Nature : arc-en-ciel" +# AI Translated msgid "Nature: Clear Sky" -msgstr "" +msgstr "Nature : ciel dégagé" +# AI Translated msgid "Nature: Sunset" -msgstr "" +msgstr "Nature : coucher de soleil" +# AI Translated msgid "Wood: Dark" -msgstr "" +msgstr "Bois : foncé" +# AI Translated msgid "Wood: Medium" -msgstr "" +msgstr "Bois : moyen" +# AI Translated msgid "Wood: Light" -msgstr "" +msgstr "Bois : clair" # AI Translated msgid "Alternate nozzles:" @@ -32008,11 +32436,13 @@ msgstr "Mappé selon la disposition UV propre au modèle, qui constitue déjà l msgid "How wide one copy of the texture is on the model. Smaller repeats the pattern more often and makes its detail finer; with Tile off, this is the size of the single copy." msgstr "Largeur d’une copie de la texture sur le modèle. Plus elle est petite, plus le motif se répète souvent et plus ses détails sont fins ; avec Mosaïque désactivée, c’est la taille de la copie unique." +# AI Translated msgid "Larger" -msgstr "" +msgstr "Plus grand" +# AI Translated msgid "Smaller" -msgstr "" +msgstr "Plus petit" # AI Translated msgid "Turns the texture on the surface, in degrees - for lining a pattern up with an edge of the model." @@ -32088,11 +32518,13 @@ msgstr "Couleurs mixtes" msgid "The most mixed filaments a bake may add. They are picked from the texture's colors, and only the ones the bake actually uses are created." msgstr "Nombre maximal de filaments mixtes qu'une intégration peut ajouter. Ils sont choisis parmi les couleurs de la texture, et seuls ceux réellement utilisés par l'intégration sont créés." +# AI Translated msgid "Few" -msgstr "" +msgstr "Peu" +# AI Translated msgid "Many" -msgstr "" +msgstr "Beaucoup" # AI Translated #. TRN The %2% part of "%1% printable colors %2%"; %1% is the number of filaments. @@ -32448,11 +32880,13 @@ msgstr "Remaillage" msgid "Triangle size the whole model is rebuilt with, in millimetres. Displacement works best on an even mesh; this is what makes one out of an uneven import." msgstr "Taille des triangles avec laquelle tout le modèle est reconstruit, en millimètres. Le déplacement fonctionne mieux sur un maillage uniforme ; c’est ce qui en crée un à partir d’une importation irrégulière." +# AI Translated msgid "Before" -msgstr "" +msgstr "Avant" +# AI Translated msgid "After" -msgstr "" +msgstr "Après" # AI Translated msgid "Keep sharp edges" @@ -34913,7 +35347,7 @@ msgstr "Échec du chargement du fichier de configuration « %1% » : %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "Ce n’est pas un fichier G-code généré par %1%." # AI Translated @@ -35033,7 +35467,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "Échec de la création d’une copie temporaire du fichier G-code %1% avant l’exécution d’un script de post-traitement : %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "Le post-processeur ne trouve pas le fichier G-code exporté" # AI Translated @@ -35163,7 +35597,7 @@ msgid "" "You can switch between Prepare and Preview workspaces by pressing the Tab key." msgstr "" "Changer les espaces de travail\n" -"Vous pouvez alterner entre l’espace de travail Préparer et Aperçu en appuyant sur la touche Tab." +"Vous pouvez alterner entre les espaces de travail Préparer et Aperçu en appuyant sur la touche Tab." #: resources/data/hints.ini: [hint:How to use keyboard shortcuts] msgid "" @@ -35266,7 +35700,7 @@ msgid "" "Split to Objects/Parts\n" "Did you know that you can split a big object into small ones for easy colorizing or printing?" msgstr "" -"Séparer en objets/parties\n" +"Séparer en objets/pièces\n" "Saviez-vous que vous pouvez séparer un gros objet en petits objets pour les colorier ou les imprimer facilement ?" #: resources/data/hints.ini: [hint:Subtract a Part] @@ -35382,7 +35816,7 @@ msgid "" "Did you know that you can use more wall loops and higher sparse infill density to improve the strength of the model?" msgstr "" "Améliorer la solidité\n" -"Saviez-vous que vous pouvez définir un plus grand nombre de périmètre et une densité de remplissage plus élevée pour améliorer la résistance du modèle ?" +"Saviez-vous que vous pouvez définir un plus grand nombre de parois et une densité de remplissage plus élevée pour améliorer la résistance du modèle ?" #: resources/data/hints.ini: [hint:When do you need to print with the printer #: door opened] @@ -35869,9 +36303,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "aucun outil configuré" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "G-code de fin lorsque vous avez terminé toute l'impression" - #~ msgid "Maximum X speed" #~ msgstr "Vitesse en X maximale" @@ -35888,25 +36319,10 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Plugin(s) Python invoqué(s) à chaque étape du pipeline de découpe pour lire et modifier les données de découpe intermédiaires, y compris une étape finale de post-traitement du G-code. Recherche/expérimental." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Si activé, le logiciel de découpe génère un G-code dont le contenu de la zone principale est centré sur l'origine du plateau (0,0). Le firmware de l'imprimante se charge de placer les copies et les images miroir à la position physique de chaque zone. N'activez cette option que sur les imprimantes dont le firmware applique ses propres décalages de zone en mode copie/miroir (par ex. le mode duplication IDEX de RepRapFirmware). Sans effet en mode Principal (Primary)." - # AI Translated #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Remplacement, par plaque, de la correspondance entre têtes physiques et emplacements de filament (numérotés à partir de 1). Vide signifie utiliser les valeurs par défaut obtenues par inversion de la table pem." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Axe autour duquel le maillage pivote avant le découpage. Il s'agit de l'inclinaison de l'imprimante à tapis : une rotation isométrique (sans distorsion) qui détermine aussi le rendu du plateau et l'inclinaison de la gravité pour les supports, et que la transformation inverse du G-code annule avant le cisaillement/la mise à l'échelle et le remappage dans le repère machine. X correspond à l'inclinaison habituelle du portique (le tapis avance le long de Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Réglage expert : définit l'angle d'inclinaison du repère machine (cisaillement/mise à l'échelle du G-code) indépendamment de l'angle de rotation avant découpage. Si désactivé, la transformation du repère machine est dérivée de l'angle d'inclinaison du tapis, de sorte qu'un seul angle pilote les deux étapes. N'activez cette option que pour compenser une machine dont l'inclinaison physique du portique diffère de la rotation de découpage." - -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "Écart maximal autorisé lors de la réduction de la résolution pour le paramètre « Résolution maximale des parois ». Si vous l’augmentez, l’impression sera moins exacte, mais le G-code sera plus petit. « Écart maximal des parois » limite « Résolution maximale des parois » ; en cas de conflit entre les deux, « Écart maximal des parois » est prioritaire." - #~ msgid " not in range " #~ msgstr " hors plage " diff --git a/localization/i18n/hu/OrcaSlicer_hu.po b/localization/i18n/hu/OrcaSlicer_hu.po index 612504a77b..aedd11a0a8 100644 --- a/localization/i18n/hu/OrcaSlicer_hu.po +++ b/localization/i18n/hu/OrcaSlicer_hu.po @@ -1743,7 +1743,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Az alakzat körvonala (%1%) nem támogatott elemet tartalmaz: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Érvénytelen állapot, kérlek, jelentsd a reprodukálás lépéseit a GitHubon" # AI Translated @@ -1751,11 +1751,11 @@ msgid "No embossed file" msgstr "Nincs dombornyomott fájl" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "Hiányzik az SVG fájl a dombornyomott alakzatból" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Hiányoznak az SVG fájl adatai" msgid "Face the camera" @@ -4984,7 +4984,7 @@ msgid "Unknown C++ exception." msgstr "Ismeretlen C++ kivétel." # AI Translated -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "G-code feldolgozása egy előző fájlból..." msgid "Slicing complete" @@ -23346,7 +23346,7 @@ msgstr "%s tesztelése indul..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "%s tesztelése: IP feloldva = %s" # AI Translated @@ -35877,7 +35877,7 @@ msgstr "Nem sikerült betölteni a(z) \"%1%\" konfigurációs fájlt: %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "Nem a(z) %1% által generált G-code fájl." # AI Translated @@ -35997,7 +35997,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "Nem sikerült ideiglenes másolatot készíteni a(z) %1% G-code fájlról az utófeldolgozó szkript futtatása előtt: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "Az utófeldolgozó nem találja az exportált G-code fájlt" # AI Translated @@ -36845,10 +36845,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "nincs beállított szerszám" -# AI Translated -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "Befejező G-code az egész nyomtatás befejezésekor" - #~ msgid "Maximum X speed" #~ msgstr "Maximális X sebesség" @@ -36865,26 +36861,10 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "A szeletelési folyamat minden lépésénél meghívott Python bővítmény(ek), amelyek beolvassák és módosítják a köztes szeletelési adatokat, beleértve egy záró G-code utófeldolgozási lépést is. Kutatási/kísérleti célra." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Ha engedélyezve van, a szeletelő úgy állítja elő a G-code-ot, hogy az elsődleges zóna tartalma az asztal origójára (0,0) van középre igazítva. A másolatok/tükörképek elhelyezése az egyes fizikai zónapozíciókba a nyomtató firmware-ének feladata. Csak olyan nyomtatókon engedélyezd, amelyek firmware-e másolat/tükör módban saját zónaeltolásokat alkalmaz (pl. RepRapFirmware IDEX duplikációs mód). Elsődleges (Primary) módban nincs hatása." - # AI Translated #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Tálcánkénti felülbírálás, amely a fizikai fejeket filamenthelyekhez rendeli (1-től számozva). Üresen a pem-inverzióból származó alapértelmezéseket használja." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Az a tengely, amely körül a háló szeletelés előtt elfordul. Ez a szalagos nyomtató dőlése: izometrikus (torzításmentes) forgatás, amely az asztal megjelenítését és a támaszok gravitációs dőlését is meghatározza, és amelyet a G-code visszatranszformáció megfordít a gépi koordináta-rendszerbe történő nyírás/skálázás és tengelyleképezés előtt. Jellemzően X a portál dőlési tengelye (a szalag Y irányban halad)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Szakértői felülbírálás: a gépi koordináta-rendszer (G-code nyírás/skálázás) dőlésszöge a szeletelés előtti forgatási szögtől függetlenül állítható be. Ha ki van kapcsolva, a gépi koordináta-rendszer transzformációja a szalag dőlésszögéből származik, így egyetlen szög vezérli mindkét lépést. Csak akkor engedélyezd, ha olyan gépet kell kompenzálni, amelynek fizikai portáldőlése eltér a szeletelési forgatástól." - -# AI Translated -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "A megengedett legnagyobb eltérés a „Maximális falfelbontás” beállítás felbontásának csökkentésekor. Ha ezt növeled, a nyomtatás kevésbé lesz pontos, de a G-code kisebb lesz. A „maximális faleltérés” korlátozza a „maximális falfelbontást”, így ha a kettő ütközik, a „Maximális faleltérés” élvez elsőbbséget." - #~ msgid " not in range " #~ msgstr " nincs a tartományban " diff --git a/localization/i18n/it/OrcaSlicer_it.po b/localization/i18n/it/OrcaSlicer_it.po index 960cbf4bec..3816ab158f 100644 --- a/localization/i18n/it/OrcaSlicer_it.po +++ b/localization/i18n/it/OrcaSlicer_it.po @@ -1749,7 +1749,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Il tratto della forma (%1%) contiene un'immagine non supportata: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Stato non valido, segnala su GitHub i passaggi per riprodurlo" # AI Translated @@ -1757,11 +1757,11 @@ msgid "No embossed file" msgstr "Nessun file in rilievo" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "File SVG mancante nella forma in rilievo" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Dati del file SVG mancanti" msgid "Face the camera" @@ -4975,7 +4975,7 @@ msgstr "Salva il progetto e riavvia l'applicazione." msgid "Unknown C++ exception." msgstr "Eccezione C++ sconosciuta." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Elaborazione G-Code dal file precedente..." msgid "Slicing complete" @@ -23205,7 +23205,7 @@ msgstr "avvio test %s..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "test %s IP risolto = %s" # AI Translated @@ -35707,7 +35707,7 @@ msgstr "Caricamento del file di configurazione \"%1%\" non riuscito: %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "Non è un file G-code generato da %1%." # AI Translated @@ -35827,7 +35827,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "Impossibile creare una copia temporanea del file G-code %1% prima di eseguire uno script di post-elaborazione: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "Il post-processore non trova il file G-code esportato" # AI Translated @@ -36668,9 +36668,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "nessuna testina configurata" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "G-code finale quando si termina la stampa." - #~ msgid "Maximum X speed" #~ msgstr "Velocità massima X" @@ -36687,25 +36684,10 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Plugin Python richiamati a ogni fase della pipeline di slicing per leggere e modificare i dati di slicing intermedi, incluso un passaggio finale di post-elaborazione del G-code. Ricerca/sperimentale." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Se abilitata, lo slicer genera G-code con il contenuto della zona principale centrato sull'origine del piatto (0,0). Il firmware della stampante si occupa di posizionare le copie e le immagini speculari nella posizione fisica di ciascuna zona. Abilita solo su stampanti il cui firmware applica i propri offset di zona in modalità Copia/Specchio (ad es. la modalità di duplicazione IDEX di RepRapFirmware). Non ha effetto in modalità Principale (Primary)." - # AI Translated #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Associazione per piatto, che sostituisce quella predefinita, tra testine fisiche e slot filamento (numerati da 1). Vuota significa usare i valori predefiniti dell'inversione pem." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Asse attorno al quale la mesh viene ruotata prima dell'elaborazione. È l'inclinazione della stampante a nastro: una rotazione isometrica (senza distorsione) che determina anche la visualizzazione del piatto e l'inclinazione della gravità per i supporti, e che la trasformazione inversa del G-code annulla prima di taglio/scala e rimappatura nel sistema di riferimento macchina. X è l'inclinazione tipica del portale (il nastro scorre lungo Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Opzione per esperti: imposta l'angolo di inclinazione del sistema di riferimento macchina (taglio/scala del G-code) indipendentemente dall'angolo di rotazione pre-elaborazione. Se disabilitata, la trasformazione del sistema di riferimento macchina deriva dall'angolo di inclinazione del nastro, quindi un unico angolo governa entrambe le fasi. Abilita solo per compensare una macchina la cui inclinazione fisica del portale differisce dalla rotazione di elaborazione." - -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "Deviazione massima consentita quando si riduce la risoluzione tramite l'impostazione \"Risoluzione massima parete\". Se si aumenta questo valore, la stampa sarà meno precisa, ma il G-Code sarà più contenuto. \"Deviazione massima parete\" limita \"Risoluzione massima parete\", quindi in caso di conflitto tra i due valori, \"Deviazione massima parete\" ha la precedenza." - #~ msgid " not in range " #~ msgstr " fuori portata " diff --git a/localization/i18n/ja/OrcaSlicer_ja.po b/localization/i18n/ja/OrcaSlicer_ja.po index 6a7d913431..ae1b9d8ee5 100644 --- a/localization/i18n/ja/OrcaSlicer_ja.po +++ b/localization/i18n/ja/OrcaSlicer_ja.po @@ -1738,7 +1738,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "形状 (%1%) のストロークにサポートされていないものが含まれています: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "無効な状態です。再現手順をGitHubで報告してください" # AI Translated @@ -1746,11 +1746,11 @@ msgid "No embossed file" msgstr "エンボス対象のファイルがありません" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "エンボス形状にSVGファイルがありません" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "SVGファイルのデータがありません" msgid "Face the camera" @@ -4972,7 +4972,7 @@ msgid "Unknown C++ exception." msgstr "不明なC++例外です。" # AI Translated -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "前のファイルのG-codeを処理中…" msgid "Slicing complete" @@ -23766,7 +23766,7 @@ msgstr "%s のテストを開始..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "%s のテスト: IP解決 = %s" # AI Translated @@ -36234,7 +36234,7 @@ msgstr "設定ファイル「%1%」の読み込みに失敗しました: %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "%1%で生成されたG-codeファイルではありません。" # AI Translated @@ -36354,7 +36354,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "後処理スクリプトの実行前にG-codeファイル%1%の一時コピーを作成できませんでした: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "後処理でエクスポートされたG-codeファイルが見つかりません" # AI Translated @@ -37219,9 +37219,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "未設定のツール" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "造形完了時のG-codeを追加" - #~ msgid "Maximum X speed" #~ msgstr "最大速度 X" @@ -37238,27 +37235,11 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "スライスパイプラインの各ステップで呼び出され、中間のスライスデータを読み取り・変更するPythonプラグインです。最終的なG-codeの後処理ステップも含みます。研究/実験用です。" -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "有効にすると、スライサーはプライマリゾーンの内容をベッド原点 (0,0) を中心に配置したG-codeを出力します。各物理ゾーン位置へのコピー/ミラーの配置はプリンターのファームウェアが行います。コピー/ミラーモードでファームウェアが独自のゾーンオフセットを適用するプリンター (例: RepRapFirmwareのIDEX複製モード) でのみ有効にしてください。プライマリ (Primary) モードでは効果がありません。" - # AI Translated # Needs human review: 'pem-inversion' is developer jargon (inverse of the physical extruder map); check the wording is understandable. #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "物理ヘッドをフィラメントスロットに対応付ける、プレートごとのオーバーライドです (1始まり)。空の場合はpem反転によるデフォルトを使用します。" -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "スライス前にメッシュを回転させる軸です。これはベルトプリンターの傾斜で、歪みのない等長回転です。ベッドの描画とサポートの重力方向の傾斜にも使用され、G-codeの逆変換では、機械座標系のせん断/スケールとリマップの前にこの回転が元に戻されます。一般的なガントリーの傾斜はXです (ベルトはY方向に移動)。" - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "エキスパート向けの上書き設定: 機械座標系 (G-codeのせん断/スケール) の傾斜角度を、スライス前の回転角度とは独立して設定します。無効の場合、機械座標系の変換はベルト傾斜角度から導出されるため、1つの角度で両方の段階を制御します。物理的なガントリーの傾斜がスライス時の回転と異なるマシンを補正する場合にのみ有効にしてください。" - -# AI Translated -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "「最大壁解像度」設定で解像度を下げる際に許容される最大偏差です。これを大きくすると印刷の精度は下がりますが、G-Codeは小さくなります。「最大壁偏差」は「最大壁解像度」を制限するため、両者が競合する場合は「最大壁偏差」が優先されます。" - #~ msgid " not in range " #~ msgstr "範囲外 " diff --git a/localization/i18n/ko/OrcaSlicer_ko.po b/localization/i18n/ko/OrcaSlicer_ko.po index 4358072734..96b91c533c 100644 --- a/localization/i18n/ko/OrcaSlicer_ko.po +++ b/localization/i18n/ko/OrcaSlicer_ko.po @@ -1747,7 +1747,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "모양의 획(%1%)에는 지원되지 않는 %2%가 포함되어 있습니다." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "유효하지 않은 상태입니다. GitHub에 재현 단계를 보고해 주세요" # AI Translated @@ -1755,11 +1755,11 @@ msgid "No embossed file" msgstr "양각 파일 없음" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "양각 형상에 SVG 파일이 없습니다" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "SVG 파일 데이터가 없습니다" msgid "Face the camera" @@ -5010,7 +5010,7 @@ msgid "Unknown C++ exception." msgstr "알 수 없는 C++ 예외입니다." # AI Translated -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "이전 파일의 G-code를 처리하는 중..." msgid "Slicing complete" @@ -23736,7 +23736,7 @@ msgstr "%s 테스트 시작..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "%s 테스트 IP 확인됨 = %s" # AI Translated @@ -36223,7 +36223,7 @@ msgstr "구성 파일 \"%1%\" 로드에 실패했습니다: %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "%1%에서 생성한 G-code 파일이 아닙니다." # AI Translated @@ -36343,7 +36343,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "후처리 스크립트를 실행하기 전에 G-code 파일 %1%의 임시 복사본을 만들지 못했습니다: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "후처리기가 내보낸 G-code 파일을 찾을 수 없습니다" # AI Translated @@ -37190,10 +37190,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "구성되지 않은 도구" -# AI Translated -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "출력이 종료될 때의 G-code" - #~ msgid "Maximum X speed" #~ msgstr "X축 최대 속도" @@ -37210,26 +37206,10 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "슬라이싱 파이프라인의 각 단계에서 호출되어 중간 슬라이싱 데이터를 읽고 수정하는 Python 플러그인입니다. 마지막 G-code 후처리 단계도 포함됩니다. 연구/실험용입니다." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "활성화하면 슬라이서가 주 영역의 내용을 베드 원점(0,0)에 중심을 맞춘 G-code를 생성합니다. 각 물리 영역 위치에 복사본/미러본을 배치하는 것은 프린터 펌웨어가 담당합니다. 복사/미러 모드에서 펌웨어가 자체 영역 오프셋을 적용하는 프린터(예: RepRapFirmware IDEX 복제 모드)에서만 활성화하세요. 주(Primary) 모드에서는 효과가 없습니다." - # AI Translated #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "물리 헤드를 필라멘트 슬롯(1부터 시작)에 매핑하는 플레이트별 재정의입니다. 비어 있으면 pem 역변환 기본값을 사용합니다." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "슬라이스 전에 메시를 회전시키는 기준 축입니다. 벨트 프린터의 기울기에 해당하며, 왜곡 없는(등거리) 회전으로 베드 렌더링과 서포트 중력 기울기에도 적용됩니다. G-code 역변환은 기계 좌표계 전단/배율 및 재매핑 전에 이 회전을 되돌립니다. 일반적인 갠트리 기울기는 X입니다(벨트는 Y 방향으로 이동)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "전문가용 재정의: 기계 좌표계(G-code 전단/배율) 기울기 각도를 슬라이스 전 회전 각도와 별도로 설정합니다. 비활성화하면 기계 좌표계 변환이 벨트 기울기 각도에서 산출되므로 하나의 각도가 두 단계를 모두 결정합니다. 실제 갠트리 기울기가 슬라이스 회전과 다른 기계를 보정할 때만 활성화하세요." - -# AI Translated -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "'최대 벽 해상도' 설정에 따라 해상도를 낮출 때 허용되는 최대 편차입니다. 이 값을 키우면 출력 정확도는 떨어지지만 G-code 크기는 작아집니다. '최대 벽 편차'는 '최대 벽 해상도'를 제한하므로, 두 설정이 충돌하면 '최대 벽 편차'가 우선합니다." - #~ msgid " not in range " #~ msgstr " 범위를 벗어남 " diff --git a/localization/i18n/lt/OrcaSlicer_lt.po b/localization/i18n/lt/OrcaSlicer_lt.po index 3385fec8ac..80e57150d7 100644 --- a/localization/i18n/lt/OrcaSlicer_lt.po +++ b/localization/i18n/lt/OrcaSlicer_lt.po @@ -1758,7 +1758,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Formos (%1%) kontūre yra nepalaikomų elementų: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Netinkama būsena. Praneškite atkūrimo veiksmus „GitHub“ svetainėje" # AI Translated @@ -1766,11 +1766,11 @@ msgid "No embossed file" msgstr "Nėra reljefinio failo" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "Reljefinėje formoje trūksta SVG failo" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Trūksta SVG failo duomenų" msgid "Face the camera" @@ -4976,7 +4976,7 @@ msgid "Unknown C++ exception." msgstr "Nežinoma C++ išimtis." # AI Translated -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Apdorojamas G-code iš ankstesnio failo…" msgid "Slicing complete" @@ -23239,7 +23239,7 @@ msgstr "pradedamas %s testas..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "%s testas: nustatytas IP = %s" # AI Translated @@ -35694,7 +35694,7 @@ msgstr "Nepavyko įkelti konfigūracijos failo „%1%“: %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "Tai ne %1% sugeneruotas G-code failas." # AI Translated @@ -35814,7 +35814,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "Nepavyko sukurti laikinos G-code failo %1% kopijos prieš paleidžiant papildomo apdorojimo scenarijų: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "Papildomo apdorojimo programa neranda eksportuoto G-code failo" # AI Translated @@ -36664,10 +36664,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "nėra sukonfigūruoto įrankio" -# AI Translated -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "Pabaigos G-code, vykdomas baigus visą spausdinimą." - #~ msgid "Maximum X speed" #~ msgstr "Didžiausias X greitis" @@ -36684,26 +36680,11 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Python papildinys (-iai), iškviečiamas kiekviename pjaustymo konvejerio žingsnyje, kad nuskaitytų ir keistų tarpinius pjaustymo duomenis, įskaitant galutinį G-code po apdorojimo žingsnį. Tyrimų/eksperimentinis." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Kai įjungta, pjaustyklė generuoja G-code, kuriame pagrindinės zonos turinys centruotas pagrindo koordinačių pradžioje (0,0). Kopijas ir veidrodinius atvaizdus kiekvienos fizinės zonos padėtyje išdėsto spausdintuvo programinė aparatinė įranga. Įjunkite tik tuose spausdintuvuose, kurių programinė aparatinė įranga kopijos (Copy) / veidrodžio (Mirror) režimu pati taiko zonų poslinkius (pvz., RepRapFirmware IDEX dubliavimo režimas). Režimu „Pagrindinis“ neturi jokio poveikio." - # AI Translated # Needs human review: 'pem-inversion' is an undefined internal term kept verbatim; check what it refers to and whether it should be explained or translated. #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Plokštės lygmens perrašymas, susiejantis fizines galvutes su gijų lizdais (numeruojama nuo 1). Tuščia reiškia, kad naudojami numatytieji pem-inversion nustatymai." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Ašis, apie kurią poligoninis tinklas pasukamas prieš sluoksniavimą. Tai juostinio spausdintuvo pokrypis: izometrinis (be iškraipymų) pasukimas, kuris taip pat lemia pagrindo atvaizdavimą ir atramų sunkio jėgos pokrypį ir kurį atvirkštinė G-code transformacija panaikina prieš mašinos koordinačių sistemos šlytį / mastelį ir ašių perskirstymą. X – įprastas portalo pokrypis (juosta juda išilgai Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Eksperto parinktis: nustatyti mašinos koordinačių sistemos (G-code šlyties / mastelio) pokrypio kampą nepriklausomai nuo pasukimo prieš sluoksniavimą kampo. Kai išjungta, mašinos koordinačių sistemos transformacija išvedama iš juostos pokrypio kampo, todėl vienas kampas valdo abu etapus. Įjunkite tik tada, kai reikia kompensuoti įrenginį, kurio fizinis portalo pokrypis skiriasi nuo sluoksniavimo pasukimo." - -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "Didžiausias leidžiamas nuokrypis, mažinant „Didžiausios sienelės raiškos“ nustatymo skiriamąją gebą. Jei jį padidinsite, spaudinys bus mažiau tikslus, tačiau G-kodas (G-Code) bus mažesnės apimties. „Didžiausias sienelės nuokrypis“ riboja „Didžiausią sienelės raišką“, todėl jei šie du nustatymai konfliktuoja, viršenybė teikiama „Didžiausiam sienelės nuokrypiui“." - #~ msgid " not in range " #~ msgstr " nepatenka į intervalą " diff --git a/localization/i18n/nl/OrcaSlicer_nl.po b/localization/i18n/nl/OrcaSlicer_nl.po index 518e4a1cde..d4d4a9ee45 100644 --- a/localization/i18n/nl/OrcaSlicer_nl.po +++ b/localization/i18n/nl/OrcaSlicer_nl.po @@ -1870,7 +1870,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "De lijn van vorm (%1%) bevat niet-ondersteund: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Ongeldige status; meld de stappen om dit te reproduceren op GitHub" # AI Translated @@ -1878,11 +1878,11 @@ msgid "No embossed file" msgstr "Geen reliëfbestand" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "SVG-bestand ontbreekt in de reliëfvorm" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Gegevens van het SVG-bestand ontbreken" # AI Translated @@ -5371,7 +5371,7 @@ msgstr "Sla uw project alstublieft op en herstart het programma." msgid "Unknown C++ exception." msgstr "Onbekende C++-uitzondering." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "De G-code van het vorige bestand wordt verwerkt..." msgid "Slicing complete" @@ -25201,7 +25201,7 @@ msgstr "test %s gestart..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "test %s ip omgezet = %s" # AI Translated @@ -37875,7 +37875,7 @@ msgstr "Laden van configuratiebestand \"%1%\" mislukt: %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "Geen G-code-bestand dat door %1% is gegenereerd." # AI Translated @@ -37995,7 +37995,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "Kan geen tijdelijke kopie van G-code-bestand %1% maken voordat een nabewerkingsscript wordt uitgevoerd: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "Nabewerking kan het geëxporteerde G-code-bestand niet vinden" # AI Translated @@ -38878,9 +38878,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "geen geconfigureerd gereedschap" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "Voeg een eind G-code toe bij het afwerken van de hele print." - #~ msgid "Maximum X speed" #~ msgstr "Maximale X snelheid" @@ -38897,27 +38894,11 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Python-plug-in(s) die bij elke stap van de slicepijplijn worden aangeroepen om tussentijdse slicegegevens te lezen en te wijzigen, inclusief een afsluitende nabewerkingsstap voor de G-code. Onderzoek/experimenteel." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Indien ingeschakeld genereert de slicer G-code waarin de inhoud van de primaire zone gecentreerd is op de oorsprong van het printbed (0,0). De printerfirmware is verantwoordelijk voor het plaatsen van kopieën/spiegelingen op elke fysieke zonepositie. Schakel dit alleen in op printers waarvan de firmware zelf zoneverschuivingen toepast in de kopie-/spiegelmodus (bijv. de IDEX-duplicatiemodus van RepRapFirmware). Heeft geen effect in de modus Primair." - # AI Translated # Needs human review: 'pem-inversion' is unexplained jargon in the source (probably the inverse of the physical extruder map); check the wording once the English is clarified. #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Overschrijving per printbed die fysieke koppen aan filamentslots koppelt (vanaf 1 geteld). Leeg betekent dat de standaardwaarden uit de pem-inversie worden gebruikt." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "As waarom de mesh vóór het slicen wordt gedraaid. Dit is de kanteling van de bandprinter: een isometrische rotatie (zonder vervorming) die ook de weergave van het printbed en de zwaartekrachtkanteling van de ondersteuning bepaalt, en die de G-code-terugtransformatie omkeert vóór de afschuiving/schaling naar het machinecoördinatenstelsel en de herindeling van de assen. X is de gebruikelijke kanteling van het portaal (de band beweegt langs Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Overschrijving voor experts: stel de kantelhoek van het machinecoördinatenstelsel (G-code-afschuiving/-schaling) in los van de rotatiehoek vóór het slicen. Indien uitgeschakeld wordt de transformatie naar het machinecoördinatenstelsel afgeleid van de kantelhoek van de band, zodat één hoek beide stappen bepaalt. Schakel dit alleen in om te compenseren voor een machine waarvan de fysieke portaalkanteling afwijkt van de slicerotatie." - -# AI Translated -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "De maximale afwijking die is toegestaan bij het verlagen van de resolutie voor de instelling 'Maximale wandresolutie'. Als u deze verhoogt, wordt de print minder nauwkeurig, maar de G-code kleiner. 'Maximale wandafwijking' beperkt 'Maximale wandresolutie'; als de twee met elkaar in conflict zijn, gaat 'Maximale wandafwijking' voor." - # AI Translated #~ msgid " not in range " #~ msgstr " niet in bereik " diff --git a/localization/i18n/pl/OrcaSlicer_pl.po b/localization/i18n/pl/OrcaSlicer_pl.po index a8292fdfd8..e503aca909 100644 --- a/localization/i18n/pl/OrcaSlicer_pl.po +++ b/localization/i18n/pl/OrcaSlicer_pl.po @@ -1763,7 +1763,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Obrys kształtu (%1%) zawiera nieobsługiwane: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Nieprawidłowy stan, zgłoś na GitHubie kroki pozwalające odtworzyć problem" # AI Translated @@ -1771,11 +1771,11 @@ msgid "No embossed file" msgstr "Brak pliku wytłoczenia" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "Brak pliku SVG w wytłoczonym kształcie" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Brak danych pliku SVG" msgid "Face the camera" @@ -5069,7 +5069,7 @@ msgstr "Zapisz projekt i uruchom program ponownie." msgid "Unknown C++ exception." msgstr "Nieznany wyjątek C++." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Przetwarzanie G-code z poprzedniego pliku..." msgid "Slicing complete" @@ -23783,7 +23783,7 @@ msgstr "test %s: start..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "test %s: rozwiązany adres IP = %s" # AI Translated @@ -36301,7 +36301,7 @@ msgstr "Nie udało się wczytać pliku konfiguracyjnego „%1%”: %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "To nie jest plik G-code wygenerowany przez %1%." # AI Translated @@ -36421,7 +36421,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "Nie udało się utworzyć tymczasowej kopii pliku G-code %1% przed uruchomieniem skryptu post-processingu: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "Post-procesor nie może znaleźć wyeksportowanego pliku G-code" # AI Translated @@ -37270,9 +37270,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "brak skonfigurowanego narzędzia" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "Końcowy G-code po zakończeniu całego druku" - #~ msgid "Maximum X speed" #~ msgstr "Maksymalna prędkość X" @@ -37289,27 +37286,11 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Wtyczki Pythona wywoływane na każdym etapie potoku cięcia w celu odczytu i modyfikacji pośrednich danych cięcia, w tym końcowego etapu postprocessingu G-code. Badawcze/eksperymentalne." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Gdy ta opcja jest włączona, slicer generuje G-code z zawartością strefy głównej wyśrodkowaną względem początku układu stołu (0,0). Oprogramowanie sprzętowe drukarki odpowiada za umieszczenie kopii i odbić lustrzanych w położeniu każdej fizycznej strefy. Włączaj tylko w drukarkach, których oprogramowanie sprzętowe samo stosuje przesunięcia stref w trybie Kopia/Lustro (np. tryb duplikacji IDEX w RepRapFirmware). Nie ma wpływu w trybie głównym (Primary)." - # AI Translated # Needs human review: 'pem-inversion' (inverse of the physical extruder map) is developer jargon kept as 'odwrócenia pem'; check it is understandable. #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Nadpisanie dla płyty przypisujące fizyczne głowice do gniazd filamentu (liczonych od 1). Puste oznacza użycie wartości domyślnych z odwrócenia pem." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Oś, wokół której siatka jest obracana przed cięciem. To pochylenie drukarki taśmowej: obrót izometryczny (bez zniekształceń), który steruje również renderowaniem stołu i pochyleniem grawitacji dla podpór i który odwrotna transformacja G-code cofa przed ścinaniem/skalowaniem w układzie współrzędnych maszyny i przemapowaniem osi. X to typowe pochylenie portalu (taśma przesuwa się wzdłuż Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Nadpisanie dla ekspertów: ustawia kąt pochylenia układu współrzędnych maszyny (ścinanie/skalowanie G-code) niezależnie od kąta obrotu przed cięciem. Gdy opcja jest wyłączona, transformacja układu współrzędnych maszyny jest wyznaczana z kąta pochylenia taśmy, więc jeden kąt steruje oboma etapami. Włączaj tylko w celu kompensacji maszyny, której fizyczne pochylenie portalu różni się od obrotu przy cięciu." - -# AI Translated -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "Maksymalna dopuszczalna odchyłka przy zmniejszaniu rozdzielczości dla ustawienia „Maksymalna rozdzielczość ściany”. Jej zwiększenie sprawi, że wydruk będzie mniej dokładny, ale G-code będzie mniejszy. „Maksymalna odchyłka ściany” ogranicza „Maksymalną rozdzielczość ściany”, więc w razie konfliktu pierwszeństwo ma „Maksymalna odchyłka ściany”." - #~ msgid " not in range " #~ msgstr " nie w zakresie " diff --git a/localization/i18n/pt_BR/OrcaSlicer_pt_BR.po b/localization/i18n/pt_BR/OrcaSlicer_pt_BR.po index 06fd49ab2f..697f0f625d 100644 --- a/localization/i18n/pt_BR/OrcaSlicer_pt_BR.po +++ b/localization/i18n/pt_BR/OrcaSlicer_pt_BR.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: Orca Slicer\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-10-15 17:40+0800\n" -"PO-Revision-Date: 2026-10-11 16:22-0300\n" +"PO-Revision-Date: 2026-10-17 10:38-0300\n" "Last-Translator: Alexandre Folle de Menezes\n" "Language-Team: Portuguese, Brazilian\n" "Language: pt_BR\n" @@ -17,7 +17,7 @@ msgstr "" "X-Crowdin-Language: pt-BR\n" "X-Crowdin-Project: orcaslicer-pt-br\n" "X-Crowdin-Project-ID: 664934\n" -"X-Generator: Poedit 3.9\n" +"X-Generator: Poedit 3.10\n" msgid "Main Extruder" msgstr "Extrusora Principal" @@ -1675,16 +1675,16 @@ msgstr "O traço da forma (%1%) é muito fino (largura mínima é %2% mm)." msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "O traço da forma (%1%) contém não suportado: %2%." -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Estado inválido, informe os passos para reproduzir no GitHub" msgid "No embossed file" msgstr "Nenhum arquivo em relevo" -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "Arquivo SVG ausente na forma em relevo" -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Dados do arquivo SVG ausentes" msgid "Face the camera" @@ -4799,7 +4799,7 @@ msgstr "Por favor, salve seu projeto e reinicie a aplicação." msgid "Unknown C++ exception." msgstr "Exceção C++ desconhecida." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Processando o G-code do arquivo anterior…" msgid "Slicing complete" @@ -15313,7 +15313,6 @@ msgstr "Este é o comprimento máximo de pontes que não precisam de suporte. De msgid "End G-code" msgstr "G-code de finalização" -# AI Translated msgid "Add end G-code when finishing the entire print." msgstr "Adicionar G-code de finalização ao terminar a impressão completa." @@ -22435,7 +22434,7 @@ msgid "test %s start..." msgstr "iniciando teste de %s..." #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "teste de %s: IP resolvido = %s" #, c-format, boost-format @@ -29594,31 +29593,24 @@ msgid_plural "The material list supports at most %1% colors. After %2% decomposi msgstr[0] "A lista de materiais suporta no máximo %1% cor. Após a decomposição de %2%, a quantidade de materiais excederia %1%. Exclua os filamentos não utilizados na tela principal antes de decompor." msgstr[1] "A lista de materiais suporta no máximo %1% cores. Após a decomposição de %2%, a quantidade de materiais excederia %1%. Exclua os filamentos não utilizados na tela principal antes de decompor." -# AI Translated msgid "Cyan" msgstr "Ciano" -# AI Translated msgid "Magenta" msgstr "Magenta" -# AI Translated msgid "Yellow" msgstr "Amarelo" -# AI Translated msgid "White" msgstr "Branco" -# AI Translated msgid "Red" msgstr "Vermelho" -# AI Translated msgid "Green" msgstr "Verde" -# AI Translated msgid "Blue" msgstr "Azul" @@ -29642,64 +29634,64 @@ msgstr[0] "A lista de filamentos atual não contém %s. Um filamento do projeto msgstr[1] "A lista de filamentos atual não contém %s. Os filamentos do projeto exigidos pelo filamento misto serão criados automaticamente após a decomposição." msgid "Color Picker" -msgstr "" +msgstr "Seletor de Cores" msgid "Basic Colors" -msgstr "" +msgstr "Cores Básicas" msgid "Orca Palette" -msgstr "" +msgstr "Paleta Orca" #. TRN: Keep the brand name "Orca" unchanged; translate only the palette descriptor. msgid "RAL Classic" -msgstr "" +msgstr "RAL Clássico" #. TRN: Keep the standard/brand name "RAL" unchanged. msgid "Gradients" -msgstr "" +msgstr "Degradês" msgid "Solid" -msgstr "" +msgstr "Sólido" msgid "Gradient" -msgstr "" +msgstr "Degradê" msgid "Gradient start" -msgstr "" +msgstr "Início do degradê" msgid "Gradient end" -msgstr "" +msgstr "Final do degradê" msgid "Gradient color" -msgstr "" +msgstr "Cor em degradê" msgid "Add color" -msgstr "" +msgstr "Adicionar cor" msgid "Remove color" -msgstr "" +msgstr "Remover cor" msgid "Saturation" -msgstr "" +msgstr "Saturação" msgid "Original color" -msgstr "" +msgstr "Cor original" #. TRN: Clicking the current color preview adds it to the saved favorites. msgid "Save current color" -msgstr "" +msgstr "Salvar cor atual" msgid "Palettes" -msgstr "" +msgstr "Paletas" msgid "Search colors" -msgstr "" +msgstr "Buscar cores" msgid "Filter colors" -msgstr "" +msgstr "Filtrar cores" msgid "No matching colors" -msgstr "" +msgstr "Nenhuma cor correspondente" msgid "Hex color" msgstr "" @@ -29712,7 +29704,7 @@ msgid "Opacity percent" msgstr "" msgid "Save color" -msgstr "" +msgstr "Salvar cor" msgid "Enter a complete hexadecimal color" msgstr "" @@ -29722,25 +29714,25 @@ msgstr "" #, c-format, boost-format msgid "Up to %d colors supported." -msgstr "" +msgstr "Até %d cores suportadas." msgid "Crimson" -msgstr "" +msgstr "Carmesin" msgid "Orange red" -msgstr "" +msgstr "Vermelho laranja" msgid "Tomato" -msgstr "" +msgstr "Tomate" msgid "Orange" -msgstr "" +msgstr "Laranja" msgid "Dark orange" -msgstr "" +msgstr "Laranja escuro" msgid "Gold" -msgstr "" +msgstr "Ouro" msgid "Burly wood" msgstr "" @@ -29752,13 +29744,13 @@ msgid "Misty rose" msgstr "" msgid "Light yellow" -msgstr "" +msgstr "Amarelo claro" msgid "Lemon chiffon" msgstr "" msgid "Beige" -msgstr "" +msgstr "Bege" msgid "Light golden rod yellow" msgstr "" @@ -29767,10 +29759,10 @@ msgid "Pale golden rod" msgstr "" msgid "Khaki" -msgstr "" +msgstr "Cáqui" msgid "Dark khaki" -msgstr "" +msgstr "Cáqui escuro" msgid "Peach puff" msgstr "" @@ -29779,25 +29771,25 @@ msgid "Moccasin" msgstr "" msgid "Papaya whip" -msgstr "" +msgstr "Creme de papaia" msgid "Blanched almond" msgstr "" msgid "Antique white" -msgstr "" +msgstr "Branco antigo" msgid "Navajo white" msgstr "" msgid "Wheat" -msgstr "" +msgstr "Trigo" msgid "Golden rod" msgstr "" msgid "Chocolate" -msgstr "" +msgstr "Chocolate" msgid "Peru" msgstr "" @@ -29812,37 +29804,37 @@ msgid "Saddle brown" msgstr "" msgid "Brown" -msgstr "" +msgstr "Marrom" msgid "Rosy brown" msgstr "" msgid "Salmon" -msgstr "" +msgstr "Salmão" msgid "Light salmon" -msgstr "" +msgstr "Salmão claro" msgid "Dark salmon" -msgstr "" +msgstr "Salmão escuro" msgid "Sandy brown" msgstr "" msgid "Coral" -msgstr "" +msgstr "Coral" msgid "Light coral" -msgstr "" +msgstr "Coral claro" msgid "Indian red" msgstr "" msgid "Dark red" -msgstr "" +msgstr "Vermelho escuro" msgid "Maroon" -msgstr "" +msgstr "Bordô" msgid "Green yellow" msgstr "" @@ -29857,7 +29849,7 @@ msgid "Lawn green" msgstr "" msgid "Lime green" -msgstr "" +msgstr "Verde limão" msgid "Spring green" msgstr "" @@ -29872,7 +29864,7 @@ msgid "Forest green" msgstr "" msgid "Dark green" -msgstr "" +msgstr "Verde escuro" msgid "Olive drab" msgstr "" @@ -29881,13 +29873,13 @@ msgid "Olive" msgstr "" msgid "Dark olive green" -msgstr "" +msgstr "Verde oliva escuro" msgid "Pale green" msgstr "" msgid "Light green" -msgstr "" +msgstr "Verde claro" msgid "Medium sea green" msgstr "" @@ -29905,13 +29897,13 @@ msgid "Medium aqua marine" msgstr "" msgid "Turquoise" -msgstr "" +msgstr "Turquesa" msgid "Medium turquoise" -msgstr "" +msgstr "Turquesa médio" msgid "Dark turquoise" -msgstr "" +msgstr "Turquesa escuro" msgid "Pale turquoise" msgstr "" @@ -29920,7 +29912,7 @@ msgid "Aqua" msgstr "" msgid "Light cyan" -msgstr "" +msgstr "Ciano claro" msgid "Mint cream" msgstr "" @@ -29935,7 +29927,7 @@ msgid "Light sea green" msgstr "" msgid "Dark cyan" -msgstr "" +msgstr "Ciano escuro" msgid "Teal" msgstr "" @@ -29950,7 +29942,7 @@ msgid "Slate gray" msgstr "" msgid "Deep sky blue" -msgstr "" +msgstr "Azul celeste profundo" msgid "Dodger Blue" msgstr "" @@ -29959,10 +29951,10 @@ msgid "Sky blue" msgstr "" msgid "Light sky blue" -msgstr "" +msgstr "Azul celeste claro" msgid "Light blue" -msgstr "" +msgstr "Azula claro" msgid "Powder blue" msgstr "" @@ -29980,13 +29972,13 @@ msgid "Royal blue" msgstr "" msgid "Medium blue" -msgstr "" +msgstr "Azul médio" msgid "Midnight blue" msgstr "" msgid "Dark blue" -msgstr "" +msgstr "Azul escuro" msgid "Navy" msgstr "" @@ -30004,10 +29996,10 @@ msgid "Blue violet" msgstr "" msgid "Indigo" -msgstr "" +msgstr "Índigo" msgid "Dark violet" -msgstr "" +msgstr "Violeta escuro" msgid "Dark orchid" msgstr "" @@ -30019,13 +30011,13 @@ msgid "Orchid" msgstr "" msgid "Violet" -msgstr "" +msgstr "Violeta" msgid "Medium purple" -msgstr "" +msgstr "Púrpura médio" msgid "Purple" -msgstr "" +msgstr "Púrpura" msgid "Rebecca purple" msgstr "" @@ -30049,19 +30041,19 @@ msgid "Pink" msgstr "" msgid "Plum" -msgstr "" +msgstr "Ameixa" msgid "Thistle" msgstr "" msgid "Fuchsia" -msgstr "" +msgstr "Fúcsia" msgid "Dark magenta" -msgstr "" +msgstr "Magenta escuro" msgid "Linen" -msgstr "" +msgstr "Linho" msgid "Old lace" msgstr "" @@ -30070,7 +30062,7 @@ msgid "Sea shell" msgstr "" msgid "Ivory" -msgstr "" +msgstr "Marfim" msgid "Floral white" msgstr "" @@ -30085,7 +30077,7 @@ msgid "Alice blue" msgstr "" msgid "Lavender" -msgstr "" +msgstr "Lavanda" msgid "White smoke" msgstr "" @@ -30094,7 +30086,7 @@ msgid "Gainsboro" msgstr "" msgid "Black" -msgstr "" +msgstr "Preto" msgid "Coral fire" msgstr "" @@ -30106,7 +30098,7 @@ msgid "Deep abyss" msgstr "" msgid "Lobster red" -msgstr "" +msgstr "Vermelho lagosta" msgid "Sandy clay" msgstr "" @@ -30124,7 +30116,7 @@ msgid "Tiger coral" msgstr "" msgid "Pink coral" -msgstr "" +msgstr "Coral rosa" msgid "Seashell glow" msgstr "" @@ -30226,7 +30218,7 @@ msgid "Neon jelly" msgstr "" msgid "Fuchsia coral" -msgstr "" +msgstr "Coral fúcsia" msgid "Pink jellyfish" msgstr "" @@ -30250,16 +30242,16 @@ msgid "Green beige" msgstr "" msgid "Sand yellow" -msgstr "" +msgstr "Amarelo areia" msgid "Signal yellow" msgstr "" msgid "Golden yellow" -msgstr "" +msgstr "Amarelo dourado" msgid "Honey yellow" -msgstr "" +msgstr "Amarelo mel" msgid "Maize yellow" msgstr "" @@ -30271,16 +30263,16 @@ msgid "Brown beige" msgstr "" msgid "Lemon yellow" -msgstr "" +msgstr "Amarelo limão" msgid "Oyster white" msgstr "" msgid "Light ivory" -msgstr "" +msgstr "Marfim claro" msgid "Zinc yellow" -msgstr "" +msgstr "Amarelo zinco" msgid "Grey beige" msgstr "" @@ -30295,7 +30287,7 @@ msgid "Traffic yellow" msgstr "" msgid "Ochre yellow" -msgstr "" +msgstr "Amarelo ocre" msgid "Traffic orange yellow" msgstr "" @@ -30304,7 +30296,7 @@ msgid "Curry" msgstr "" msgid "Melon yellow" -msgstr "" +msgstr "Amarelo melão" msgid "Broom yellow" msgstr "" @@ -30313,7 +30305,7 @@ msgid "Dahlia yellow" msgstr "" msgid "Pastel yellow" -msgstr "" +msgstr "Amarelo pastel" msgid "Pearl beige" msgstr "" @@ -30328,7 +30320,7 @@ msgid "Yellow orange" msgstr "" msgid "Deep orange" -msgstr "" +msgstr "Laranja profundo" msgid "Vermilion" msgstr "" @@ -30337,13 +30329,13 @@ msgid "Pearl orange" msgstr "" msgid "Pure orange" -msgstr "" +msgstr "Laranja puro" msgid "Luminous orange" -msgstr "" +msgstr "Laranja luminoso" msgid "Luminous bright orange" -msgstr "" +msgstr "Laranja brilhante luminoso" msgid "Bright red orange" msgstr "" @@ -30373,19 +30365,19 @@ msgid "Signal red" msgstr "" msgid "Luminous red" -msgstr "" +msgstr "Vermelho luminoso" msgid "Carmine red" -msgstr "" +msgstr "Vermelho carmim" msgid "Pearl carmine red" msgstr "" msgid "Pure red" -msgstr "" +msgstr "Vermelho puro" msgid "Luminous deep red" -msgstr "" +msgstr "Vermelho profundo luminoso" msgid "Currant red" msgstr "" @@ -30394,22 +30386,22 @@ msgid "Pearl ruby red" msgstr "" msgid "Fire red" -msgstr "" +msgstr "Vermelho fogo" msgid "Ruby red" -msgstr "" +msgstr "Vermelho rubi" msgid "Purple red" -msgstr "" +msgstr "Vermelho púrpura" msgid "Wine red" -msgstr "" +msgstr "Vermelho vinho" msgid "Black red" msgstr "" msgid "Oxide red" -msgstr "" +msgstr "Vermelho ferrugem" msgid "Brown red" msgstr "" @@ -30418,19 +30410,19 @@ msgid "Pine red" msgstr "" msgid "Tomato red" -msgstr "" +msgstr "Vermelho tomate" msgid "Antique pink" msgstr "" msgid "Coral red" -msgstr "" +msgstr "Vermelho coral" msgid "Rose" msgstr "" msgid "Strawberry red" -msgstr "" +msgstr "Vermelho morango" msgid "Traffic red" msgstr "" @@ -30439,13 +30431,13 @@ msgid "Salmon pink" msgstr "" msgid "Luminous rose" -msgstr "" +msgstr "Rosa luminoso" msgid "Luminous bright red" -msgstr "" +msgstr "Vermelho brilhante luminoso" msgid "Raspberry red" -msgstr "" +msgstr "Vermelho framboesa" msgid "Orient red" msgstr "" @@ -30454,7 +30446,7 @@ msgid "Pearl ruby" msgstr "" msgid "Red purple" -msgstr "" +msgstr "Púrpura vermelho" msgid "Red violet" msgstr "" @@ -30466,7 +30458,7 @@ msgid "Bordeaux violet" msgstr "" msgid "Mahogany" -msgstr "" +msgstr "Mogno" msgid "Grey purple" msgstr "" @@ -30493,7 +30485,7 @@ msgid "Ultramarine blue" msgstr "" msgid "Sapphire blue" -msgstr "" +msgstr "Azul safira" msgid "Black blue" msgstr "" @@ -30514,7 +30506,7 @@ msgid "Gentian blue" msgstr "" msgid "Cobalt blue" -msgstr "" +msgstr "Azul cobalto" msgid "Pigeon blue" msgstr "" @@ -30529,7 +30521,7 @@ msgid "Capsanthin violet" msgstr "" msgid "Ocean blue" -msgstr "" +msgstr "Azul marinho" msgid "Water blue" msgstr "" @@ -30541,7 +30533,7 @@ msgid "Distant blue" msgstr "" msgid "Pastel blue" -msgstr "" +msgstr "Azul pastel" msgid "Pearl gentian blue" msgstr "" @@ -30550,22 +30542,22 @@ msgid "Pearl midnight blue" msgstr "" msgid "Patina green" -msgstr "" +msgstr "Verde pátina" msgid "Emerald green" -msgstr "" +msgstr "Verde esmeralda" msgid "Leaf green" -msgstr "" +msgstr "Verde folha" msgid "Olive green" -msgstr "" +msgstr "Verde oliva" msgid "Blue green" msgstr "" msgid "Moss green" -msgstr "" +msgstr "Verde musgo" msgid "Grey olive" msgstr "" @@ -30607,7 +30599,7 @@ msgid "Fern green" msgstr "" msgid "Opal green" -msgstr "" +msgstr "Verde opala" msgid "Mint green" msgstr "" @@ -30628,10 +30620,10 @@ msgid "Pearl jade" msgstr "" msgid "Pure green" -msgstr "" +msgstr "Verde puro" msgid "Luminous green" -msgstr "" +msgstr "Verde luminoso" msgid "Squirrel grey" msgstr "" @@ -30745,7 +30737,7 @@ msgid "Green brown" msgstr "" msgid "Ochre brown" -msgstr "" +msgstr "Marrom ocre" msgid "Clay brown" msgstr "" @@ -30763,7 +30755,7 @@ msgid "Nut brown" msgstr "" msgid "Red brown" -msgstr "" +msgstr "Marrom vermelho" msgid "Sepia brown" msgstr "" @@ -30772,7 +30764,7 @@ msgid "Chestnut brown" msgstr "" msgid "Mahogany brown" -msgstr "" +msgstr "Marrom mogno" msgid "Grey brown" msgstr "" @@ -30814,10 +30806,10 @@ msgid "Grey aluminium" msgstr "" msgid "Pure white" -msgstr "" +msgstr "Branco puro" msgid "Graphite black" -msgstr "" +msgstr "Preto grafite" msgid "Traffic white" msgstr "" @@ -30826,46 +30818,46 @@ msgid "Traffic black" msgstr "" msgid "Papyrus white" -msgstr "" +msgstr "Branco papiro" msgid "Pearl light grey" msgstr "" msgid "Metal: Silver" -msgstr "" +msgstr "Metal: Prata" msgid "Metal: Brass" -msgstr "" +msgstr "Metal: Latão" msgid "Metal: Gold" -msgstr "" +msgstr "Metal: Ouro" msgid "Metal: Copper" -msgstr "" +msgstr "Metal: Cobre" msgid "Metal: Bronze" -msgstr "" +msgstr "Metal: Bronze" msgid "Nature: Pearl" -msgstr "" +msgstr "Natureza: Pérola" msgid "Nature: Rainbow" -msgstr "" +msgstr "Natureza: Arco-Íris" msgid "Nature: Clear Sky" -msgstr "" +msgstr "Natureza: Céu Limpo" msgid "Nature: Sunset" -msgstr "" +msgstr "Natureza: Pôr do Sol" msgid "Wood: Dark" -msgstr "" +msgstr "Madeira: Escura" msgid "Wood: Medium" -msgstr "" +msgstr "Madeira: Média" msgid "Wood: Light" -msgstr "" +msgstr "Madeira: Clara" # AI Translated msgid "Alternate nozzles:" @@ -32402,9 +32394,8 @@ msgstr "+ Adicionar Material" msgid "- Delete Material" msgstr "- Excluir Material" -# AI Translated msgid "Gradient Effect" -msgstr "Efeito de Gradiente" +msgstr "Efeito de Degradê" # AI Translated msgid "Enable per-part gradient effect" @@ -34559,7 +34550,7 @@ msgstr "Falha ao carregar o arquivo de configuração \"%1%\": %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "Não é um arquivo G-code gerado pelo %1%." # AI Translated @@ -34676,7 +34667,7 @@ msgstr "" msgid "Failed making a temporary copy of G-code file %1% before running a post-processing script: %2%" msgstr "Falha ao criar uma cópia temporária do arquivo G-code %1% antes de executar um script de pós-processamento: %2%" -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "O pós-processador não consegue encontrar o arquivo G-code exportado" #, boost-format @@ -34944,8 +34935,7 @@ msgstr "" "Divida suas impressões em placas\n" "Você sabia que pode dividir um modelo que tem diversas peças em placas individuais distintas prontas para imprimir? Isso simplifica o processo de manter o controle de todas as peças." -#: resources/data/hints.ini: [hint:Speed up your print with Adaptive Layer -#: Height] +#: resources/data/hints.ini: [hint:Speed up your print with Adaptive Layer Height] msgid "" "Speed up your print with Adaptive Layer Height\n" "Did you know that you can print a model even faster by using the Adaptive Layer Height option? Check it out!" @@ -35017,8 +35007,7 @@ msgstr "" "Melhorar a resistência\n" "Você sabia que pode usar mais voltas de parede e maior densidade de preenchimento esparso mais alta para melhorar a resistência do modelo?" -#: resources/data/hints.ini: [hint:When do you need to print with the printer -#: door opened] +#: resources/data/hints.ini: [hint:When do you need to print with the printer door opened] msgid "" "When do you need to print with the printer door opened?\n" "Did you know that opening the printer door can reduce the probability of extruder/hotend clogging when printing lower temperature filament with a higher enclosure temperature? There is more info about this in the Wiki." @@ -35495,13 +35484,6 @@ msgstr "" #~ msgid " is partially outside the printable area, and it cannot be printed.\n" #~ msgstr " está parcialmente fora da área imprimível, e não pode ser impresso.\n" -# AI Translated -#~ msgid "no configured tool" -#~ msgstr "nenhuma ferramenta configurada" - -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "Adicionar G-code de finalização ao terminar a impressão completa." - #~ msgid "Maximum X speed" #~ msgstr "Velocidade máxima em X" @@ -35517,25 +35499,10 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Plugin(s) Python invocado(s) em cada etapa do pipeline de fatiamento para ler e modificar dados intermediários de fatiamento, incluindo uma etapa final de pós-processamento do G-code. Pesquisa/experimental." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Quando ativado, o fatiador emite o G-code com o conteúdo da zona principal centralizado na origem da mesa (0,0). O firmware da impressora é responsável por posicionar as cópias/espelhos na posição física de cada zona. Ative somente em impressoras cujo firmware aplica seus próprios deslocamentos de zona no modo cópia/espelho (ex.: modo de duplicação IDEX do RepRapFirmware). Não tem efeito no modo Principal." - # AI Translated #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Substituição por placa que mapeia as cabeças físicas para os espaços de filamento (começando em 1). Vazio significa usar os padrões da inversão do pem." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Eixo em torno do qual a malha é girada antes do fatiamento. Esta é a inclinação da impressora de esteira: uma rotação isométrica (sem distorção) que também define a renderização da mesa e a inclinação da gravidade dos suportes, e que a transformação inversa do G-code desfaz antes do cisalhamento/escala e do remapeamento do referencial da máquina. X é a inclinação típica do pórtico (a esteira se move ao longo de Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Substituição para especialistas: define o ângulo de inclinação do referencial da máquina (cisalhamento/escala do G-code) independentemente do ângulo de rotação antes do fatiamento. Quando desativado, a transformação do referencial da máquina é derivada do ângulo de inclinação da esteira, de modo que um único ângulo controla as duas etapas. Ative somente para compensar uma máquina cuja inclinação física do pórtico difere da rotação de fatiamento." - -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "O desvio máximo permitido ao reduzir a resolução para a configuração 'Resolução máxima de parede'. Se você aumentar esse valor, a impressão ficará menos precisa, mas o G-code será menor. 'Desvio máximo de parede' limita a 'Resolução máxima de parede', portanto, se houver conflito entre os dois, 'Desvio máximo de parede' terá prioridade." - #~ msgid " not in range " #~ msgstr " fora do intervalo " diff --git a/localization/i18n/ru/OrcaSlicer_ru.po b/localization/i18n/ru/OrcaSlicer_ru.po index 8215dec8f6..abe50f3433 100644 --- a/localization/i18n/ru/OrcaSlicer_ru.po +++ b/localization/i18n/ru/OrcaSlicer_ru.po @@ -1733,7 +1733,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Обводка фигуры (%1%) не поддерживается: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Недопустимое состояние. Сообщите о шагах воспроизведения на GitHub" # AI Translated @@ -1741,11 +1741,11 @@ msgid "No embossed file" msgstr "Нет файла рельефа" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "В рельефной фигуре отсутствует файл SVG" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Отсутствуют данные файла SVG" msgid "Face the camera" @@ -4961,7 +4961,7 @@ msgstr "Пожалуйста, сохраните проект и перезап msgid "Unknown C++ exception." msgstr "Неизвестное исключение C++." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Обработка G-code из предыдущего файла…" msgid "Slicing complete" @@ -23636,7 +23636,7 @@ msgstr "тест %s: запуск..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "тест %s: IP-адрес определён = %s" # AI Translated @@ -36080,7 +36080,7 @@ msgstr "Не удалось загрузить файл конфигурации # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "Это не файл G-code, созданный в %1%." # AI Translated @@ -36200,7 +36200,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "Не удалось создать временную копию файла G-code %1% перед запуском скрипта постобработки: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "Постобработчику не удалось найти экспортированный файл G-code" # AI Translated @@ -37074,10 +37074,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "ненастроенный инструмент" -# AI Translated -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "G-code, который выполняется в самом конце печати." - #~ msgid "Maximum X speed" #~ msgstr "Максимальная скорость перемещения по X" @@ -37093,28 +37089,11 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Python-плагины, вызываемые на каждом этапе нарезки для чтения и изменения промежуточных её данных (включая финальную постобработку G-code). Тестовая/экспериментальная функция." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Если включено, слайсер выводит G-code, в котором содержимое основной зоны центрировано относительно начала координат стола (0,0). За размещение копий и зеркальных отражений в физическом положении каждой зоны отвечает прошивка принтера. Включайте только на принтерах, прошивка которых сама применяет смещения зон в режиме копии/зеркала (например, режим дублирования IDEX в RepRapFirmware). Не действует в режиме «Основной»." - # AI Translated # Needs human review: 'pem-inversion defaults' is developer jargon (inverse of physical_extruder_map); check the wording. #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Переопределение для стола: соответствие физических голов слотам материала (нумерация с 1). Пустое значение означает значения по умолчанию, полученные обращением карты физических экструдеров (pem)." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Ось, вокруг которой поворачивается сетка перед нарезкой. Это наклон ленточного принтера: изометрический (без искажений) поворот, который также определяет отображение стола и наклон направления силы тяжести для поддержек и который обратное преобразование G-code отменяет перед сдвигом/масштабированием в машинную систему координат и переназначением осей. Обычно портал наклонён вокруг X (лента движется вдоль Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Настройка для экспертов: задаёт угол наклона машинной системы координат (сдвиг/масштаб G-code) независимо от угла поворота перед нарезкой. Если отключено, преобразование в машинную систему координат выводится из угла наклона ленты, так что один угол управляет обоими этапами. Включайте только для компенсации принтера, у которого физический наклон портала отличается от поворота при нарезке." - -# AI Translated -# Перенёс упоминание главенства этой настройки в настройку выше. -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "Максимальное отклонение сегментов от модели. Чем меньше, тем выше точность и размер файла G-code." - #~ msgid " not in range " #~ msgstr " вне диапазона " diff --git a/localization/i18n/sv/OrcaSlicer_sv.po b/localization/i18n/sv/OrcaSlicer_sv.po index 50819ceaa4..8962c506c3 100644 --- a/localization/i18n/sv/OrcaSlicer_sv.po +++ b/localization/i18n/sv/OrcaSlicer_sv.po @@ -1931,7 +1931,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Formens linje (%1%) innehåller något som inte stöds: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Ogiltigt tillstånd, rapportera stegen för att återskapa det på GitHub" # AI Translated @@ -1939,11 +1939,11 @@ msgid "No embossed file" msgstr "Ingen präglad fil" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "SVG-fil saknas i den präglade formen" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Data för SVG-filen saknas" # AI Translated @@ -5438,7 +5438,7 @@ msgstr "Spara projekt och starta om programmet." msgid "Unknown C++ exception." msgstr "Okänt C++-undantag." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Processera G-Code från Föregående fil…" msgid "Slicing complete" @@ -25409,7 +25409,7 @@ msgstr "test av %s startar..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "test av %s: IP uppslagen = %s" # AI Translated @@ -38105,7 +38105,7 @@ msgstr "Det gick inte att läsa in konfigurationsfilen \"%1%\": %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "Inte en G-code-fil som genererats av %1%." # AI Translated @@ -38225,7 +38225,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "Det gick inte att skapa en tillfällig kopia av G-code-filen %1% innan ett efterbearbetningsskript kördes: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "Efterbearbetningen hittar inte den exporterade G-code-filen" # AI Translated @@ -39125,10 +39125,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "inget konfigurerat verktyg" -# AI Translated -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "Lägg till slut-G-code när hela utskriften avslutas." - #~ msgid "Maximum X speed" #~ msgstr "Max X hastighet" @@ -39145,26 +39141,10 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Python-insticksmoduler som anropas vid varje steg i beredningspipelinen för att läsa och ändra mellanliggande beredningsdata, inklusive ett avslutande efterbearbetningssteg för G-code. Forskning/experimentellt." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "När detta är aktiverat genererar beredningsprogrammet G-code med den primära zonens innehåll centrerat kring byggplattans origo (0,0). Skrivarens fasta programvara ansvarar för att placera kopior/speglingar på varje fysisk zonposition. Aktivera endast på skrivare vars fasta programvara tillämpar egna zonförskjutningar i läget Kopia/Spegel (t.ex. dupliceringsläget för IDEX i RepRapFirmware). Har ingen effekt i läget Primär." - # AI Translated #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Åsidosättning per platta som mappar fysiska huvuden till filamentplatser (1-baserade). Tomt innebär att standardvärdena för pem-inversion används." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Axeln som meshen roteras kring före beredning. Detta är bandskrivarens lutning: en isometrisk (förvrängningsfri) rotation som även styr renderingen av byggplattan och tyngdkraftslutningen för support, och som G-code-baktransformationen inverterar före skjuvningen/skalningen och ommappningen till maskinkoordinatsystemet. X är den typiska portallutningen (bandet rör sig längs Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Expertinställning: ange lutningsvinkeln för maskinkoordinatsystemet (G-code-skjuvning/skalning) oberoende av rotationsvinkeln före beredning. När detta är inaktiverat härleds transformationen till maskinkoordinatsystemet från bandets lutningsvinkel, så att en enda vinkel styr båda stegen. Aktivera endast för att kompensera för en maskin vars fysiska portallutning skiljer sig från beredningsrotationen." - -# AI Translated -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "Den största avvikelse som tillåts när upplösningen minskas för inställningen 'Maximal väggupplösning'. Om du ökar den blir utskriften mindre exakt, men G-code:n blir mindre. 'Maximal väggavvikelse' begränsar 'Maximal väggupplösning', så om de två står i konflikt har 'Maximal väggavvikelse' företräde." - #~ msgid " not in range " #~ msgstr " inte inom intervallet " diff --git a/localization/i18n/th/OrcaSlicer_th.po b/localization/i18n/th/OrcaSlicer_th.po index c0b34bc848..80274623aa 100644 --- a/localization/i18n/th/OrcaSlicer_th.po +++ b/localization/i18n/th/OrcaSlicer_th.po @@ -1747,7 +1747,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "เส้นโครงร่างของรูปร่าง (%1%) ประกอบด้วยที่ไม่รองรับ: %2%" # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "สถานะไม่ถูกต้อง โปรดรายงานขั้นตอนการทำให้เกิดซ้ำบน GitHub" # AI Translated @@ -1755,11 +1755,11 @@ msgid "No embossed file" msgstr "ไม่มีไฟล์ลายนูน" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "ไม่มีไฟล์ SVG ในรูปทรงลายนูน" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "ไม่มีข้อมูลของไฟล์ SVG" msgid "Face the camera" @@ -4963,7 +4963,7 @@ msgstr "โปรดบันทึกโปรเจกต์และเริ msgid "Unknown C++ exception." msgstr "ข้อยกเว้น C++ ที่ไม่ทราบสาเหตุ" -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "กำลังประมวลผล G-code จากไฟล์ก่อนหน้า..." msgid "Slicing complete" @@ -23309,7 +23309,7 @@ msgstr "เริ่มทดสอบ %s..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "ทดสอบ %s แปลง IP ได้ = %s" # AI Translated @@ -35684,7 +35684,7 @@ msgstr "โหลดไฟล์การกำหนดค่า \"%1%\" ไม # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "ไม่ใช่ไฟล์ G-code ที่สร้างโดย %1%" # AI Translated @@ -35804,7 +35804,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "ไม่สามารถสร้างสำเนาชั่วคราวของไฟล์ G-code %1% ก่อนเรียกใช้สคริปต์หลังการประมวลผลได้: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "ตัวประมวลผลภายหลังไม่พบไฟล์ G-code ที่ส่งออก" # AI Translated @@ -36642,9 +36642,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "ไม่มีเครื่องมือที่กำหนดค่าไว้" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "สิ้นสุด G-code เมื่อพิมพ์เสร็จทั้งหมด" - #~ msgid "Maximum X speed" #~ msgstr "ความเร็ว X สูงสุด" @@ -36661,25 +36658,10 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "ปลั๊กอิน Python ที่เรียกใช้ในแต่ละขั้นตอนของไปป์ไลน์การสไลซ์เพื่ออ่านและแก้ไขข้อมูลการสไลซ์ระหว่างกลาง รวมถึงขั้นตอนหลังประมวลผล G-code สุดท้าย สำหรับการวิจัย/ทดลอง" -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "เมื่อเปิดใช้งาน สไลเซอร์จะสร้าง G-code โดยให้เนื้อหาของโซนหลักอยู่กึ่งกลางที่จุดกำเนิดของฐานพิมพ์ (0,0) เฟิร์มแวร์ของเครื่องพิมพ์จะรับผิดชอบการวางสำเนา/ภาพกระจกเงาที่ตำแหน่งของแต่ละโซนจริง เปิดใช้งานเฉพาะกับเครื่องพิมพ์ที่เฟิร์มแวร์ใช้ค่าออฟเซ็ตโซนของตัวเองในโหมดสำเนา/กระจกเงา (เช่น โหมด duplication ของ IDEX ใน RepRapFirmware) ไม่มีผลในโหมดหลัก (Primary)" - # AI Translated #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "ค่าแทนที่ต่อเพลตที่จับคู่หัวจริงกับช่องเส้นพลาสติก (เริ่มนับจาก 1) เว้นว่างหมายถึงใช้ค่าเริ่มต้นจาก pem-inversion" -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "แกนที่ใช้หมุนเมชก่อนการสไลซ์ นี่คือการเอียงของเครื่องพิมพ์สายพาน: การหมุนแบบไอโซเมตริก (ไม่บิดเบี้ยว) ซึ่งยังใช้กำหนดการแสดงผลฐานพิมพ์และการเอียงแรงโน้มถ่วงของส่วนรองรับ และการแปลงกลับของ G-code จะย้อนการหมุนนี้ก่อนการเฉือน/ปรับสเกลและการแมปแกนของระบบพิกัดเครื่อง X คือการเอียงแกนทรีที่ใช้ทั่วไป (สายพานเคลื่อนที่ตามแนว Y)" - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "การแทนที่สำหรับผู้เชี่ยวชาญ: ตั้งมุมเอียงของระบบพิกัดเครื่อง (การเฉือน/ปรับสเกล G-code) แยกจากมุมหมุนก่อนสไลซ์ เมื่อปิดใช้งาน การแปลงระบบพิกัดเครื่องจะคำนวณจากมุมเอียงสายพาน ดังนั้นมุมเดียวจะควบคุมทั้งสองขั้นตอน เปิดใช้งานเฉพาะเพื่อชดเชยเครื่องที่การเอียงจริงของแกนทรีต่างจากการหมุนสำหรับสไลซ์" - -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "ค่าเบี่ยงเบนสูงสุดที่อนุญาตเมื่อลดความละเอียดสำหรับการตั้งค่า 'ความละเอียดสูงสุดของผนัง' หากเพิ่มค่านี้ การพิมพ์จะแม่นยำน้อยลง แต่ G-Code จะน้อยลง 'ค่าเบี่ยงเบนของผนังสูงสุด' จะจำกัด 'ความละเอียดของผนังสูงสุด' ดังนั้นหากทั้งสองข้อขัดแย้งกัน 'ค่าเบี่ยงเบนของผนังสูงสุด' จะมีความสำคัญเหนือกว่า" - #~ msgid " not in range " #~ msgstr "ไม่อยู่ในช่วง" diff --git a/localization/i18n/tr/OrcaSlicer_tr.po b/localization/i18n/tr/OrcaSlicer_tr.po index ead52e8b7b..0d42b6b8d8 100644 --- a/localization/i18n/tr/OrcaSlicer_tr.po +++ b/localization/i18n/tr/OrcaSlicer_tr.po @@ -1749,7 +1749,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Şeklin konturu (%1%) desteklenmeyenleri içeriyor: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Geçersiz durum, lütfen yeniden oluşturma adımlarını GitHub'da bildirin" # AI Translated @@ -1757,11 +1757,11 @@ msgid "No embossed file" msgstr "Kabartma dosyası yok" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "Kabartmalı şekilde SVG dosyası eksik" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "SVG dosyasının verileri eksik" msgid "Face the camera" @@ -5013,7 +5013,7 @@ msgstr "Lütfen projeyi kaydedin ve programı yeniden başlatın." msgid "Unknown C++ exception." msgstr "Bilinmeyen C++ istisnası." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Önceki dosyadan G-code işleniyor…" msgid "Slicing complete" @@ -23470,7 +23470,7 @@ msgstr "%s testi başlatılıyor..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "%s testi: IP çözümlendi = %s" # AI Translated @@ -35988,7 +35988,7 @@ msgstr "\"%1%\" yapılandırma dosyası yüklenemedi: %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "%1% tarafından oluşturulmuş bir G-code dosyası değil." # AI Translated @@ -36108,7 +36108,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "İşlem sonrası komut dosyası çalıştırılmadan önce %1% G-code dosyasının geçici kopyası oluşturulamadı: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "İşlem sonrası işlemcisi dışa aktarılan G-code dosyasını bulamıyor" # AI Translated @@ -36956,9 +36956,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "yapılandırılmış araç yok" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "Tüm yazdırmayı tamamladığında çalışacak olan G-code." - #~ msgid "Maximum X speed" #~ msgstr "Maksimum X hızı" @@ -36975,26 +36972,10 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Ara dilimleme verilerini okumak ve değiştirmek için her dilimleme hattı adımında çağrılan Python eklentileri; son bir G-code son işleme adımı da buna dahildir. Araştırma/deneysel." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Etkinleştirildiğinde dilimleyici, birincil bölgenin içeriğini yatak orijininde (0,0) ortalanmış şekilde G-code üretir. Kopyaları/ayna görüntülerini her fiziksel bölge konumuna yerleştirmekten yazıcının ürün yazılımı sorumludur. Yalnızca ürün yazılımı kopya/ayna modunda kendi bölge ofsetlerini uygulayan yazıcılarda etkinleştirin (ör. RepRapFirmware IDEX çoğaltma modu). Birincil modda etkisi yoktur." - # AI Translated #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Fiziksel kafaları filament yuvalarına eşleyen plaka başına geçersiz kılma (1 tabanlı). Boş bırakılırsa pem-inversion varsayılanları kullanılır." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Dilimlemeden önce mesh'in etrafında döndürüldüğü eksen. Bu, bant yazıcının eğimidir: yatak görüntülemesini ve destek yerçekimi eğimini de belirleyen izometrik (bozulmasız) bir dönüş; G-code geri dönüşümü bunu, makine koordinat sistemi kesme/ölçekleme ve yeniden eşleme işlemlerinden önce tersine çevirir. Tipik portal eğimi X'tir (bant Y boyunca ilerler)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Uzman geçersiz kılması: makine koordinat sistemi (G-code kesme/ölçekleme) eğim açısını dilimleme öncesi dönüş açısından bağımsız olarak ayarlar. Devre dışı bırakıldığında makine koordinat sistemi dönüşümü bant eğim açısından türetilir; böylece tek bir açı her iki aşamayı da belirler. Yalnızca fiziksel portal eğimi dilimleme dönüşünden farklı olan bir makineyi telafi etmek için etkinleştirin." - -# AI Translated -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "'Maksimum duvar çözünürlüğü' ayarı için çözünürlük düşürülürken izin verilen maksimum sapma. Bunu artırırsanız baskı daha az doğru olur ancak G-Code daha küçük olur. 'Maksimum duvar sapması', 'Maksimum duvar çözünürlüğü'nü sınırlar; dolayısıyla ikisi çakışırsa 'Maksimum duvar sapması' önceliklidir." - #~ msgid " not in range " #~ msgstr " aralıkta değil " diff --git a/localization/i18n/uk/OrcaSlicer_uk.po b/localization/i18n/uk/OrcaSlicer_uk.po index 00bdf873b3..2611479982 100644 --- a/localization/i18n/uk/OrcaSlicer_uk.po +++ b/localization/i18n/uk/OrcaSlicer_uk.po @@ -1740,7 +1740,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Обведення фігури (%1%) не підтримується: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Некоректний стан, будь ласка, повідомте кроки відтворення на GitHub" # AI Translated @@ -1748,11 +1748,11 @@ msgid "No embossed file" msgstr "Відсутній файл рельєфу" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "У рельєфній формі відсутній файл SVG" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Відсутні дані файлу SVG" msgid "Face the camera" @@ -4964,7 +4964,7 @@ msgstr "Збережіть проект і перезапустіть прогр msgid "Unknown C++ exception." msgstr "Невідомий виняток C++." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Обробка G-code з попереднього файлу..." msgid "Slicing complete" @@ -23756,7 +23756,7 @@ msgstr "тест %s розпочато..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "тест %s: IP визначено = %s" # AI Translated @@ -36323,7 +36323,7 @@ msgstr "Не вдалося завантажити файл конфігурац # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "Це не файл G-code, створений %1%." # AI Translated @@ -36443,7 +36443,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "Не вдалося створити тимчасову копію файлу G-code %1% перед запуском скрипта постобробки: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "Постпроцесор не може знайти експортований файл G-code" # AI Translated @@ -37307,9 +37307,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "інструмент, якого немає в налаштуваннях" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "Завершальний G-code, коли закінчити весь друк" - #~ msgid "Maximum X speed" #~ msgstr "Максимальна швидкість X" @@ -37326,26 +37323,10 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "Плагіни Python, що викликаються на кожному кроці конвеєра нарізки для читання та зміни проміжних даних нарізки, включно з фінальним кроком постобробки G-code. Дослідницьке/експериментальне." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Якщо увімкнено, слайсер генерує G-code із вмістом основної зони, відцентрованим відносно початку координат столу (0,0). За розміщення копій і дзеркальних відображень у кожній фізичній зоні відповідає прошивка принтера. Вмикайте лише на принтерах, прошивка яких сама застосовує зміщення зон у режимі копії чи дзеркала (наприклад, режим дублювання IDEX у RepRapFirmware). Не діє в режимі «Основний»." - # AI Translated #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Перевизначення для пластини, що зіставляє фізичні головки зі слотами філаменту (нумерація з 1). Порожнє значення означає типові значення з інверсії pem." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Вісь, навколо якої сітку повертають перед нарізкою. Це нахил стрічкового принтера: ізометричне (без спотворень) обертання, яке також визначає відображення столу й нахил сили тяжіння для підтримок і яке зворотне перетворення G-code скасовує перед зсувом/масштабуванням і перепризначенням осей у машинній системі координат. X — типовий нахил порталу (стрічка рухається вздовж Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Експертне перевизначення: задає кут нахилу машинної системи координат (зсув/масштаб G-code) незалежно від кута повороту перед нарізкою. Якщо вимкнено, перетворення машинної системи координат обчислюється з кута нахилу стрічки, тож один кут керує обома етапами. Вмикайте лише для компенсації машини, фізичний нахил порталу якої відрізняється від повороту під час нарізки." - -# AI Translated -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "Максимальне відхилення, дозволене при зниженні роздільності для налаштування «Максимальна роздільність стінки». Якщо його збільшити, друк буде менш точним, але G-code — меншим. «Максимальне відхилення стінки» обмежує «Максимальну роздільність стінки», тож у разі конфлікту пріоритет має «Максимальне відхилення стінки»." - #~ msgid " not in range " #~ msgstr " не в зоні " diff --git a/localization/i18n/vi/OrcaSlicer_vi.po b/localization/i18n/vi/OrcaSlicer_vi.po index 348289eec2..104fea5474 100644 --- a/localization/i18n/vi/OrcaSlicer_vi.po +++ b/localization/i18n/vi/OrcaSlicer_vi.po @@ -1804,7 +1804,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "Nét của hình (%1%) chứa không hỗ trợ: %2%." # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "Trạng thái không hợp lệ, vui lòng báo cáo các bước tái hiện lỗi trên GitHub" # AI Translated @@ -1812,11 +1812,11 @@ msgid "No embossed file" msgstr "Không có file emboss" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "Thiếu file SVG trong hình emboss" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "Thiếu dữ liệu của file SVG" msgid "Face the camera" @@ -5204,7 +5204,7 @@ msgstr "Vui lòng lưu dự án và khởi động lại chương trình." msgid "Unknown C++ exception." msgstr "Ngoại lệ C++ không xác định." -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "Đang xử lý G-code từ file trước..." msgid "Slicing complete" @@ -24140,7 +24140,7 @@ msgstr "bắt đầu kiểm tra %s..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "kiểm tra %s: đã phân giải IP = %s" # AI Translated @@ -36680,7 +36680,7 @@ msgstr "Tải file cấu hình \"%1%\" thất bại: %2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "Không phải file gcode do %1% tạo ra." # AI Translated @@ -36800,7 +36800,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "Không thể tạo bản sao tạm của file G-code %1% trước khi chạy script hậu xử lý: %2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "Trình hậu xử lý không tìm thấy file G-code đã xuất" # AI Translated @@ -37660,9 +37660,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "không có công cụ nào được cấu hình" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "G-code kết thúc khi hoàn thành toàn bộ bản in." - #~ msgid "Maximum X speed" #~ msgstr "Tốc độ X tối đa" @@ -37679,27 +37676,11 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "(Các) plugin Python được gọi ở mỗi bước của quy trình slice để đọc và sửa đổi dữ liệu slice trung gian, bao gồm một bước hậu xử lý G-code cuối cùng. Mang tính nghiên cứu/thử nghiệm." -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "Khi bật, phần mềm slice xuất G-code với nội dung của vùng chính được căn giữa tại gốc tọa độ bàn in (0,0). Firmware máy in chịu trách nhiệm đặt các bản sao/bản đối xứng tại vị trí vật lý của từng vùng. Chỉ bật trên máy in có firmware tự áp dụng độ lệch vùng ở chế độ Sao chép (Copy)/Gương (Mirror) (ví dụ chế độ nhân bản IDEX của RepRapFirmware). Không có tác dụng ở chế độ Chính." - # AI Translated # Needs human review: "pem-inversion" is developer jargon (physical extruder map inversion) kept in English; check it reads acceptably in this Printer/plate setting tooltip. #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "Ghi đè theo từng plate, ánh xạ các đầu vật lý đến khe filament (đánh số từ 1). Để trống nghĩa là dùng giá trị mặc định pem-inversion." -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "Trục mà lưới được xoay quanh trước khi slice. Đây là độ nghiêng của máy in băng chuyền: một phép xoay đẳng cự (không biến dạng), đồng thời điều khiển việc hiển thị bàn in và độ nghiêng trọng lực cho support, và được phép biến đổi ngược G-code đảo lại trước bước trượt/co giãn và ánh xạ lại của hệ tọa độ máy. X là độ nghiêng giàn trục thông thường (băng chuyền chạy dọc theo Y)." - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "Ghi đè cho chuyên gia: đặt góc nghiêng hệ tọa độ máy (trượt/co giãn G-code) độc lập với góc xoay trước khi slice. Khi tắt, phép biến đổi hệ tọa độ máy được suy ra từ góc nghiêng băng chuyền, nên một góc duy nhất điều khiển cả hai bước. Chỉ bật để bù cho máy có độ nghiêng giàn trục vật lý khác với góc xoay khi slice." - -# AI Translated -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "Độ lệch tối đa cho phép khi giảm độ phân giải cho cài đặt 'Độ phân giải thành tối đa'. Nếu bạn tăng giá trị này, bản in sẽ kém chính xác hơn nhưng G-Code sẽ nhỏ hơn. 'Độ lệch thành tối đa' giới hạn 'Độ phân giải thành tối đa', nên nếu hai giá trị xung đột, 'Độ lệch thành tối đa' được ưu tiên." - #~ msgid " not in range " #~ msgstr " không trong phạm vi " diff --git a/localization/i18n/zh_CN/OrcaSlicer_zh_CN.po b/localization/i18n/zh_CN/OrcaSlicer_zh_CN.po index 2b00f52e4b..362b0a844b 100644 --- a/localization/i18n/zh_CN/OrcaSlicer_zh_CN.po +++ b/localization/i18n/zh_CN/OrcaSlicer_zh_CN.po @@ -1751,7 +1751,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "形状(%1%)的描边包含不受支持的内容:%2%。" # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "状态无效,请在 GitHub 上报告复现步骤" # AI Translated @@ -1759,11 +1759,11 @@ msgid "No embossed file" msgstr "没有浮雕文件" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "浮雕形状中缺少 SVG 文件" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "缺少 SVG 文件数据" # AI Translated @@ -5008,7 +5008,7 @@ msgid "Unknown C++ exception." msgstr "未知的 C++ 异常。" # AI Translated -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "正在处理之前文件的 G-code…" msgid "Slicing complete" @@ -24004,7 +24004,7 @@ msgstr "开始测试 %s..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "测试 %s:IP 解析结果 = %s" # AI Translated @@ -36891,7 +36891,7 @@ msgstr "加载配置文件“%1%”失败:%2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "不是由 %1% 生成的 G-code 文件。" # AI Translated @@ -37011,7 +37011,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "运行后处理脚本之前,无法创建 G-code 文件 %1% 的临时副本:%2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "后处理器找不到导出的 G-code 文件" # AI Translated @@ -37865,9 +37865,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "未配置的工具头" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "所有打印结束时的结尾G-code" - #~ msgid "Maximum X speed" #~ msgstr "X最大速度" @@ -37884,26 +37881,11 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "在每个切片流水线步骤中调用的 Python 插件,用于读取和修改中间切片数据,包括最终的 G-code 后处理步骤。研究/实验性。" -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "启用后,切片软件输出的 G-code 会以热床原点 (0,0) 为中心放置主区域的内容,由打印机固件负责把复制件/镜像件放到各个物理区域。仅当打印机固件在复制/镜像模式下会自行应用区域偏移时才启用(例如 RepRapFirmware 的 IDEX 复制模式)。主模式下无效。" - # AI Translated # Needs human review: "pem-inversion defaults": confirm pem is the physical extruder map and that the default is its inverse. #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "按盘单独设置物理工具头到耗材丝槽位的映射(从 1 开始编号),覆盖默认映射。留空则使用由物理挤出机映射(pem)反推的默认值。" -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "切片前模型网格的旋转轴。这一旋转即传送带打印机的倾斜:它是保距(无畸变)旋转,同时用于热床渲染和支撑的重力倾斜;生成 G-code 时,逆变换会先还原这一旋转,再进行机器坐标系剪切/缩放和重映射。X 是典型的龙门倾斜轴(传送带沿 Y 方向移动)。" - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "专家选项:单独设置机器坐标系(G-code 剪切/缩放)的倾斜角度,与切片前的旋转角度互不影响。禁用时,机器坐标系变换由传送带倾斜角度推导,两个阶段使用同一个角度。仅当机器实际的龙门倾角与切片旋转角度不一致时,才需启用此项进行补偿。" - -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "在为“最大墙体分辨率”设置降低分辨率时所允许的最大偏差。如果增大此值,打印精度会降低,但 G-code 会更小。“最大墙体偏差”会限制“最大墙体分辨率”,因此当两者冲突时,以“最大墙体偏差”为准。" - #~ msgid " not in range " #~ msgstr " 不在合理范围内" diff --git a/localization/i18n/zh_TW/OrcaSlicer_zh_TW.po b/localization/i18n/zh_TW/OrcaSlicer_zh_TW.po index 69c1fc755e..f19843d911 100644 --- a/localization/i18n/zh_TW/OrcaSlicer_zh_TW.po +++ b/localization/i18n/zh_TW/OrcaSlicer_zh_TW.po @@ -1826,7 +1826,7 @@ msgid "Stroke of shape (%1%) contains unsupported: %2%." msgstr "形狀(%1%)的筆劃包含不支援的內容:%2%。" # AI Translated -msgid "Not valid state please report reproduction steps on github" +msgid "Not valid state please report reproduction steps on GitHub" msgstr "狀態無效,請在 GitHub 上回報重現步驟" # AI Translated @@ -1834,11 +1834,11 @@ msgid "No embossed file" msgstr "沒有浮雕檔案" # AI Translated -msgid "Missing svg file in embossed shape" +msgid "Missing SVG file in embossed shape" msgstr "浮雕形狀中缺少 SVG 檔案" # AI Translated -msgid "Missing data of svg file" +msgid "Missing data of SVG file" msgstr "缺少 SVG 檔案的資料" msgid "Face the camera" @@ -5219,7 +5219,7 @@ msgid "Unknown C++ exception." msgstr "未知的 C++ 例外。" # AI Translated -msgid "Processing G-Code from previous file…" +msgid "Processing G-code from previous file…" msgstr "正在處理先前檔案的 G-code…" msgid "Slicing complete" @@ -24597,7 +24597,7 @@ msgstr "測試 %s 開始..." # AI Translated #, c-format, boost-format -msgid "test %s ip resolved = %s" +msgid "test %s IP resolved = %s" msgstr "測試 %s IP 解析結果 = %s" # AI Translated @@ -37533,7 +37533,7 @@ msgstr "載入設定檔「%1%」失敗:%2%" # AI Translated #. TRN %1% is the application name. #, boost-format -msgid "Not a gcode file generated by %1%." +msgid "Not a G-code file generated by %1%." msgstr "不是由 %1% 產生的 G-code 檔案。" # AI Translated @@ -37653,7 +37653,7 @@ msgid "Failed making a temporary copy of G-code file %1% before running a post-p msgstr "執行後處理腳本前,無法建立 G-code 檔案 %1% 的暫存副本:%2%" # AI Translated -msgid "Post-processor can't find exported gcode file" +msgid "Post-processor can't find exported G-code file" msgstr "後處理程式找不到匯出的 G-code 檔案" # AI Translated @@ -38513,9 +38513,6 @@ msgstr "" #~ msgid "no configured tool" #~ msgstr "未設定的工具頭" -#~ msgid "Add end G-Code when finishing the entire print." -#~ msgstr "所有列印結束時的結尾 G-code" - #~ msgid "Maximum X speed" #~ msgstr "X 最大速度" @@ -38532,25 +38529,10 @@ msgstr "" #~ msgid "Python plugin(s) invoked at each slicing pipeline step to read and modify intermediate slicing data, including a final G-code post-processing step. Research/experimental." #~ msgstr "在每個切片管線步驟呼叫的 Python 外掛,用於讀取與修改中介切片資料,包括最終的 G-code 後處理步驟。研究/實驗性質。" -# AI Translated -#~ msgid "When enabled, the slicer emits g-code with the primary zone's contents centered on bed origin (0,0). The printer firmware is responsible for placing copies/mirrors at each physical zone position. Enable only on printers whose firmware applies its own zone offsets in copy/mirror mode (e.g. RepRapFirmware IDEX duplication mode). Has no effect in Primary mode." -#~ msgstr "啟用後,切片軟體輸出的 G-code 會將主區域的內容以列印板原點 (0,0) 為中心放置,並由列印裝置韌體負責將複製件/鏡像件放到各個實體區域位置。僅在韌體會於複製/鏡像模式下自行套用區域偏移的列印裝置上啟用(例如 RepRapFirmware 的 IDEX 複製模式)。在主模式下無效。" - # AI Translated #~ msgid "Per-plate override mapping physical heads to filament slots (1-based). Empty means use pem-inversion defaults." #~ msgstr "依列印板覆寫實體工具頭到線材槽位的映射(從 1 開始編號)。留空表示使用由 pem 反推的預設映射。" -# AI Translated -#~ msgid "Axis the mesh is rotated about before slicing. This is the belt printer's tilt: an isometric (no distortion) rotation that also drives bed rendering and support gravity tilt, and that the g-code back-transform inverts before the machine-frame shear/scale and remap. X is the typical gantry tilt (belt travels along Y)." -#~ msgstr "切片前網格旋轉所繞的軸。這就是輸送帶列印裝置的傾斜:一種等距(無變形)旋轉,同時用於列印板渲染與支撐的重力傾斜;G-code 反向轉換會先還原此旋轉,再進行機器座標系的剪切/縮放與重新映射。X 是典型的龍門傾斜軸(輸送帶沿 Y 方向移動)。" - -# AI Translated -#~ msgid "Expert override: set the machine-frame (g-code shear/scale) tilt angle independently of the pre-slice rotation angle. When disabled, the machine-frame transform is derived from the belt tilt angle, so a single angle drives both stages. Enable only to compensate for a machine whose physical gantry tilt differs from the slicing rotation." -#~ msgstr "專家覆寫選項:獨立於切片前的旋轉角度,單獨設定機器座標系(G-code 剪切/縮放)的傾斜角度。停用時,機器座標系變換由輸送帶傾斜角度推導,兩個階段使用同一個角度。僅在機器實際的龍門傾角與切片旋轉角度不同時,才啟用此選項進行補償。" - -#~ msgid "The maximum deviation allowed when reducing the resolution for the 'Maximum wall resolution' setting. If you increase this, the print will be less accurate, but the G-Code will be smaller. 'Maximum wall deviation' limits 'Maximum wall resolution', so if the two conflict, 'Maximum wall deviation' takes precedence." -#~ msgstr "「最大牆解析度」設定在降低解析度時所允許的最大偏差。若增加此值,列印會較不精確,但 G-Code 會更小。「最大牆偏差」會限制「最大牆解析度」,因此若兩者衝突,將以「最大牆偏差」為準。" - #~ msgid " not in range " #~ msgstr " 不在合理的區間" diff --git a/resources/profiles/Snapmaker.json b/resources/profiles/Snapmaker.json index 4978095364..4abf624a41 100644 --- a/resources/profiles/Snapmaker.json +++ b/resources/profiles/Snapmaker.json @@ -1,6 +1,6 @@ { "name": "Snapmaker", - "version": "02.04.00.17", + "version": "02.04.00.18", "force_update": "0", "description": "Snapmaker configurations", "machine_model_list": [ diff --git a/resources/profiles/Snapmaker/filament/Snapmaker ABS @U1 base.json b/resources/profiles/Snapmaker/filament/Snapmaker ABS @U1 base.json index af8c929c82..df243f2bbb 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker ABS @U1 base.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker ABS @U1 base.json @@ -49,5 +49,8 @@ ], "pressure_advance": [ "0.02" + ], + "temperature_vitrification": [ + "100" ] } diff --git a/resources/profiles/Snapmaker/filament/Snapmaker ASA @U1 base.json b/resources/profiles/Snapmaker/filament/Snapmaker ASA @U1 base.json index 409bbdd793..e566ab4682 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker ASA @U1 base.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker ASA @U1 base.json @@ -46,5 +46,8 @@ ], "fan_min_speed": [ "0" + ], + "temperature_vitrification": [ + "100" ] } diff --git a/resources/profiles/Snapmaker/filament/Snapmaker PETG @U1 base.json b/resources/profiles/Snapmaker/filament/Snapmaker PETG @U1 base.json index d081c6f9d8..e9164a7c2f 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker PETG @U1 base.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker PETG @U1 base.json @@ -45,7 +45,7 @@ "250" ], "temperature_vitrification": [ - "178" + "70" ], "fan_max_speed": [ "20" diff --git a/resources/profiles/Snapmaker/filament/Snapmaker PETG Translucent @U1 base.json b/resources/profiles/Snapmaker/filament/Snapmaker PETG Translucent @U1 base.json index 6b51cd2535..5a712d7483 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker PETG Translucent @U1 base.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker PETG Translucent @U1 base.json @@ -4,5 +4,8 @@ "inherits": "fdm_filament_petg", "from": "system", "filament_id": "OFW8lqnb", - "instantiation": "false" + "instantiation": "false", + "temperature_vitrification": [ + "70" + ] } diff --git a/resources/profiles/Snapmaker/filament/Snapmaker PETG-CF @U1 base.json b/resources/profiles/Snapmaker/filament/Snapmaker PETG-CF @U1 base.json index 076dc7e2b9..562c7ce6e3 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker PETG-CF @U1 base.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker PETG-CF @U1 base.json @@ -60,7 +60,7 @@ "250" ], "temperature_vitrification": [ - "178" + "70" ], "fan_max_speed": [ "20" diff --git a/resources/profiles/Snapmaker/filament/Snapmaker PLA @U1 base.json b/resources/profiles/Snapmaker/filament/Snapmaker PLA @U1 base.json index 3f41d5579e..f0a41e4cc1 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker PLA @U1 base.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker PLA @U1 base.json @@ -34,5 +34,8 @@ ], "nozzle_temperature": [ "220" + ], + "temperature_vitrification": [ + "45" ] } diff --git a/resources/profiles/Snapmaker/filament/Snapmaker PLA Eco @U1 base.json b/resources/profiles/Snapmaker/filament/Snapmaker PLA Eco @U1 base.json index 67e0d74b2e..23586149c3 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker PLA Eco @U1 base.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker PLA Eco @U1 base.json @@ -34,5 +34,8 @@ ], "filament_cooling_final_speed": [ "60" + ], + "temperature_vitrification": [ + "45" ] } diff --git a/resources/profiles/Snapmaker/filament/Snapmaker PLA Glow @U1 base.json b/resources/profiles/Snapmaker/filament/Snapmaker PLA Glow @U1 base.json index 97d2a7ea61..15e1d514ad 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker PLA Glow @U1 base.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker PLA Glow @U1 base.json @@ -34,5 +34,8 @@ ], "nozzle_temperature": [ "220" + ], + "temperature_vitrification": [ + "45" ] } diff --git a/resources/profiles/Snapmaker/filament/Snapmaker PLA Metal @U1 base.json b/resources/profiles/Snapmaker/filament/Snapmaker PLA Metal @U1 base.json index 87c26fdb09..63648c9206 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker PLA Metal @U1 base.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker PLA Metal @U1 base.json @@ -40,5 +40,8 @@ ], "nozzle_temperature": [ "220" + ], + "temperature_vitrification": [ + "45" ] } diff --git a/resources/profiles/Snapmaker/filament/Snapmaker PVA @U1 base.json b/resources/profiles/Snapmaker/filament/Snapmaker PVA @U1 base.json index f2b2033dd9..4444e1f7ab 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker PVA @U1 base.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker PVA @U1 base.json @@ -31,5 +31,8 @@ ], "slow_down_layer_time": [ "8" + ], + "temperature_vitrification": [ + "45" ] } diff --git a/resources/profiles/Snapmaker/filament/Snapmaker TPE @U1.json b/resources/profiles/Snapmaker/filament/Snapmaker TPE @U1.json index 5f6820fa39..cedc844340 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker TPE @U1.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker TPE @U1.json @@ -50,5 +50,8 @@ "additional_cooling_fan_speed": [ "70", "70" + ], + "temperature_vitrification": [ + "30" ] } diff --git a/resources/profiles/Snapmaker/filament/Snapmaker TPU 95A @U1 base.json b/resources/profiles/Snapmaker/filament/Snapmaker TPU 95A @U1 base.json index d61e2adb1b..aa0899f247 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker TPU 95A @U1 base.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker TPU 95A @U1 base.json @@ -137,7 +137,7 @@ "240" ], "temperature_vitrification": [ - "60" + "30" ], "nozzle_temperature_range_low": [ "200" diff --git a/resources/profiles/Snapmaker/filament/Snapmaker TPU 95A @U1.json b/resources/profiles/Snapmaker/filament/Snapmaker TPU 95A @U1.json index 6d5c2c4c73..474b9a0620 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker TPU 95A @U1.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker TPU 95A @U1.json @@ -302,7 +302,7 @@ "-1" ], "temperature_vitrification": [ - "60" + "30" ], "textured_cool_plate_temp": [ "40" diff --git a/resources/profiles/Snapmaker/filament/Snapmaker TPU @U1.json b/resources/profiles/Snapmaker/filament/Snapmaker TPU @U1.json index 7de9731406..c4f9ee7985 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker TPU @U1.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker TPU @U1.json @@ -29,5 +29,8 @@ "additional_cooling_fan_speed": [ "70", "70" + ], + "temperature_vitrification": [ + "30" ] } diff --git a/resources/profiles/Snapmaker/filament/Snapmaker TPU High-Flow @U1.json b/resources/profiles/Snapmaker/filament/Snapmaker TPU High-Flow @U1.json index a3afba536b..dfa2fe0526 100644 --- a/resources/profiles/Snapmaker/filament/Snapmaker TPU High-Flow @U1.json +++ b/resources/profiles/Snapmaker/filament/Snapmaker TPU High-Flow @U1.json @@ -49,5 +49,8 @@ "additional_cooling_fan_speed": [ "70", "70" + ], + "temperature_vitrification": [ + "30" ] } diff --git a/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.2 nozzle).json b/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.2 nozzle).json index 6971ed458f..99dda99752 100644 --- a/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.2 nozzle).json +++ b/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.2 nozzle).json @@ -97,7 +97,7 @@ "20", "12" ], - "machine_start_gcode": "SET_PRINT_AUTO_BED_LEVELING ENABLE=1\nSET_TIME_LAPSE_CAMERA ENABLE=1\n;===== date: 20260128 =====================\n\nPRINT_START\nDEFECT_DETECTION_START\nSET_PRINT_STATS_INFO TOTAL_LAYER={total_layer_count} CURRENT_LAYER=0\nTIMELAPSE_START\nM140 S{bed_temperature_initial_layer_single}\nM104 T{initial_extruder} S140\nM204 S10000\nG28 X Y\nDEFECT_DETECT_NOODLE_FIRST\n;===== 床面异物检测 ========\nT{initial_extruder}\nG90\nDEFECT_DETECTION_DETECT_BED\n;===== 取放头检测 =================\nSM_PRINT_CHECK_SWITCH_EXTRUDER\n\n;===== 自动进料 & 挤出流量 & 预挤出 ======================\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=1 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=0\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=0\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=2 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=1\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=1\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=3 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=2\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=2\nSM_PRINT_AUTO_FEED EXTRUDER=3\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=3\nM104 S0 T0 A0\nM104 S0 T1 A0\nM104 S0 T2 A0\nM104 S0 T3 A0\nM104 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\n\n;===== 粗回零 =================\nT{initial_extruder}\nM106 S255\nM106 P2 S0\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\nROUGHLY_CLEAN_NOZZLE_WITH_DISCARD\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nG28 Z I140 J140\n\n;===== 检测钢板 =================\nDETECT_BED_PLATE\n\n;===== 深度清洁喷嘴 =================\nG90\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 S{nozzle_temperature[initial_extruder] - 50}\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_1\nM104 S{nozzle_temperature[initial_extruder] - 90}\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_2\n\n;===== 精回零 =================\nM106 S255\nM109 S{nozzle_temperature[initial_extruder] - 90}\nM190 S{bed_temperature_initial_layer_single}\nM107 P2\nG90\nG0 Z5 F10000\nWAIT_CHAMBER_TEMP TIMEOUT=180\n{if curr_bed_type==\"High Temp Plate\"} \nG28 Z Z_OFFSET -0.07 \n{else} \nG28 Z \n{endif} \n\n\n;===== 热床调平 =================\n{if curr_bed_type==\"High Temp Plate\"} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0 Z_OFFSET=-0.07\n{else} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0\n{endif} \n\n\n;===== 画起始线 =================\nG90\nG1 Z1.5\nG0 X85 Y1 Z2 F18000\nM109 S{nozzle_temperature_initial_layer[initial_extruder]}\nG1 Z0.2\nM83\nG1 X185 E15 F360\nG1 Z1.5\n\nG90\nM106 S0", + "machine_start_gcode": "SET_PRINT_AUTO_BED_LEVELING ENABLE=1\nSET_TIME_LAPSE_CAMERA ENABLE=1\n;===== date: 20260128 =====================\n\nPRINT_START\nDEFECT_DETECTION_START\nSET_PRINT_STATS_INFO TOTAL_LAYER={total_layer_count} CURRENT_LAYER=0\nTIMELAPSE_START\nM140 S{bed_temperature_initial_layer_single}\nM104 T{initial_extruder} S140\nM204 S10000\n;===== top cover purifier =====\n{if min_vitrification_temperature <= 50}\nSET_PURIFIER_MODE MODE=1 DESIRE_TEMP=42 ALARM_TEMP=48 FAN_SPEED=0.6 DELAY_OFF=0 ; strong cooling\n{elsif min_vitrification_temperature <= 70}\nSET_PURIFIER_MODE MODE=1 DESIRE_TEMP=45 ALARM_TEMP=51 FAN_SPEED=0.6 DELAY_OFF=0 ; weak cooling\n{else}\nSET_PURIFIER_MODE MODE=3 DESIRE_TEMP=45 FAN_SPEED=0.6 DELAY_OFF=600 ; keep warm\n{endif}\nG28 X Y\nDEFECT_DETECT_NOODLE_FIRST\n;===== 床面异物检测 ========\nT{initial_extruder}\nG90\nDEFECT_DETECTION_DETECT_BED\n;===== 取放头检测 =================\nSM_PRINT_CHECK_SWITCH_EXTRUDER\n\n;===== 自动进料 & 挤出流量 & 预挤出 ======================\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=1 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=0\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=0\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=2 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=1\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=1\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=3 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=2\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=2\nSM_PRINT_AUTO_FEED EXTRUDER=3\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=3\nM104 S0 T0 A0\nM104 S0 T1 A0\nM104 S0 T2 A0\nM104 S0 T3 A0\n\n;==== 预挤出耗材 =====\nM104 T{initial_extruder} S{nozzle_temperature[initial_extruder]}\nT{initial_extruder}\nM109 T{initial_extruder} S{nozzle_temperature[initial_extruder]}\nSM_PRINT_PREEXTRUDE_FILAMENT INDEX={initial_extruder}\nM104 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\n\n;===== 粗回零 =================\nT{initial_extruder}\nM106 S255\nM106 P2 S0\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\nROUGHLY_CLEAN_NOZZLE_WITH_DISCARD\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nM107\nG28 Z I140 J140\n\n;===== 检测钢板 =================\nM107\nDETECT_BED_PLATE\n\n;===== 深度清洁喷嘴 =================\nM106 S255\nG90\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 S{nozzle_temperature[initial_extruder] - 50}\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_1\nM104 S{nozzle_temperature[initial_extruder] - 90}\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_2\n\n;===== 精回零 =================\nM106 S255\nM109 S{nozzle_temperature[initial_extruder] - 90}\nM190 S{bed_temperature_initial_layer_single}\nM107 P2\nG90\nG0 Z5 F10000\nWAIT_CHAMBER_TEMP TIMEOUT=180\nM107\n{if curr_bed_type==\"High Temp Plate\"} \nG28 Z Z_OFFSET -0.07 \n{else} \nG28 Z \n{endif} \n\n\n;===== 热床调平 =================\nM107\n{if curr_bed_type==\"High Temp Plate\"} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0 Z_OFFSET=-0.07\n{else} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0\n{endif} \n\n\n;===== 画起始线 =================\nG90\nG1 Z1.5\nG0 X85 Y1 Z2 F18000\nM109 S{nozzle_temperature_initial_layer[initial_extruder]}\nG1 Z0.2\nM83\nG1 X185 E15 F360\nG1 Z1.5\n\nG90\nM106 S0", "machine_tool_change_time": "5", "max_layer_height": [ "0.14", diff --git a/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.4 nozzle).json b/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.4 nozzle).json index 8438b121cb..be5af23449 100644 --- a/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.4 nozzle).json +++ b/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.4 nozzle).json @@ -97,7 +97,7 @@ "20", "12" ], - "machine_start_gcode": "SET_PRINT_AUTO_BED_LEVELING ENABLE=1\nSET_TIME_LAPSE_CAMERA ENABLE=1\n;===== date: 20260128 =====================\n\nPRINT_START\nDEFECT_DETECTION_START\nSET_PRINT_STATS_INFO TOTAL_LAYER={total_layer_count} CURRENT_LAYER=0\nTIMELAPSE_START\nM140 S{bed_temperature_initial_layer_single}\nM104 T{initial_extruder} S140\nM204 S10000\nG28 X Y\nDEFECT_DETECT_NOODLE_FIRST\n;===== 床面异物检测 ========\nT{initial_extruder}\nG90\nDEFECT_DETECTION_DETECT_BED\n;===== 取放头检测 =================\nSM_PRINT_CHECK_SWITCH_EXTRUDER\n\n;===== 自动进料 & 挤出流量 & 预挤出 ======================\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=1 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=0\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=0\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=2 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=1\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=1\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=3 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=2\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=2\nSM_PRINT_AUTO_FEED EXTRUDER=3\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=3\nM104 S0 T0 A0\nM104 S0 T1 A0\nM104 S0 T2 A0\nM104 S0 T3 A0\nM104 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\n\n;===== 粗回零 =================\nT{initial_extruder}\nM106 S255\nM106 P2 S0\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\nROUGHLY_CLEAN_NOZZLE_WITH_DISCARD\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nG28 Z I140 J140\n\n;===== 检测钢板 =================\nDETECT_BED_PLATE\n\n;===== 深度清洁喷嘴 =================\nG90\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 S{nozzle_temperature[initial_extruder] - 50}\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_1\nM104 S{nozzle_temperature[initial_extruder] - 90}\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_2\n\n;===== 精回零 =================\nM106 S255\nM109 S{nozzle_temperature[initial_extruder] - 90}\nM190 S{bed_temperature_initial_layer_single}\nM107 P2\nG90\nG0 Z5 F10000\nWAIT_CHAMBER_TEMP TIMEOUT=180\n{if curr_bed_type==\"High Temp Plate\"} \nG28 Z Z_OFFSET -0.07 \n{else} \nG28 Z \n{endif} \n\n\n;===== 热床调平 =================\n{if curr_bed_type==\"High Temp Plate\"} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0 Z_OFFSET=-0.07\n{else} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0\n{endif} \n\n\n;===== 画起始线 =================\nG90\nG1 Z1.5\nG0 X85 Y1 Z2 F18000\nM109 S{nozzle_temperature_initial_layer[initial_extruder]}\nG1 Z0.2\nM83\nG1 X185 E15 F360\nG1 Z1.5\n\nG90\nM106 S0", + "machine_start_gcode": "SET_PRINT_AUTO_BED_LEVELING ENABLE=1\nSET_TIME_LAPSE_CAMERA ENABLE=1\n;===== date: 20260128 =====================\n\nPRINT_START\nDEFECT_DETECTION_START\nSET_PRINT_STATS_INFO TOTAL_LAYER={total_layer_count} CURRENT_LAYER=0\nTIMELAPSE_START\nM140 S{bed_temperature_initial_layer_single}\nM104 T{initial_extruder} S140\nM204 S10000\n;===== top cover purifier =====\n{if min_vitrification_temperature <= 50}\nSET_PURIFIER_MODE MODE=1 DESIRE_TEMP=42 ALARM_TEMP=48 FAN_SPEED=0.6 DELAY_OFF=0 ; strong cooling\n{elsif min_vitrification_temperature <= 70}\nSET_PURIFIER_MODE MODE=1 DESIRE_TEMP=45 ALARM_TEMP=51 FAN_SPEED=0.6 DELAY_OFF=0 ; weak cooling\n{else}\nSET_PURIFIER_MODE MODE=3 DESIRE_TEMP=45 FAN_SPEED=0.6 DELAY_OFF=600 ; keep warm\n{endif}\nG28 X Y\nDEFECT_DETECT_NOODLE_FIRST\n;===== 床面异物检测 ========\nT{initial_extruder}\nG90\nDEFECT_DETECTION_DETECT_BED\n;===== 取放头检测 =================\nSM_PRINT_CHECK_SWITCH_EXTRUDER\n\n;===== 自动进料 & 挤出流量 & 预挤出 ======================\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=1 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=0\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=0\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=2 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=1\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=1\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=3 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=2\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=2\nSM_PRINT_AUTO_FEED EXTRUDER=3\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=3\nM104 S0 T0 A0\nM104 S0 T1 A0\nM104 S0 T2 A0\nM104 S0 T3 A0\n\n;==== 预挤出耗材 =====\nM104 T{initial_extruder} S{nozzle_temperature[initial_extruder]}\nT{initial_extruder}\nM109 T{initial_extruder} S{nozzle_temperature[initial_extruder]}\nSM_PRINT_PREEXTRUDE_FILAMENT INDEX={initial_extruder}\nM104 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\n\n;===== 粗回零 =================\nT{initial_extruder}\nM106 S255\nM106 P2 S0\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\nROUGHLY_CLEAN_NOZZLE_WITH_DISCARD\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nM107\nG28 Z I140 J140\n\n;===== 检测钢板 =================\nM107\nDETECT_BED_PLATE\n\n;===== 深度清洁喷嘴 =================\nM106 S255\nG90\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 S{nozzle_temperature[initial_extruder] - 50}\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_1\nM104 S{nozzle_temperature[initial_extruder] - 90}\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_2\n\n;===== 精回零 =================\nM106 S255\nM109 S{nozzle_temperature[initial_extruder] - 90}\nM190 S{bed_temperature_initial_layer_single}\nM107 P2\nG90\nG0 Z5 F10000\nWAIT_CHAMBER_TEMP TIMEOUT=180\nM107\n{if curr_bed_type==\"High Temp Plate\"} \nG28 Z Z_OFFSET -0.07 \n{else} \nG28 Z \n{endif} \n\n\n;===== 热床调平 =================\nM107\n{if curr_bed_type==\"High Temp Plate\"} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0 Z_OFFSET=-0.07\n{else} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0\n{endif} \n\n\n;===== 画起始线 =================\nG90\nG1 Z1.5\nG0 X85 Y1 Z2 F18000\nM109 S{nozzle_temperature_initial_layer[initial_extruder]}\nG1 Z0.2\nM83\nG1 X185 E15 F360\nG1 Z1.5\n\nG90\nM106 S0", "machine_tool_change_time": "5", "max_layer_height": [ "0.32", diff --git a/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.6 nozzle).json b/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.6 nozzle).json index ec01b97698..41fb2bf76e 100644 --- a/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.6 nozzle).json +++ b/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.6 nozzle).json @@ -97,7 +97,7 @@ "20", "12" ], - "machine_start_gcode": "SET_PRINT_AUTO_BED_LEVELING ENABLE=1\nSET_TIME_LAPSE_CAMERA ENABLE=1\n;===== date: 20260128 =====================\n\nPRINT_START\nDEFECT_DETECTION_START\nSET_PRINT_STATS_INFO TOTAL_LAYER={total_layer_count} CURRENT_LAYER=0\nTIMELAPSE_START\nM140 S{bed_temperature_initial_layer_single}\nM104 T{initial_extruder} S140\nM204 S10000\nG28 X Y\nDEFECT_DETECT_NOODLE_FIRST\n;===== 床面异物检测 ========\nT{initial_extruder}\nG90\nDEFECT_DETECTION_DETECT_BED\n;===== 取放头检测 =================\nSM_PRINT_CHECK_SWITCH_EXTRUDER\n\n;===== 自动进料 & 挤出流量 & 预挤出 ======================\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=1 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=0\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=0\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=2 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=1\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=1\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=3 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=2\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=2\nSM_PRINT_AUTO_FEED EXTRUDER=3\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=3\nM104 S0 T0 A0\nM104 S0 T1 A0\nM104 S0 T2 A0\nM104 S0 T3 A0\nM104 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\n\n;===== 粗回零 =================\nT{initial_extruder}\nM106 S255\nM106 P2 S0\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\nROUGHLY_CLEAN_NOZZLE_WITH_DISCARD\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nG28 Z I140 J140\n\n;===== 检测钢板 =================\nDETECT_BED_PLATE\n\n;===== 深度清洁喷嘴 =================\nG90\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 S{nozzle_temperature[initial_extruder] - 50}\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_1\nM104 S{nozzle_temperature[initial_extruder] - 90}\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_2\n\n;===== 精回零 =================\nM106 S255\nM109 S{nozzle_temperature[initial_extruder] - 90}\nM190 S{bed_temperature_initial_layer_single}\nM107 P2\nG90\nG0 Z5 F10000\nWAIT_CHAMBER_TEMP TIMEOUT=180\n{if curr_bed_type==\"High Temp Plate\"} \nG28 Z Z_OFFSET -0.07 \n{else} \nG28 Z \n{endif} \n\n\n;===== 热床调平 =================\n{if curr_bed_type==\"High Temp Plate\"} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0 Z_OFFSET=-0.07\n{else} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0\n{endif} \n\n\n;===== 画起始线 =================\nG90\nG1 Z1.5\nG0 X85 Y1 Z2 F18000\nM109 S{nozzle_temperature_initial_layer[initial_extruder]}\nG1 Z0.2\nM83\nG1 X185 E15 F360\nG1 Z1.5\n\nG90\nM106 S0", + "machine_start_gcode": "SET_PRINT_AUTO_BED_LEVELING ENABLE=1\nSET_TIME_LAPSE_CAMERA ENABLE=1\n;===== date: 20260128 =====================\n\nPRINT_START\nDEFECT_DETECTION_START\nSET_PRINT_STATS_INFO TOTAL_LAYER={total_layer_count} CURRENT_LAYER=0\nTIMELAPSE_START\nM140 S{bed_temperature_initial_layer_single}\nM104 T{initial_extruder} S140\nM204 S10000\n;===== top cover purifier =====\n{if min_vitrification_temperature <= 50}\nSET_PURIFIER_MODE MODE=1 DESIRE_TEMP=42 ALARM_TEMP=48 FAN_SPEED=0.6 DELAY_OFF=0 ; strong cooling\n{elsif min_vitrification_temperature <= 70}\nSET_PURIFIER_MODE MODE=1 DESIRE_TEMP=45 ALARM_TEMP=51 FAN_SPEED=0.6 DELAY_OFF=0 ; weak cooling\n{else}\nSET_PURIFIER_MODE MODE=3 DESIRE_TEMP=45 FAN_SPEED=0.6 DELAY_OFF=600 ; keep warm\n{endif}\nG28 X Y\nDEFECT_DETECT_NOODLE_FIRST\n;===== 床面异物检测 ========\nT{initial_extruder}\nG90\nDEFECT_DETECTION_DETECT_BED\n;===== 取放头检测 =================\nSM_PRINT_CHECK_SWITCH_EXTRUDER\n\n;===== 自动进料 & 挤出流量 & 预挤出 ======================\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=1 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=0\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=0\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=2 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=1\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=1\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=3 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=2\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=2\nSM_PRINT_AUTO_FEED EXTRUDER=3\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=3\nM104 S0 T0 A0\nM104 S0 T1 A0\nM104 S0 T2 A0\nM104 S0 T3 A0\n\n;==== 预挤出耗材 =====\nM104 T{initial_extruder} S{nozzle_temperature[initial_extruder]}\nT{initial_extruder}\nM109 T{initial_extruder} S{nozzle_temperature[initial_extruder]}\nSM_PRINT_PREEXTRUDE_FILAMENT INDEX={initial_extruder}\nM104 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\n\n;===== 粗回零 =================\nT{initial_extruder}\nM106 S255\nM106 P2 S0\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\nROUGHLY_CLEAN_NOZZLE_WITH_DISCARD\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nM107\nG28 Z I140 J140\n\n;===== 检测钢板 =================\nM107\nDETECT_BED_PLATE\n\n;===== 深度清洁喷嘴 =================\nM106 S255\nG90\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 S{nozzle_temperature[initial_extruder] - 50}\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_1\nM104 S{nozzle_temperature[initial_extruder] - 90}\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_2\n\n;===== 精回零 =================\nM106 S255\nM109 S{nozzle_temperature[initial_extruder] - 90}\nM190 S{bed_temperature_initial_layer_single}\nM107 P2\nG90\nG0 Z5 F10000\nWAIT_CHAMBER_TEMP TIMEOUT=180\nM107\n{if curr_bed_type==\"High Temp Plate\"} \nG28 Z Z_OFFSET -0.07 \n{else} \nG28 Z \n{endif} \n\n\n;===== 热床调平 =================\nM107\n{if curr_bed_type==\"High Temp Plate\"} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0 Z_OFFSET=-0.07\n{else} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0\n{endif} \n\n\n;===== 画起始线 =================\nG90\nG1 Z1.5\nG0 X85 Y1 Z2 F18000\nM109 S{nozzle_temperature_initial_layer[initial_extruder]}\nG1 Z0.2\nM83\nG1 X185 E15 F360\nG1 Z1.5\n\nG90\nM106 S0", "machine_tool_change_time": "5", "max_layer_height": [ "0.42", diff --git a/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.8 nozzle).json b/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.8 nozzle).json index 5bc11525e9..6c31cf7633 100644 --- a/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.8 nozzle).json +++ b/resources/profiles/Snapmaker/machine/Snapmaker U1 (0.8 nozzle).json @@ -97,7 +97,7 @@ "20", "12" ], - "machine_start_gcode": "SET_PRINT_AUTO_BED_LEVELING ENABLE=1\nSET_TIME_LAPSE_CAMERA ENABLE=1\n;===== date: 20260128 =====================\n\nPRINT_START\nDEFECT_DETECTION_START\nSET_PRINT_STATS_INFO TOTAL_LAYER={total_layer_count} CURRENT_LAYER=0\nTIMELAPSE_START\nM140 S{bed_temperature_initial_layer_single}\nM104 T{initial_extruder} S140\nM204 S10000\nG28 X Y\nDEFECT_DETECT_NOODLE_FIRST\n;===== 床面异物检测 ========\nT{initial_extruder}\nG90\nDEFECT_DETECTION_DETECT_BED\n;===== 取放头检测 =================\nSM_PRINT_CHECK_SWITCH_EXTRUDER\n\n;===== 自动进料 & 挤出流量 & 预挤出 ======================\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=1 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=0\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=0\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=2 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=1\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=1\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=3 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=2\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=2\nSM_PRINT_AUTO_FEED EXTRUDER=3\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=3\nM104 S0 T0 A0\nM104 S0 T1 A0\nM104 S0 T2 A0\nM104 S0 T3 A0\nM104 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\n\n;===== 粗回零 =================\nT{initial_extruder}\nM106 S255\nM106 P2 S0\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\nROUGHLY_CLEAN_NOZZLE_WITH_DISCARD\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nG28 Z I140 J140\n\n;===== 检测钢板 =================\nDETECT_BED_PLATE\n\n;===== 深度清洁喷嘴 =================\nG90\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 S{nozzle_temperature[initial_extruder] - 50}\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_1\nM104 S{nozzle_temperature[initial_extruder] - 90}\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_2\n\n;===== 精回零 =================\nM106 S255\nM109 S{nozzle_temperature[initial_extruder] - 90}\nM190 S{bed_temperature_initial_layer_single}\nM107 P2\nG90\nG0 Z5 F10000\nWAIT_CHAMBER_TEMP TIMEOUT=180\n{if curr_bed_type==\"High Temp Plate\"} \nG28 Z Z_OFFSET -0.07 \n{else} \nG28 Z \n{endif} \n\n\n;===== 热床调平 =================\n{if curr_bed_type==\"High Temp Plate\"} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0 Z_OFFSET=-0.07\n{else} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0\n{endif} \n\n\n;===== 画起始线 =================\nG90\nG1 Z1.5\nG0 X85 Y1 Z2 F18000\nM109 S{nozzle_temperature_initial_layer[initial_extruder]}\nG1 Z0.2\nM83\nG1 X185 E15 F360\nG1 Z1.5\n\nG90\nM106 S0", + "machine_start_gcode": "SET_PRINT_AUTO_BED_LEVELING ENABLE=1\nSET_TIME_LAPSE_CAMERA ENABLE=1\n;===== date: 20260128 =====================\n\nPRINT_START\nDEFECT_DETECTION_START\nSET_PRINT_STATS_INFO TOTAL_LAYER={total_layer_count} CURRENT_LAYER=0\nTIMELAPSE_START\nM140 S{bed_temperature_initial_layer_single}\nM104 T{initial_extruder} S140\nM204 S10000\n;===== top cover purifier =====\n{if min_vitrification_temperature <= 50}\nSET_PURIFIER_MODE MODE=1 DESIRE_TEMP=42 ALARM_TEMP=48 FAN_SPEED=0.6 DELAY_OFF=0 ; strong cooling\n{elsif min_vitrification_temperature <= 70}\nSET_PURIFIER_MODE MODE=1 DESIRE_TEMP=45 ALARM_TEMP=51 FAN_SPEED=0.6 DELAY_OFF=0 ; weak cooling\n{else}\nSET_PURIFIER_MODE MODE=3 DESIRE_TEMP=45 FAN_SPEED=0.6 DELAY_OFF=600 ; keep warm\n{endif}\nG28 X Y\nDEFECT_DETECT_NOODLE_FIRST\n;===== 床面异物检测 ========\nT{initial_extruder}\nG90\nDEFECT_DETECTION_DETECT_BED\n;===== 取放头检测 =================\nSM_PRINT_CHECK_SWITCH_EXTRUDER\n\n;===== 自动进料 & 挤出流量 & 预挤出 ======================\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=1 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=0\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=0\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=2 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=1\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=1\nSM_PRINT_EXTRUDER_PREHEAT EXTRUDER=3 TEMP=140\nSM_PRINT_AUTO_FEED EXTRUDER=2\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=2\nSM_PRINT_AUTO_FEED EXTRUDER=3\nSM_PRINT_FLOW_CALIBRATE EXTRUDER=3\nM104 S0 T0 A0\nM104 S0 T1 A0\nM104 S0 T2 A0\nM104 S0 T3 A0\n\n;==== 预挤出耗材 =====\nM104 T{initial_extruder} S{nozzle_temperature[initial_extruder]}\nT{initial_extruder}\nM109 T{initial_extruder} S{nozzle_temperature[initial_extruder]}\nSM_PRINT_PREEXTRUDE_FILAMENT INDEX={initial_extruder}\nM104 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\n\n;===== 粗回零 =================\nT{initial_extruder}\nM106 S255\nM106 P2 S0\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 T{initial_extruder} S{nozzle_temperature[initial_extruder] - 90}\nROUGHLY_CLEAN_NOZZLE_WITH_DISCARD\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nM107\nG28 Z I140 J140\n\n;===== 检测钢板 =================\nM107\nDETECT_BED_PLATE\n\n;===== 深度清洁喷嘴 =================\nM106 S255\nG90\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nM109 S{nozzle_temperature[initial_extruder] - 50}\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_1\nM104 S{nozzle_temperature[initial_extruder] - 90}\nG0 Z5 F10000\nMOVE_TO_DISCARD_FILAMENT_POSITION\nROUGHLY_CLEAN_NOZZLE\nMOVE_TO_XY_IDLE_POSITION_EXTRUDER\nFINELY_CLEAN_NOZZLE_STAGE_2\n\n;===== 精回零 =================\nM106 S255\nM109 S{nozzle_temperature[initial_extruder] - 90}\nM190 S{bed_temperature_initial_layer_single}\nM107 P2\nG90\nG0 Z5 F10000\nWAIT_CHAMBER_TEMP TIMEOUT=180\nM107\n{if curr_bed_type==\"High Temp Plate\"} \nG28 Z Z_OFFSET -0.07 \n{else} \nG28 Z \n{endif} \n\n\n;===== 热床调平 =================\nM107\n{if curr_bed_type==\"High Temp Plate\"} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0 Z_OFFSET=-0.07\n{else} \n; Always pass `ADAPTIVE_MARGIN=0` because Orca has already handled `adaptive_bed_mesh_margin` internally\n; Make sure to set ADAPTIVE to 0 otherwise Klipper will use it's own adaptive bed mesh logic\nBED_MESH_CALIBRATE mesh_min={adaptive_bed_mesh_min[0]},{adaptive_bed_mesh_min[1]} mesh_max={adaptive_bed_mesh_max[0]},{adaptive_bed_mesh_max[1]} ALGORITHM=[bed_mesh_algo] PROBE_COUNT={bed_mesh_probe_count[0]},{bed_mesh_probe_count[1]} ADAPTIVE=0 ADAPTIVE_MARGIN=0\n{endif} \n\n\n;===== 画起始线 =================\nG90\nG1 Z1.5\nG0 X85 Y1 Z2 F18000\nM109 S{nozzle_temperature_initial_layer[initial_extruder]}\nG1 Z0.2\nM83\nG1 X185 E15 F360\nG1 Z1.5\n\nG90\nM106 S0", "machine_tool_change_time": "5", "max_layer_height": [ "0.56", diff --git a/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml b/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml index a8cbf1d868..cca417f735 100644 --- a/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml +++ b/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml @@ -336,10 +336,10 @@ modules: sha256: 3d22d46c566b1761a0e15ea397589b3a5f36ac09b7c785382e6470156c04247f dest: external-packages/PNG - # libjpeg-turbo 3.0.1 + # libjpeg-turbo 3.2.0 - type: file - url: https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/3.0.1.zip - sha256: d6d99e693366bc03897677650e8b2dfa76b5d6c54e2c9e70c03f0af821b0a52f + url: https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/3.2.0.zip + sha256: 1b4c2cb6cba1ca5e53b9e85eeeab02154cab4b70894c96e97a9c747a26d19d63 dest: external-packages/JPEG # Freetype 2.12.1 diff --git a/scripts/orca_profile_tool.py b/scripts/orca_profile_tool.py index f1a428cdfe..2519ce9e43 100755 --- a/scripts/orca_profile_tool.py +++ b/scripts/orca_profile_tool.py @@ -12,6 +12,7 @@ commands: trim delete profile files no .json list references update-index regenerate the *_list sections of .json legacy-compat write the printers user presets can be migrated back to + gcode-diff print a readable markdown diff of changed custom G-code options shared by several commands: --vendor VENDOR act on one vendor bundle only; repeatable, empty means all @@ -94,11 +95,14 @@ parent in the OFL map. filament_vendor / filament_type resolve the same way. """ import argparse +import difflib import functools +import html import json import os import posixpath import re +import subprocess import sys import uuid from collections import Counter, defaultdict @@ -192,6 +196,7 @@ VECTOR_KEYS = { PRINT_CONFIG_CPP = os.path.normpath( os.path.join(SCRIPTS_DIR, "..", "src", "libslic3r", "PrintConfig.cpp")) +TAB_CPP = os.path.normpath(os.path.join(SCRIPTS_DIR, "..", "src", "slic3r", "GUI", "Tab.cpp")) @functools.lru_cache(maxsize=None) @@ -313,11 +318,11 @@ REMEDY_HINTS = { } -def print_error(msg): - print(f"\033[91m[ERROR]\033[0m {msg}") # Red +def print_error(msg, file=None): + print(f"\033[91m[ERROR]\033[0m {msg}", file=file) # Red -def print_warning(msg): - print(f"\033[93m[WARNING]\033[0m {msg}") # Yellow +def print_warning(msg, file=None): + print(f"\033[93m[WARNING]\033[0m {msg}", file=file) # Yellow def print_info(msg): print(f"\033[94m[INFO]\033[0m {msg}") # Blue @@ -3209,6 +3214,223 @@ def run_legacy_compat(base_dir, profiles_dir, output, check): return 0 +# --------------------------------------------------------------------------- +# gcode-diff +# --------------------------------------------------------------------------- + +# UTF-8 bytes, kept well under GitHub's 65,536-character comment limit. +GCODE_DIFF_BUDGET = 60000 +# The file names a section's summary shows before "and N more". +GCODE_DIFF_SUMMARY_FILES = 3 + +GCODE_DIFF_HEADER = ( + "## Custom G-code changes\n" + "\n" + "GitHub shows custom G-code in a profile as one long line, so below is a line by line " + "diff of each changed G-code or other text setting.\n") + + +@functools.lru_cache(maxsize=None) +def _text_option_keys(): + """The string options PrintConfig.cpp defines as G-code or other multi-line text + (every *_gcode option, and every one it marks multiline, such as notes), plus the + ones Tab.cpp edits as code, such as filename_format.""" + with open(PRINT_CONFIG_CPP, encoding="utf-8") as f: + source = f.read() + keys = set() + for body in re.split(r"\bdef\s*=\s*this->add(?:_nullable)?\(", source)[1:]: + match = re.match(r'"(\w+)",\s*coStrings?\b', body) + if match and (match.group(1).endswith("_gcode") + or re.search(r"def->multiline\s*=\s*true", body)): + keys.add(match.group(1)) + if "machine_start_gcode" not in keys: + raise RuntimeError(f"{PRINT_CONFIG_CPP} no longer defines machine_start_gcode") + # Tab.cpp only adds keys, so a missing file is not an error. + try: + with open(TAB_CPP, encoding="utf-8") as f: + gui = f.read() + except OSError: + gui = "" + keys.update(re.findall(r'get_option\("(\w+)"\);(?:(?!get_option\().)*?\bis_code\s*=\s*true', + gui, re.DOTALL)) + return frozenset(keys) + + +def _git(cwd, *args, stdin=None): + return subprocess.run(["git", "-C", cwd, *args], input=stdin, check=True, + capture_output=True).stdout + + +def _blobs_at(profiles_dir, specs): + """{(ref, path): bytes, or None if not a file there} for (ref, path relative to + profiles_dir) pairs, all read by one git cat-file process.""" + prefix = _git(profiles_dir, "rev-parse", "--show-prefix").decode("utf-8").strip() + out = _git(profiles_dir, "cat-file", "--batch", + stdin="".join(f"{ref}:{prefix}{rel}\n" for ref, rel in specs).encode("utf-8")) + blobs, pos = {}, 0 + for spec in specs: + end = out.index(b"\n", pos) + header = out[pos:end] + pos = end + 1 + # " missing" and " ambiguous" have no content; " " does. + if header.endswith((b" missing", b" ambiguous")): + blobs[spec] = None + continue + _oid, kind, size = header.split() + blobs[spec] = out[pos:pos + int(size)] if kind == b"blob" else None + pos += int(size) + 1 + return blobs + + +def _parse_profile(raw, rel, where): + """The JSON in raw, or None with a warning when it is absent or not JSON.""" + if raw is None: + print_warning(f"{rel}: skipped, not found at {where}", file=sys.stderr) + return None + try: + return json.loads(raw.decode("utf-8-sig")) + except ValueError as e: + print_warning(f"{rel}: skipped, cannot read it at {where}: {e}", file=sys.stderr) + return None + + +def _changed_profiles(profiles_dir, base, head): + """(old path, new path) of each JSON file under profiles_dir that differs between + base and head (the working tree, untracked files included, when None); the absent + side of an added or deleted file is None, and so is a side that is not JSON. Renames + are paired.""" + out = _git(profiles_dir, "diff", "--name-status", "-z", "-M", "--relative", base, + *([head] if head else []), "--", ".") + fields = out.decode("utf-8").split("\0") + pairs, i = [], 0 + while i + 1 < len(fields): + status = fields[i] + old = new = fields[i + 1] + if status[0] in "RC": + new = fields[i + 2] + i += 3 + else: + i += 2 + old = None if status[0] == "A" or not old.endswith(".json") else old + new = None if status[0] == "D" or not new.endswith(".json") else new + if old or new: + pairs.append((old, new)) + if head is None: + out = _git(profiles_dir, "ls-files", "-z", "--others", "--exclude-standard", "--", ".") + pairs += [(None, rel) for rel in out.decode("utf-8").split("\0") + if rel.endswith(".json") and rel.split("/")[0] != USER_DIR] + return pairs + + +def _text_lines(value): + return [line.rstrip() for line in value.split("\n")] if value else [] + + +def _text_changes(old, new): + """(setting, unified diff) for every G-code or other text value that differs + between two profiles; a vector option with several values gives one per value.""" + changes = [] + for key in list(new) + [k for k in old if k not in new]: + a, b = _as_list(old.get(key, [])), _as_list(new.get(key, [])) + if a == b or not all(isinstance(v, str) for v in a + b): + continue + if key not in _text_option_keys() and not any("\n" in v for v in a + b): + continue + width = max(len(a), len(b)) + for i in range(width): + diff = list(difflib.unified_diff( + _text_lines(a[i] if i < len(a) else ""), _text_lines(b[i] if i < len(b) else ""), + lineterm=""))[2:] # drops the ---/+++ file header + if diff: + changes.append((key if width == 1 else f"{key}[{i}]", "\n".join(diff))) + return changes + + +def _gcode_diff_section(files, setting, diff): + # A fence longer than any backtick run in the G-code cannot be closed by it. + fence = "`" * max([3] + [len(run) + 1 for run in re.findall(r"`+", diff)]) + # In , the "@BBL" of a filament file name does not mention a GitHub user. + def code(text): + return f"{html.escape(text, quote=False)}" + names, listing = ", ".join(map(code, files)), "" + if len(files) > GCODE_DIFF_SUMMARY_FILES + 1: # never "and 1 more" + listing = f"

{names}

\n\n" # an HTML block, so markdown in names stays literal + names = (", ".join(map(code, files[:GCODE_DIFF_SUMMARY_FILES])) + + f" and {len(files) - GCODE_DIFF_SUMMARY_FILES} more") + return (f"\n
\n{names} - {code(setting)} (click to expand)" + f"\n\n{listing}{fence}diff\n{diff}\n{fence}\n\n
\n") + + +def gcode_diff(profiles_dir, base, head=None, vendors=None): + """Markdown with one collapsed diff per changed G-code setting between base and + head, or "" when none changed. Files whose diff of a setting is identical share + one section. Cut to whole sections under GCODE_DIFF_BUDGET.""" + pairs = [(old, new) for old, new in _changed_profiles(profiles_dir, base, head) + if not vendors or any(p and p.split("/")[0] in vendors for p in (old, new))] + specs = ([(base, old) for old, _ in pairs if old] + + [(head, new) for _, new in pairs if new and head]) + blobs = _blobs_at(profiles_dir, specs) if specs else {} + + def load(ref, rel): + if rel is None: + return {} + if ref: + return _parse_profile(blobs[(ref, rel)], rel, ref) + try: + return _parse_profile(Path(profiles_dir, rel).read_bytes(), rel, "the working tree") + except OSError as e: + print_warning(f"{rel}: skipped, cannot read it: {e}", file=sys.stderr) + return None + + groups = {} # (setting, diff) -> files, in the order git lists them + for old_rel, new_rel in pairs: + old, new = load(base, old_rel), load(head, new_rel) + if not isinstance(old, dict) or not isinstance(new, dict): + continue + for setting, diff in _text_changes(old, new): + groups.setdefault((setting, diff), []).append(new_rel or old_rel) + if not groups: + return "" + + sections = [_gcode_diff_section(files, setting, diff) + for (setting, diff), files in groups.items()] + budget = GCODE_DIFF_BUDGET - len(GCODE_DIFF_HEADER.encode("utf-8")) + shown = 0 + for section in sections: + budget -= len(section.encode("utf-8")) + if budget < 0: + break + shown += 1 + note, hidden = "", len(sections) - shown + if hidden: + note = (f"\n{hidden} of {len(sections)} sections {'is' if hidden == 1 else 'are'} not " + "shown because the comment would be too long for GitHub. See the Files " + "changed tab for the rest.\n") + return GCODE_DIFF_HEADER + "".join(sections[:shown]) + note + + +def _default_gcode_diff_base(profiles_dir, head): + for main in ("upstream/main", "origin/main"): + try: + return _git(profiles_dir, "merge-base", head or "HEAD", main).decode().strip() + except subprocess.CalledProcessError: + continue + raise RuntimeError("no --base given, and neither upstream/main nor origin/main exists") + + +def run_gcode_diff(profiles_dir, vendors, base, head): + try: + markdown = gcode_diff(profiles_dir, base or _default_gcode_diff_base(profiles_dir, head), + head, vendors) + # UnicodeDecodeError means git listed a file name that is not UTF-8. + except (OSError, RuntimeError, UnicodeDecodeError, subprocess.CalledProcessError) as e: + stderr = getattr(e, "stderr", None) + print_error(stderr.decode(errors="replace").strip() if stderr else str(e), file=sys.stderr) + return 1 + sys.stdout.write(markdown) + return 0 + + # --------------------------------------------------------------------------- # CLI # --------------------------------------------------------------------------- @@ -3233,6 +3455,9 @@ examples: orca_profile_tool.py legacy-compat --base /tmp/v2.4.2/resources/profiles rewrite resources/info/legacy_compatible_printers.json against 2.4.2's profiles (git archive v2.4.2 resources/profiles | tar -x -C /tmp/v2.4.2) + orca_profile_tool.py gcode-diff > gcode.md + the changed custom G-code of the working tree since it left upstream/main, + as markdown with one collapsed diff per setting after adding, renaming or deleting profile files, run in this order: normalize -> update-index -> generate-id -> check @@ -3387,6 +3612,25 @@ def build_parser(): legacy_cmd.add_argument("--check", action="store_true", help="fail if the map differs from what --base implies; write nothing") + gcode_cmd = add( + "gcode-diff", [vendor_opt, profiles_opt], + "print a readable markdown diff of changed custom G-code", + "Print, as markdown, a unified diff of every G-code or other multi-line\n" + "setting that differs between --base and --head in each changed profile\n" + "file, one collapsed section per setting. Files whose diff of a setting is\n" + "identical share a section. Trailing spaces are removed from every line, and\n" + "the output is cut to whole sections to fit a GitHub comment. Prints nothing\n" + "when no such setting changed. CI posts it on profile PRs.\n" + "\n" + "The settings are the *_gcode and multiline string options PrintConfig.cpp\n" + "defines, the options Tab.cpp edits as code (such as filename_format), and any\n" + "string value that spans several lines.") + gcode_cmd.add_argument("--base", metavar="REF", + help="compare against this git ref (default: the merge base " + "with upstream/main, else origin/main)") + gcode_cmd.add_argument("--head", metavar="REF", + help="compare this git ref (default: the working tree)") + return parser @@ -3423,6 +3667,9 @@ def main(argv=None): if args.command == "legacy-compat": return run_legacy_compat(args.base, profiles_dir, args.output, args.check) + if args.command == "gcode-diff": + return run_gcode_diff(profiles_dir, vendors, args.base, args.head) + if args.command == "fix-variant": _changed, errors = fix_variant_arrays(profiles_dir, vendors, dry_run=args.dry_run, strict=args.strict) diff --git a/scripts/tests/test_profile_tool.py b/scripts/tests/test_profile_tool.py index 167951d609..ed329b478c 100644 --- a/scripts/tests/test_profile_tool.py +++ b/scripts/tests/test_profile_tool.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """Tests for the tree-maintenance half of scripts/orca_profile_tool.py: the -normalize, trim, update-index, fix-variant and check commands, and the subcommand -dispatch that reaches them (stdlib unittest, no external deps). +normalize, trim, update-index, fix-variant, check and gcode-diff commands, and the +subcommand dispatch that reaches them (stdlib unittest, no external deps). The id halves are covered by test_filament_id.py and test_setting_id.py. @@ -14,9 +14,12 @@ import json import os import re import shutil +import stat +import subprocess import sys import tempfile import unittest +from unittest import mock sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) @@ -41,7 +44,24 @@ class Tree: os.makedirs(self.profiles) def cleanup(self): - shutil.rmtree(self.dir, ignore_errors=True) + root = os.path.abspath(self.dir) + + def writable_retry(func, path, _exc): + # Windows refuses to delete read-only files such as git's objects, and POSIX + # refuses to delete the entries of a read-only directory. + if not os.path.lexists(path): # already removed, as on a second cleanup + return + parent = os.path.dirname(os.path.abspath(path)) + try: + if os.path.commonpath([parent, root]) == root: # never the temp dir itself + os.chmod(parent, stat.S_IRWXU) + if not os.path.islink(path): # chmod would follow it out of the tree + os.chmod(path, stat.S_IRWXU) + func(path) + except (OSError, ValueError): # commonpath raises ValueError across drives + pass + hook = "onexc" if sys.version_info >= (3, 12) else "onerror" + shutil.rmtree(self.dir, **{hook: writable_retry}) def index_path(self, vendor): return os.path.join(self.profiles, vendor + ".json") @@ -1409,6 +1429,292 @@ class TestDispatch(TreeCase): self.assertEqual(self.t.read("V", "filament/A.json")["type"], "filament") +# --------------------------------------------------------------------------- +# gcode-diff +# --------------------------------------------------------------------------- + +@unittest.skipUnless(shutil.which("git"), "git not installed") +class TestGcodeDiff(TreeCase): + START = "G28\nM104 S200\nG1 Z5" + + def git(self, *args): + subprocess.run(["git", "-C", self.t.dir, "-c", "user.name=t", "-c", "user.email=t@t", + "-c", "commit.gpgsign=false", *args], check=True, capture_output=True) + + def printer(self, name, **extra): + self.t.write("V", f"machine/{name}.json", {"type": "machine", "name": name, **extra}) + + def commit(self): + self.git("add", "-A") + self.git("commit", "-q", "--allow-empty", "-m", "x") + + @classmethod + def setUpClass(cls): + # git's list of the variables that tie a process to a repository, asked with no + # GIT_* set since a stray GIT_DIR fails the query. + clean = {k: v for k, v in os.environ.items() if not k.startswith("GIT_")} + cls.repo_env_vars = set(subprocess.run( + ["git", "rev-parse", "--local-env-vars"], env=clean, check=True, + capture_output=True, text=True).stdout.split()) + + def setUp(self): + super().setUp() + # A git hook's GIT_DIR or GIT_INDEX_FILE would point every git call here, the + # tool's included, at the real repository instead of the temp tree. + env = {k: v for k, v in os.environ.items() if k not in self.repo_env_vars} + patcher = mock.patch.dict(os.environ, env, clear=True) + patcher.start() + self.addCleanup(patcher.stop) + self.git("init", "-q") + for name in ("A", "B", "C"): + self.printer(name, machine_start_gcode=self.START, nozzle_diameter=["0.4"]) + self.printer("Gone", machine_end_gcode="M84") + self.commit() + + def diff(self): + rc, out = self.run_command("gcode-diff", "--base", "HEAD") + self.assertEqual(rc, 0, out) + return out + + def test_identical_edits_share_one_section(self): + for name in ("A", "B"): + self.printer(name, machine_start_gcode="G28\nM104 S210 \nG1 Z5") + self.printer("C", machine_start_gcode="G28\nM104 S220\nG1 Z5") + out = self.diff() + self.assertEqual(out.count("
"), 2) + self.assertIn("V/machine/A.json, V/machine/B.json - " + "machine_start_gcode", out) + self.assertIn("V/machine/C.json - machine_start_gcode", out) + # Trailing spaces are removed. + self.assertIn("\n-M104 S200\n+M104 S210\n", out) + self.assertIn("\n\n```diff\n@@ ", out) + self.assertIn("\n```\n\n
", out) + + def test_nothing_is_printed_without_a_text_change(self): + self.printer("A", machine_start_gcode=self.START, nozzle_diameter=["0.6"]) + self.assertEqual(self.diff(), "") + + def test_added_and_deleted_files_show_the_whole_value(self): + # An untracked file counts as added; the validator's user dir is not a profile. + self.printer("New", machine_start_gcode="G28\nG29") + self.t.write("user", "default/machine/U.json", {"machine_start_gcode": "G28"}) + os.remove(self.t.path("V", "machine/Gone.json")) + out = self.diff() + self.assertIn("@@ -0,0 +1,2 @@\n+G28\n+G29\n", out) + self.assertIn("V/machine/Gone.json - machine_end_gcode", out) + self.assertIn("@@ -1 +0,0 @@\n-M84\n", out) + self.assertNotIn("U.json", out) + + def test_a_multi_line_value_counts_whatever_its_key(self): + self.printer("A", machine_start_gcode=self.START, custom_note="one\ntwo") + self.assertIn("V/machine/A.json - custom_note", self.diff()) + + def test_a_file_name_cannot_mention_a_user(self): + self.t.write("V", "filament/PLA @BBL A1.json", {"filament_start_gcode": ["M106"]}) + self.assertIn("V/filament/PLA @BBL A1.json", self.diff()) + + def test_head_compares_two_commits(self): + self.printer("A", machine_start_gcode="G28") + self.commit() + rc, out = self.run_command("gcode-diff", "--base", "HEAD~1", "--head", "HEAD") + self.assertEqual(rc, 0, out) + self.assertIn("V/machine/A.json - machine_start_gcode", out) + + def test_a_renamed_file_diffs_against_its_old_self(self): + os.rename(self.t.path("V", "machine/A.json"), self.t.path("V", "machine/A2.json")) + self.printer("A2", machine_start_gcode="G28\nM104 S210\nG1 Z5", nozzle_diameter=["0.4"]) + self.commit() + rc, out = self.run_command("gcode-diff", "--base", "HEAD~1", "--head", "HEAD") + self.assertEqual(rc, 0, out) + self.assertIn("V/machine/A2.json - machine_start_gcode", out) + self.assertIn("\n G28\n-M104 S200\n+M104 S210\n G1 Z5\n", out) + + def test_a_file_renamed_off_json_loses_its_values(self): + os.rename(self.t.path("V", "machine/Gone.json"), self.t.path("V", "machine/Gone.json.bak")) + self.commit() + rc, out = self.run_command("gcode-diff", "--base", "HEAD~1", "--head", "HEAD") + self.assertEqual(rc, 0, out) + self.assertIn("V/machine/Gone.json - machine_end_gcode", out) + self.assertIn("@@ -1 +0,0 @@\n-M84\n", out) + + def test_a_file_renamed_onto_json_is_new(self): + with open(self.t.path("V", "machine/Draft.txt"), "w", encoding="utf-8") as f: + json.dump({"type": "machine", "machine_start_gcode": self.START}, f) + self.commit() + os.rename(self.t.path("V", "machine/Draft.txt"), self.t.path("V", "machine/Draft.json")) + self.commit() + rc, out = self.run_command("gcode-diff", "--base", "HEAD~1", "--head", "HEAD") + self.assertEqual(rc, 0, out) + self.assertIn("@@ -0,0 +1,3 @@\n+G28\n+M104 S200\n+G1 Z5\n", out) + + def test_a_batch_read_survives_paths_that_are_not_files(self): + blobs = apt._blobs_at(self.t.profiles, [("HEAD", "V/machine"), ("HEAD", "V/no such.json"), + ("HEAD", "V/machine/Gone.json")]) + self.assertIsNone(blobs[("HEAD", "V/machine")]) + self.assertIsNone(blobs[("HEAD", "V/no such.json")]) + self.assertEqual(json.loads(blobs[("HEAD", "V/machine/Gone.json")])["machine_end_gcode"], + "M84") + + def test_each_value_of_a_vector_option_is_its_own_setting(self): + self.t.write("V", "filament/F.json", {"filament_start_gcode": ["M106", "M107"]}) + self.commit() + self.t.write("V", "filament/F.json", {"filament_start_gcode": ["M106", "M106 S0"]}) + out = self.diff() + self.assertEqual(out.count("
"), 1) + self.assertIn("filament_start_gcode[1]", out) + + def test_vendor_limits_the_files(self): + self.printer("A", machine_start_gcode="G28") + self.t.write("W", "machine/X.json", {"machine_start_gcode": "G28"}) + rc, out = self.run_command("gcode-diff", "--base", "HEAD", "--vendor", "V") + self.assertEqual(rc, 0, out) + self.assertIn("V/machine/A.json", out) + self.assertNotIn("W/machine/X.json", out) + + def test_vendor_includes_files_moved_out_of_it(self): + self.t.add_vendor("W") + os.rename(self.t.path("V", "machine/A.json"), self.t.path("W", "machine/A.json")) + data = self.t.read("W", "machine/A.json") + self.t.write("W", "machine/A.json", {**data, "machine_start_gcode": "G28\nM104 S210\nG1 Z5"}) + self.commit() + rc, out = self.run_command("gcode-diff", "--base", "HEAD~1", "--head", "HEAD", + "--vendor", "V") + self.assertEqual(rc, 0, out) + self.assertIn("W/machine/A.json - machine_start_gcode", out) + + def same_edit(self, names): + """The diff after one start G-code edit to each of names; returns (summary, output).""" + for name in names: + self.printer(name, machine_start_gcode=self.START, nozzle_diameter=["0.4"]) + self.commit() + for name in names: + self.printer(name, machine_start_gcode="G28") + out = self.diff() + return re.search(r"(.*)", out).group(1), out + + def test_a_long_file_list_moves_into_the_section(self): + summary, out = self.same_edit("ABCDE") + self.assertIn("V/machine/C.json and 2 more - ", summary) + self.assertNotIn("D.json", summary) + self.assertIn("V/machine/D.json, V/machine/E.json

\n\n```diff", + out) + + def test_four_files_are_all_named_in_the_summary(self): + summary, _out = self.same_edit("ABCD") + self.assertIn("V/machine/D.json - ", summary) + self.assertNotIn("more", summary) + + def test_an_error_goes_to_stderr_only(self): + err = io.StringIO() + with contextlib.redirect_stderr(err): + rc, out = self.run_command("gcode-diff", "--base", "no-such-ref") + self.assertEqual(rc, 1) + self.assertEqual(out, "") + self.assertIn("no-such-ref", err.getvalue()) + + def test_a_file_name_that_is_not_utf8_is_an_error(self): + bad = UnicodeDecodeError("utf-8", b"\xe9.json", 0, 1, "invalid continuation byte") + err = io.StringIO() + with mock.patch.object(apt, "_changed_profiles", side_effect=bad), \ + contextlib.redirect_stderr(err): + rc, out = self.run_command("gcode-diff", "--base", "HEAD") + self.assertEqual((rc, out), (1, "")) + self.assertIn("invalid continuation byte", err.getvalue()) + + def test_output_is_cut_to_whole_sections(self): + for name in ("A", "B", "C"): + self.printer(name, machine_start_gcode=name * 300) + size = len(apt.gcode_diff(self.t.profiles, "HEAD").encode("utf-8")) + with mock.patch.object(apt, "GCODE_DIFF_BUDGET", size - 1): + out = self.diff() + self.assertEqual(out.count("
"), 2) + self.assertEqual(out.count("
"), 2) + self.assertIn("\n1 of 3 sections is not shown", out) + with mock.patch.object(apt, "GCODE_DIFF_BUDGET", 1): + self.assertIn("\n3 of 3 sections are not shown", self.diff()) + + def test_cleanup_removes_the_repo(self): + # setUp's commit leaves read-only git objects, and a read-only directory blocks + # deletion on POSIX. + os.chmod(self.t.path("V", "machine"), stat.S_IRUSR | stat.S_IXUSR) + self.t.cleanup() + self.assertFalse(os.path.exists(self.t.dir)) + with mock.patch.object(os, "chmod") as chmod: + self.t.cleanup() # a second cleanup, as addCleanup runs, must not touch the temp dir + chmod.assert_not_called() + + def test_only_repository_variables_are_stripped(self): + self.assertTrue({"GIT_DIR", "GIT_WORK_TREE", "GIT_INDEX_FILE"} <= self.repo_env_vars) + self.assertFalse({"GIT_SSH", "GIT_EXEC_PATH", "GIT_EDITOR"} & self.repo_env_vars) + + def test_cleanup_leaves_symlink_targets_alone(self): + outside = tempfile.mkdtemp(prefix="profile_tool_outside_") + self.addCleanup(shutil.rmtree, outside, True) + target = os.path.join(outside, "f") + open(target, "w").close() + os.chmod(target, stat.S_IRUSR) + self.addCleanup(os.chmod, target, stat.S_IRWXU) # runs before the rmtree above + machine = self.t.path("V", "machine") + try: + os.symlink(target, os.path.join(machine, "link")) + except (OSError, NotImplementedError): + self.skipTest("cannot create symlinks here") + os.chmod(machine, stat.S_IRUSR | stat.S_IXUSR) # so removing the link fails at first + self.t.cleanup() + self.assertFalse(os.path.exists(self.t.dir)) + self.assertEqual(stat.S_IMODE(os.stat(target).st_mode) & stat.S_IWUSR, 0) + + def test_a_git_hook_environment_is_ignored(self): + scripts = os.path.join(REPO_ROOT, "scripts") + result = subprocess.run( + [sys.executable, "-m", "unittest", + "tests.test_profile_tool.TestGcodeDiff.test_head_compares_two_commits"], + cwd=scripts, capture_output=True, text=True, + env={**os.environ, "GIT_DIR": os.path.join(self.t.dir, "nowhere")}) + self.assertEqual(result.returncode, 0, result.stderr) + + def test_the_options_are_read_from_the_engine(self): + keys = apt._text_option_keys() + self.assertTrue({"machine_start_gcode", "filament_start_gcode", "printing_by_object_gcode", + "notes", "post_process"} <= keys) + self.assertNotIn("emit_machine_limits_to_gcode", keys) # a coBool + + START_DEF = 'def = this->add("machine_start_gcode", coString);\n' + + def keys_from(self, print_config, tab=None): + """_text_option_keys read from these sources; no tab means no Tab.cpp.""" + paths = [os.path.join(self.t.dir, "PrintConfig.cpp"), os.path.join(self.t.dir, "Tab.cpp")] + for path, text in zip(paths, (print_config, tab)): + if text is not None: + with open(path, "w", encoding="utf-8") as f: + f.write(text) + apt._text_option_keys.cache_clear() + self.addCleanup(apt._text_option_keys.cache_clear) + with mock.patch.object(apt, "PRINT_CONFIG_CPP", paths[0]), \ + mock.patch.object(apt, "TAB_CPP", paths[1]): + return apt._text_option_keys() + + def test_multiline_is_read_whatever_its_spacing(self): + keys = self.keys_from(self.START_DEF + 'def = this->add("printer_notes", coString);\n' + ' def->multiline = true;\n') + self.assertIn("printer_notes", keys) + + def test_the_code_options_of_tab_cpp_are_read(self): + keys = self.keys_from(self.START_DEF, 'option = optgroup->get_option("filename_format");\n' + 'option.opt.is_code = true;\n' + 'option = optgroup->get_option("layer_height");\n') + self.assertIn("filename_format", keys) + self.assertNotIn("layer_height", keys) + + def test_a_missing_tab_cpp_is_not_an_error(self): + self.assertIn("machine_start_gcode", self.keys_from(self.START_DEF)) + + def test_markdown_in_a_file_name_stays_literal(self): + section = apt._gcode_diff_section(["V/a *b*.json", "V/c.json", "V/d.json", "V/e.json", + "V/f.json"], "machine_start_gcode", "@@ -1 +1 @@") + self.assertIn("\n

V/a *b*.json, ", section) + + # --------------------------------------------------------------------------- # the real tree # --------------------------------------------------------------------------- diff --git a/src/OrcaSlicer.cpp b/src/OrcaSlicer.cpp index 9eff0ceb46..f161b04d99 100644 --- a/src/OrcaSlicer.cpp +++ b/src/OrcaSlicer.cpp @@ -1133,6 +1133,19 @@ static void load_downward_settings_list_from_config(std::string config_file, std } } +#ifdef __WXGTK__ +// Virtual GPUs (VirtualBox, VMware, QEMU) cannot back WebKit's hardware DMABUF renderer. +static bool is_hypervisor_guest() +{ + std::ifstream cpuinfo("/proc/cpuinfo"); + std::string line; + while (std::getline(cpuinfo, line)) + if (boost::starts_with(line, "flags")) + return line.find(" hypervisor") != std::string::npos; + return false; +} +#endif + int CLI::run(int argc, char **argv) { // Mark the main thread for the debugger and for runtime checks. @@ -1183,6 +1196,9 @@ int CLI::run(int argc, char **argv) ::setenv("WEBKIT_FORCE_DMABUF_RENDERER", "1", /* replace */ false); } + if (is_hypervisor_guest() && WebView::SupportsForceSharedMemory()) + ::setenv("WEBKIT_DMABUF_RENDERER_FORCE_SHM", "1", /* replace */ false); + if (x11_opt_in) { // ===== X11 / XWayland (opted in via GDK_BACKEND=x11) ===== BOOST_LOG_TRIVIAL(info) << "GDK_BACKEND=x11 detected; applying v2.3.2 X11/XWayland workarounds."; diff --git a/src/libslic3r/Arachne/WallToolPaths.cpp b/src/libslic3r/Arachne/WallToolPaths.cpp index a116674daa..9fd933480e 100644 --- a/src/libslic3r/Arachne/WallToolPaths.cpp +++ b/src/libslic3r/Arachne/WallToolPaths.cpp @@ -812,7 +812,8 @@ bool WallToolPaths::removeEmptyToolPaths(std::vector &toolpa * Get the order constraints of the insets when printing walls per region / hole. * Each returned pair consists of adjacent wall lines where the left has an inset_idx one lower than the right. * - * Odd walls should always go after their enclosing wall polygons. + * Odd walls follow the same order as even ones, so that the centre line of a narrow wall is an inner wall + * like any other when printing inner to outer. * * \param outer_to_inner Whether the wall polygons with a lower inset_idx should go before those with a higher one. */ @@ -886,12 +887,7 @@ WallToolPaths::ExtrusionLineSet WallToolPaths::getRegionOrder(const std::vector< continue; // not directly adjacent if (!shorter_then(loc_here - lineloc_nearby.j.p, (lineloc_here.j.w + lineloc_nearby.j.w) / 2 * diagonal_extension)) continue; // points are too far away from each other - if (here->is_odd || nearby->is_odd) { - if (here->is_odd && !nearby->is_odd && nearby->inset_idx < here->inset_idx) - order_requirements.emplace(std::make_pair(nearby, here)); - if (nearby->is_odd && !here->is_odd && here->inset_idx < nearby->inset_idx) - order_requirements.emplace(std::make_pair(here, nearby)); - } else if ((nearby->inset_idx < here->inset_idx) == outer_to_inner) { + if ((nearby->inset_idx < here->inset_idx) == outer_to_inner) { order_requirements.emplace(std::make_pair(nearby, here)); } else { assert((nearby->inset_idx > here->inset_idx) == outer_to_inner); diff --git a/src/libslic3r/Config.cpp b/src/libslic3r/Config.cpp index ee6078596a..4667674bf0 100644 --- a/src/libslic3r/Config.cpp +++ b/src/libslic3r/Config.cpp @@ -1432,7 +1432,7 @@ ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &file, Fo } if (!header_found) { // TRN %1% is the application name. - std::string error_message = format(_u8L("Not a gcode file generated by %1%."), SLIC3R_APP_FULL_NAME); + std::string error_message = format(_u8L("Not a G-code file generated by %1%."), SLIC3R_APP_FULL_NAME); BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << error_message; throw Slic3r::RuntimeError(error_message.c_str()); } diff --git a/src/libslic3r/Format/bbs_3mf.cpp b/src/libslic3r/Format/bbs_3mf.cpp index aca428f171..1c809910e0 100644 --- a/src/libslic3r/Format/bbs_3mf.cpp +++ b/src/libslic3r/Format/bbs_3mf.cpp @@ -988,7 +988,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result) MetadataList metadata; VolumeMetadataList volumes; - bool auto_drop { true }; + std::optional auto_drop; }; struct CutObjectInfo @@ -1208,6 +1208,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result) //IdToGeometryMap m_orig_geometries; // backup & restore CurrentConfig m_curr_config; IdToMetadataMap m_objects_metadata; + std::set m_items_auto_drop_off; // object ids with a build item auto_drop="0" (2.4.x layout) IdToCutObjectInfoMap m_cut_object_infos; IdToLayerHeightsProfileMap m_layer_heights_profiles; IdToLayerConfigRangesMap m_layer_config_ranges; @@ -1463,6 +1464,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result) m_objects.clear(); m_instances.clear(); m_objects_metadata.clear(); + m_items_auto_drop_off.clear(); m_curr_metadata_name.clear(); m_curr_characters.clear(); @@ -1502,6 +1504,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result) m_curr_config.object_id = -1; m_curr_config.volume_id = -1; m_objects_metadata.clear(); + m_items_auto_drop_off.clear(); m_layer_heights_profiles.clear(); m_layer_config_ranges.clear(); m_brim_ear_points.clear(); @@ -2257,11 +2260,14 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result) ObjectMetadata::VolumeMetadataList volumes; ObjectMetadata::VolumeMetadataList* volumes_ptr = nullptr; + // 2.4.x stored auto_drop on build items, shared by all instances of an object; any "off" wins + const bool legacy_auto_drop = !m_items_auto_drop_off.count(object.first.second); + IdToMetadataMap::iterator obj_metadata = m_objects_metadata.find(object.first.second); if (obj_metadata != m_objects_metadata.end()) { // config data has been found, this model was saved using slic3r pe - model_object->auto_drop = obj_metadata->second.auto_drop; + model_object->auto_drop = obj_metadata->second.auto_drop.value_or(legacy_auto_drop); // apply object's name and config data for (const Metadata& metadata : obj_metadata->second.metadata) { @@ -2279,6 +2285,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result) } else { // config data not found, this model was not saved using slic3r pe + model_object->auto_drop = legacy_auto_drop; // add the entire geometry as the single volume to generate //volumes.emplace_back(0, (int)obj_geometry->second.triangles.size() - 1); @@ -4121,6 +4128,8 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result) std::string path = bbs_get_attribute_value_string(attributes, num_attributes, PPATH_ATTR); Transform3d transform = bbs_get_transform_from_3mf_specs_string(bbs_get_attribute_value_string(attributes, num_attributes, TRANSFORM_ATTR)); int printable = bbs_get_attribute_value_bool(attributes, num_attributes, PRINTABLE_ATTR); + if (const char* auto_drop = bbs_get_attribute_value_charptr(attributes, num_attributes, AUTO_DROP_ATTR); auto_drop != nullptr && !::atoi(auto_drop)) + m_items_auto_drop_off.insert(object_id); return !m_load_model || _create_object_instance(path, object_id, transform, printable, 1); } @@ -4489,7 +4498,8 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result) // int instances_count_id = bbs_get_attribute_value_int(attributes, num_attributes, INSTANCESCOUNT_ATTR); ObjectMetadata metadata; - metadata.auto_drop = bbs_get_attribute_value_bool(attributes, num_attributes, AUTO_DROP_ATTR); + if (bbs_get_attribute_value_charptr(attributes, num_attributes, AUTO_DROP_ATTR) != nullptr) + metadata.auto_drop = bbs_get_attribute_value_bool(attributes, num_attributes, AUTO_DROP_ATTR); m_objects_metadata.insert({ object_id, std::move(metadata) }); m_curr_config.object_id = object_id; return true; @@ -10110,7 +10120,7 @@ bool to_xml(std::stringstream &stream, const EmbossShape::SvgFile &svg, const Mo assert(file_data != nullptr); if (file_data == nullptr && !svg.path.empty()) file_data = read_from_disk(svg.path); if (file_data == nullptr) { - BOOST_LOG_TRIVIAL(warning) << "Can't write svg file no filedata"; + BOOST_LOG_TRIVIAL(warning) << "Can't write SVG file no filedata"; return false; } const std::string &file_data_str = *file_data; @@ -10126,7 +10136,7 @@ void to_xml(std::stringstream &stream, const EmbossShape &es, const ModelVolume stream << " <" << SHAPE_TAG << " "; if (es.svg_file.has_value()) if (!to_xml(stream, *es.svg_file, volume, archive, export_full_path)) { - BOOST_LOG_TRIVIAL(warning) << "Can't write svg file defiden embossed shape into 3mf"; + BOOST_LOG_TRIVIAL(warning) << "Can't write SVG file defiden embossed shape into 3mf"; } stream << SHAPE_SCALE_ATTR << "=\"" << es.scale << "\" "; diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 8e3efd3289..141b3b2ba3 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -480,27 +480,36 @@ static std::vector get_path_of_change_filament(const Print& print) std::string OozePrevention::pre_toolchange(GCode& gcodegen) { - std::string gcode; - unsigned int extruder_id = gcodegen.writer().filament()->id(); - const auto& filament_idle_temp = gcodegen.config().idle_temperature; - if (filament_idle_temp.get_at(extruder_id) == 0) { - // There is no idle temperature defined in filament settings. - // Use the delta value from print config. - if (gcodegen.config().standby_temperature_delta.value != 0) { - // we assume that heating is always slower than cooling, so no need to block - gcode += gcodegen.writer().set_temperature - (this->_get_temp(gcodegen) + gcodegen.config().standby_temperature_delta.value, false, extruder_id); - gcode.pop_back(); - gcode += " ;cooldown\n"; // this is a marker for GCodeProcessor, so it can supress the commands when needed - } - } else { - // Use the value from filament settings. That one is absolute, not delta. - gcode += gcodegen.writer().set_temperature(filament_idle_temp.get_at(extruder_id), false, extruder_id); - gcode.pop_back(); - gcode += " ;cooldown\n"; // this is a marker for GCodeProcessor, so it can supress the commands when needed + + // Check if this tool will ever be used again in this print. + bool is_last_use = false; + if (gcodegen.m_print != nullptr && !gcodegen.m_print->tool_ordering().empty()) { + coordf_t current_z = gcodegen.layer() ? gcodegen.layer()->print_z : gcodegen.writer().get_position().z(); + const auto& tool_ordering = gcodegen.m_print->tool_ordering(); + const auto& cfg = gcodegen.config(); + const int heater = imex_physical_heater_for(cfg.is_imex.value, cfg.physical_extruder_map, int(extruder_id)); + is_last_use = tool_ordering.is_last_extrusion_layer(current_z, extruder_id); + for (unsigned int f : tool_ordering.all_extruders()) + if (is_last_use && imex_physical_heater_for(cfg.is_imex.value, cfg.physical_extruder_map, int(f)) == heater) + is_last_use = tool_ordering.is_last_extrusion_layer(current_z, f); } + int temp = 0; + if (!is_last_use) { + const auto& filament_idle_temp = gcodegen.config().idle_temperature; + if (filament_idle_temp.get_at(extruder_id) == 0) { + if (gcodegen.config().standby_temperature_delta.value == 0) + return std::string(); + temp = this->_get_temp(gcodegen) + gcodegen.config().standby_temperature_delta.value; + } else { + temp = filament_idle_temp.get_at(extruder_id); + } + } + + std::string gcode = gcodegen.writer().set_temperature(temp, false, extruder_id); + gcode.pop_back(); + gcode += " ;cooldown\n"; // this is a marker for GCodeProcessor, so it can supress the commands when needed return gcode; } @@ -4061,6 +4070,16 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato this->placeholder_parser().set("print_time_minute", new ConfigOptionString(GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Print_Time_Minute_Placeholder))); this->placeholder_parser().set("print_time_sec", new ConfigOptionString(GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Print_Time_Sec_Placeholder))); this->placeholder_parser().set("used_filament_length", new ConfigOptionString(GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Used_Filament_Length_Placeholder))); + // The final print statistics are known only after the whole G-code is generated, so they are filled in during post-processing too. + // The running extruded_* totals are left alone; profiles use them as numbers. + this->placeholder_parser().set("used_filament", new ConfigOptionString(GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Used_Filament_Length_Placeholder))); + this->placeholder_parser().set("print_time", new ConfigOptionString(GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Normal_Print_Time_Placeholder))); + this->placeholder_parser().set("normal_print_time", new ConfigOptionString(GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Normal_Print_Time_Placeholder))); + this->placeholder_parser().set("silent_print_time", new ConfigOptionString(GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Silent_Print_Time_Placeholder))); + this->placeholder_parser().set("total_weight", new ConfigOptionString(GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Total_Weight_Placeholder))); + this->placeholder_parser().set("total_cost", new ConfigOptionString(GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Total_Cost_Placeholder))); + this->placeholder_parser().set("total_wipe_tower_cost", new ConfigOptionString(GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Total_Wipe_Tower_Cost_Placeholder))); + this->placeholder_parser().set("total_wipe_tower_filament", new ConfigOptionString(GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Total_Wipe_Tower_Filament_Placeholder))); // Sync variant-mapped params into placeholder_parser before processing start gcode update_placeholder_parser_with_variant_params(); diff --git a/src/libslic3r/GCode.hpp b/src/libslic3r/GCode.hpp index 2a83ef0876..c651a5e2b5 100644 --- a/src/libslic3r/GCode.hpp +++ b/src/libslic3r/GCode.hpp @@ -1031,6 +1031,7 @@ protected: size_t num_objects, size_t num_islands); + friend class OozePrevention; friend class Wipe; friend class WipeTowerIntegration; friend class PressureEqualizer; diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 39b0b13b05..0df0729d85 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -121,7 +121,13 @@ const std::vector GCodeProcessor::Reserved_Tags = { "@PRINT_TIME_HOUR@", "@PRINT_TIME_MINUTE@", "@PRINT_TIME_SEC@", - "@USED_FILAMENT_LENGTH@" + "@USED_FILAMENT_LENGTH@", + "@NORMAL_PRINT_TIME@", + "@SILENT_PRINT_TIME@", + "@TOTAL_WEIGHT@", + "@TOTAL_COST@", + "@TOTAL_WIPE_TOWER_COST@", + "@TOTAL_WIPE_TOWER_FILAMENT@" }; const std::vector GCodeProcessor::Reserved_Tags_compatible = { @@ -148,7 +154,13 @@ const std::vector GCodeProcessor::Reserved_Tags_compatible = { "@PRINT_TIME_HOUR@", "@PRINT_TIME_MINUTE@", "@PRINT_TIME_SEC@", - "@USED_FILAMENT_LENGTH@" + "@USED_FILAMENT_LENGTH@", + "@NORMAL_PRINT_TIME@", + "@SILENT_PRINT_TIME@", + "@TOTAL_WEIGHT@", + "@TOTAL_COST@", + "@TOTAL_WIPE_TOWER_COST@", + "@TOTAL_WIPE_TOWER_FILAMENT@" }; @@ -1265,19 +1277,22 @@ void GCodeProcessor::run_post_process() return ret; }; - // Process inline placeholders (print_time_total_sec, print_time_day, print_time_hour, print_time_minute, print_time_sec and used_filament_length) + // Process inline placeholders (print_time_*, used_filament_length and the print statistics known only after export) auto process_inline_placeholders = [&](std::string& gcode_line) { bool processed = false; // Every inline placeholder contains '@', so a line without one has nothing to replace. if (gcode_line.find('@') == std::string::npos) return processed; - const std::string& print_time_total_placeholder = reserved_tag(ETags::Print_Time_Total_Sec_Placeholder); - const std::string& print_time_day_placeholder = reserved_tag(ETags::Print_Time_Day_Placeholder); - const std::string& print_time_hour_placeholder = reserved_tag(ETags::Print_Time_Hour_Placeholder); - const std::string& print_time_minute_placeholder = reserved_tag(ETags::Print_Time_Minute_Placeholder); - const std::string& print_time_sec_placeholder = reserved_tag(ETags::Print_Time_Sec_Placeholder); - const std::string& used_filament_placeholder = reserved_tag(ETags::Used_Filament_Length_Placeholder); + auto replace_tag = [&gcode_line, &processed](ETags tag, const std::string& value) { + const std::string& placeholder = reserved_tag(tag); + size_t pos = gcode_line.find(placeholder); + while (pos != std::string::npos) { + gcode_line.replace(pos, placeholder.length(), value); + processed = true; + pos = gcode_line.find(placeholder, pos + value.length()); + } + }; double print_time_total_sec = m_time_processor.machines[static_cast(PrintEstimatedStatistics::ETimeMode::Normal)].time; if (print_time_total_sec < 0.0) @@ -1290,70 +1305,31 @@ void GCodeProcessor::run_post_process() int print_time_minute = (day_remainder_seconds % 3600) / 60; int print_time_sec = day_remainder_seconds % 60; - // Replace print_time_total_sec - size_t pos = gcode_line.find(print_time_total_placeholder); - while (pos != std::string::npos) { - char buf[64]; - sprintf(buf, "%.2f", print_time_total_sec); - gcode_line.replace(pos, print_time_total_placeholder.length(), buf); - processed = true; - pos = gcode_line.find(print_time_total_placeholder, pos + strlen(buf)); + double total_filament_mm = 0.0; + for (const auto& mm : filament_mm) { + total_filament_mm += mm; } - // Replace print_time_day - pos = gcode_line.find(print_time_day_placeholder); - while (pos != std::string::npos) { - char buf[64]; - sprintf(buf, "%d", print_time_day); - gcode_line.replace(pos, print_time_day_placeholder.length(), buf); - processed = true; - pos = gcode_line.find(print_time_day_placeholder, pos + strlen(buf)); - } - - // Replace print_time_hour - pos = gcode_line.find(print_time_hour_placeholder); - while (pos != std::string::npos) { - char buf[64]; - sprintf(buf, "%d", print_time_hour); - gcode_line.replace(pos, print_time_hour_placeholder.length(), buf); - processed = true; - pos = gcode_line.find(print_time_hour_placeholder, pos + strlen(buf)); - } - - // Replace print_time_minute - pos = gcode_line.find(print_time_minute_placeholder); - while (pos != std::string::npos) { - char buf[64]; - sprintf(buf, "%d", print_time_minute); - gcode_line.replace(pos, print_time_minute_placeholder.length(), buf); - processed = true; - pos = gcode_line.find(print_time_minute_placeholder, pos + strlen(buf)); - } - - // Replace print_time_sec - pos = gcode_line.find(print_time_sec_placeholder); - while (pos != std::string::npos) { - char buf[64]; - sprintf(buf, "%d", print_time_sec); - gcode_line.replace(pos, print_time_sec_placeholder.length(), buf); - processed = true; - pos = gcode_line.find(print_time_sec_placeholder, pos + strlen(buf)); - } - - // Replace used_filament_length - pos = gcode_line.find(used_filament_placeholder); - while (pos != std::string::npos) { - double total_filament_mm = 0.0; - for (const auto& mm : filament_mm) { - total_filament_mm += mm; - } - double used_filament_length = total_filament_mm / 1000.0; // Convert mm to m - char buf[64]; - sprintf(buf, "%.2f", used_filament_length); - gcode_line.replace(pos, used_filament_placeholder.length(), buf); - processed = true; - pos = gcode_line.find(used_filament_placeholder, pos + strlen(buf)); - } + replace_tag(ETags::Print_Time_Total_Sec_Placeholder, Slic3r::float_to_string_decimal_point(print_time_total_sec, 2)); + replace_tag(ETags::Print_Time_Day_Placeholder, std::to_string(print_time_day)); + replace_tag(ETags::Print_Time_Hour_Placeholder, std::to_string(print_time_hour)); + replace_tag(ETags::Print_Time_Minute_Placeholder, std::to_string(print_time_minute)); + replace_tag(ETags::Print_Time_Sec_Placeholder, std::to_string(print_time_sec)); + replace_tag(ETags::Used_Filament_Length_Placeholder, + Slic3r::float_to_string_decimal_point(total_filament_mm / 1000.0, 2)); // Convert mm to m + // Same values as the print statistics that filename_format gets (PrintStatistics::config(), filled in by + // update_print_estimated_stats() in GCode.cpp), which runs only after this post-processing. + replace_tag(ETags::Normal_Print_Time_Placeholder, get_time_dhm(PrintEstimatedStatistics::ETimeMode::Normal)); + replace_tag(ETags::Silent_Print_Time_Placeholder, is_stealth_time_estimator_enabled() ? + get_time_dhm(PrintEstimatedStatistics::ETimeMode::Stealth) : + short_time("N/A")); + const double total_cost = filament_total_cost + m_print->config().time_cost.value * print_time_total_sec / 3600.0; + replace_tag(ETags::Total_Weight_Placeholder, Slic3r::float_to_string_decimal_point(filament_total_g, 2)); + replace_tag(ETags::Total_Cost_Placeholder, Slic3r::float_to_string_decimal_point(total_cost, 2)); + replace_tag(ETags::Total_Wipe_Tower_Cost_Placeholder, + Slic3r::float_to_string_decimal_point(m_print->print_statistics().total_wipe_tower_cost, 2)); + replace_tag(ETags::Total_Wipe_Tower_Filament_Placeholder, + Slic3r::float_to_string_decimal_point(m_print->print_statistics().total_wipe_tower_filament, 2)); return processed; }; diff --git a/src/libslic3r/GCode/GCodeProcessor.hpp b/src/libslic3r/GCode/GCodeProcessor.hpp index feec69f12f..a4f26a8dcb 100644 --- a/src/libslic3r/GCode/GCodeProcessor.hpp +++ b/src/libslic3r/GCode/GCodeProcessor.hpp @@ -624,6 +624,12 @@ inline constexpr float DEFAULT_FILAMENT_DENSITY = 1.245f; Print_Time_Minute_Placeholder, Print_Time_Sec_Placeholder, Used_Filament_Length_Placeholder, + Normal_Print_Time_Placeholder, + Silent_Print_Time_Placeholder, + Total_Weight_Placeholder, + Total_Cost_Placeholder, + Total_Wipe_Tower_Cost_Placeholder, + Total_Wipe_Tower_Filament_Placeholder, }; static const std::string& reserved_tag(ETags tag) { return s_IsBBLPrinter ? Reserved_Tags[static_cast(tag)] : Reserved_Tags_compatible[static_cast(tag)]; } diff --git a/src/libslic3r/GCode/ToolOrdering.cpp b/src/libslic3r/GCode/ToolOrdering.cpp index 19f5c686f6..2ea34aef90 100644 --- a/src/libslic3r/GCode/ToolOrdering.cpp +++ b/src/libslic3r/GCode/ToolOrdering.cpp @@ -1276,6 +1276,13 @@ void ToolOrdering::collect_extruder_statistics(bool prime_multi_material) sort_remove_duplicates(m_all_printing_extruders); } + m_last_layer_per_extruder.clear(); + for (const LayerTools& lt : m_layer_tools) { + for (unsigned int ext : lt.extruders) { + m_last_layer_per_extruder[ext] = lt.print_z; + } + } + if (prime_multi_material && ! m_all_printing_extruders.empty()) { // Reorder m_all_printing_extruders in the sequence they will be primed, the last one will be m_first_printing_extruder. // Then set m_first_printing_extruder to the 1st extruder primed. @@ -3664,5 +3671,11 @@ int WipingExtrusions::get_support_interface_extruder_overrides(const PrintObject return -1; } - +bool ToolOrdering::is_last_extrusion_layer(coordf_t print_z, unsigned int extruder_id) const +{ + auto it = m_last_layer_per_extruder.find(extruder_id); + if (it == m_last_layer_per_extruder.end()) + return true; + return print_z >= it->second - EPSILON; +} } // namespace Slic3r diff --git a/src/libslic3r/GCode/ToolOrdering.hpp b/src/libslic3r/GCode/ToolOrdering.hpp index 5c11f482cd..b7aca7dd30 100644 --- a/src/libslic3r/GCode/ToolOrdering.hpp +++ b/src/libslic3r/GCode/ToolOrdering.hpp @@ -370,6 +370,7 @@ public: std::vector & initial_filaments); bool has_non_support_filament(const PrintConfig &config); + bool is_last_extrusion_layer(coordf_t print_z, unsigned int extruder_id) const; private: void initialize_layers(std::vector &zs); @@ -413,6 +414,8 @@ private: // which keeps every legacy per-object code path bit-identical (loops over an empty map are // no-ops; downstream emission falls through to the per-object branch). std::map>> m_gradient_volume_layers; + // Map: extruder_id -> print_z (z coordinate) of the last layer it is used on + std::map m_last_layer_per_extruder; const PrintObject* m_print_object_ptr = nullptr; Print* m_print; bool m_sorted = false; diff --git a/src/libslic3r/PNGReadWrite.cpp b/src/libslic3r/PNGReadWrite.cpp index 1f29de646b..40f88a9447 100644 --- a/src/libslic3r/PNGReadWrite.cpp +++ b/src/libslic3r/PNGReadWrite.cpp @@ -211,6 +211,35 @@ bool decode_colored_png(const ReadBuf &in_buf, ImageColorscale &out_img) return decode_colored_png(stream, out_img); } +bool is_decodable_8bit_png(const ReadBuf &pngbuf) +{ + static const constexpr int PNG_SIG_BYTES = 8; + + struct ReadBufStream stream{pngbuf}; + std::vector sig(PNG_SIG_BYTES, 0); + stream.read(sig.data(), PNG_SIG_BYTES); + if (!png_check_sig(sig.data(), PNG_SIG_BYTES)) + return false; + + PNGDescr dsc; + dsc.png = png_create_read_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); + if (!dsc.png) + return false; + dsc.info = png_create_info_struct(dsc.png); + if (!dsc.info) + return false; + + if (!png_read_header_guarded(dsc.png, dsc.info, &stream, PNG_SIG_BYTES)) + return false; + + const size_t color_type = png_get_color_type(dsc.png, dsc.info); + const size_t bit_depth = png_get_bit_depth(dsc.png, dsc.info); + const bool grey = color_type == PNG_COLOR_TYPE_GRAY; + const bool colour = color_type == PNG_COLOR_TYPE_RGB || color_type == PNG_COLOR_TYPE_RGB_ALPHA; + return png_get_image_width(dsc.png, dsc.info) > 0 && png_get_image_height(dsc.png, dsc.info) > 0 && + bit_depth == 8 && (grey || colour); +} + // Down to earth function to store a packed RGB image to file. Mostly useful for debugging purposes. // Based on https://www.lemoda.net/c/write-png/ diff --git a/src/libslic3r/PNGReadWrite.hpp b/src/libslic3r/PNGReadWrite.hpp index c2d2149e1f..6b8ed75cae 100644 --- a/src/libslic3r/PNGReadWrite.hpp +++ b/src/libslic3r/PNGReadWrite.hpp @@ -50,6 +50,9 @@ struct ReadBuf { const void *buf = nullptr; const size_t sz = 0; }; bool is_png(const ReadBuf &pngbuf); +// True if decode_png() or decode_colored_png() would accept these bytes, judged from the header alone. +bool is_decodable_8bit_png(const ReadBuf &pngbuf); + struct ReadBufStream: public IStream { const ReadBuf &rbuf_ref; size_t pos = 0; diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index b1c6ed21fa..eed1adcf78 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -62,7 +62,12 @@ public: // Depth in the hierarchy. External perimeter has depth = 0. An external perimeter could be both a contour and a hole. unsigned short depth; // ORCA: an external hole perimeter touching the next outer wall all around, with nothing between them. + // E.g. a 1mm tube wall with 0.5mm walls: 2 lines, the contour's outer wall and the hole's. bool is_thin_wall_hole = false; + // ORCA: an external hole perimeter with no room for an inner wall beside it, at most gap fill. Every thin wall + // hole is one, and so is e.g. a 1.5mm tube wall with 0.5mm walls: 3 lines, the two outer walls and gap fill + // between them. A 2mm tube wall has room for an inner wall a side and is not. Only set for Inner/Outer/Inner. + bool is_narrow_wall_hole = false; // Children contour, may be both CCW and CW oriented (outer contours or holes). std::vector children; @@ -572,7 +577,8 @@ static ExtrusionEntityCollection traverse_extrusions(const PerimeterGenerator& p extrusion_coll.append(std::move(extrusion_loop)); // Orca: Reverse the order of paths for thin wall holes. We define thin wall hole as a hole with only one perimeter. const bool thin_wall_hole = !pg_extrusion.is_contour && pg_extrusions.size() == 2; - if (thin_wall_hole && perimeter_generator.config->wall_sequence != WallSequence::OuterInner) + if (thin_wall_hole && perimeter_generator.config->wall_sequence != WallSequence::OuterInner && + !perimeter_generator.outer_walls_first_for_brim()) std::reverse(extrusion_coll.entities.begin(), extrusion_coll.entities.end()); } else { @@ -1690,13 +1696,24 @@ void PerimeterGenerator::process_classic() last = std::move(offsets); - // ORCA: a thin wall hole has no room for gap fill or an inner wall anywhere beside its outer wall. + // ORCA: a thin wall hole has no room for gap fill or an inner wall anywhere beside its outer wall, a + // narrow wall hole none for an inner wall, the room the next loop is offset by below. if (i == 0 && ! holes[0].empty()) { - const float room = float(0.5 * (ext_perimeter_spacing2 + gap_fill_min_width)); - const Polygons reach = to_polygons(offset2_ex(last, -room, room + float(SCALED_EPSILON))); - for (PerimeterGeneratorLoop &hole : holes[0]) - hole.is_thin_wall_hole = intersection_pl(Polylines{ hole.polygon.split_at_first_point() }, - ClipperUtils::clip_clipper_polygons_with_subject_bbox(reach, get_extents(hole.polygon).inflated(SCALED_EPSILON))).empty(); + auto reach = [&last](double room) { + return to_polygons(offset2_ex(last, -float(room), float(room) + float(SCALED_EPSILON))); + }; + auto out_of_reach = [](const Polygon &hole, const Polygons &reach) { + return intersection_pl(Polylines{ hole.split_at_first_point() }, + ClipperUtils::clip_clipper_polygons_with_subject_bbox(reach, get_extents(hole).inflated(SCALED_EPSILON))).empty(); + }; + // Only Inner/Outer/Inner orders narrow wall holes apart. + const bool narrow_holes_ordered = this->config->wall_sequence == WallSequence::InnerOuterInner; + const Polygons gap_fill_reach = reach(0.5 * (ext_perimeter_spacing2 + gap_fill_min_width)); + const Polygons inner_wall_reach = narrow_holes_ordered ? reach(ext_perimeter_spacing2 + min_spacing / 2.) : Polygons(); + for (PerimeterGeneratorLoop &hole : holes[0]) { + hole.is_thin_wall_hole = out_of_reach(hole.polygon, gap_fill_reach); + hole.is_narrow_wall_hole = narrow_holes_ordered && out_of_reach(hole.polygon, inner_wall_reach); + } } //BBS: refer to superslicer @@ -1835,18 +1852,16 @@ void PerimeterGenerator::process_classic() // if brim will be printed, reverse the order of perimeters so that // we continue inwards after having finished the brim - // TODO: add test for perimeter order bool is_outer_wall_first = this->config->wall_sequence == WallSequence::OuterInner; - if (is_outer_wall_first || - //BBS: always print outer wall first when there indeed has brim. - // btLeadingEdgeOnly is an outer brim too (a belt brim at the part's first contact). - (this->layer_id == 0 && - (this->object_config->brim_type == BrimType::btOuterOnly || - this->object_config->brim_type == BrimType::btLeadingEdgeOnly) && - this->object_config->brim_width.value > 0)) + // Orca: a contour with only a narrow wall hole beside it has nothing to sandwich, and prints the hole first, + // then the contour, then the gap fill between them, as Arachne does. + const PerimeterGeneratorLoops &island_loops = contours.front(); + const bool narrow_wall_hole_island = island_loops.size() == 1 && island_loops.front().children.size() == 1 && + island_loops.front().children.front().is_narrow_wall_hole; + if (is_outer_wall_first || this->outer_walls_first_for_brim()) entities.reverse(); // Orca: sandwich mode. Apply after 1st layer. - else if ((this->config->wall_sequence == WallSequence::InnerOuterInner) && layer_id > 0){ + else if ((this->config->wall_sequence == WallSequence::InnerOuterInner) && layer_id > 0 && !narrow_wall_hole_island){ entities.reverse(); // reverse all entities - order them from external to internal if(entities.entities.size()>2){ // 3 walls minimum needed to do inner outer inner ordering int position = 0; // index to run the re-ordering for multiple external perimeters in a single island. @@ -2412,11 +2427,25 @@ std::vector reorderPerimetersByProximity(std // Function to reorder perimeters starting from a given reference index auto reorderFromReference = [&](int referenceIndex) { - std::unordered_set firstLevelIndices; - firstLevelIndices.insert(referenceIndex); - - // Find first level touching perimeters - std::vector firstLevelTouchingIndices = findAllTouchingPerimeters(entities, firstLevelIndices, threshold_external, threshold_internal, 1); + // Find first level touching perimeters. The odd centre line of a wall too narrow for two inner walls is shared + // by the outer walls on both sides, so those join this island and are printed before it too, holes first. + std::vector outerIndices{referenceIndex}; + std::vector firstLevelTouchingIndices; + for (size_t next = 0; next < outerIndices.size(); ++next) + for (int idx : findAllTouchingPerimeters(entities, {outerIndices[next]}, threshold_external, threshold_internal, 1)) { + if (std::find(firstLevelTouchingIndices.begin(), firstLevelTouchingIndices.end(), idx) != firstLevelTouchingIndices.end()) + continue; + firstLevelTouchingIndices.push_back(idx); + if (!entities[idx].extrusion->is_odd) + continue; + for (size_t i = 0; i < entities.size(); ++i) + if (entities[i].extrusion->inset_idx == 0 && includedIndices.count(int(i)) == 0 && + std::find(outerIndices.begin(), outerIndices.end(), int(i)) == outerIndices.end() && + arachne_lines_touch(*entities[i].extrusion, *entities[idx].extrusion, double(threshold_external))) + outerIndices.push_back(int(i)); + } + std::stable_partition(outerIndices.begin(), outerIndices.end(), + [&entities](int idx) { return entities[idx].extrusion->is_closed && !entities[idx].is_contour; }); // Bring the largest first level perimeter to the front // The longest first neighbour is most likely the dominant proximate perimeter // hence printing it immediately after the external perimeter should speed things up @@ -2427,8 +2456,10 @@ std::vector reorderPerimetersByProximity(std std::iter_swap(maxIt, firstLevelTouchingIndices.end() - 1); } // Insert first level perimeters into reordered list - reordered.push_back(entities[referenceIndex]); - includedIndices.insert(referenceIndex); + for (int idx : outerIndices) { + reordered.push_back(entities[idx]); + includedIndices.insert(idx); + } for (int idx : firstLevelTouchingIndices) { if (includedIndices.count(idx) == 0) { @@ -2757,7 +2788,7 @@ void PerimeterGenerator::process_arachne() if (layer_id == 0){ // disable inner outer inner algorithm after the first layer is_outer_wall_first = - this->config->wall_sequence == WallSequence::OuterInner; + this->config->wall_sequence == WallSequence::OuterInner || this->outer_walls_first_for_brim(); } if (is_outer_wall_first) { start_perimeter = 0; @@ -3042,6 +3073,16 @@ ExPolygons PerimeterGenerator::printable_slices(const ExPolygons &slices) const return min_width > EPSILON ? opening_ex(slices, float(scale_(min_width / 2.))) : slices; } +bool PerimeterGenerator::outer_walls_first_for_brim() const +{ + return layer_id == 0 && brim_puts_outer_walls_first(object_config->brim_type.value, object_config->brim_width.value); +} + +bool brim_puts_outer_walls_first(BrimType brim_type, double brim_width) +{ + return brim_width > 0 && (brim_type == btOuterOnly || brim_type == btOuterAndInner || brim_type == btLeadingEdgeOnly); +} + std::vector PerimeterGenerator::generate_lower_polygons_series(float width) { float nozzle_diameter = print_config->nozzle_diameter.get_at(config->outer_wall_filament_id - 1); diff --git a/src/libslic3r/PerimeterGenerator.hpp b/src/libslic3r/PerimeterGenerator.hpp index ceaa2252d1..0dcc510e42 100644 --- a/src/libslic3r/PerimeterGenerator.hpp +++ b/src/libslic3r/PerimeterGenerator.hpp @@ -164,6 +164,8 @@ public: Polygons lower_slices_polygons() const { return m_lower_slices_polygons; } // ORCA: the slices less the slivers the wall generator prints nothing for, so they never count as support. ExPolygons printable_slices(const ExPolygons &slices) const; + // ORCA: whether this layer prints its outer walls first for the brim, see brim_puts_outer_walls_first(). + bool outer_walls_first_for_brim() const; private: std::vector generate_lower_polygons_series(float width); @@ -183,6 +185,10 @@ private: Polygons m_lower_slices_polygons; }; +// ORCA: a brim against the outer walls makes the first layer print them first, whatever the wall sequence, so the +// brim runs straight on into the outer wall. Auto, ear and painted brims may leave the outer walls bare. +bool brim_puts_outer_walls_first(BrimType brim_type, double brim_width); + } #endif diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 3626ea8dfa..b35ce604ca 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -1421,6 +1421,7 @@ static std::vector s_Preset_print_options{ "initial_layer_travel_acceleration", "initial_layer_travel_jerk", "exclude_object", + "exclude_object_tolerance", "slow_down_layers", "infill_anchor", "infill_anchor_max", @@ -2294,6 +2295,7 @@ void PresetCollection::load_project_embedded_presets(std::vector& proje BOOST_LOG_TRIVIAL(error) << boost::format("can not find parent for config %1%!")%preset->file; continue; } + extend_default_config_length(config, false, {}); preset->config.update_diff_values_to_child_config(config, extruder_id_name, extruder_variant_name, *key_set1, *key_set2); //preset->config.apply(std::move(config)); Preset::normalize(preset->config); diff --git a/src/libslic3r/Preset.hpp b/src/libslic3r/Preset.hpp index b6dc3b37bb..8d5372c5e4 100644 --- a/src/libslic3r/Preset.hpp +++ b/src/libslic3r/Preset.hpp @@ -756,7 +756,14 @@ public: Preset& get_edited_preset() { return m_edited_preset; } const Preset& get_edited_preset() const { return m_edited_preset; } - const Preset& get_selected_preset_base() const { return *get_preset_base(m_presets[m_idx_selected]); } + // The root of the selected preset's inherits chain, or the selected preset itself when + // the chain names a preset that is not loaded (e.g. a vendor that is not installed). + const Preset& get_selected_preset_base() const + { + const Preset &selected = m_presets[m_idx_selected]; + const Preset *base = get_preset_base(selected); + return base ? *base : selected; + } // Return the last saved preset. // const Preset& get_saved_preset() const { return m_saved_preset; } diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index ed1ce9379d..e54b60cdf8 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -400,6 +400,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n "gcode_comments", "gcode_label_objects", "exclude_object", + "exclude_object_tolerance", "support_material_interface_fan_speed", "internal_bridge_fan_speed", // ORCA: Add support for separate internal bridge fan speed control "ironing_fan_speed", @@ -7097,7 +7098,7 @@ BoundingBoxf3 PrintInstance::get_bounding_box() const { Polygon PrintInstance::get_convex_hull_2d() { Polygon poly = print_object->model_object()->convex_hull_2d(model_instance->get_matrix()); - poly.douglas_peucker(scale_(0.1)); + poly.douglas_peucker(scale_(print_object->print()->config().exclude_object_tolerance.value)); return poly; } diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 01e3184efd..aa3e63f4c8 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -4667,6 +4667,17 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); + def = this->add("exclude_object_tolerance", coFloat); + def->label = L("Outline tolerance"); + def->tooltip = L("Maximum deviation of the object outline written to EXCLUDE_OBJECT_DEFINE from the " + "original outline. Larger values give fewer points, which helps firmware that stalls " + "while parsing G-code with many objects. 0 keeps every point."); + def->sidetext = L("mm"); + def->min = 0; + def->max = 5; + def->mode = comExpert; + def->set_default_value(new ConfigOptionFloat(0.1)); + def = this->add("gcode_comments", coBool); def->label = L("Verbose G-code"); def->tooltip = L("Enable this to get a commented G-code file, with each line explained by a descriptive text. " diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index d3e02f5ccc..adc115d101 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -2141,6 +2141,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionPercents, filament_shrinkage_compensation_z)) ((ConfigOptionBool, gcode_label_objects)) ((ConfigOptionBool, exclude_object)) + ((ConfigOptionFloat, exclude_object_tolerance)) ((ConfigOptionFloats, grab_length)) ((ConfigOptionBool, gcode_comments)) ((ConfigOptionInt, slow_down_layers)) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 1754f09a9e..3484186306 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -17,6 +17,7 @@ #include "I18N.hpp" #include "Layer.hpp" #include "MutablePolygon.hpp" +#include "PerimeterGenerator.hpp" #include "PrintBase.hpp" #include "PrintConfig.hpp" #include "SLA/IndexedMesh.hpp" @@ -1481,15 +1482,13 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "top_surface_speed") { // Brim is printed below supports, support invalidates brim and skirt. steps.emplace_back(posSupportMaterial); - if (opt_key == "brim_type") { - const auto* old_brim_type = old_config.option>(opt_key); - const auto* new_brim_type = new_config.option>(opt_key); - //BBS: When switch to manual brim, the object must have brim, then re-generate perimeter - //to make the wall order of first layer to be outer-first - // btLeadingEdgeOnly is printed as an outer brim (Brim.cpp, BeltBrim.cpp), so it - // takes part in the same first-layer wall order rule. - if (old_brim_type->value == btOuterOnly || new_brim_type->value == btOuterOnly || - old_brim_type->value == btLeadingEdgeOnly || new_brim_type->value == btLeadingEdgeOnly) + if (opt_key == "brim_type" || opt_key == "brim_width") { + // Regenerate the walls when the brim starts or stops putting the first layer's outer walls first. + auto outer_walls_first = [](const ConfigOptionResolver &config) { + return brim_puts_outer_walls_first(config.option>("brim_type")->value, + config.option("brim_width")->value); + }; + if (outer_walls_first(old_config) != outer_walls_first(new_config)) steps.emplace_back(posPerimeters); } } else if ( diff --git a/src/libslic3r/Support/SupportCommon.cpp b/src/libslic3r/Support/SupportCommon.cpp index 68e601c7ba..0cca31adca 100644 --- a/src/libslic3r/Support/SupportCommon.cpp +++ b/src/libslic3r/Support/SupportCommon.cpp @@ -834,8 +834,10 @@ void tree_supports_generate_paths( false); } if (eec) { - std::reverse(eec->entities.begin(), eec->entities.end()); - dst.emplace_back(eec.release()); + if (!eec->empty()) { + std::reverse(eec->entities.begin(), eec->entities.end()); + dst.emplace_back(eec.release()); + } } } } @@ -1952,12 +1954,7 @@ void generate_support_toolpaths( no_sort = true; } else if (support_params.support_style == SupportMaterialStyle::smsTreeOrganic && (config.support_base_pattern == smpNone || config.support_base_pattern == smpDefault)) { - // Orca: A special case for the hollow Organic supports - // Orca: If the tree supports are too tall, use a double wall to make it stronger - SupportParameters support_params2 = support_params; - if (support_layer.print_z > 100.0) - support_params2.tree_branch_diameter_double_wall_area_scaled = 0.1; - tree_supports_generate_paths(base_layer.extrusions, base_layer.polygons_to_extrude(), flow, support_params2); + tree_supports_generate_paths(base_layer.extrusions, base_layer.polygons_to_extrude(), flow, support_params); done = true; } if (! done) diff --git a/src/libslic3r/Support/TreeSupport.cpp b/src/libslic3r/Support/TreeSupport.cpp index 5187e73a25..70ab0b06f1 100644 --- a/src/libslic3r/Support/TreeSupport.cpp +++ b/src/libslic3r/Support/TreeSupport.cpp @@ -2149,7 +2149,9 @@ void TreeSupport::draw_circles() const bool with_lightning_infill = m_support_params.base_fill_pattern == ipLightning; coordf_t support_extrusion_width = m_support_params.support_extrusion_width; const float tree_brim_width = config.tree_support_brim_width.value; - + // Reinforce branches moving more than half a support-line width between layers. + // Square the threshold for comparison with the squared XY movement below. + const double max_move_sq = sqr(double(scale_(m_object_config->support_line_width / 2))); // Belt floor: the first object layer is not on a flat bed — it rests on the // tilted, moving belt. So the first-object-layer adhesion features (the tree // support brim, the hybrid first-layer base expansion) must be suppressed: @@ -2201,7 +2203,7 @@ void TreeSupport::draw_circles() size_t first_base_roof_area = 0; bool floor_interface_as_base = false; bool has_circle_node = false; - bool need_extra_wall = false; + ExPolygons extra_wall_areas; ExPolygons collision_sharp_tails; ExPolygons collision_base; auto get_collision = [&](bool sharp_tail) -> ExPolygons &{ @@ -2279,7 +2281,6 @@ void TreeSupport::draw_circles() // area = diff_clipped({ ExPolygon(circle) }, get_collision(node.is_sharp_tail && node.distance_to_top <= 0)); if (!area.empty()) has_circle_node = true; - if (node.need_extra_wall) need_extra_wall = true; // merge overhang to get a smoother interface surface // Do not merge when buildplate_only is on, because some underneath nodes may have been deleted. @@ -2294,6 +2295,10 @@ void TreeSupport::draw_circles() } } + // Use the Pythagorean theorem to compare movement magnitude (dx² + dy²) without a square root. + if (node.is_processed && node.movement.cast().squaredNorm() > max_move_sq) + append(extra_wall_areas, area); + if (obj_layer_nr>0 && node.distance_to_top < 0) append(roof_gap_areas, area); else if (obj_layer_nr > 0 && node.support_roof_layers_below == 1 && @@ -2530,7 +2535,8 @@ void TreeSupport::draw_circles() //if (area(expoly) < SQ(scale_(1))) continue; area_groups.emplace_back(&expoly, SupportLayer::BaseType, max_layers_above_base); area_groups.back().need_infill = overlaps({ expoly }, area_poly); - area_groups.back().need_extra_wall = need_extra_wall && !area_groups.back().need_infill; + area_groups.back().need_extra_wall = !area_groups.back().need_infill && + !extra_wall_areas.empty() && overlaps({expoly}, extra_wall_areas); } for (size_t roof_idx = 0; roof_idx < ts_layer->roof_areas.size(); ++roof_idx) { auto &expoly = ts_layer->roof_areas[roof_idx]; @@ -3433,11 +3439,6 @@ void TreeSupport::smooth_nodes() } } - float max_move = scale_(m_object_config->support_line_width / 2); - // if the branch is very tall, the tip also needs extra wall - float thresh_tall_branch = 100; - float thresh_dist_to_top = 30; - for (int layer_nr = 0; layer_nr< contact_nodes.size(); layer_nr++) { std::vector &curr_layer_nodes = contact_nodes[layer_nr]; if (curr_layer_nodes.empty()) continue; @@ -3447,20 +3448,17 @@ void TreeSupport::smooth_nodes() std::vector radii; std::vector branch; SupportNode * p_node = node; - float total_height = 0; // add a fixed head if it's not a polygon node, see STUDIO-4403 // Polygon node can't be added because the move distance might be huge, making the nodes in between jump and dangling if (node->child && node->child->type!=ePolygon) { pts.push_back(p_node->child->position); radii.push_back(p_node->child->radius); branch.push_back(p_node->child); - total_height += p_node->child->height; } do { pts.push_back(p_node->position); radii.push_back(p_node->radius); branch.push_back(p_node); - total_height += p_node->height; p_node = p_node->parent; } while (p_node && !p_node->is_processed); if (pts.size() < 3) continue; @@ -3479,9 +3477,6 @@ void TreeSupport::smooth_nodes() branch[i]->radius = radii1[i]; branch[i]->movement = (pts[i + 1] - pts[i - 1]) / 2; branch[i]->is_processed = true; - if (branch[i]->parents.size() > 1 || (branch[i]->movement.x() > max_move || branch[i]->movement.y() > max_move) || - (total_height > thresh_tall_branch && branch[i]->dist_mm_to_top < thresh_dist_to_top)) - branch[i]->need_extra_wall = true; BOOST_LOG_TRIVIAL(info) << "smooth_nodes: layer_nr=" << layer_nr << ", i=" << i << ", pt=" << pt << ", movement=" << branch[i]->movement << ", radius=" << branch[i]->radius; } } @@ -3489,13 +3484,6 @@ void TreeSupport::smooth_nodes() std::swap(pts, pts1); std::swap(radii, radii1); } - else { - // interpolate need_extra_wall in the end - for (size_t i = 1; i < branch.size() - 1; i++) { - if (branch[i - 1]->need_extra_wall && branch[i + 1]->need_extra_wall) - branch[i]->need_extra_wall = true; - } - } } } } diff --git a/src/libslic3r/Support/TreeSupport.hpp b/src/libslic3r/Support/TreeSupport.hpp index d8bb241fee..e6f651077f 100644 --- a/src/libslic3r/Support/TreeSupport.hpp +++ b/src/libslic3r/Support/TreeSupport.hpp @@ -135,7 +135,6 @@ struct SupportNode TreeNodeType type = eCircle; bool is_corner = false; bool is_processed = false; - bool need_extra_wall = false; bool is_sharp_tail = false; bool valid = true; ExPolygon overhang; // when type==ePolygon, set this value to get original overhang area diff --git a/src/libslic3r/TextureDisplacement.cpp b/src/libslic3r/TextureDisplacement.cpp index ab63a75c70..26e8726a72 100644 --- a/src/libslic3r/TextureDisplacement.cpp +++ b/src/libslic3r/TextureDisplacement.cpp @@ -283,7 +283,7 @@ bool height_texture_has_color(const TextureDisplacementLayer &layer) return decode_height_texture(layer).has_color(); } -DecodedHeightTexture decode_height_texture(const TextureDisplacementLayer &layer) +DecodedHeightTexture decode_height_texture(const TextureDisplacementLayer &layer, bool keep_decoded) { DecodedHeightTexture result; if (layer.empty()) @@ -351,13 +351,15 @@ DecodedHeightTexture decode_height_texture(const TextureDisplacementLayer &layer } } - std::lock_guard lock(g_decoded_texture_cache.mutex); - // Opportunistically drop entries for image_data that no longer exists anywhere, so the - // cache doesn't grow without bound across many add/remove-texture cycles in a long session. - auto &entries = g_decoded_texture_cache.entries; - for (auto it = entries.begin(); it != entries.end();) - it = it->second.first.expired() ? entries.erase(it) : std::next(it); - entries[key] = { std::weak_ptr>(layer.image_data), result }; + if (keep_decoded) { + std::lock_guard lock(g_decoded_texture_cache.mutex); + // Opportunistically drop entries for image_data that no longer exists anywhere, so the + // cache doesn't grow without bound across many add/remove-texture cycles in a long session. + auto &entries = g_decoded_texture_cache.entries; + for (auto it = entries.begin(); it != entries.end();) + it = it->second.first.expired() ? entries.erase(it) : std::next(it); + entries[key] = { std::weak_ptr>(layer.image_data), result }; + } } // The image-adjustment panel's live edits, on top of the decode and before the smoothing. Before, diff --git a/src/libslic3r/TextureDisplacement.hpp b/src/libslic3r/TextureDisplacement.hpp index 6bd5d1ea33..919dfad654 100644 --- a/src/libslic3r/TextureDisplacement.hpp +++ b/src/libslic3r/TextureDisplacement.hpp @@ -599,8 +599,9 @@ DecodedHeightTexture downscale_height_texture(const DecodedHeightTexture &src, i // colour PNGs are accepted; for a colour source the height is its luminance, using the same // coefficients wxImage::ConvertToGreyscale() uses, so a texture imported as colour displaces exactly // as it did when the importer flattened it to grey on the way in. Returns an empty -// DecodedHeightTexture if image_data is empty or is not a PNG at all. -DecodedHeightTexture decode_height_texture(const TextureDisplacementLayer &layer); +// DecodedHeightTexture if image_data is empty or is not a PNG at all. keep_decoded = false leaves the +// result out of the decode cache, for one-off reads such as a picker thumbnail that must not hold full-size pixels. +DecodedHeightTexture decode_height_texture(const TextureDisplacementLayer &layer, bool keep_decoded = true); // decode_height_texture(layer).has_color(), answered from the decode cache rather than from a copy of the // texture - cheap enough to ask every frame. Smoothing does not change it, so the raw decode is what is read. diff --git a/src/libslic3r/Utils.hpp b/src/libslic3r/Utils.hpp index eb171e4ee0..c5cf29d590 100644 --- a/src/libslic3r/Utils.hpp +++ b/src/libslic3r/Utils.hpp @@ -842,6 +842,13 @@ void load_string_file(const boost::filesystem::path& p, std::string& str); bool check_layer_id_pattern(const std::string& pattern, int layer_id); +// On Windows, return an equivalent path carrying the extended-length ("\\?\" / "\\?\UNC\") +// prefix so the Win32 APIs accept it past MAX_PATH even when LongPathsEnabled is off. The path +// is made absolute and lexically normalized first, because the prefix disables normalisation. +// A path that is already extended (or a device path) is returned unchanged; on other platforms, +// or when an absolute path cannot be formed, the input is returned unchanged. +boost::filesystem::path extended_path(const boost::filesystem::path& path); + } // namespace Slic3r #if WIN32 diff --git a/src/libslic3r/miniz_extension.cpp b/src/libslic3r/miniz_extension.cpp index f4a520d0ce..1e1efbec54 100644 --- a/src/libslic3r/miniz_extension.cpp +++ b/src/libslic3r/miniz_extension.cpp @@ -17,6 +17,7 @@ #if defined(_MSC_VER) || defined(__MINGW64__) #include "boost/nowide/cstdio.hpp" +#include "boost/nowide/convert.hpp" #endif #include "I18N.hpp" @@ -62,7 +63,11 @@ bool open_zip(mz_zip_archive *zip, const char *fname, bool isread) FILE *f = nullptr; #if defined(_MSC_VER) || defined(__MINGW64__) - f = boost::nowide::fopen(fname, mode); + // fname is UTF-8 (the nowide contract). Route it through the shared extended-path helper so an + // archive stored past MAX_PATH opens even with LongPathsEnabled off. + const std::wstring wide_path = boost::nowide::widen(fname); + const std::string extended = boost::nowide::narrow(Slic3r::extended_path(boost::filesystem::path(wide_path)).wstring()); + f = boost::nowide::fopen(extended.c_str(), mode); #elif defined(__GNUC__) && defined(_LARGEFILE64_SOURCE) f = fopen64(fname, mode); #else @@ -101,6 +106,14 @@ bool close_zip(mz_zip_archive *zip, bool isread) } return ret; } + +#ifdef WIN32 +// mz_file_write_func writing an extracted entry into an already-open FILE*. +size_t mz_write_to_cfile(void *opaque, mz_uint64 /*file_ofs*/, const void *buffer, size_t size) +{ + return std::fwrite(buffer, 1, size, static_cast(opaque)); +} +#endif } bool open_zip_reader(mz_zip_archive *zip, const std::string &fname) @@ -116,6 +129,36 @@ bool open_zip_writer(mz_zip_archive *zip, const std::string &fname) bool close_zip_reader(mz_zip_archive *zip) { return close_zip(zip, true); } bool close_zip_writer(mz_zip_archive *zip) { return close_zip(zip, false); } +bool extract_zip_entry_to_file(mz_zip_archive *zip, mz_uint file_index, const boost::filesystem::path &dest_path) +{ + if (!zip) + return false; +#ifdef WIN32 + // Open the destination ourselves with a Windows extended-length path: miniz's narrow + // extract_to_file cannot be relied on past MAX_PATH with LongPathsEnabled off, and its wide + // variant takes a plain (unprefixed) path and a text-mode stream. This keeps the write binary. + FILE *file = ::_wfopen(Slic3r::extended_path(dest_path).wstring().c_str(), L"wb"); + if (!file) { + zip->m_last_error = MZ_ZIP_FILE_OPEN_FAILED; + return false; + } + + const bool written = mz_zip_reader_extract_to_callback(zip, file_index, mz_write_to_cfile, file, 0) != 0; + const bool closed = std::fclose(file) == 0; + if (!written || !closed) { + if (written && !closed) + zip->m_last_error = MZ_ZIP_FILE_CLOSE_FAILED; + // Drop the partial entry rather than leave a truncated file behind. + boost::system::error_code ec; + boost::filesystem::remove(Slic3r::extended_path(dest_path), ec); + return false; + } + return true; +#else + return mz_zip_reader_extract_to_file(zip, file_index, dest_path.string().c_str(), 0) != 0; +#endif +} + std::string decode_archive_entry_path(mz_zip_archive *zip, const mz_zip_archive_file_stat &stat) { if (stat.m_is_utf8) @@ -156,10 +199,13 @@ bool extract_archive_confined(const std::string &zip_path_utf8, const std::strin } const std::string dest_file = dest_dir + "/" + stat.m_filename; try { + // Use the extended-length form for every filesystem call so entries under a destination + // past MAX_PATH are created even with LongPathsEnabled off. + const boost::filesystem::path dest_path(dest_file); + const boost::filesystem::path io_dest = extended_path(dest_path); if (stat.m_is_directory) { - const boost::filesystem::path dest_path(dest_file); - if (!boost::filesystem::exists(dest_path)) - boost::filesystem::create_directories(dest_path); + if (!boost::filesystem::exists(io_dest)) + boost::filesystem::create_directories(io_dest); continue; } if (stat.m_uncomp_size == 0) { @@ -167,10 +213,9 @@ bool extract_archive_confined(const std::string &zip_path_utf8, const std::strin continue; } // Replace a symlink at the destination rather than writing through it. - const boost::filesystem::path dest_path(dest_file); - if (boost::filesystem::is_symlink(boost::filesystem::symlink_status(dest_path))) - boost::filesystem::remove(dest_path); - if (!mz_zip_reader_extract_to_file(&archive, stat.m_file_index, dest_file.c_str(), 0)) { + if (boost::filesystem::is_symlink(boost::filesystem::symlink_status(io_dest))) + boost::filesystem::remove(io_dest); + if (!extract_zip_entry_to_file(&archive, stat.m_file_index, dest_path)) { BOOST_LOG_TRIVIAL(error) << "Unzip: extract file " << stat.m_filename << " to dest " << dest_file << " failed"; close_zip_reader(&archive); return false; diff --git a/src/libslic3r/miniz_extension.hpp b/src/libslic3r/miniz_extension.hpp index 97aa91b93f..4953f61f58 100644 --- a/src/libslic3r/miniz_extension.hpp +++ b/src/libslic3r/miniz_extension.hpp @@ -1,6 +1,7 @@ #ifndef MINIZ_EXTENSION_HPP #define MINIZ_EXTENSION_HPP +#include #include #include @@ -13,6 +14,10 @@ bool close_zip_writer(mz_zip_archive *zip); std::string decode_archive_entry_path(mz_zip_archive *zip, const mz_zip_archive_file_stat &stat); // Extracts every entry of the archive under dest_dir. Nothing is written if any entry would resolve outside dest_dir. bool extract_archive_confined(const std::string &zip_path_utf8, const std::string &dest_dir); +// Extracts one entry into dest_path, binary-safe and overwriting. On Windows the destination is +// opened through an extended-length path so it works past MAX_PATH even with LongPathsEnabled off; +// a partial file is removed if the write fails. False for a directory/unsupported entry or on error. +bool extract_zip_entry_to_file(mz_zip_archive *zip, mz_uint file_index, const boost::filesystem::path &dest_path); class MZ_Archive { public: diff --git a/src/libslic3r/utils.cpp b/src/libslic3r/utils.cpp index 260e1e7d95..12b3083d4d 100644 --- a/src/libslic3r/utils.cpp +++ b/src/libslic3r/utils.cpp @@ -2254,5 +2254,45 @@ bool check_layer_id_pattern(const std::string& pattern, int layer_id){ return mod >= 0 && mod < count; } +boost::filesystem::path extended_path(const boost::filesystem::path& path) { +#ifdef WIN32 + namespace fs = boost::filesystem; + + // Already extended, or an explicit device path (which is not subject to MAX_PATH and must not + // be absolutized or normalized): leave it alone. + { + fs::path prefix_candidate = path; + const std::wstring native = prefix_candidate.make_preferred().wstring(); + if (native.rfind(L"\\\\?\\", 0) == 0 || native.rfind(L"\\\\.\\", 0) == 0) + return fs::path(native); + } + + fs::path absolute = path; + if (!absolute.is_absolute()) { + boost::system::error_code ec; + absolute = fs::absolute(absolute, ec); + if (ec) + return path; // can't form a valid prefixed path from a relative one + } + + // A trailing separator is redundant to the Win32 APIs, but lexically_normal() would rewrite it + // as a "." element, which the "\\?\" prefix (normalisation off) takes literally. Drop it first. + while (absolute.has_relative_path() && absolute.filename() == ".") + absolute = absolute.parent_path(); + + // The "\\?\" prefix turns off Win32 normalisation, so do it here first. + absolute = absolute.lexically_normal(); + + // Extended paths only recognize backslash separators. + const std::wstring native = absolute.make_preferred().wstring(); + if (native.empty()) + return path; + if (native.rfind(L"\\\\", 0) == 0) + return fs::path(L"\\\\?\\UNC\\" + native.substr(2)); // \\server\share\... -> \\?\UNC\server\share\... + return fs::path(L"\\\\?\\" + native); // C:\dir\... -> \\?\C:\dir\... +#else + return path; +#endif +} }; // namespace Slic3r diff --git a/src/libvgcode/src/Layers.cpp b/src/libvgcode/src/Layers.cpp index 5e52bc7aa9..1ef6c3236a 100644 --- a/src/libvgcode/src/Layers.cpp +++ b/src/libvgcode/src/Layers.cpp @@ -75,7 +75,7 @@ std::vector Layers::get_zs() const size_t Layers::get_layer_id_at(float z) const { - auto iter = std::upper_bound(m_items.begin(), m_items.end(), z, [](float z, const Item& item) { return item.z < z; }); + auto iter = std::upper_bound(m_items.begin(), m_items.end(), z, [](float z, const Item& item) { return item.z > z; }); return std::distance(m_items.begin(), iter); } diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt index 05650d2275..367aadaa27 100644 --- a/src/slic3r/CMakeLists.txt +++ b/src/slic3r/CMakeLists.txt @@ -222,6 +222,7 @@ set(SLIC3R_GUI_SOURCES GUI/Gizmos/GLGizmoUtils.hpp GUI/GLCanvas3D.cpp GUI/GLCanvas3D.hpp + GUI/SequentialPrintClearance.hpp GUI/GLModel.cpp GUI/GLModel.hpp GUI/GLSelectionRectangle.cpp diff --git a/src/slic3r/GUI/BackgroundSlicingProcess.cpp b/src/slic3r/GUI/BackgroundSlicingProcess.cpp index b6f95e30c0..602464bb86 100644 --- a/src/slic3r/GUI/BackgroundSlicingProcess.cpp +++ b/src/slic3r/GUI/BackgroundSlicingProcess.cpp @@ -225,7 +225,7 @@ void BackgroundSlicingProcess::process_fff() // BBS: add the logic to process from an existed gcode file if (m_print->finished()) { BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(" %1%: skip slicing, to process previous gcode file") % __LINE__; - m_fff_print->set_status(80, _utf8(L("Processing G-Code from previous file\u2026"))); + m_fff_print->set_status(80, _utf8(L("Processing G-code from previous file\u2026" /* \u2026 -> ... */))); wxCommandEvent evt(m_event_slicing_completed_id); // Post the Slicing Finished message for the G-code viewer to update. // Passing the timestamp diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index cd7e44b5d6..8bf5b843cc 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -1245,6 +1245,8 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, in if(gcf_is_klipper) toggle_field("accel_to_decel_factor", config->opt_bool("accel_to_decel_enable")); + toggle_line("exclude_object_tolerance", gcf_is_klipper && config->opt_bool("exclude_object")); + bool have_make_overhang_printable = config->opt_bool("make_overhang_printable"); toggle_line("make_overhang_printable_angle", have_make_overhang_printable); toggle_line("make_overhang_printable_hole_size", have_make_overhang_printable); diff --git a/src/slic3r/GUI/CreatePresetsDialog.cpp b/src/slic3r/GUI/CreatePresetsDialog.cpp index 0d5f688948..92925227ac 100644 --- a/src/slic3r/GUI/CreatePresetsDialog.cpp +++ b/src/slic3r/GUI/CreatePresetsDialog.cpp @@ -3151,7 +3151,7 @@ void CreatePrinterPresetDialog::set_current_visible_printer() m_printer_name_to_preset.clear(); for (const Preset &printer_preset : printer_presets) { if (!printer_preset.is_visible) continue; - if (preset_bundle->printers.get_preset_base(printer_preset)->name != printer_preset.name) continue; + if (preset_bundle->printers.get_preset_base(printer_preset) != &printer_preset) continue; if (auto printer_model = dynamic_cast(const_cast(printer_preset).config.option("printer_model", false))) { if (m_printer_name_to_preset.find(printer_model->value) == m_printer_name_to_preset.end()) { printer_choice.push_back(from_u8(printer_model->value)); @@ -4962,7 +4962,7 @@ void CreatePresetForPrinterDialog::get_visible_printer_and_compatible_filament_p if (filament_preset.is_default || !filament_preset.is_compatible || filament_preset.is_project_embedded) continue; ConfigOptionStrings *filament_types; const Preset * filament_preset_base = m_preset_bundle->filaments.get_preset_base(filament_preset); - if (filament_preset_base == &filament_preset) { + if (filament_preset_base == &filament_preset || filament_preset_base == nullptr) { filament_types = dynamic_cast(const_cast(&filament_preset)->config.option("filament_type")); } else { filament_types = dynamic_cast(const_cast(filament_preset_base)->config.option("filament_type")); diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index ed78f4f26b..39b6a0e17f 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -65,6 +65,7 @@ #include #include "slic3r/GUI/Selection.hpp" #include "GLCanvas3D.hpp" +#include "SequentialPrintClearance.hpp" #ifdef SLIC3R_CAD #include "slic3r/GUI/CAD/DesignSketchTool.hpp" // Design tab: interactive 2D sketch tool #endif @@ -6419,17 +6420,16 @@ void GLCanvas3D::update_sequential_clearance() //BBS: add the height logic PartPlate* plate = wxGetApp().plater()->get_partplate_list().get_curr_plate(); Polygons polygons; - std::vector> height_polygons; polygons.reserve(instances_count); - height_polygons.reserve(instances_count); - std::vector convex_and_bounding_boxes; - struct height_info - { - double instance_height; - BoundingBox bounding_box; - Polygon hull_polygon; - }; + std::vector convex_and_bounding_boxes; + convex_and_bounding_boxes.reserve(instances_count); + std::map print_order; + for (const PrintObject* print_object : fff_print()->objects()) + for (const PrintInstance& instance : print_object->instances()) + print_order.emplace(instance.model_instance->id(), instance.model_instance->arrange_order); + for (size_t i = 0; i < instance_transforms.size(); ++i) { + const size_t first_instance = convex_and_bounding_boxes.size(); const auto& instances = instance_transforms[i]; double rotation_z0 = instances.front()->get_rotation().z(); int index = 0; @@ -6449,96 +6449,20 @@ void GLCanvas3D::update_sequential_clearance() Polygon convex_hull(std::move(inst_pts)); BoundingBox bouding_box = convex_hull.bounding_box(); BoundingBox plate_bb = plate->get_bounding_box_crd(); + const ObjectID instance_id = m_model->objects[i]->instances[index]->id(); double instance_height = m_model->objects[i]->get_instance_max_z(index++); //skip the object for not current plate if (!plate_bb.overlap(bouding_box)) continue; - convex_and_bounding_boxes.push_back({instance_height, bouding_box, convex_hull}); + convex_and_bounding_boxes.push_back({instance_height, bouding_box, convex_hull, instance_id}); polygons.emplace_back(std::move(convex_hull)); } + sort_sequential_clearance_instances(convex_and_bounding_boxes.begin() + first_instance, convex_and_bounding_boxes.end(), print_order); } - //sort the print instance - std::sort(convex_and_bounding_boxes.begin(), convex_and_bounding_boxes.end(), - [](auto &l, auto &r) { - auto ly1 = l.bounding_box.min.y(); - auto ly2 = l.bounding_box.max.y(); - auto ry1 = r.bounding_box.min.y(); - auto ry2 = r.bounding_box.max.y(); - auto inter_min = std::max(ly1, ry1); - auto inter_max = std::min(ly2, ry2); - auto lx = l.bounding_box.min.x(); - auto rx = r.bounding_box.min.x(); - if (inter_max - inter_min > 0) - return (lx < rx) || ((lx == rx)&&(ly1 < ry1)); - else - return (ly1 < ry1); - }); - - /*bool has_interlaced_objects = false; - for (int k = 0; k < bounding_box_count; k++) - { - Polygon& convex = convex_and_bounding_boxes[k].hull_polygon; - BoundingBox& bbox = convex_and_bounding_boxes[k].bounding_box; - auto iy1 = bbox.min.y(); - auto iy2 = bbox.max.y(); - - for (int i = k+1; i < bounding_box_count; i++) - { - Polygon& next_convex = convex_and_bounding_boxes[i].hull_polygon; - BoundingBox& next_bbox = convex_and_bounding_boxes[i].bounding_box; - auto py1 = next_bbox.min.y(); - auto py2 = next_bbox.max.y(); - auto inter_min = std::max(iy1, py1); // min y of intersection - auto inter_max = std::min(iy2, py2); // max y of intersection. length=max_y-min_y>0 means intersection exists - if (inter_max - inter_min > 0) { - has_interlaced_objects = true; - break; - } - } - if (has_interlaced_objects) - break; - }*/ - - int bounding_box_count = convex_and_bounding_boxes.size(); - double printable_height = fff_print()->config().printable_height; - double hc1 = fff_print()->config().extruder_clearance_height_to_lid; - double hc2 = fff_print()->config().extruder_clearance_height_to_rod; - for (int k = 0; k < bounding_box_count; k++) - { - Polygon& convex = convex_and_bounding_boxes[k].hull_polygon; - BoundingBox& bbox = convex_and_bounding_boxes[k].bounding_box; - auto iy1 = bbox.min.y(); - auto iy2 = bbox.max.y(); - double height = (k == (bounding_box_count - 1))?printable_height:hc1; - - /*if (has_interlaced_objects) { - if ((k < (bounding_box_count - 1)) && (convex_and_bounding_boxes[k].instance_height > hc2)) { - height_polygons.emplace_back(std::make_pair(convex, hc2)); - } - } - else { - if ((k < (bounding_box_count - 1)) && (convex_and_bounding_boxes[k].instance_height > hc1)) { - height_polygons.emplace_back(std::make_pair(convex, hc1)); - } - }*/ - - for (int i = k+1; i < bounding_box_count; i++) - { - Polygon& next_convex = convex_and_bounding_boxes[i].hull_polygon; - BoundingBox& next_bbox = convex_and_bounding_boxes[i].bounding_box; - auto py1 = next_bbox.min.y(); - auto py2 = next_bbox.max.y(); - auto inter_min = std::max(iy1, py1); // min y of intersection - auto inter_max = std::min(iy2, py2); // max y of intersection. length=max_y-min_y>0 means intersection exists - if (inter_max - inter_min > 0) { - height = hc2; - break; - } - } - if (height < convex_and_bounding_boxes[k].instance_height) - height_polygons.emplace_back(std::make_pair(convex, height)); - } + const auto& config = fff_print()->config(); + const auto height_polygons = sequential_clearance_height_polygons(convex_and_bounding_boxes, config.printable_height, + config.extruder_clearance_height_to_lid, config.extruder_clearance_height_to_rod); // sends instances 2d hulls to be rendered set_sequential_print_clearance_visible(true); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp index c4d76a0315..1dd9fdc18d 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp @@ -1350,7 +1350,7 @@ void GLGizmoSVG::draw_window() assert(m_volume_id.valid()); if (m_volume == nullptr || m_volume_id.invalid()) { - ImGui::Text("%s", _u8L("Not valid state please report reproduction steps on github").c_str()); + ImGui::Text("%s", _u8L("Not valid state please report reproduction steps on GitHub").c_str()); return; } @@ -1362,13 +1362,13 @@ void GLGizmoSVG::draw_window() assert(m_volume->emboss_shape->svg_file.has_value()); if (!m_volume->emboss_shape->svg_file.has_value()){ - ImGui::Text("%s", _u8L("Missing svg file in embossed shape").c_str()); + ImGui::Text("%s", _u8L("Missing SVG file in embossed shape").c_str()); return; } assert(m_volume->emboss_shape->svg_file->file_data != nullptr); if (m_volume->emboss_shape->svg_file->file_data == nullptr){ - ImGui::Text("%s", _u8L("Missing data of svg file").c_str()); + ImGui::Text("%s", _u8L("Missing data of SVG file").c_str()); return; } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp b/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp index 4597e98fd2..7f0019f86b 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp @@ -174,6 +174,10 @@ constexpr int HEIGHT_TEX_MAX_PX = 2048; // The full-size image is only ever adjusted once, on commit. constexpr int ADJUST_PREVIEW_MAX_PX = 384; +// Library textures the texture picker decodes per frame. Each decode runs on the GUI thread, so the +// rest of the visible tiles fill in over the following frames instead of in one stall. +constexpr int PICKER_LOADS_PER_FRAME = 2; + // How many rings of vertex-adjacent triangles either side of the paint's edge join the border refine // band (see collect_paint_region()). Two is enough to grade the size change without the band's own // cost growing to matter: it is a ring around a perimeter, not an area. @@ -4118,7 +4122,7 @@ const GLGizmoTextureDisplacement::LibraryTexture *GLGizmoTextureDisplacement::ge if (entry.image_data) { TextureDisplacementLayer probe; probe.image_data = entry.image_data; - entry.thumbnail = upload_height_thumbnail(decode_height_texture(probe)); + entry.thumbnail = upload_height_thumbnail(decode_height_texture(probe, /* keep_decoded */ false)); if (!entry.thumbnail) entry.image_data.reset(); // decoded to nothing usable - treat it as a failed load } else { @@ -4331,6 +4335,8 @@ void GLGizmoTextureDisplacement::render_texture_library_popup(const ImVec2 &pane std::optional to_remove; bool import_clicked = false; bool download_clicked = false; + int loads_left = PICKER_LOADS_PER_FRAME; + bool loads_deferred = false; // Tiles are placed on the four-column grid explicitly rather than flowed with SameLine(): a user tile // overlays a remove button on its corner, and that button would otherwise be "the previous item" the @@ -4348,11 +4354,30 @@ void GLGizmoTextureDisplacement::render_texture_library_popup(const ImVec2 &pane }; // One section's tiles, in the order the section holds them (shipped alphabetically, pack textures by // name, the user's own most recently used first - the order texture_library() produced); a user tile - // carries a remove button on hover. Returns how many it drew. + // carries a remove button on hover. Returns how many tiles it laid out, drawn or not. const auto grid = [&](const ImVec2 &origin, const std::vector &entries, bool removable) { int n = 0; for (const TextureLibraryEntry *entry : entries) { - ImGui::SetCursorScreenPos(tile_pos(origin, n++)); + const ImVec2 rect_min = tile_pos(origin, n++); + const ImVec2 rect_max = ImVec2(rect_min.x + tile, rect_min.y + tile); + const bool current = entry->path == layer->path; + // The selected tile is centred even when it is off screen, so it is drawn and loaded next frame. + if (current && m_picker_reveal_selected) { + ImGui::SetScrollFromPosY(0.5f * (rect_min.y + rect_max.y) - ImGui::GetWindowPos().y, 0.5f); + m_parent.request_extra_frame(); + } + if (!ImGui::IsRectVisible(rect_min, rect_max)) + continue; + // Thumbnails decode on this thread, so only a few per frame; the rest fill in on later frames. + const bool cached = m_library_textures.count(entry->path) != 0; + if (!cached && loads_left == 0) { + loads_deferred = true; + dl->AddRectFilled(rect_min, rect_max, ImGui::GetColorU32(ImGuiCol_FrameBg), style.FrameRounding); + continue; + } + if (!cached) + --loads_left; + ImGui::SetCursorScreenPos(rect_min); ImGui::PushID(entry->path.c_str()); const LibraryTexture *tex = get_library_texture(entry->path); GLTexture *thumb = tex != nullptr ? tex->thumbnail.get() : nullptr; @@ -4375,7 +4400,6 @@ void GLGizmoTextureDisplacement::render_texture_library_popup(const ImVec2 &pane if (removable) ImGui::SetItemAllowOverlap(); // the remove button drawn over its corner takes its own clicks const ImVec2 a = ImGui::GetItemRectMin(), b = ImGui::GetItemRectMax(); - const bool current = entry->path == layer->path; const bool hovered = ImGui::IsItemHovered(); // The layer's current texture carries an accent ring, and the tile under the pointer a thinner, // fainter one. Both are drawn inside the tile, where the grid's clip rect never cuts them. @@ -4384,9 +4408,6 @@ void GLGizmoTextureDisplacement::render_texture_library_popup(const ImVec2 &pane dl->AddRect(ImVec2(a.x + 0.5f * w, a.y + 0.5f * w), ImVec2(b.x - 0.5f * w, b.y - 0.5f * w), ImGui::GetColorU32(current ? orca : ImVec4(orca.x, orca.y, orca.z, 0.6f)), 0.f, 0, w); } - // Centred, as far as the scroll range allows, so the textures around it are in view too. - if (current && m_picker_reveal_selected) - ImGui::SetScrollFromPosY(0.5f * (a.y + b.y) - ImGui::GetWindowPos().y, 0.5f); if (hovered) panel_tooltip(entry->name); @@ -4575,6 +4596,8 @@ void GLGizmoTextureDisplacement::render_texture_library_popup(const ImVec2 &pane ImGui::TextDisabled("%s", _u8L("PNG, JPG or BMP - converted to a height map on import. Hover one of yours to remove it.").c_str()); ImGui::PopTextWrapPos(); } + if (loads_deferred) + m_parent.request_extra_frame(); // Done whether or not the current texture was drawn: one in a collapsed section stays where it is. m_picker_reveal_selected = false; ImGui::EndChild(); diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index 9ce8d79e4d..080e85ad4e 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -62,6 +62,7 @@ #include "Search.hpp" #include "BitmapCache.hpp" #include "GUI_App.hpp" +#include "KeyChord.hpp" #include #include @@ -2134,6 +2135,27 @@ bool ImGuiWrapper::want_any_input() const return io.WantCaptureMouse || io.WantCaptureKeyboard || io.WantTextInput; } +bool ImGuiWrapper::text_input_active() const +{ + const ImGuiID id = ImGui::GetActiveID(); + return id != 0 && ImGui::GetInputTextState(id) != nullptr; +} + +bool ImGuiWrapper::modal_popup_open() const +{ + // A modal stays on the popup stack while its canvas is hidden, so it counts only if the last finished + // frame drew it, which NewFrame() moves from Active to WasActive. + const ImGuiWindow* modal = ImGui::GetTopMostPopupModal(); + if (modal == nullptr) + return false; + return ImGui::GetCurrentContext()->WithinFrameScope ? modal->WasActive : modal->Active; +} + +bool ImGuiWrapper::owns_key(const KeyChord& chord) const +{ + return modal_popup_open() || (chord.edits_text() && text_input_active()); +} + ImFontAtlasCustomRect* ImGuiWrapper::GetTextureCustomRect(const wchar_t& tex_id) { auto item = m_custom_glyph_rects_ids.find(tex_id); diff --git a/src/slic3r/GUI/ImGuiWrapper.hpp b/src/slic3r/GUI/ImGuiWrapper.hpp index 1a6f5e1bb9..6b5487bb5f 100644 --- a/src/slic3r/GUI/ImGuiWrapper.hpp +++ b/src/slic3r/GUI/ImGuiWrapper.hpp @@ -35,6 +35,7 @@ struct ImRect; namespace Slic3r { namespace GUI { +struct KeyChord; bool get_data_from_svg(const std::string &filename, unsigned int max_size_px, ThumbnailData &thumbnail_data); @@ -219,6 +220,12 @@ public: bool want_keyboard() const; bool want_text_input() const; bool want_any_input() const; + // True while an ImGui InputText is active, without the one-frame lag of want_text_input(). + bool text_input_active() const; + // True while an ImGui modal popup is on screen. + bool modal_popup_open() const; + // True for every key while a modal is open, and for text-editing keys while an InputText is active. + bool owns_key(const KeyChord& chord) const; // Optional inputs are used for set up value inside of an optional, with default value // diff --git a/src/slic3r/GUI/KBShortcutsDialog.cpp b/src/slic3r/GUI/KBShortcutsDialog.cpp index 0fbe4f79c4..47fc0631ee 100644 --- a/src/slic3r/GUI/KBShortcutsDialog.cpp +++ b/src/slic3r/GUI/KBShortcutsDialog.cpp @@ -173,7 +173,7 @@ void KBShortcutsDialog::fill_pages() using Section = ShortcutSection; if (wxGetApp().is_editor()) { - page(_L("Global"), _L("Available anywhere in the window, even while typing in a text field."), ShortcutContext::Global, { + page(_L("Global"), _L("Available anywhere in the window."), ShortcutContext::Global, { fixed(Section::SpeedDial, { alt, "1-9, 0" }, L("Run favorite 1 to 10")), fixed(Section::SpeedDial, { ctrl, "B" }, L("Pin or unpin the selected action")), // wx cycles notebook pages on Ctrl+Tab, which is Cmd+Tab on macOS and never arrives there. @@ -438,17 +438,16 @@ ShortcutCaptureDialog::ShortcutCaptureDialog(wxWindow* parent, Shortcut shortcut SetBackgroundColour(*wxWHITE); wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); - // A Global shortcut also runs while a text field has the focus, so its hint names the keys it can use. + // A Global shortcut runs before the focused control gets the key, so its hint names the keys it can use. const bool global = (shortcut_info(shortcut).contexts & context_bit(ShortcutContext::Global)) != 0; const wxString advice = global_key_advice(); - const wxString typing = _L("Global shortcuts also apply while typing."); const wxString rule = _L("A key that types a character cannot be a global shortcut."); - m_hint = global ? typing + "\n" + advice : _L("Esc cancels, Enter confirms."); + m_hint = global ? advice : _L("Esc cancels, Enter confirms."); m_rejection = rule + "\n" + advice; // Wide enough for each sentence on a line of its own where the translation allows, within limits. int width = FromDIP(450); - for (const wxString& sentence : { typing, rule, advice }) { + for (const wxString& sentence : { rule, advice }) { int extent = 0; GetTextExtent(sentence, &extent, nullptr, nullptr, nullptr, &wxGetApp().normal_font()); width = std::max(width, extent); diff --git a/src/slic3r/GUI/KeyChord.cpp b/src/slic3r/GUI/KeyChord.cpp index 768e503486..652eda2ae4 100644 --- a/src/slic3r/GUI/KeyChord.cpp +++ b/src/slic3r/GUI/KeyChord.cpp @@ -187,6 +187,40 @@ bool KeyChord::is_menu_accelerator() const return valid() && ((modifiers & (wxMOD_CONTROL | wxMOD_ALT | wxMOD_RAW_CONTROL)) != 0 || (!is_printable(key) && key != WXK_SPACE)); } +bool KeyChord::edits_text() const +{ + if (!valid()) + return false; + if (!is_menu_accelerator()) + return true; + const int mods = modifiers & ~wxMOD_SHIFT; + switch (key) { + case WXK_LEFT: case WXK_RIGHT: case WXK_UP: case WXK_DOWN: + case WXK_HOME: case WXK_END: case WXK_BACK: case WXK_DELETE: +#ifdef __APPLE__ + return mods == wxMOD_NONE || mods == wxMOD_CONTROL || mods == wxMOD_ALT; // Option moves by word +#else + return mods == wxMOD_NONE || mods == wxMOD_CONTROL; +#endif + case WXK_INSERT: + return mods == wxMOD_NONE || mods == wxMOD_CONTROL; + case WXK_RETURN: case WXK_TAB: case WXK_ESCAPE: case WXK_PAGEUP: case WXK_PAGEDOWN: + return mods == wxMOD_NONE; + default: + break; + } + if (!is_printable(key)) + return false; +#ifdef __APPLE__ + if (mods == wxMOD_ALT || mods == wxMOD_RAW_CONTROL) + return true; // Option types a character, Control runs the Cocoa text key bindings +#else + if (mods == (wxMOD_CONTROL | wxMOD_ALT)) + return true; // AltGr types a character +#endif + return mods == wxMOD_CONTROL && (key == 'A' || key == 'C' || key == 'V' || key == 'X' || key == 'Y' || key == 'Z'); +} + // Only a chord the desktop acts on while still delivering it to the app belongs here. bool KeyChord::is_system_shortcut() const { diff --git a/src/slic3r/GUI/KeyChord.hpp b/src/slic3r/GUI/KeyChord.hpp index 36d1ca8d16..f969cd149e 100644 --- a/src/slic3r/GUI/KeyChord.hpp +++ b/src/slic3r/GUI/KeyChord.hpp @@ -35,6 +35,9 @@ struct KeyChord // True when Ctrl or Alt is held or the key is non-printable, the chords a menu can own without // swallowing typing in text fields. bool is_menu_accelerator() const; + // True for a chord a focused text field acts on: typing a character (AltGr and macOS Option + // characters included), moving the caret, selecting, deleting, or the clipboard and undo chords. + bool edits_text() const; // True for a chord the desktop acts on although the app receives it, so a binding would // take it from the system. bool is_system_shortcut() const; diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index b64aed574b..c973bc1a05 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -107,6 +108,8 @@ #include "../Utils/PrintHost.hpp" #include "GUI_App.hpp" +#include "ImGuiWrapper.hpp" +#include "OpenGLManager.hpp" #include "Shortcuts.hpp" #include "UnsavedChangesDialog.hpp" #include "PublishSettingsDialog.hpp" @@ -184,18 +187,31 @@ enum class ERescaleTarget namespace { +bool focus_is_text_field(wxWindow* focus) +{ + if (dynamic_cast(focus) || dynamic_cast(focus)) + return true; // a web page can have its own text fields + if (dynamic_cast(focus) || dynamic_cast(focus)) + return true; // the native Windows spin control is not a wxTextEntry + return false; +} + +// Only a scene canvas draws ImGui, and a hidden one can keep the wx focus after a tab switch. +const ImGuiWrapper* focused_canvas_imgui(wxWindow* focus) +{ + if (!OpenGLManager::is_scene_canvas(focus) || !focus->IsShownOnScreen()) + return nullptr; + return wxGetApp().imgui(); +} + // Space opens the speed dial, but it is the activation key for buttons, checkboxes and other -// controls. CHAR_HOOK runs before the focused child, so only take Space when the focused window has -// no keyboard-activation meaning of its own. Canvases (GLCanvas3D) and panels are not controls and -// fall through to "open"; the Notebook itself does too, so Space still opens the dial on any page. +// controls, so only take Space when the focused window has no keyboard-activation meaning of its +// own. Canvases (GLCanvas3D) and panels are not controls and fall through to "open"; the Notebook +// itself does too, so Space still opens the dial on any page. bool focus_keeps_space(wxWindow* focus) { if (!focus) return false; - if (dynamic_cast(focus)) - return true; // typing a space into a text field - if (dynamic_cast(focus)) - return true; // web content scrolls and hosts its own text fields if (dynamic_cast<::Button*>(focus)) return true; // custom button: Space clicks it (it is a wxWindow, not a wxControl) if (dynamic_cast(focus)) @@ -816,16 +832,12 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_ bool MainFrame::handle_global_shortcut(const KeyChord& chord) { - // ImGui draws its text fields (the text tool's box, a sketch value field) on the GL canvas, so - // while one of them is typed into the focused wx window is that canvas or an in-canvas frame: - // neither is a wxControl, so focus_keeps_space() cannot see it and CHAR_HOOK takes the chord - // here first -- Space opened the Speed Dial, Ctrl+P the Preferences, and the field never saw - // the key. ImGui raises WantCaptureKeyboard while one of its items owns the keyboard, so leave - // the key to it then. A focused wxControl (text field, list, web view) is untouched: those - // keep their own keys, and ImGui's flag can outlive the focus moving to one of them. + // CHAR_HOOK runs before the focused window, so leave text-editing keys to a focused text field and + // the keys ImGui owns to the focused canvas. wxWindow* const focus = wxWindow::FindFocus(); - ImGuiWrapper* const imgui = wxGetApp().imgui(); - if (focus != nullptr && imgui != nullptr && imgui->want_keyboard() && dynamic_cast(focus) == nullptr) + if (chord.edits_text() && focus_is_text_field(focus)) + return false; + if (const ImGuiWrapper* imgui = focused_canvas_imgui(focus); imgui != nullptr && imgui->owns_key(chord)) return false; const std::optional shortcut = wxGetApp().shortcuts().lookup(ShortcutContext::Global, chord); @@ -1743,6 +1755,9 @@ void MainFrame::fit_tab_labels() for (size_t i = count - 1; i >= 1; --i) { int right = ScreenToClient(m_slice_option_btn->ClientToScreen({})).x; int left = sizer->GetSize().GetWidth(); + // The overflow button sits between the tab buttons and the side tools, so it is not free space. + if (const wxWindow* overflow = ctrl->GetOverflowButton()) + left += overflow->GetSize().GetWidth(); if (right - left - FromDIP(15) > 0) return; ctrl->SetCompact(i, true); m_tabpanel->Refresh(); diff --git a/src/slic3r/GUI/NetworkTestDialog.cpp b/src/slic3r/GUI/NetworkTestDialog.cpp index 54c0f11cf0..964004b67c 100644 --- a/src/slic3r/GUI/NetworkTestDialog.cpp +++ b/src/slic3r/GUI/NetworkTestDialog.cpp @@ -295,7 +295,7 @@ void NetworkTestDialog::start_test_url(TestJob job, wxString name, wxString url) } }) .on_ip_resolve([this,name,job](std::string ip) { - wxString ip_report = wxString::Format(_L("test %s ip resolved = %s"), name, ip); + wxString ip_report = wxString::Format(_L("test %s IP resolved = %s"), name, ip); update_status(job, ip_report); }) .on_error([this,name,job](std::string body, std::string error, unsigned int status) { diff --git a/src/slic3r/GUI/Notebook.hpp b/src/slic3r/GUI/Notebook.hpp index e85f3ad723..b7774c84e0 100644 --- a/src/slic3r/GUI/Notebook.hpp +++ b/src/slic3r/GUI/Notebook.hpp @@ -57,6 +57,7 @@ public: // ORCA: a companion widget shown right after the tab buttons (before any side_tools), e.g. // an overflow indicator. Pass nullptr to remove it; ownership stays with the caller. void SetOverflowButton(wxWindow* button); + wxWindow* GetOverflowButton() const { return m_overflow_button; } private: wxFlexGridSizer* m_buttons_sizer; diff --git a/src/slic3r/GUI/OpenGLManager.cpp b/src/slic3r/GUI/OpenGLManager.cpp index 971a5282fc..fccfb57a9a 100644 --- a/src/slic3r/GUI/OpenGLManager.cpp +++ b/src/slic3r/GUI/OpenGLManager.cpp @@ -427,6 +427,8 @@ wxGLContext* OpenGLManager::init_glcontext(wxGLCanvas& canvas, const std::pairSetBackgroundStyle(wxBG_STYLE_PAINT); return canvas; } +bool OpenGLManager::is_scene_canvas(const wxWindow* window) +{ + return window != nullptr && window->GetName() == SCENE_CANVAS_NAME; +} + void OpenGLManager::detect_multisample(int* attribList) { int wxVersion = wxMAJOR_VERSION * 10000 + wxMINOR_VERSION * 100 + wxRELEASE_NUMBER; diff --git a/src/slic3r/GUI/OpenGLManager.hpp b/src/slic3r/GUI/OpenGLManager.hpp index 9e82123205..e9de7fc197 100644 --- a/src/slic3r/GUI/OpenGLManager.hpp +++ b/src/slic3r/GUI/OpenGLManager.hpp @@ -101,6 +101,8 @@ public: static bool are_framebuffers_supported() { return (s_framebuffers_type != EFramebufferType::Unknown); } static EFramebufferType get_framebuffers_type() { return s_framebuffers_type; } static wxGLCanvas* create_wxglcanvas(wxWindow& parent); + // True for a canvas made by create_wxglcanvas(), the kind a GLCanvas3D draws its scene and ImGui into. + static bool is_scene_canvas(const wxWindow* window); static const GLInfo& get_gl_info() { return s_gl_info; } static bool force_power_of_two_textures() { return s_force_power_of_two_textures; } diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index e639ab8b00..ae77405132 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -21192,7 +21192,12 @@ void Plater::print_job_finished(wxCommandEvent &evt) Slic3r::DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager(); if (!dev) return; - dev->set_selected_machine(evt.GetString().ToStdString()); + const std::string dev_id = evt.GetString().ToStdString(); + MachineObject* selected = dev->get_selected_machine(); + // After a LAN print, the completion event reselects the same printer. + // Keep the active session while asynchronous status traffic may still be in flight. + if (!selected || selected->get_dev_id() != dev_id || selected->connection_type() != "lan") + dev->set_selected_machine(dev_id); p->main_frame->request_select_tab(TAB_ID_MONITOR); // Selects the status page on a built Device tab; one built by the switch starts there. MonitorPanel* curr_monitor = MonitorPanel::if_built(); diff --git a/src/slic3r/GUI/PostProcessor.cpp b/src/slic3r/GUI/PostProcessor.cpp index 4aa498ad74..c918650aa7 100644 --- a/src/slic3r/GUI/PostProcessor.cpp +++ b/src/slic3r/GUI/PostProcessor.cpp @@ -395,7 +395,7 @@ bool run_post_process_scripts( auto gcode_file = boost::filesystem::path(path); if (!boost::filesystem::exists(gcode_file)) - throw Slic3r::RuntimeError(_u8L("Post-processor can't find exported gcode file")); + throw Slic3r::RuntimeError(_u8L("Post-processor can't find exported G-code file")); // Store print configuration into environment variables. config.setenv_(); diff --git a/src/slic3r/GUI/PublishSettingsDialog.cpp b/src/slic3r/GUI/PublishSettingsDialog.cpp index 080182a1b6..4020eedee4 100644 --- a/src/slic3r/GUI/PublishSettingsDialog.cpp +++ b/src/slic3r/GUI/PublishSettingsDialog.cpp @@ -2225,8 +2225,10 @@ void PublishSettingsDialog::refresh_tab_indicators() if (section.variant_switch != nullptr) { const wxString& title = m_categories[section.categories[i]].title; const wxString text = on ? title + wxString(" ") + wxString(wxUniChar(0x2022)) : title; - if (section.variant_switch->GetOptionText(static_cast(i)) != text) + if (section.variant_switch->GetOptionText(static_cast(i)) != text) { section.variant_switch->SetOptionText(static_cast(i), text); + section.page->Layout(); + } } any = any || on; } diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index c6e1ea312e..3f5bf126a2 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -4087,7 +4087,7 @@ void SelectMachineDialog::update_user_printer() { m_printer_last_select = ""; update_select_layout(nullptr); - m_printer_box->GetPrinterComboBox()->SetTextLabel(""); + m_printer_box->GetPrinterComboBox()->SetValue(_L("No available printers")); } BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "for send task, current printer id = " << m_printer_last_select << std::endl; diff --git a/src/slic3r/GUI/Selection.cpp b/src/slic3r/GUI/Selection.cpp index 58d5e15fe3..4d7f1591ee 100644 --- a/src/slic3r/GUI/Selection.cpp +++ b/src/slic3r/GUI/Selection.cpp @@ -474,17 +474,14 @@ void Selection::add_curr_plate() if (!m_valid) return; + std::vector volume_idxs = get_volume_idxs_from_plate(wxGetApp().plater()->get_partplate_list().get_curr_plate_index()); + if (volume_idxs.empty()) + return; + wxGetApp().plater()->take_snapshot(std::string("Selection-Add Curr Plate All!")); m_mode = Instance; clear(); - - PartPlate* plate = wxGetApp().plater()->get_partplate_list().get_curr_plate(); - for (int obj_idx = 0; obj_idx < m_model->objects.size(); obj_idx++) { - if (plate && plate->contain_instance_totally(obj_idx, 0)) { - std::vector volume_idxs = get_volume_idxs_from_object(obj_idx); - do_add_volumes(volume_idxs); - } - } + do_add_volumes(volume_idxs); update_type(); this->set_bounding_boxes_dirty(); @@ -511,20 +508,14 @@ void Selection::remove_curr_plate() if (!m_valid) return; - PartPlate* plate = wxGetApp().plater()->get_partplate_list().get_curr_plate(); - if (plate->empty()) + std::vector volume_idxs = get_volume_idxs_from_plate(wxGetApp().plater()->get_partplate_list().get_curr_plate_index()); + if (volume_idxs.empty()) return; wxGetApp().plater()->take_snapshot(std::string("Selection-Delete Curr Plate All")); m_mode = Instance; clear(); - - for (int obj_idx = 0; obj_idx < m_model->objects.size(); obj_idx++) { - if (plate && plate->contain_instance(obj_idx, 0)) { - std::vector volume_idxs = get_volume_idxs_from_object(obj_idx); - do_add_volumes(volume_idxs); - } - } + do_add_volumes(volume_idxs); update_type(); this->set_bounding_boxes_dirty(); @@ -2270,6 +2261,27 @@ std::vector Selection::get_volume_idxs_from_volume(unsigned int ob return idxs; } +std::vector Selection::get_volume_idxs_from_plate(const int plate_idx) const +{ + PartPlate* plate = wxGetApp().plater()->get_partplate_list().get_plate(plate_idx); + std::vector idxs; + if (!plate) + return idxs; + + for (int obj_idx = 0; obj_idx < (int)m_model->objects.size(); obj_idx++) { + const ModelObject* obj = m_model->objects[obj_idx]; + for (int inst_idx = 0; inst_idx < (int)obj->instances.size(); inst_idx++) { + // on this plate or overlapping it in some way (fully inside, oversized or partly outside) + if (plate->contain_instance(obj_idx, inst_idx) || plate->intersect_instance(obj_idx, inst_idx)) { + std::vector inst_idxs = get_volume_idxs_from_instance(obj_idx, inst_idx); + idxs.insert(idxs.end(), inst_idxs.begin(), inst_idxs.end()); + } + } + } + + return idxs; +} + std::vector Selection::get_missing_volume_idxs_from(const std::vector& volume_idxs) const { std::vector idxs; diff --git a/src/slic3r/GUI/Selection.hpp b/src/slic3r/GUI/Selection.hpp index dcee38a813..a02f01da00 100644 --- a/src/slic3r/GUI/Selection.hpp +++ b/src/slic3r/GUI/Selection.hpp @@ -409,6 +409,8 @@ public: std::vector get_volume_idxs_from_instance(unsigned int object_idx, unsigned int instance_idx) const; // returns the idx of the volume corresponding to the volume with the given idxs std::vector get_volume_idxs_from_volume(unsigned int object_idx, unsigned int instance_idx, unsigned int volume_idx) const; + // returns the list of idxs of the volumes of all instances on the given plate or overlapping it. (fully inside, oversized or partly outside) + std::vector get_volume_idxs_from_plate(const int plate_idx) const; // returns the list of idxs of the volumes contained in the selection but not in the given list std::vector get_missing_volume_idxs_from(const std::vector& volume_idxs) const; // returns the list of idxs of the volumes contained in the given list but not in the selection diff --git a/src/slic3r/GUI/SendToPrinter.cpp b/src/slic3r/GUI/SendToPrinter.cpp index a2a705b8a2..031c5847f4 100644 --- a/src/slic3r/GUI/SendToPrinter.cpp +++ b/src/slic3r/GUI/SendToPrinter.cpp @@ -1229,7 +1229,7 @@ void SendToPrinterDialog::update_user_printer() } else { m_printer_last_select = ""; - m_comboBox_printer->SetTextLabel(""); + m_comboBox_printer->SetValue(_L("No available printers")); } BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "for send task, current printer id = " << m_printer_last_select << std::endl; diff --git a/src/slic3r/GUI/SequentialPrintClearance.hpp b/src/slic3r/GUI/SequentialPrintClearance.hpp new file mode 100644 index 0000000000..0f5d79be9c --- /dev/null +++ b/src/slic3r/GUI/SequentialPrintClearance.hpp @@ -0,0 +1,63 @@ +#pragma once + +#include "libslic3r/BoundingBox.hpp" +#include "libslic3r/ObjectID.hpp" +#include "libslic3r/Polygon.hpp" + +#include +#include +#include +#include +#include + +namespace Slic3r::GUI { + +struct SequentialClearanceInstance +{ + double instance_height; + BoundingBox bounding_box; + Polygon hull_polygon; + ObjectID instance_id; +}; + +// PrintApply may group rotated copies in a different order from ModelObject::instances. +// Reorder one object's instances only when validation has assigned all of them an order. +inline void sort_sequential_clearance_instances( + std::vector::iterator first, std::vector::iterator last, + const std::map& print_order) +{ + if (!std::all_of(first, last, [&print_order](const SequentialClearanceInstance& instance) { + const auto order = print_order.find(instance.instance_id); + return order != print_order.end() && order->second > 0; + })) + return; + + std::stable_sort(first, last, [&print_order](const SequentialClearanceInstance& lhs, const SequentialClearanceInstance& rhs) { + return print_order.at(lhs.instance_id) < print_order.at(rhs.instance_id); + }); +} + +// Input follows object-list order with validated print order within each object. +inline std::vector> sequential_clearance_height_polygons( + const std::vector& instances, double printable_height, double height_to_lid, double height_to_rod) +{ + std::vector> height_polygons; + height_polygons.reserve(instances.size()); + for (size_t k = 0; k < instances.size(); ++k) { + const auto& instance = instances[k]; + double height = k + 1 == instances.size() ? printable_height : height_to_lid; + for (size_t i = k + 1; i < instances.size(); ++i) { + const auto& next_bbox = instances[i].bounding_box; + if (std::min(instance.bounding_box.max.y(), next_bbox.max.y()) > + std::max(instance.bounding_box.min.y(), next_bbox.min.y())) { + height = height_to_rod; + break; + } + } + if (height < instance.instance_height) + height_polygons.emplace_back(instance.hull_polygon, float(height)); + } + return height_polygons; +} + +} // namespace Slic3r::GUI diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 07b857d443..a0ac179201 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -3319,6 +3319,7 @@ void TabPrint::build() optgroup->append_single_option_line("gcode_comments", "others_settings_g_code_output#verbose-g-code"); optgroup->append_single_option_line("gcode_label_objects", "others_settings_g_code_output#label-objects"); optgroup->append_single_option_line("exclude_object", "others_settings_g_code_output#exclude-objects"); + optgroup->append_single_option_line("exclude_object_tolerance", "others_settings_g_code_output#outline-tolerance"); option = optgroup->get_option("filename_format"); // option.opt.full_width = true; option.opt.is_code = true; diff --git a/src/slic3r/GUI/TextureLibrary.cpp b/src/slic3r/GUI/TextureLibrary.cpp index 0388ed4f21..3d76791027 100644 --- a/src/slic3r/GUI/TextureLibrary.cpp +++ b/src/slic3r/GUI/TextureLibrary.cpp @@ -223,23 +223,11 @@ std::vector read_file_bytes(const std::string &path) return std::vector(std::istreambuf_iterator(ifs), std::istreambuf_iterator()); } -// True if these bytes are a PNG libslic3r can decode, i.e. can be stored on a layer as-is. Mirrors -// exactly what decode_height_texture() accepts: 8-bit grayscale, or 8-bit colour (whose luminance is -// the height and whose RGB is available to colour the model). Anything else is converted on load. +// True if decode_height_texture() can read these bytes, so they can be stored on a layer as-is. +// Anything else is converted on load. bool is_supported_height_map(const std::vector &bytes) { - if (bytes.empty()) - return false; - const png::ReadBuf rbuf{ bytes.data(), bytes.size() }; - if (!png::is_png(rbuf)) - return false; - png::ImageGreyscale gray; - if (png::decode_png(rbuf, gray) && gray.cols > 0 && gray.rows > 0) - return true; - png::ImageColorscale color; - return png::decode_colored_png(rbuf, color) && color.cols > 0 && color.rows > 0 && - color.bytes_per_pixel >= 3 && - color.buf.size() == color.cols * color.rows * size_t(color.bytes_per_pixel); + return !bytes.empty() && png::is_decodable_8bit_png(png::ReadBuf{ bytes.data(), bytes.size() }); } std::vector g_library; diff --git a/src/slic3r/GUI/TroubleshootDialog.cpp b/src/slic3r/GUI/TroubleshootDialog.cpp index 20ca84d220..82aa4b659c 100644 --- a/src/slic3r/GUI/TroubleshootDialog.cpp +++ b/src/slic3r/GUI/TroubleshootDialog.cpp @@ -74,6 +74,7 @@ #endif #ifdef __LINUX__ +#include "LinuxDisplayBackend.hpp" #include #include #include @@ -201,7 +202,11 @@ TroubleshootDialog::TroubleshootDialog() return std::vector{GetOStype()}; return std::vector{ GetOSinfo(), +#ifdef __LINUX__ + GetPackageType() + GetAppDisplayBackend(), +#else GetPackageType(), +#endif GetCPUinfo(), GetRAMinfo() + " RAM", GetGPUinfo(), @@ -434,10 +439,15 @@ wxString TroubleshootDialog::GetTimestamp() wxString TroubleshootDialog::GetSysInfoAll() { + wxString package = GetPackageType(); +#ifdef __LINUX__ + package += GetAppDisplayBackend(); +#endif + wxString info; info += "Version : " + wxString(SoftFever_VERSION) + "\n" + "Build : " + wxString(build_commit_label) + "\n" - + "Package : " + GetPackageType() + "\n" + + "Package : " + package + "\n" + "Platform : " + GetOSinfo() + "\n" + "Processor : " + GetCPUinfo() + "\n" + "Memory : " + GetRAMinfo() + "RAM" + "\n" @@ -751,6 +761,18 @@ wxString TroubleshootDialog::GetLinuxDisplayServer() return ""; } + +wxString TroubleshootDialog::GetAppDisplayBackend() +{ + // Display backend actually used by the app (GDK), not the session type + wxString display; + switch (get_linux_display_backend()) { + case LinuxDisplayBackend::X11: display = "X11"; break; + case LinuxDisplayBackend::Wayland: display = "Wayland"; break; + default: break; + } + return display.IsEmpty() ? "" : (" (" + display + ")"); // spacing included here to prevent non centered text +} #endif wxString TroubleshootDialog::GetPackageType() diff --git a/src/slic3r/GUI/TroubleshootDialog.hpp b/src/slic3r/GUI/TroubleshootDialog.hpp index f8b1e5fbaa..003e49b8f8 100644 --- a/src/slic3r/GUI/TroubleshootDialog.hpp +++ b/src/slic3r/GUI/TroubleshootDialog.hpp @@ -68,6 +68,7 @@ protected: #elif defined(__LINUX__) wxString GetLinuxDistroName(); wxString GetLinuxDisplayServer(); + wxString GetAppDisplayBackend(); #endif wxString GetPackageType(); wxString GetCPUinfo(); diff --git a/src/slic3r/GUI/Widgets/ComboBox.cpp b/src/slic3r/GUI/Widgets/ComboBox.cpp index 55e261d04d..d58c677205 100644 --- a/src/slic3r/GUI/Widgets/ComboBox.cpp +++ b/src/slic3r/GUI/Widgets/ComboBox.cpp @@ -287,7 +287,7 @@ void ComboBox::DoDeleteOneItem(unsigned int pos) void ComboBox::ForceDropdownOpen() { - if (!IsEnabled()) + if (!IsEnabled() || items.empty()) return; if (!drop_down) { @@ -398,7 +398,7 @@ void ComboBox::mouseDown(wxMouseEvent &event) SetFocus(); if (drop_down) { drop.Hide(); - } else if (drop.HasDismissLongTime()) { + } else if (!items.empty() && drop.HasDismissLongTime()) { // DropDown paints nothing for an empty list drop.autoPosition(); drop_down = true; drop.Popup(&drop); @@ -426,7 +426,7 @@ void ComboBox::keyDown(wxKeyEvent& event) case WXK_SPACE: if (drop_down) { drop.DismissAndNotify(); - } else if (drop.HasDismissLongTime()) { + } else if (!items.empty() && drop.HasDismissLongTime()) { drop.autoPosition(); drop_down = true; drop.Popup(); diff --git a/src/slic3r/GUI/Widgets/TabCtrl.cpp b/src/slic3r/GUI/Widgets/TabCtrl.cpp index 6b970929e5..2135a695e1 100644 --- a/src/slic3r/GUI/Widgets/TabCtrl.cpp +++ b/src/slic3r/GUI/Widgets/TabCtrl.cpp @@ -32,7 +32,7 @@ END_EVENT_TABLE() */ #define TAB_BUTTON_SPACE 2 -#define TAB_BUTTON_PADDING_X 2 +#define TAB_BUTTON_PADDING_X 3 #define TAB_BUTTON_PADDING_Y 2 #define TAB_BUTTON_PADDING TAB_BUTTON_PADDING_X, TAB_BUTTON_PADDING_Y diff --git a/src/slic3r/Utils/MoonrakerPrinterAgent.cpp b/src/slic3r/Utils/MoonrakerPrinterAgent.cpp index 81a25165a2..8494eb5cfd 100644 --- a/src/slic3r/Utils/MoonrakerPrinterAgent.cpp +++ b/src/slic3r/Utils/MoonrakerPrinterAgent.cpp @@ -5,6 +5,7 @@ #include "bambu_networking.hpp" #include "libslic3r/Preset.hpp" #include "libslic3r/PresetBundle.hpp" +#include "libslic3r/Utils.hpp" #include "slic3r/GUI/GUI_App.hpp" #include "slic3r/GUI/I18N.hpp" #include "slic3r/GUI/DeviceManager.hpp" @@ -19,14 +20,19 @@ #include #include #include +#include #include #include +#include +#include #include #include #include #include #include #include +#include +#include #include #include #include @@ -37,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -120,6 +127,31 @@ std::string map_moonraker_state(std::string state) return "IDLE"; } +// Runs one asynchronous operation to completion, because synchronous Beast calls ignore timeouts and cannot be aborted +template +beast::error_code run_until_done(net::io_context& ioc, const std::atomic& stop, Initiate&& initiate) +{ + // An abort that runs before the operation starts finds nothing to cancel + if (stop.load()) { + return net::error::operation_aborted; + } + beast::error_code result; + bool done = false; + initiate([&](beast::error_code ec, auto&&...) { + result = ec; + done = true; + }); + ioc.restart(); + while (!done && ioc.run_one() != 0) {} // run() never returns while the websocket idle timer is armed + return done ? result : beast::error_code{net::error::operation_aborted}; +} + +uint64_t steady_now_ms() +{ + return static_cast( + std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count()); +} + } // namespace namespace Slic3r { @@ -1298,6 +1330,8 @@ bool MoonrakerPrinterAgent::fetch_object_list(const std::string& base_url, } http.timeout_connect(5) .timeout_max(10) + // Gives up once the status stream, the only caller, stops + .on_progress([this](Http::Progress, bool& cancel) { cancel = ws_stop.load(); }) .on_complete([&](std::string body, unsigned status) { if (status == 200) { response_body = body; @@ -1468,19 +1502,47 @@ void MoonrakerPrinterAgent::start_status_stream(const std::string& dev_id, const return; } + std::lock_guard lock(ws_abort_mutex); ws_stop.store(false); - ws_thread = std::thread([this, dev_id, base_url, api_key]() { run_status_stream(dev_id, base_url, api_key); }); + ws_thread = std::thread( + [this, dev_id, base_url, api_key, timings = ws_timings]() { run_status_stream(dev_id, base_url, api_key, timings); }); } void MoonrakerPrinterAgent::stop_status_stream() { - ws_stop.store(true); - if (ws_thread.joinable()) { - ws_thread.join(); + std::thread stopped; + { + std::lock_guard lock(ws_abort_mutex); + ws_stop.store(true); + if (ws_abort) { + ws_abort(); + } + // A callback on the stream thread can stop the stream, which then ends on its own and is joined later, outside connect_mutex + if (ws_thread.get_id() != std::this_thread::get_id()) { + stopped = std::move(ws_thread); + } + } + if (stopped.joinable()) { + stopped.join(); } } -void MoonrakerPrinterAgent::run_status_stream(std::string dev_id, std::string base_url, std::string api_key) +void MoonrakerPrinterAgent::join_stopped_status_stream() +{ + std::thread stopped; + { + std::lock_guard lock(ws_abort_mutex); + // A running stream belongs to a newer connection, so only one that is already stopping is joined + if (ws_stop.load() && ws_thread.get_id() != std::this_thread::get_id()) { + stopped = std::move(ws_thread); + } + } + if (stopped.joinable()) { + stopped.join(); + } +} + +void MoonrakerPrinterAgent::run_status_stream(std::string dev_id, std::string base_url, std::string api_key, StatusStreamTimings timings) { WsEndpoint endpoint; if (!parse_ws_endpoint(base_url, endpoint)) { @@ -1492,25 +1554,108 @@ void MoonrakerPrinterAgent::run_status_stream(std::string dev_id, std::string ba return; } + net::io_context ioc; + net::steady_timer backoff{ioc}; + std::function abort_connection; // Set while a connection attempt runs + const auto run = [&](auto&& initiate) { return run_until_done(ioc, ws_stop, initiate); }; + + // Registered under the lock stop_status_stream() takes, so a stop either finds this abort or has already set ws_stop + { + std::lock_guard lock(ws_abort_mutex); + if (ws_stop.load()) { + return; + } + ws_abort = [&] { + net::post(ioc, [&] { + backoff.cancel(); + if (abort_connection) { + abort_connection(); + } + }); + }; + } + const ScopeGuard clear_abort([this] { + std::lock_guard lock(ws_abort_mutex); + ws_abort = nullptr; + }); + // Reconnection logic ws_reconnect_requested.store(false); // Reset reconnect flag - int retry_count = 0; - const int max_retries = 10; - const int base_delay_ms = 1000; + int retry_count = 0; - while (!ws_stop.load() && retry_count < max_retries) { + while (!ws_stop.load()) { bool connection_lost = false; // Flag to distinguish clean shutdown from unexpected disconnect + tcp::resolver resolver{ioc}; + websocket::stream ws{ioc}; + beast::tcp_stream& stream = beast::get_lowest_layer(ws); + net::steady_timer close_deadline{ioc}; + bool closing = false; + bool deadline_pending = false; + auto last_message = std::chrono::steady_clock::now(); + // Sends a close frame if the websocket is open, and drops the socket when the printer has not answered within timings.close + const auto close_politely = [&](websocket::close_code code) { + if (!ws.is_open() || closing) { + return; + } + closing = true; + deadline_pending = true; + close_deadline.expires_after(timings.close); + close_deadline.async_wait([&](beast::error_code ec) { + deadline_pending = false; + if (!ec) { + beast::error_code ignored; + stream.socket().close(ignored); + } + }); + ws.async_close(code, [&](beast::error_code) { + closing = false; + close_deadline.cancel(); + }); + }; + abort_connection = [&] { + // Beast reports a closing websocket as not open, and dropping its socket would cut off the close frame + if (closing) { + return; + } + if (ws.is_open()) { + close_politely(websocket::close_code::going_away); + } else { + beast::error_code ignored; + stream.socket().close(ignored); + } + }; + const ScopeGuard clear_connection_abort([&] { abort_connection = nullptr; }); + try { - net::io_context ioc; - tcp::resolver resolver{ioc}; - beast::tcp_stream stream{ioc}; + beast::error_code connect_ec = net::error::host_not_found; + for (const auto& entry : resolver.resolve(endpoint.host, endpoint.port)) { + beast::error_code ignored; + stream.socket().close(ignored); // A failed attempt leaves the socket open + stream.expires_after(std::chrono::seconds(5)); + connect_ec = run([&](auto&& handler) { stream.async_connect(entry.endpoint(), handler); }); + if (!connect_ec || ws_stop.load()) { + break; + } + } + if (connect_ec) { + throw beast::system_error{connect_ec}; + } + // Clears the connect deadline, which would otherwise close the socket 5 s after connecting + stream.expires_never(); - stream.expires_after(std::chrono::seconds(10)); - auto const results = resolver.resolve(endpoint.host, endpoint.port); - stream.connect(results); - - websocket::stream ws{std::move(stream)}; + websocket::stream_base::timeout timeouts{}; + timeouts.handshake_timeout = timings.handshake; + timeouts.idle_timeout = timings.idle; + timeouts.keep_alive_pings = true; + ws.set_option(timeouts); + // Beast pings on a fixed schedule, so the heartbeat also checks how long the printer has sent no message + ws.control_callback([&](websocket::frame_type kind, beast::string_view) { + if (kind == websocket::frame_type::pong && !closing && + std::chrono::steady_clock::now() - last_message >= timings.heartbeat) { + send_heartbeat_if_due(dev_id, timings.heartbeat); + } + }); ws.set_option(websocket::stream_base::decorator([&](websocket::request_type& req) { req.set(http::field::user_agent, "OrcaSlicer"); if (!api_key.empty()) { @@ -1522,7 +1667,9 @@ void MoonrakerPrinterAgent::run_status_stream(std::string dev_id, std::string ba if (!endpoint.port.empty() && endpoint.port != "80") { host_header += ":" + endpoint.port; } - ws.handshake(host_header, endpoint.target); + if (const auto ec = run([&](auto&& handler) { ws.async_handshake(host_header, endpoint.target, handler); })) { + throw beast::system_error{ec}; + } ws.text(true); // Send client identification @@ -1534,7 +1681,10 @@ void MoonrakerPrinterAgent::run_status_stream(std::string dev_id, std::string ba identify["params"]["type"] = "agent"; identify["params"]["url"] = "https://github.com/SoftFever/OrcaSlicer"; identify["id"] = 0; - ws.write(net::buffer(identify.dump())); + const std::string identify_payload = identify.dump(); + if (const auto ec = run([&](auto&& handler) { ws.async_write(net::buffer(identify_payload), handler); })) { + throw beast::system_error{ec}; + } std::set subscribe_objects = {"print_stats", "virtual_sdcard"}; std::set available_objects; @@ -1586,28 +1736,17 @@ void MoonrakerPrinterAgent::run_status_stream(std::string dev_id, std::string ba } subscribe["params"]["objects"] = std::move(objects); subscribe["id"] = 1; - ws.write(net::buffer(subscribe.dump())); + const std::string subscribe_payload = subscribe.dump(); + if (const auto ec = run([&](auto&& handler) { ws.async_write(net::buffer(subscribe_payload), handler); })) { + throw beast::system_error{ec}; + } // Read loop while (!ws_stop.load()) { - ws.next_layer().expires_after(std::chrono::seconds(2)); beast::flat_buffer buffer; - beast::error_code ec; - ws.read(buffer, ec); - if (ec == beast::error::timeout) { - const auto now_ms = static_cast( - std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count()); - const auto last_ms = ws_last_emit_ms.load(); - if (last_ms == 0 || now_ms - last_ms >= 10000) { - nlohmann::json message; - { - std::lock_guard lock(payload_mutex); - message = build_print_payload_locked(); - } - dispatch_message(dev_id, message.dump()); - ws_last_emit_ms.store(now_ms); - } - continue; + const auto ec = run([&](auto&& handler) { ws.async_read(buffer, handler); }); + if (ws_stop.load()) { + break; } if (ec == websocket::error::closed) { connection_lost = true; @@ -1618,6 +1757,9 @@ void MoonrakerPrinterAgent::run_status_stream(std::string dev_id, std::string ba connection_lost = true; break; } + last_message = std::chrono::steady_clock::now(); + // A message shows the printer is answering, so the next drop starts the backoff from reconnect_delay + retry_count = 0; handle_ws_message(dev_id, beast::buffers_to_string(buffer.data())); // Check if handle_ws_message triggered reconnection request if (ws_reconnect_requested.exchange(false)) { @@ -1625,20 +1767,18 @@ void MoonrakerPrinterAgent::run_status_stream(std::string dev_id, std::string ba break; } } - - beast::error_code ec; - ws.close(websocket::close_code::normal, ec); - - // Only reset retry count on clean shutdown (not connection_lost) - if (!connection_lost && !ws_stop.load()) { - retry_count = 0; - } - } catch (const std::exception& e) { - BOOST_LOG_TRIVIAL(warning) << "MoonrakerPrinterAgent: websocket disconnected: " << e.what(); + if (!ws_stop.load()) { + BOOST_LOG_TRIVIAL(warning) << "MoonrakerPrinterAgent: websocket disconnected: " << e.what(); + } connection_lost = true; } + close_politely(ws_stop.load() ? websocket::close_code::going_away : websocket::close_code::normal); + ioc.restart(); + // Both handlers refer to this connection, so neither may be left queued for the next one + while ((closing || deadline_pending) && ioc.run_one() != 0) {} + // Exit loop on clean shutdown if (!connection_lost) { break; @@ -1649,17 +1789,13 @@ void MoonrakerPrinterAgent::run_status_stream(std::string dev_id, std::string ba break; } - // Exponential backoff before reconnection - int delay_ms = base_delay_ms * (1 << std::min(retry_count, 5)); - BOOST_LOG_TRIVIAL(info) << "MoonrakerPrinterAgent: Reconnecting in " << delay_ms << "ms (attempt " << (retry_count + 1) << ")"; - std::this_thread::sleep_for(std::chrono::milliseconds(delay_ms)); + // Exponential backoff before reconnection, capped at 32 times reconnect_delay so a printer that comes back is found again + const auto delay = timings.reconnect_delay * (1 << std::min(retry_count, 5)); + BOOST_LOG_TRIVIAL(info) << "MoonrakerPrinterAgent: Reconnecting in " << delay.count() << "ms (attempt " << (retry_count + 1) << ")"; + backoff.expires_after(delay); + run([&](auto&& handler) { backoff.async_wait(handler); }); retry_count++; } - - if (retry_count >= max_retries) { - BOOST_LOG_TRIVIAL(error) << "MoonrakerPrinterAgent: Max reconnection attempts reached"; - dispatch_local_connect(ConnectStatusLost, dev_id, "max_retries"); - } } void MoonrakerPrinterAgent::handle_ws_message(const std::string& dev_id, const std::string& payload) @@ -1733,8 +1869,7 @@ void MoonrakerPrinterAgent::handle_ws_message(const std::string& dev_id, const s } if (updated) { - const auto now_ms = static_cast( - std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count()); + const auto now_ms = steady_now_ms(); const auto last_dispatch_ms = ws_last_dispatch_ms.load(); // Dispatch if: critical change OR throttle interval elapsed @@ -1755,6 +1890,24 @@ void MoonrakerPrinterAgent::handle_ws_message(const std::string& dev_id, const s } } +void MoonrakerPrinterAgent::send_heartbeat_if_due(const std::string& dev_id, std::chrono::milliseconds interval) +{ + const auto now_ms = steady_now_ms(); + const auto last_ms = ws_last_emit_ms.load(); + // Re-sends only a status the printer has reported at least once + if (last_ms == 0 || now_ms - last_ms < static_cast(interval.count())) { + return; + } + + nlohmann::json message; + { + std::lock_guard lock(payload_mutex); + message = build_print_payload_locked(); + } + dispatch_message(dev_id, message.dump()); + ws_last_emit_ms.store(now_ms); +} + void MoonrakerPrinterAgent::update_status_cache(const nlohmann::json& updates) { if (!updates.is_object()) { @@ -2139,8 +2292,15 @@ void MoonrakerPrinterAgent::perform_connection_async(const std::string& dev_id, BOOST_LOG_TRIVIAL(warning) << "MoonrakerPrinterAgent: Initial status query failed: " << error_msg; } - // Start WebSocket status stream - start_status_stream(dev_id, base_url, api_key); + join_stopped_status_stream(); + // Holds connect_mutex across the staleness check and the start, so a disconnect during the queries above prevents the start + { + std::lock_guard lock(connect_mutex); + if (is_stale()) { + return; + } + start_status_stream(dev_id, base_url, api_key); + } #endif // Success! diff --git a/src/slic3r/Utils/MoonrakerPrinterAgent.hpp b/src/slic3r/Utils/MoonrakerPrinterAgent.hpp index 141574b84d..a7edc476e8 100644 --- a/src/slic3r/Utils/MoonrakerPrinterAgent.hpp +++ b/src/slic3r/Utils/MoonrakerPrinterAgent.hpp @@ -5,6 +5,7 @@ #include "bambu_networking.hpp" #include +#include #include #include #include @@ -85,6 +86,16 @@ protected: bool use_ssl = false; } device_info; + // Copied when the stream starts, so changes apply to the next start_status_stream() + struct StatusStreamTimings + { + std::chrono::milliseconds handshake{std::chrono::seconds(10)}; // Opening and closing handshakes + std::chrono::milliseconds close{std::chrono::seconds(1)}; // Wait for the close frame's answer before dropping the socket + std::chrono::milliseconds idle{std::chrono::seconds(30)}; // Silence before giving up, with a ping every half of it + std::chrono::milliseconds heartbeat{std::chrono::seconds(10)}; // Silence before the cached status is sent again + std::chrono::milliseconds reconnect_delay{std::chrono::seconds(1)}; // First wait, doubling per consecutive failure up to 32x + } ws_timings; + // Tray data for AMS payload building struct AmsTrayData { int slot_index = 0; // 0-based slot index @@ -102,6 +113,8 @@ protected: // Methods that derived classes may need to override or access virtual bool init_device_info(const std::string& dev_id, const std::string& dev_ip, const std::string& username, const std::string& password, bool use_ssl, const std::string& port); virtual bool fetch_device_info(const std::string& base_url, const std::string& api_key, MoonrakerDeviceInfo& info, std::string& error) const; + void start_status_stream(const std::string& dev_id, const std::string& base_url, const std::string& api_key); + void stop_status_stream(); // State access for derived classes mutable std::recursive_mutex state_mutex; @@ -133,10 +146,11 @@ private: void dispatch_local_connect(int state, const std::string& dev_id, const std::string& msg); void dispatch_printer_connected(const std::string& dev_id); void dispatch_message(const std::string& dev_id, const std::string& payload); - void start_status_stream(const std::string& dev_id, const std::string& base_url, const std::string& api_key); - void stop_status_stream(); - void run_status_stream(std::string dev_id, std::string base_url, std::string api_key); + // Joins a stream stopped from its own callback, so a new stream can start without waiting on it under connect_mutex + void join_stopped_status_stream(); + void run_status_stream(std::string dev_id, std::string base_url, std::string api_key, StatusStreamTimings timings); void handle_ws_message(const std::string& dev_id, const std::string& payload); + void send_heartbeat_if_due(const std::string& dev_id, std::chrono::milliseconds interval); void update_status_cache(const nlohmann::json& updates); nlohmann::json build_print_payload_locked() const; @@ -196,6 +210,8 @@ private: std::atomic ws_reconnect_requested{false}; // Flag to trigger reconnection std::atomic ws_last_emit_ms{0}; std::thread ws_thread; + std::mutex ws_abort_mutex; // Guards ws_thread and ws_abort + std::function ws_abort; // Interrupts whatever the stream thread is waiting on, from any thread // Throttling configuration for WebSocket updates // Critical changes (state transitions) dispatch immediately; telemetry is throttled diff --git a/src/slic3r/plugin/PluginFsUtils.cpp b/src/slic3r/plugin/PluginFsUtils.cpp index c04b15c26f..1dd8391ad7 100644 --- a/src/slic3r/plugin/PluginFsUtils.cpp +++ b/src/slic3r/plugin/PluginFsUtils.cpp @@ -34,10 +34,6 @@ #include #include -#ifdef WIN32 -#include -#endif - namespace Slic3r { const char* const INSTALL_STATE_FILE = ".install_state.json"; @@ -665,7 +661,7 @@ bool extract_zip_to_directory(const boost::filesystem::path& zip_path, const boo namespace fs = boost::filesystem; boost::system::error_code ec; - fs::create_directories(destination, ec); + fs::create_directories(extended_path(destination), ec); if (ec) { error = "Failed to create plugin staging directory: " + ec.message(); return false; @@ -709,7 +705,7 @@ bool extract_zip_to_directory(const boost::filesystem::path& zip_path, const boo const fs::path output_path = destination / relative_path; if (stat.m_is_directory || mz_zip_reader_is_file_a_directory(&reader.archive, stat.m_file_index)) { - fs::create_directories(output_path, ec); + fs::create_directories(extended_path(output_path), ec); if (ec) { error = "Failed to create plugin zip directory " + output_path.string() + ": " + ec.message(); return false; @@ -717,26 +713,19 @@ bool extract_zip_to_directory(const boost::filesystem::path& zip_path, const boo continue; } - fs::create_directories(output_path.parent_path(), ec); + fs::create_directories(extended_path(output_path.parent_path()), ec); if (ec) { error = "Failed to create plugin zip parent directory " + output_path.parent_path().string() + ": " + ec.message(); return false; } - if (fs::exists(output_path, ec) && fs::is_directory(output_path, ec)) { + if (fs::exists(extended_path(output_path), ec) && fs::is_directory(extended_path(output_path), ec)) { error = "Plugin zip file conflicts with an existing directory: " + output_path.string(); return false; } - const std::string encoded_output_path = encode_path(output_path.string().c_str()); - mz_bool extracted = mz_zip_reader_extract_to_file(&reader.archive, stat.m_file_index, encoded_output_path.c_str(), 0); -#ifdef WIN32 - if (!extracted) { - const std::wstring wide_output_path = boost::locale::conv::utf_to_utf(output_path.generic_string()); - extracted = mz_zip_reader_extract_to_file_w(&reader.archive, stat.m_file_index, wide_output_path.c_str(), 0); - } -#endif - if (!extracted) { + // Shared with the rest of the archive code: long-path capable and binary-safe. + if (!extract_zip_entry_to_file(&reader.archive, stat.m_file_index, output_path)) { error = "Failed to extract plugin zip entry " + relative_key + ": " + MZ_Archive::get_errorstr(mz_zip_get_last_error(&reader.archive)); return false; diff --git a/src/slic3r/plugin/PythonInterpreter.cpp b/src/slic3r/plugin/PythonInterpreter.cpp index 4a08431117..89dc91723c 100644 --- a/src/slic3r/plugin/PythonInterpreter.cpp +++ b/src/slic3r/plugin/PythonInterpreter.cpp @@ -584,6 +584,19 @@ bool PythonInterpreter::initialize() } BOOST_LOG_TRIVIAL(debug) << "Program name set successfully"; + // Keep bytecode out of the Python home. The shipped .pyc files are stale against their + // sources, so a writable install would rewrite them inside the app (breaking a signed + // macOS bundle's seal) and a read-only one would recompile them on every launch. + const std::string pycache_prefix = data_dir() + "/python/pycache"; +#ifdef _WIN32 + status = PyConfig_SetString(&config, &config.pycache_prefix, boost::nowide::widen(pycache_prefix).c_str()); +#else + status = PyConfig_SetBytesString(&config, &config.pycache_prefix, pycache_prefix.c_str()); +#endif + if (PyStatus_Exception(status)) + BOOST_LOG_TRIVIAL(warning) << "Failed to set the Python bytecode cache to " << pycache_prefix << ": " + << (status.err_msg ? status.err_msg : "unknown error"); + // Use pybind11's scoped_interpreter which properly initializes // pybind11 internals for multi-threaded use — raw Py_InitializeFromConfig // does not set up thread state tracking that pybind11 requires. diff --git a/src/slic3r/plugin/host/PluginPages.cpp b/src/slic3r/plugin/host/PluginPages.cpp index cf4ed6a6a8..93bc8e93cd 100644 --- a/src/slic3r/plugin/host/PluginPages.cpp +++ b/src/slic3r/plugin/host/PluginPages.cpp @@ -4,6 +4,7 @@ #include "slic3r/GUI/GUI.hpp" #include "slic3r/GUI/Notebook.hpp" #include "slic3r/GUI/GUI_App.hpp" +#include "slic3r/GUI/MainFrame.hpp" #include "slic3r/GUI/Widgets/Button.hpp" #include "slic3r/GUI/wxExtensions.hpp" #include "slic3r/plugin/PluginManager.hpp" @@ -382,6 +383,7 @@ void PluginPages::relayout() m_parent->SelectPageByName(id_to_reselect); } + const bool overflow_changed = need_overflow != (m_overflow_button != nullptr); if (need_overflow) { if (m_overflow_button == nullptr) { auto* btn = new Button(m_parent->GetBtnsListCtrl(), wxString(L"\u25BE"), wxString(), wxNO_BORDER); @@ -398,6 +400,11 @@ void PluginPages::relayout() m_overflow_button->Destroy(); m_overflow_button = nullptr; } + + // The tab strip changed width; compact the labels again so the side tools stay visible. + if ((!up_to_date || overflow_changed) && !GUI::wxGetApp().is_closing()) + if (GUI::MainFrame* mainframe = GUI::wxGetApp().mainframe) + mainframe->fit_tab_labels(); } void PluginPages::select_page(const PluginCapabilityId& id) diff --git a/tests/data/wipe_tower_temperature_trace_main.txt b/tests/data/wipe_tower_temperature_trace_main.txt index f755008c26..2ff2b4f0a4 100644 --- a/tests/data/wipe_tower_temperature_trace_main.txt +++ b/tests/data/wipe_tower_temperature_trace_main.txt @@ -163,7 +163,7 @@ M109 S240 T0 ; set nozzle temperature and wait for it to be reached ; CP TOOLCHANGE END M104 S240 T1 ; preheat T1 time: 30s lead 30.0s ; CP TOOLCHANGE START -M104 S200 T0 ; set nozzle temperature ;cooldown +M104 S0 T0 ; set nozzle temperature ;cooldown T1 ; change extruder M109 S240 T1 ; set nozzle temperature and wait for it to be reached ; CP TOOLCHANGE END diff --git a/tests/fff_print/test_gcode.cpp b/tests/fff_print/test_gcode.cpp index 07091eddef..cb707ae3d4 100644 --- a/tests/fff_print/test_gcode.cpp +++ b/tests/fff_print/test_gcode.cpp @@ -51,6 +51,44 @@ TEST_CASE("Klipper object labels name each copy without the characters Klipper c } } +// The outline written to EXCLUDE_OBJECT_DEFINE is simplified with exclude_object_tolerance. A larger value must +// leave fewer points, which keeps the exclude-object array small on printers that stall while parsing it. +TEST_CASE("A larger exclude object tolerance writes fewer outline points", "[GCode]") +{ + const auto slice_with_tolerance = [](const std::string &tolerance) { + DynamicPrintConfig config = DynamicPrintConfig::full_print_config(); + config.set_deserialize_strict({{"gcode_flavor", "klipper"}, {"exclude_object", "1"}, + {"exclude_object_tolerance", tolerance}}); + // Default facet angle (2 degrees): 180 hull points, well inside either tolerance. + return Test::slice({make_cylinder(20., 5.)}, config); + }; + // Points of the POLYGON=[[x,y],...] on the first EXCLUDE_OBJECT_DEFINE line. + const auto polygon_points = [](const std::string &gcode) { + const size_t define = gcode.find("EXCLUDE_OBJECT_DEFINE"); + REQUIRE(define != std::string::npos); + const size_t begin = gcode.find("POLYGON=", define); + REQUIRE(begin != std::string::npos); + const std::string polygon = gcode.substr(begin, gcode.find('\n', begin) - begin); + size_t points = 1; + for (size_t pos = polygon.find("],["); pos != std::string::npos; pos = polygon.find("],[", pos + 1)) + ++points; + return points; + }; + + const size_t fine = polygon_points(slice_with_tolerance("0.1")); + const size_t coarse = polygon_points(slice_with_tolerance("0.4")); + INFO("points at 0.1 mm: " << fine << ", at 0.4 mm: " << coarse); + CHECK(coarse >= 4); + CHECK(coarse < fine); +} + +// Existing profiles must keep writing the outlines they wrote when the tolerance was a constant 0.1 mm. +TEST_CASE("The exclude object tolerance defaults to the former fixed 0.1 mm", "[GCode]") +{ + CHECK_THAT(DynamicPrintConfig::full_print_config().opt_float("exclude_object_tolerance"), + Catch::Matchers::WithinAbs(0.1, 1e-9)); +} + // Firmwares read the compatibility header lines (Anycubic's GoKlipper heats the bed with // first_layer_bed_temperature), so they must describe the filament the plate prints, not filament 1. TEST_CASE("The G-code header names the first layer temperatures of the filament the plate prints", "[GCode]") diff --git a/tests/fff_print/test_multifilament.cpp b/tests/fff_print/test_multifilament.cpp index 54a98d2268..b7fccf2890 100644 --- a/tests/fff_print/test_multifilament.cpp +++ b/tests/fff_print/test_multifilament.cpp @@ -1742,3 +1742,112 @@ TEST_CASE("Each filament cools with the fan speeds of its extruder variant", "[M CHECK(gcode.find("; start range high " + std::to_string(range_high) + "\n") != std::string::npos); } } + +TEST_CASE("Shared heater on IMEX printer stays hot until all filaments on it are done", "[MultiFilament]") +{ + DynamicPrintConfig cfg = multifilament_config(7); + cfg.set_deserialize_strict({ + {"ooze_prevention", 1}, + {"preheat_time", 0}, + {"single_extruder_multi_material", 0}, + }); + imex_7x4_printer(cfg); + + const std::string gcode = slice_with_object_overrides({make_cube(20., 20., 10.), make_cube(20., 20., 4.), make_cube(20., 20., 10.)}, + cfg, + {{{"extruder", 1}, {"layer_height", 0.30}}, + {{"extruder", 2}, {"layer_height", 0.15}}, + {{"extruder", 5}}}); + + bool premature_s0_t0 = false; + double current_z = 0.0; + + GCodeReader reader; + reader.parse_buffer(gcode, [&](GCodeReader& /*self*/, const GCodeReader::GCodeLine& line) { + if (line.has_z()) + current_z = line.z(); + + const std::string raw = line.raw(); + if (raw.find("M104 S0 T0") != std::string::npos && raw.find(";cooldown") != std::string::npos) { + if (current_z < 9.0) + premature_s0_t0 = true; + } + }); + + // Filaments 1 and 2 share head 0, and filament 1 prints up to 10mm. + // T0 must not shut down at ~4mm when filament 2 finishes. + CHECK_FALSE(premature_s0_t0); +} + +TEST_CASE("Unused extruder turns off after its final layer on multi-object print", "[MultiFilament]") +{ + const std::string gcode = slice_with_object_overrides( + { make_cube(20., 20., 10.), make_cube(20., 20., 4.) }, + multifilament_config(2, { + { "single_extruder_multi_material", 0 }, + { "ooze_prevention", 1 }, + { "standby_temperature_delta", -40 }, + { "nozzle_temperature", "240,240" }, + }), + { + { { "extruder", 1 }, { "layer_height", 0.20 } }, + { { "extruder", 2 }, { "layer_height", 0.15 } } + }); + + int t1_s0_cooldown_count = 0; + int t0_s0_cooldown_count = 0; + + std::istringstream stream(gcode); + for (std::string line; std::getline(stream, line);) { + if (line.find(";cooldown") != std::string::npos) { + if (line.find("M104 S0 T1") != std::string::npos) + ++t1_s0_cooldown_count; + if (line.find("M104 S0 T0") != std::string::npos) + ++t0_s0_cooldown_count; + } + } + + // T1 (extruder 2, 4mm cube) gets exactly one S0 after its last layer. + // T0 (extruder 1, 10mm cube) never gets S0 mid-print. + CHECK(t1_s0_cooldown_count == 1); + CHECK(t0_s0_cooldown_count == 0); +} + +TEST_CASE("Unused extruder turns off on non-IMEX three-tool print", "[MultiFilament]") +{ + const std::string gcode = slice_with_object_overrides( + { make_cube(20., 20., 4.), make_cube(20., 20., 10.), make_cube(20., 20., 10.) }, + multifilament_config(3, { + { "single_extruder_multi_material", 0 }, + { "ooze_prevention", 1 }, + { "standby_temperature_delta", -40 }, + { "nozzle_temperature", "240,240,240" }, + }), + { + { { "extruder", 1 } }, + { { "extruder", 2 } }, + { { "extruder", 3 } } + }); + + bool premature_s0_t1 = false; + bool premature_s0_t2 = false; + double current_z = 0.0; + + GCodeReader reader; + reader.parse_buffer(gcode, [&](GCodeReader& /*self*/, const GCodeReader::GCodeLine& line) { + if (line.has_z()) + current_z = line.z(); + + const std::string raw = line.raw(); + if (raw.find(";cooldown") != std::string::npos && current_z < 9.0) { + if (raw.find("M104 S0 T1") != std::string::npos) + premature_s0_t1 = true; + if (raw.find("M104 S0 T2") != std::string::npos) + premature_s0_t2 = true; + } + }); + + // T1 and T2 print up to 10mm — neither should get S0 before that. + CHECK_FALSE(premature_s0_t1); + CHECK_FALSE(premature_s0_t2); +} \ No newline at end of file diff --git a/tests/fff_print/test_perimeters.cpp b/tests/fff_print/test_perimeters.cpp index 070912c307..b105cfd832 100644 --- a/tests/fff_print/test_perimeters.cpp +++ b/tests/fff_print/test_perimeters.cpp @@ -22,6 +22,7 @@ #include "libslic3r/ClipperUtils.hpp" #include "libslic3r/ExPolygon.hpp" #include "libslic3r/Point.hpp" +#include "libslic3r/Polygon.hpp" #include "libslic3r/Polyline.hpp" #include #include @@ -994,3 +995,384 @@ TEST_CASE("A hole whose outer wall touches the contour's runs with it", "[Perime CHECK(layers[i].holes_ccw.front() == ccw); } } + +namespace { + +// The outer radius of round_tube(). +const double tube_radius = 11.5; + +// Every setting the tube walls below are measured against. With 0.5mm walls a 1mm tube wall holds only the two +// outer walls, touching, and every further 0.5mm makes room for one more inner wall. +DynamicPrintConfig tube_config(const char *wall_generator, int wall_loops) +{ + DynamicPrintConfig config = DynamicPrintConfig::full_print_config(); + config.set_deserialize_strict({ + { "wall_generator", wall_generator }, + { "wall_loops", wall_loops }, + { "wall_sequence", "inner wall/outer wall" }, + { "wall_direction", "ccw" }, + { "layer_height", 0.2 }, + { "initial_layer_print_height", 0.2 }, + { "nozzle_diameter", "0.4" }, + { "outer_wall_line_width", 0.5 }, + { "inner_wall_line_width", 0.5 }, + { "precise_outer_wall", true }, + { "detect_thin_wall", false }, + { "only_one_wall_top", false }, + { "only_one_wall_first_layer", false }, + { "brim_type", "no_brim" }, + { "detect_overhang_wall", true }, + { "overhang_reverse", false }, + { "overhang_reverse_threshold", "0%" }, + }); + return config; +} + +// A 2mm tall round tube whose wall is `wall` mm thick. +Print &round_tube(Print &print, Model &model, const DynamicPrintConfig &config, double wall) +{ + ModelObject *object = model.add_object(); + object->name = "round_tube.stl"; + object->add_volume(make_cylinder(tube_radius, 2.), ModelVolumeType::MODEL_PART, false); + object->add_volume(make_cylinder(tube_radius - wall, 2.), ModelVolumeType::NEGATIVE_VOLUME, false); + object->add_instance(); + object->ensure_on_bed(); + + print.auto_assign_extruders(object); + print.apply(model, config); + print.validate(); + print.set_status_silent(); + print.process(); + return print; +} + +// The side of the tube wall a wall loop lies on. The centre is the middle of the tube wall, where Arachne lays the +// inner wall both sides share when the tube wall is too narrow for a pair of them. +enum class TubeSide { Contour, Hole, Centre }; + +struct TubeLoop { + TubeSide side; + int inset; + bool ccw; +}; + +// The wall loops of every layer of round_tube() in extrusion order. +std::vector> tube_loops(const Print &print, double wall) +{ + const double centre = tube_radius - 0.5 * wall; + std::vector> out; + for (const Layer *layer : print.objects().front()->layers()) { + const Vec2d axis = get_extents(layer->lslices).center().cast(); + std::vector &loops = out.emplace_back(); + for (const LayerRegion *region : layer->regions()) + for (const ExtrusionEntity *entity : region->perimeters.flatten().entities) { + if (! entity->is_loop()) + continue; + const ExtrusionLoop *loop = static_cast(entity); + const Polygon polygon = loop->polygon(); + double radius = 0.; + for (const Point &p : polygon.points) + radius += unscaled((p.cast() - axis).norm()); + radius /= double(polygon.points.size()); + const TubeSide side = radius > centre + 0.1 ? TubeSide::Contour : radius < centre - 0.1 ? TubeSide::Hole : TubeSide::Centre; + loops.push_back({ side, loop->inset_idx, polygon.is_counter_clockwise() }); + } + } + return out; +} + +// The insets one side of a wall is printed in, given its deepest inset: inside out for Inner/Outer, outside in for +// Outer/Inner, and for Inner/Outer/Inner the third wall onwards inside out, then the outer wall, then the first inner +// wall. Inner/Outer/Inner prints its first layer Inner/Outer, and outside in when there is no third wall. +std::vector wall_sequence_insets(const std::string &wall_sequence, bool first_layer, int deepest) +{ + std::vector insets; + if (wall_sequence == "inner wall/outer wall" || (wall_sequence == "inner-outer-inner wall" && first_layer)) { + for (int inset = deepest; inset >= 0; -- inset) + insets.push_back(inset); + } else if (wall_sequence == "outer wall/inner wall" || deepest < 2) { + for (int inset = 0; inset <= deepest; ++ inset) + insets.push_back(inset); + } else { + for (int inset = deepest; inset >= 2; -- inset) + insets.push_back(inset); + insets.push_back(0); + insets.push_back(1); + } + return insets; +} + +// Whether a wall of round_tube() runs with the contour: all but the walls of the hole, and those too when the hole +// is a thin wall hole, its outer wall touching the contour's with nothing between them. +bool runs_with_contour(const TubeLoop &loop, bool thin_wall_hole) +{ + return loop.side != TubeSide::Hole || thin_wall_hole; +} + +// The insets of the walls on one side of a round_tube() layer, the shared centre line included, in extrusion order. +std::vector side_insets(const std::vector &loops, TubeSide side) +{ + std::vector insets; + for (const TubeLoop &loop : loops) + if (loop.side == side || loop.side == TubeSide::Centre) + insets.push_back(loop.inset); + return insets; +} + +// The walls of a round_tube() layer in extrusion order, as side and inset: "c0 c1 h0 h1" is the contour's outer wall, +// then its first inner wall, then the same for the hole, and "m" marks the wall in the middle both sides share. +std::string wall_order(const std::vector &loops) +{ + std::string out; + for (const TubeLoop &loop : loops) + out += std::string(out.empty() ? "" : " ") + (loop.side == TubeSide::Contour ? "c" : loop.side == TubeSide::Hole ? "h" : "m") + + std::to_string(loop.inset); + return out; +} + +} // namespace + +// Each side of a tube wall prints its walls in the order the wall sequence asks for, from two walls a side up to +// four. The inner wall Arachne lays in the middle of a wall too narrow for a pair of them is an inner wall of both +// sides; Classic fills that middle with gap fill instead, so it has one wall less a side there. +TEST_CASE("Each side of a tube wall prints its walls in the wall sequence order", "[Perimeters]") +{ + struct TubeWall { + double wall; + int wall_loops; + // Walls a side, a shared inner wall included. + int arachne_walls; + int classic_walls; + }; + const TubeWall tube = GENERATE(values({ + { 1.5, 3, 2, 1 }, { 2.0, 2, 2, 2 }, { 2.5, 3, 3, 2 }, { 3.0, 3, 3, 3 }, { 4.0, 4, 4, 4 } })); + const char *wall_generator = GENERATE("classic", "arachne"); + const std::string wall_sequence = GENERATE("inner wall/outer wall", "outer wall/inner wall", "inner-outer-inner wall"); + CAPTURE(tube.wall, tube.wall_loops, wall_generator, wall_sequence); + + DynamicPrintConfig config = tube_config(wall_generator, tube.wall_loops); + config.set_deserialize_strict("wall_sequence", wall_sequence); + Print print; + Model model; + round_tube(print, model, config, tube.wall); + const std::vector> layers = tube_loops(print, tube.wall); + // 2mm at 0.2mm layers. + REQUIRE(layers.size() == 10); + + const int walls = std::string(wall_generator) == "arachne" ? tube.arachne_walls : tube.classic_walls; + for (size_t i = 0; i < layers.size(); ++ i) { + for (const TubeSide side : { TubeSide::Contour, TubeSide::Hole }) { + const bool contour_side = side == TubeSide::Contour; + CAPTURE(i, contour_side); + const std::vector insets = side_insets(layers[i], side); + REQUIRE(int(insets.size()) == walls); + CHECK(insets == wall_sequence_insets(wall_sequence, i == 0, walls - 1)); + } + } +} + +// The outer wall of a thin wall hole touches the contour's with nothing between them. The hole is printed first, so +// the contour leans on it, unless the wall sequence puts the outer walls first. +TEST_CASE("A thin wall hole is printed before the contour unless the outer walls go first", "[Perimeters]") +{ + const char *wall_generator = GENERATE("classic", "arachne"); + const std::string wall_sequence = GENERATE("inner wall/outer wall", "outer wall/inner wall", "inner-outer-inner wall"); + CAPTURE(wall_generator, wall_sequence); + + DynamicPrintConfig config = tube_config(wall_generator, 3); + config.set_deserialize_strict("wall_sequence", wall_sequence); + Print print; + Model model; + round_tube(print, model, config, 1.); + const std::vector> layers = tube_loops(print, 1.); + REQUIRE(layers.size() == 10); + + const TubeSide first = wall_sequence == "outer wall/inner wall" ? TubeSide::Contour : TubeSide::Hole; + for (size_t i = 0; i < layers.size(); ++ i) { + CAPTURE(i); + REQUIRE(layers[i].size() == 2); + REQUIRE(layers[i][0].side != layers[i][1].side); + CHECK(layers[i].front().side == first); + } +} + +// A 1.5mm tube wall leaves Inner/Outer/Inner no third wall to sandwich, only the inner wall Arachne lays in the middle +// for both sides, or Classic's gap fill. Past the first layer it prints the hole first, then the contour, then the +// middle. +TEST_CASE("Inner/Outer/Inner prints the hole of a narrow tube wall first and the middle last", "[Perimeters]") +{ + const char *wall_generator = GENERATE("classic", "arachne"); + CAPTURE(wall_generator); + + DynamicPrintConfig config = tube_config(wall_generator, 3); + config.set_deserialize_strict("wall_sequence", "inner-outer-inner wall"); + Print print; + Model model; + round_tube(print, model, config, 1.5); + const std::vector> layers = tube_loops(print, 1.5); + REQUIRE(layers.size() == 10); + + // Classic's gap fill is not a wall loop, and goes after the walls. + const std::string expected = std::string(wall_generator) == "arachne" ? "h0 c0 m1" : "h0 c0"; + for (size_t i = 1; i < layers.size(); ++ i) { + CAPTURE(i); + CHECK(wall_order(layers[i]) == expected); + } +} + +// The contour's walls run in the wall direction and the hole's against it, except that the walls of a thin wall +// hole run with the contour, as does the inner wall Arachne shares between both sides of a 1.5mm tube wall. +TEST_CASE("Tube walls run in the wall direction and hole walls against it", "[Perimeters]") +{ + const double wall = GENERATE(1.0, 1.5, 2.0, 3.0); + const char *wall_generator = GENERATE("classic", "arachne"); + const std::string wall_direction = GENERATE("ccw", "cw"); + CAPTURE(wall, wall_generator, wall_direction); + + DynamicPrintConfig config = tube_config(wall_generator, 3); + config.set_deserialize_strict("wall_direction", wall_direction); + Print print; + Model model; + round_tube(print, model, config, wall); + const std::vector> layers = tube_loops(print, wall); + REQUIRE(layers.size() == 10); + + const bool thin_wall_hole = wall == 1.; + for (size_t i = 0; i < layers.size(); ++ i) { + CAPTURE(i); + REQUIRE(std::any_of(layers[i].begin(), layers[i].end(), [](const TubeLoop &loop) { return loop.side == TubeSide::Contour; })); + REQUIRE(std::any_of(layers[i].begin(), layers[i].end(), [](const TubeLoop &loop) { return loop.side == TubeSide::Hole; })); + for (const TubeLoop &loop : layers[i]) { + CAPTURE(int(loop.side), loop.inset); + CHECK(loop.ccw == (runs_with_contour(loop, thin_wall_hole) == (wall_direction == "ccw"))); + } + } +} + +// Reverse on even with no threshold reverses every wall of every other layer, or only the inner walls when it is +// restricted to them, and leaves the order of the walls alone. +TEST_CASE("Reverse on even reverses the tube walls of every other layer", "[Perimeters]") +{ + const double wall = GENERATE(1.0, 1.5, 3.0); + const char *wall_generator = GENERATE("classic", "arachne"); + const bool reverse_internal_only = GENERATE(false, true); + CAPTURE(wall, wall_generator, reverse_internal_only); + + auto slice = [&](bool overhang_reverse) { + DynamicPrintConfig config = tube_config(wall_generator, 3); + config.set_deserialize_strict({ + { "overhang_reverse", overhang_reverse }, + { "overhang_reverse_internal_only", reverse_internal_only }, + }); + Print print; + Model model; + round_tube(print, model, config, wall); + return tube_loops(print, wall); + }; + const std::vector> plain = slice(false); + const std::vector> reversed = slice(true); + REQUIRE(plain.size() == 10); + REQUIRE(reversed.size() == plain.size()); + + for (size_t i = 0; i < plain.size(); ++ i) { + CAPTURE(i); + REQUIRE(reversed[i].size() == plain[i].size()); + for (size_t j = 0; j < plain[i].size(); ++ j) { + CAPTURE(j); + CHECK(reversed[i][j].side == plain[i][j].side); + CHECK(reversed[i][j].inset == plain[i][j].inset); + const bool flips = i % 2 == 1 && (! reverse_internal_only || plain[i][j].inset > 0); + CHECK(reversed[i][j].ccw == (plain[i][j].ccw != flips)); + } + } +} + +namespace { + +DynamicPrintConfig brim_tube_config(const char *wall_generator, const std::string &wall_sequence, const char *brim_type, double brim_width) +{ + DynamicPrintConfig config = tube_config(wall_generator, 3); + config.set_deserialize_strict({ + { "wall_sequence", wall_sequence }, + { "brim_type", brim_type }, + { "brim_width", brim_width }, + }); + return config; +} + +} // namespace + +// A brim against the outer walls makes the first layer print them first, whatever the wall sequence, so the brim runs +// straight on into the outer wall: each side of the tube wall outside in, and the contour before a thin wall hole. +// Brims that may leave the outer walls bare keep the wall sequence, and so do the layers above. +TEST_CASE("A brim against the outer walls makes the first layer print them first", "[Perimeters]") +{ + struct Brim { + const char *type; + double width; + bool outer_walls_first; + }; + const Brim brim = GENERATE(values({ + { "no_brim", 5., false }, { "inner_only", 5., false }, { "auto_brim", 5., false }, { "outer_only", 0., false }, + { "outer_only", 5., true }, { "outer_and_inner", 5., true }, { "leading_edge_only", 5., true } })); + const double wall = GENERATE(1.0, 3.0); + const char *wall_generator = GENERATE("classic", "arachne"); + const std::string wall_sequence = GENERATE("inner wall/outer wall", "inner-outer-inner wall"); + CAPTURE(brim.type, brim.width, wall, wall_generator, wall_sequence); + + Print print; + Model model; + round_tube(print, model, brim_tube_config(wall_generator, wall_sequence, brim.type, brim.width), wall); + const std::vector> layers = tube_loops(print, wall); + REQUIRE(layers.size() == 10); + + // The thin wall hole has its outer wall a side, the 3mm tube wall three walls a side. + const size_t walls = wall == 1. ? 1 : 3; + for (const size_t i : { size_t(0), size_t(1) }) { + const bool outer_walls_first = brim.outer_walls_first && i == 0; + for (const TubeSide side : { TubeSide::Contour, TubeSide::Hole }) { + const bool contour_side = side == TubeSide::Contour; + CAPTURE(i, contour_side); + const std::vector insets = side_insets(layers[i], side); + REQUIRE(insets.size() == walls); + CHECK(insets == wall_sequence_insets(outer_walls_first ? "outer wall/inner wall" : wall_sequence, i == 0, int(walls) - 1)); + } + if (wall == 1.) + CHECK(layers[i].front().side == (outer_walls_first ? TubeSide::Contour : TubeSide::Hole)); + } +} + +// Changing the brim of a sliced print regenerates the walls when the first layer's wall order changes with it, so +// the print gets the walls a slice from scratch with the new brim gets. +TEST_CASE("Changing the brim updates the wall order of the first layer", "[Perimeters]") +{ + struct BrimChange { + const char *from_type; + double from_width; + const char *to_type; + double to_width; + }; + const BrimChange change = GENERATE(values({ + { "outer_only", 0., "outer_only", 5. }, { "outer_only", 5., "outer_only", 0. }, + { "no_brim", 5., "outer_and_inner", 5. }, { "outer_and_inner", 5., "inner_only", 5. } })); + const char *wall_generator = GENERATE("classic", "arachne"); + CAPTURE(change.from_type, change.from_width, change.to_type, change.to_width, wall_generator); + + const std::string wall_sequence = "inner wall/outer wall"; + Print print; + Model model; + round_tube(print, model, brim_tube_config(wall_generator, wall_sequence, change.from_type, change.from_width), 3.); + const std::string before = wall_order(tube_loops(print, 3.).front()); + print.apply(model, brim_tube_config(wall_generator, wall_sequence, change.to_type, change.to_width)); + print.process(); + const std::string after = wall_order(tube_loops(print, 3.).front()); + + Print fresh_print; + Model fresh_model; + round_tube(fresh_print, fresh_model, brim_tube_config(wall_generator, wall_sequence, change.to_type, change.to_width), 3.); + const std::string fresh = wall_order(tube_loops(fresh_print, 3.).front()); + + // The change does turn the first layer around. + REQUIRE(before != fresh); + CHECK(after == fresh); +} diff --git a/tests/fff_print/test_print.cpp b/tests/fff_print/test_print.cpp index 33a0c4980b..4b9b6dab86 100644 --- a/tests/fff_print/test_print.cpp +++ b/tests/fff_print/test_print.cpp @@ -835,6 +835,65 @@ TEST_CASE("Custom G-code placeholders are substituted", "[Print]") CHECK(per_layer.find(";Layer:399 ") != std::string::npos); } +// The final print statistics are known only after the whole G-code is generated, yet every custom G-code, +// the file header included, gets the same values as filename_format. +TEST_CASE("Print statistics in custom G-code match the final print statistics", "[Print][Regression]") +{ + const std::string gcode_key = GENERATE(as{}, "file_start_gcode", "machine_start_gcode", "machine_end_gcode"); + // Bambu printers use another tag table and G-code layout. + const bool is_bbl = GENERATE(false, true); + CAPTURE(gcode_key, is_bbl); + + const std::vector number_keys = { "total_weight", "used_filament", "total_cost", "total_wipe_tower_cost", + "total_wipe_tower_filament" }; + const std::vector time_keys = { "print_time", "normal_print_time", "silent_print_time" }; + std::string templ; + for (const std::vector *keys : { &number_keys, &time_keys }) + for (const std::string &key : *keys) + templ += "; stat " + key + "={" + key + "}\n"; + + DynamicPrintConfig config = DynamicPrintConfig::full_print_config(); + config.set_deserialize_strict({ + { gcode_key, templ }, + { "filament_density", "1.25" }, + { "filament_cost", "20" }, + { "time_cost", "2" }, + }); + Print print; + Model model; + init_print({ cube(20) }, print, model, config); + print.is_BBL_printer() = is_bbl; + + std::string gcode; + REQUIRE_NOTHROW(gcode = Slic3r::Test::gcode(print)); + + // Match whole lines only: the config block repeats the template on a single line, and Bambu printers + // write that block before the start G-code. + const std::string lines = "\n" + gcode; + const auto value_of = [&lines](const std::string &key) { + const std::string prefix = "\n; stat " + key + "="; + const size_t start = lines.find(prefix); + REQUIRE(start != std::string::npos); + const size_t begin = start + prefix.size(); + return lines.substr(begin, lines.find('\n', begin) - begin); + }; + // The same statistics filename_format is expanded with. + DynamicConfig stats = print.print_statistics().config(); + // A 20mm cube with filament_density 1.25 weighs something, unlike the running extruded_weight_total in the header. + CHECK(stats.opt_float("total_weight") > 0.); + for (const std::string &key : number_keys) { + CAPTURE(key); + const std::string value = value_of(key); + REQUIRE(value.find('@') == std::string::npos); + // Written with two decimals. + CHECK_THAT(std::stod(value), Catch::Matchers::WithinAbs(stats.opt_float(key), 0.006)); + } + for (const std::string &key : time_keys) { + CAPTURE(key); + CHECK(value_of(key) == stats.opt_string(key)); + } +} + TEST_CASE("export_gcode writes G-code without a result pointer", "[Print][export_gcode]") { Print print; diff --git a/tests/libslic3r/test_3mf.cpp b/tests/libslic3r/test_3mf.cpp index 425c86c0f7..00721b952f 100644 --- a/tests/libslic3r/test_3mf.cpp +++ b/tests/libslic3r/test_3mf.cpp @@ -579,6 +579,28 @@ TEST_CASE("A project whose components reference themselves fails to load", "[3mf REQUIRE_FALSE(loaded); } +TEST_CASE("A project in the 2.4.x layout keeps auto drop off from its build item", "[3mf][Regression]") +{ + // 2.4.x wrote auto_drop on the build item and left it off the object, so the object is re-laid out here. + ScopedTemporaryFile temp(".3mf"); + { + Model model; + ModelObject* object = model.add_object(); + object->add_volume(make_cube(10., 10., 10.)); + object->add_instance(); + object->auto_drop = false; + store_project(model, temp.string(), SaveStrategy::Zip64 | SaveStrategy::Silence); + } + REQUIRE(replace_in_3mf_entry(temp.string(), "model_settings.config", " auto_drop=\"0\"", "")); + REQUIRE(replace_in_3mf_entry(temp.string(), "3dmodel.model", "printable=\"1\"/>", "printable=\"1\" auto_drop=\"0\"/>")); + + ScopedTemporaryDir backup_dir("orca_auto_drop_dst"); + Model model; + REQUIRE(load_project(temp.string(), model, backup_dir)); + REQUIRE(model.objects.size() == 1); + CHECK_FALSE(model.objects.front()->auto_drop); +} + TEST_CASE("An object loads up to the component reference budget and fails past it", "[3mf][Regression]") { // The importer queues at most 100000 component references per object. Every reference besides the diff --git a/tests/libslic3r/test_miniz_extension.cpp b/tests/libslic3r/test_miniz_extension.cpp index 3a10a8eb8e..dfb23c22cb 100644 --- a/tests/libslic3r/test_miniz_extension.cpp +++ b/tests/libslic3r/test_miniz_extension.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -176,6 +177,55 @@ TEST_CASE("Confined extraction writes nothing outside the target for Windows-spe CHECK(list_dir(tmp.path()) == std::vector{"bundle.zip", "cache"}); } +TEST_CASE("Confined extraction writes files under a target path longer than MAX_PATH", "[MinizExtension]") +{ + ScopedTemporaryDir tmp; + const fs::path zip_file = tmp.path() / "bundle.zip"; + // Directory entries are explicit: extract_archive_confined recreates directories only for them. + write_zip(zip_file, {{"vendor/", ""}, {"vendor/machine/", ""}, {"vendor.json", "{\"a\":1}"}, + {"vendor/machine/printer.json", "{\"b\":2}"}}); + + // One 240-char component keeps every name below the NTFS 255 limit while pushing the full + // target path past the 260-char MAX_PATH the Win32 APIs enforce when LongPathsEnabled is off. + const fs::path target = tmp.path() / std::string(240, 'd'); + REQUIRE(target.string().size() > 260); + fs::create_directories(extended_path(target)); + + REQUIRE(extract_archive_confined(zip_file.string(), target.string())); + // Verify through extended-length paths, otherwise the checks themselves are bounded by MAX_PATH. + CHECK(fs::is_directory(extended_path(target / "vendor"))); + CHECK(read_file(extended_path(target / "vendor.json")) == "{\"a\":1}"); + CHECK(read_file(extended_path(target / "vendor" / "machine" / "printer.json")) == "{\"b\":2}"); + + // The temporary dir guard cannot remove a deep tree on Windows, so drop it here. + boost::system::error_code ec; + fs::remove_all(extended_path(target), ec); + CHECK_FALSE(ec); +} + +TEST_CASE("A zip archive under a path longer than MAX_PATH can be written and read", "[MinizExtension]") +{ + ScopedTemporaryDir tmp; + + // Create the long directory with the extended-length path, then exercise the archive + // reader/writer against an archive whose own path is past MAX_PATH. + const fs::path long_dir = tmp.path() / std::string(240, 'z'); + fs::create_directories(extended_path(long_dir)); + const fs::path zip_file = long_dir / "bundle.zip"; + REQUIRE(zip_file.string().size() > 260); + + write_zip(zip_file, {{"vendor.json", "{\"a\":1}"}}); + + const fs::path target = tmp.path() / "out"; + fs::create_directories(target); + REQUIRE(extract_archive_confined(zip_file.string(), target.string())); + CHECK(read_file(target / "vendor.json") == "{\"a\":1}"); + + boost::system::error_code ec; + fs::remove_all(extended_path(long_dir), ec); + CHECK_FALSE(ec); +} + #ifndef _WIN32 TEST_CASE("Confined extraction replaces a symlink at the destination instead of writing through it", "[MinizExtension]") { diff --git a/tests/libslic3r/test_preset_bundle_loading.cpp b/tests/libslic3r/test_preset_bundle_loading.cpp index 47f5c80cca..1b4927f08c 100644 --- a/tests/libslic3r/test_preset_bundle_loading.cpp +++ b/tests/libslic3r/test_preset_bundle_loading.cpp @@ -985,6 +985,37 @@ TEST_CASE("A user filament synced to the cloud and back keeps its values and uns } } +TEST_CASE("A project filament storing one value for a per-variant key applies it to every variant", "[Preset][Bundle][Regression]") +{ + PresetCollection filaments(Preset::TYPE_FILAMENT, Preset::filament_options(), + static_cast(FullPrintConfig::defaults())); + Preset &parent = add_inmemory_preset(filaments, "Parent Filament"); + parent.config.set_key_value("filament_extruder_variant", new ConfigOptionStrings({"Direct Drive Standard", "Direct Drive High Flow"})); + parent.config.set_key_value("adaptive_pressure_advance_model", new ConfigOptionStrings({"parent standard", "parent high flow"})); + parent.config.set_deserialize_strict("pressure_advance", "0.02,0.03"); + parent.is_system = true; + + // A filament saved before these keys became per-variant lists both variants but stores each key once. + const std::string model = "0.025,15.6,5000"; + DynamicPrintConfig config; + config.set_key_value(BBL_JSON_KEY_INHERITS, new ConfigOptionString("Parent Filament")); + config.set_key_value("filament_extruder_variant", new ConfigOptionStrings({"Direct Drive Standard", "Direct Drive High Flow"})); + config.set_key_value("adaptive_pressure_advance_model", new ConfigOptionStrings({model})); + config.set_deserialize_strict("pressure_advance", "0.016"); + auto embedded = std::make_unique(Preset::TYPE_FILAMENT, "Project Filament", false); + embedded->config = std::move(config); + embedded->is_project_embedded = true; + + std::vector project_presets{embedded.get()}; + PresetsConfigSubstitutions substitutions; + filaments.load_project_embedded_presets(project_presets, PRESET_FILAMENT_NAME, substitutions, ForwardCompatibilitySubstitutionRule::Disable); + + const Preset *loaded = filaments.find_preset("Project Filament"); + REQUIRE(loaded != nullptr); + CHECK(loaded->config.option("adaptive_pressure_advance_model")->values == std::vector{model, model}); + check_double_vector(loaded->config.option("pressure_advance")->values, {0.016, 0.016}); +} + TEST_CASE("Repeated loads of a user preset directory produce the same presets", "[Preset][Bundle]") { ScopedTemporaryDir temp_dir; @@ -1188,6 +1219,24 @@ TEST_CASE("find_preset2 auto-matches removed Generic vendor profiles to the libr CHECK(bundle.filaments.find_preset2("BrandX Generic PETG", /*auto_match=*/true) == nullptr); } +TEST_CASE("The selected preset is its own base when its parent is not loaded", "[Preset]") +{ + PresetCollection printers(Preset::TYPE_PRINTER, Preset::printer_options(), + static_cast(FullPrintConfig::defaults())); + add_inmemory_preset(printers, "Printer"); + add_inmemory_preset(printers, "User Printer", "Printer"); + add_inmemory_preset(printers, "Orphan Printer", "Uninstalled Vendor Printer"); + + printers.select_preset_by_name("User Printer", true); + REQUIRE(printers.get_selected_preset_name() == "User Printer"); + CHECK(printers.get_selected_preset_base().name == "Printer"); + + printers.select_preset_by_name("Orphan Printer", true); + REQUIRE(printers.get_selected_preset_name() == "Orphan Printer"); + REQUIRE(printers.get_preset_base(printers.get_selected_preset()) == nullptr); + CHECK(printers.get_selected_preset_base().name == "Orphan Printer"); +} + TEST_CASE("Renamed parent is normalized into a loaded preset's inherits", "[Preset][Rename]") { ScopedTemporaryDir temp_dir; diff --git a/tests/libslic3r/test_utils.cpp b/tests/libslic3r/test_utils.cpp index 49161d5d6c..d87b8e686e 100644 --- a/tests/libslic3r/test_utils.cpp +++ b/tests/libslic3r/test_utils.cpp @@ -521,3 +521,49 @@ TEST_CASE("ascii_iequals compares ASCII letters regardless of case", "[Utils]") CHECK_FALSE(ascii_iequals("[", "{")); CHECK_FALSE(ascii_iequals("@", "`")); } + +TEST_CASE("extended_path turns a Windows path into its long-path form", "[Utils]") { +#ifdef _WIN32 + namespace fs = boost::filesystem; + + SECTION("a normal absolute drive path is prefixed") { + CHECK(extended_path(fs::path(R"(C:\models\model.3mf)")).wstring() == LR"(\\?\C:\models\model.3mf)"); + } + SECTION("separators are made native") { + CHECK(extended_path(fs::path("C:/models/model.3mf")).wstring() == LR"(\\?\C:\models\model.3mf)"); + } + SECTION("dot segments are collapsed before prefixing") { + // The "\\?\" prefix disables Win32 normalisation, so "." and ".." must be gone beforehand. + CHECK(extended_path(fs::path(R"(C:\models\..\model.3mf)")).wstring() == LR"(\\?\C:\model.3mf)"); + } + SECTION("a trailing separator is dropped, not turned into a dot element") { + CHECK(extended_path(fs::path(R"(C:\models\)")).wstring() == LR"(\\?\C:\models)"); + } + SECTION("a UNC path becomes an extended UNC path") { + CHECK(extended_path(fs::path(R"(\\server\share\model.3mf)")).wstring() == LR"(\\?\UNC\server\share\model.3mf)"); + } + SECTION("an already extended path is returned unchanged") { + const fs::path extended(R"(\\?\C:\models\model.3mf)"); + CHECK(extended_path(extended) == extended); + } + SECTION("a device path is returned unchanged") { + const fs::path device(R"(\\.\C:\models\model.3mf)"); + CHECK(extended_path(device) == device); + } + SECTION("a bare device path without a root directory is returned unchanged") { + // Not "absolute" by Boost's rules, so it must be recognized before absolutizing. + const fs::path device(R"(\\.\PhysicalDrive0)"); + CHECK(extended_path(device) == device); + } + SECTION("a relative path is completed against the working directory") { + const fs::path result = extended_path(fs::path("model.3mf")); + CHECK(result.wstring().rfind(L"\\\\?\\", 0) == 0); + CHECK(result.filename() == fs::path("model.3mf")); + } +#else + SECTION("non-Windows returns the path unchanged") { + const boost::filesystem::path p = boost::filesystem::temp_directory_path() / "model.3mf"; + CHECK(extended_path(p) == p); + } +#endif +} diff --git a/tests/slic3rutils/CMakeLists.txt b/tests/slic3rutils/CMakeLists.txt index 9c7d94894d..aba8377d66 100644 --- a/tests/slic3rutils/CMakeLists.txt +++ b/tests/slic3rutils/CMakeLists.txt @@ -7,7 +7,7 @@ add_executable(${_TEST_NAME}_tests test_creality_cfs_match.cpp test_dev_mapping.cpp test_device_access.cpp - test_moonraker_discovery.cpp + test_moonraker_printer_agent.cpp test_network_discovery.cpp test_filament_bitmap_utils.cpp test_colour_picker_field.cpp @@ -48,6 +48,7 @@ add_executable(${_TEST_NAME}_tests test_file_url.cpp test_imgui_wrapper.cpp test_user_manager.cpp + test_sequential_clearance.cpp ../fff_print/test_helpers.cpp ) diff --git a/tests/slic3rutils/test_imgui_wrapper.cpp b/tests/slic3rutils/test_imgui_wrapper.cpp index f24e371cd2..544a3832f5 100644 --- a/tests/slic3rutils/test_imgui_wrapper.cpp +++ b/tests/slic3rutils/test_imgui_wrapper.cpp @@ -1,6 +1,7 @@ -// How ImGuiWrapper turns wx mouse events into ImGui input. ImGuiWrapper lives in libslic3r_gui; this is -// the suite that links it. Same Windows include prologue as test_texture_color_palette.cpp (wx pulls in -// ; keep WIN32_LEAN_AND_MEAN / NOMINMAX ahead of it). +// How ImGuiWrapper turns wx mouse events into ImGui input, and when it reports that ImGui owns a key. +// ImGuiWrapper lives in libslic3r_gui; this is the suite that links it. Same Windows include prologue +// as test_texture_color_palette.cpp (wx pulls in ; keep WIN32_LEAN_AND_MEAN / NOMINMAX +// ahead of it). #ifdef WIN32 #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN @@ -17,12 +18,15 @@ #include #include +#include #include #include "slic3r/GUI/ImGuiWrapper.hpp" +#include "slic3r/GUI/KeyChord.hpp" using Catch::Matchers::WithinAbs; using Slic3r::GUI::ImGuiWrapper; +using Slic3r::GUI::KeyChord; namespace { @@ -41,6 +45,45 @@ float wheel_after(int rotation, wxMouseWheelAxis axis) return ImGui::GetIO().MouseWheel; } +// Runs ImGui frames without OpenGL by building the font atlas on the CPU. +struct ImGuiFrames +{ + ImGuiWrapper imgui; + + ImGuiFrames() + { + imgui.set_display_size(800.f, 600.f); + unsigned char* pixels = nullptr; + int width = 0, height = 0; + ImGui::GetIO().Fonts->GetTexDataAsRGBA32(&pixels, &width, &height); + } + + template void frame(Draw draw) + { + ImGui::NewFrame(); + draw(); + ImGui::EndFrame(); + } + + // SetKeyboardFocusHere() activates the field in the next frame that draws it. + void draw_input(bool focus) + { + ImGui::Begin("window"); + if (focus) + ImGui::SetKeyboardFocusHere(); + ImGui::InputText("##text", text, sizeof(text)); + ImGui::End(); + } + + char text[16] = ""; +}; + +void draw_modal() +{ + if (ImGui::BeginPopupModal("modal")) + ImGui::EndPopup(); +} + } // namespace TEST_CASE("a vertical wheel event steps ImGui's wheel in its own direction", "[ImGuiWrapper]") @@ -59,3 +102,62 @@ TEST_CASE("a wheel event with no rotation or on the horizontal axis does not ste })); CHECK_THAT(wheel_after(rotation, axis), WithinAbs(0.0, 0.0)); } + +TEST_CASE("an InputText counts as active only while it holds the keyboard", "[ImGuiWrapper]") +{ + ImGuiFrames f; + f.frame([&] { f.draw_input(false); }); + CHECK_FALSE(f.imgui.text_input_active()); + + f.frame([&] { f.draw_input(true); }); + f.frame([&] { f.draw_input(false); }); + CHECK(f.imgui.text_input_active()); + + f.frame([] {}); + f.frame([] {}); + CHECK_FALSE(f.imgui.text_input_active()); +} + +TEST_CASE("a modal counts as open from its first frame until a frame no longer draws it", "[ImGuiWrapper]") +{ + ImGuiFrames f; + CHECK_FALSE(f.imgui.modal_popup_open()); + + f.frame([] { + ImGui::OpenPopup("modal"); + draw_modal(); + }); + CHECK(f.imgui.modal_popup_open()); + + // A frame opened by input, before anything is drawn in it. + ImGui::NewFrame(); + CHECK(f.imgui.modal_popup_open()); + draw_modal(); + ImGui::EndFrame(); + CHECK(f.imgui.modal_popup_open()); + + // A frame that no longer draws it, as when its canvas is hidden. + f.frame([] {}); + REQUIRE(ImGui::GetTopMostPopupModal() != nullptr); + CHECK_FALSE(f.imgui.modal_popup_open()); +} + +TEST_CASE("ImGui owns every key under a modal and text-editing keys in an active InputText", "[ImGuiWrapper]") +{ + ImGuiFrames f; + const KeyChord letter{ 'A' }; + const KeyChord save{ 'S', wxMOD_CONTROL }; + CHECK_FALSE(f.imgui.owns_key(letter)); + CHECK_FALSE(f.imgui.owns_key(save)); + + f.frame([&] { f.draw_input(true); }); + f.frame([&] { f.draw_input(false); }); + CHECK(f.imgui.owns_key(letter)); + CHECK_FALSE(f.imgui.owns_key(save)); + + f.frame([] { + ImGui::OpenPopup("modal"); + draw_modal(); + }); + CHECK(f.imgui.owns_key(save)); +} diff --git a/tests/slic3rutils/test_moonraker_discovery.cpp b/tests/slic3rutils/test_moonraker_discovery.cpp deleted file mode 100644 index f4df147225..0000000000 --- a/tests/slic3rutils/test_moonraker_discovery.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include - -#include -#include "slic3r/Utils/MoonrakerPrinterAgent.hpp" - -using namespace Slic3r; - -namespace { - -class DiscoveryAgent : public MoonrakerPrinterAgent -{ -public: - using MoonrakerPrinterAgent::MoonrakerPrinterAgent; - using MoonrakerPrinterAgent::device_info; - mutable unsigned fetch_count = 0; - -protected: - bool fetch_device_info(const std::string&, const std::string&, MoonrakerDeviceInfo& info, std::string&) const override - { - ++fetch_count; - info.dev_name = "Test printer"; - return true; - } -}; - -} // namespace - -TEST_CASE("Moonraker discovery waits for a complete device identity", "[MoonrakerDiscovery]") -{ - DiscoveryAgent agent(""); - unsigned announcements = 0; - nlohmann::json announcement; - agent.set_on_ssdp_msg_fn([&](std::string payload) { - ++announcements; - announcement = nlohmann::json::parse(payload); - }); - - agent.start_discovery(true, false); - REQUIRE(announcements == 0); - REQUIRE(agent.fetch_count == 0); - - agent.device_info.dev_id = "127.0.0.1:7125"; - agent.device_info.dev_ip = agent.device_info.dev_id; - agent.device_info.base_url = "http://127.0.0.1:7125"; - agent.start_discovery(true, false); - REQUIRE(announcements == 1); - REQUIRE(agent.fetch_count == 1); - REQUIRE(announcement.at("dev_id") == agent.device_info.dev_id); - REQUIRE(announcement.at("dev_ip") == agent.device_info.dev_ip); - REQUIRE(announcement.at("dev_name") == "Test printer"); -} diff --git a/tests/slic3rutils/test_moonraker_printer_agent.cpp b/tests/slic3rutils/test_moonraker_printer_agent.cpp new file mode 100644 index 0000000000..d3559cea1f --- /dev/null +++ b/tests/slic3rutils/test_moonraker_printer_agent.cpp @@ -0,0 +1,589 @@ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "slic3r/Utils/IPrinterAgent.hpp" +#include "slic3r/Utils/MoonrakerPrinterAgent.hpp" + +using namespace Slic3r; + +namespace { + +namespace beast = boost::beast; +namespace http = beast::http; +namespace websocket = beast::websocket; +namespace net = boost::asio; +using tcp = net::ip::tcp; +using namespace std::chrono_literals; + +class DiscoveryAgent : public MoonrakerPrinterAgent +{ +public: + using MoonrakerPrinterAgent::MoonrakerPrinterAgent; + using MoonrakerPrinterAgent::device_info; + mutable unsigned fetch_count = 0; + +protected: + bool fetch_device_info(const std::string&, const std::string&, MoonrakerDeviceInfo& info, std::string&) const override + { + ++fetch_count; + info.dev_name = "Test printer"; + return true; + } +}; + +class StreamAgent : public MoonrakerPrinterAgent +{ +public: + using MoonrakerPrinterAgent::MoonrakerPrinterAgent; + using MoonrakerPrinterAgent::start_status_stream; + using MoonrakerPrinterAgent::stop_status_stream; + using MoonrakerPrinterAgent::ws_timings; + +protected: + bool init_device_info( + const std::string& dev_id, const std::string& dev_ip, const std::string&, const std::string&, bool, const std::string& port) override + { + device_info = MoonrakerDeviceInfo{}; + device_info.dev_id = dev_id; + device_info.base_url = "http://" + dev_ip + ":" + port; + return true; + } + + bool fetch_device_info(const std::string&, const std::string&, MoonrakerDeviceInfo& info, std::string&) const override + { + info.dev_name = "Test printer"; + return true; + } +}; + +enum class Behavior { + SilentBeforeHandshake, // Accepts the connection and never answers + Silent, // Completes the upgrade, then never reads or sends + AnswersPings, // Reports a status, then answers pings and sends nothing else + AnswersPingsWithoutStatus, // Answers pings but never reports a status + Chatters, // Reports a status, then answers pings and sends notifications that carry no status + HangsUp, // Reports a status, then closes the websocket + HangsUpWithoutAnswer, // Closes the websocket without sending anything + IgnoresClose, // Reports Klippy disconnected, then never answers the close + StallsObjectList, // Never answers the stream's object list request + StallsStatusQuery, // Never answers HTTP requests until released, then hangs up on them +}; + +class FakePrinter +{ +public: + explicit FakePrinter(Behavior behavior) : m_behavior(behavior) + { + m_accept_thread = std::thread([this] { accept_loop(); }); + } + + ~FakePrinter() + { + release(); + m_stopping = true; + // Wakes the blocking accept. + tcp::socket wake{m_accept_ioc}; + beast::error_code ec; + wake.connect(m_acceptor.local_endpoint(), ec); + m_accept_thread.join(); + for (std::thread& connection : m_connections) + connection.join(); + } + + std::string host() const { return "127.0.0.1"; } + std::string port() const { return std::to_string(m_acceptor.local_endpoint().port()); } + std::string base_url() const { return "http://" + host() + ":" + port(); } + + // A connection is ready once it reaches the state its behavior waits in. + bool wait_for_ready_connections(int count, std::chrono::milliseconds timeout = 10s) + { + std::unique_lock lock(m_mutex); + return m_changed.wait_for(lock, timeout, [&] { return m_ready >= count; }); + } + + bool wait_for_http_requests(int count) + { + std::unique_lock lock(m_mutex); + return m_changed.wait_for(lock, 10s, [&] { return m_http_requests >= count; }); + } + + // Waits until the printer, once released, has hung up on `count` stalled HTTP requests. + bool wait_for_http_hang_ups(int count) + { + std::unique_lock lock(m_mutex); + return m_changed.wait_for(lock, 10s, [&] { return m_http_hung_up >= count; }); + } + + int close_frames() + { + std::lock_guard lock(m_mutex); + return m_close_frames; + } + + // The printer answers a close frame before its own read completes, so the agent's stop can return first. + bool wait_for_close_frames(int count) + { + std::unique_lock lock(m_mutex); + return m_changed.wait_for(lock, 10s, [&] { return m_close_frames >= count; }); + } + + // Hangs up every connection that is waiting. + void release() + { + std::lock_guard lock(m_mutex); + m_released = true; + m_changed.notify_all(); + } + +private: + void accept_loop() + { + for (;;) { + // Each connection gets its own io_context, so a connection that runs one never runs another's handlers. + auto ioc = std::make_unique(); + tcp::socket socket{*ioc}; + beast::error_code ec; + m_acceptor.accept(socket, ec); + if (ec || m_stopping) + return; + m_connections.emplace_back( + [this, ioc = std::move(ioc), socket = std::move(socket)]() mutable { serve(*ioc, std::move(socket)); }); + } + } + + void serve(net::io_context& ioc, tcp::socket socket) + { + if (m_behavior == Behavior::SilentBeforeHandshake) { + mark_ready(); + wait_for_release(); + return; + } + + beast::flat_buffer buffer; + http::request request; + beast::error_code ec; + http::read(socket, buffer, request, ec); + if (ec) + return; + // The agent also queries the printer's status and object list over plain HTTP. + if (!websocket::is_upgrade(request)) { + serve_http(socket, request); + return; + } + + websocket::stream ws{std::move(socket)}; + ws.accept(request, ec); + // Without its object list the stream never sends the subscribe request. + const int requests = m_behavior == Behavior::StallsObjectList ? 1 : 2; + for (int i = 0; i < requests && !ec; ++i) { + beast::flat_buffer message; + ws.read(message, ec); + } + if (!ec && (m_behavior == Behavior::AnswersPings || m_behavior == Behavior::Chatters || m_behavior == Behavior::HangsUp)) { + const std::string status = + nlohmann::json{{"jsonrpc", "2.0"}, {"id", 1}, {"result", {{"status", {{"print_stats", {{"state", "standby"}}}}}}}}.dump(); + ws.write(net::buffer(status), ec); + } + if (ec) + return; + + switch (m_behavior) { + case Behavior::AnswersPings: + case Behavior::AnswersPingsWithoutStatus: + case Behavior::Chatters: + mark_ready(); + answer_pings(ioc, ws, m_behavior == Behavior::Chatters); + break; + case Behavior::HangsUp: + case Behavior::HangsUpWithoutAnswer: + ws.close(websocket::close_code::normal, ec); + mark_ready(); + break; + case Behavior::IgnoresClose: { + const std::string notification = nlohmann::json{{"jsonrpc", "2.0"}, {"method", "notify_klippy_disconnected"}}.dump(); + ws.write(net::buffer(notification), ec); + mark_ready(); + wait_for_release(); + break; + } + case Behavior::StallsObjectList: answer_pings(ioc, ws, false); break; + default: mark_ready(); wait_for_release(); + } + } + + void serve_http(tcp::socket& socket, const http::request& request) + { + { + std::lock_guard lock(m_mutex); + ++m_http_requests; + m_changed.notify_all(); + } + if (m_behavior == Behavior::StallsObjectList) { + mark_ready(); + wait_for_release(); + return; + } + if (m_behavior == Behavior::StallsStatusQuery) { + wait_for_release(); + beast::error_code ec; + socket.close(ec); + std::lock_guard lock(m_mutex); + ++m_http_hung_up; + m_changed.notify_all(); + return; + } + http::response response{http::status::not_found, request.version()}; + response.prepare_payload(); + beast::error_code ec; + http::write(socket, response, ec); + } + + // Keeps a read pending, which answers pings, until released or closed, and with `chatter` also sends a notification every 50 ms. + void answer_pings(net::io_context& ioc, websocket::stream& ws, bool chatter) + { + const std::string notification = nlohmann::json{{"jsonrpc", "2.0"}, + {"method", "notify_proc_stat_update"}, + {"params", nlohmann::json::array({nlohmann::json::object()})}} + .dump(); + beast::flat_buffer message; + bool reading = true; + bool writing = false; + std::function read_next = [&] { + ws.async_read(message, [&](beast::error_code ec, std::size_t) { + message.clear(); + if (ec == websocket::error::closed) { + std::lock_guard lock(m_mutex); + ++m_close_frames; + m_changed.notify_all(); + } + if (ec) + reading = false; + else + read_next(); + }); + }; + read_next(); + + auto next_notification = std::chrono::steady_clock::now(); + while (reading && !wait_for_release(10ms)) { + if (chatter && !writing && std::chrono::steady_clock::now() >= next_notification) { + writing = true; + next_notification += 50ms; + ws.async_write(net::buffer(notification), [&](beast::error_code, std::size_t) { writing = false; }); + } + ioc.restart(); + ioc.run_for(20ms); + } + beast::error_code ignored; + ws.next_layer().close(ignored); + while (reading || writing) { + ioc.restart(); + ioc.run_for(20ms); + } + } + + void mark_ready() + { + std::lock_guard lock(m_mutex); + ++m_ready; + m_changed.notify_all(); + } + + void wait_for_release() + { + std::unique_lock lock(m_mutex); + m_changed.wait(lock, [this] { return m_released; }); + } + + bool wait_for_release(std::chrono::milliseconds timeout) + { + std::unique_lock lock(m_mutex); + return m_changed.wait_for(lock, timeout, [this] { return m_released; }); + } + + const Behavior m_behavior; + net::io_context m_accept_ioc; + tcp::acceptor m_acceptor{m_accept_ioc, {net::ip::make_address("127.0.0.1"), 0}}; + std::atomic m_stopping{false}; + std::thread m_accept_thread; + std::vector m_connections; + std::mutex m_mutex; + std::condition_variable m_changed; + int m_ready = 0; + int m_http_requests = 0; + int m_http_hung_up = 0; + int m_close_frames = 0; + bool m_released = false; +}; + +// Records when the agent dispatches a status report. +class Reports +{ +public: + void attach(StreamAgent& agent) + { + agent.set_on_local_message_fn([this](std::string, std::string) { + std::lock_guard lock(m_mutex); + m_times.push_back(std::chrono::steady_clock::now()); + m_changed.notify_all(); + }); + } + + bool wait_for(std::size_t count) + { + std::unique_lock lock(m_mutex); + return m_changed.wait_for(lock, 10s, [&] { return m_times.size() >= count; }); + } + + std::vector times() + { + std::lock_guard lock(m_mutex); + return m_times; + } + +private: + std::mutex m_mutex; + std::condition_variable m_changed; + std::vector m_times; +}; + +// A printer and a stream agent connected to it. +struct StreamFixture +{ + explicit StreamFixture(Behavior behavior) : printer(behavior) {} + + // Runs before the members are destroyed, so the agent's destructor never joins a stream the printer still holds open. + ~StreamFixture() { printer.release(); } + + void start() { agent.start_status_stream("printer", printer.base_url(), ""); } + + // Stops the stream, giving it `limit` to return before the printer hangs up on it. + bool stops_within(std::chrono::milliseconds limit) + { + auto stopped = std::async(std::launch::async, [this] { agent.stop_status_stream(); }); + const bool in_time = stopped.wait_for(limit) == std::future_status::ready; + printer.release(); + stopped.wait(); + return in_time; + } + + FakePrinter printer; + StreamAgent agent{""}; +}; + +} // namespace + +TEST_CASE("Moonraker discovery waits for a complete device identity", "[MoonrakerPrinterAgent][Discovery]") +{ + DiscoveryAgent agent(""); + unsigned announcements = 0; + nlohmann::json announcement; + agent.set_on_ssdp_msg_fn([&](std::string payload) { + ++announcements; + announcement = nlohmann::json::parse(payload); + }); + + agent.start_discovery(true, false); + REQUIRE(announcements == 0); + REQUIRE(agent.fetch_count == 0); + + agent.device_info.dev_id = "127.0.0.1:7125"; + agent.device_info.dev_ip = agent.device_info.dev_id; + agent.device_info.base_url = "http://127.0.0.1:7125"; + agent.start_discovery(true, false); + REQUIRE(announcements == 1); + REQUIRE(agent.fetch_count == 1); + REQUIRE(announcement.at("dev_id") == agent.device_info.dev_id); + REQUIRE(announcement.at("dev_ip") == agent.device_info.dev_ip); + REQUIRE(announcement.at("dev_name") == "Test printer"); +} + +TEST_CASE("Stopping the status stream gives a silent printer no more than its timeouts", "[MoonrakerPrinterAgent][StatusStream]") +{ + // An open websocket gets the 200 ms close timeout, and a stalled object list request up to 1 s of curl progress to see the stop. + const auto [behavior, limit] = GENERATE(table({ + {Behavior::SilentBeforeHandshake, 500ms}, + {Behavior::Silent, 1000ms}, + {Behavior::StallsObjectList, 2000ms}, + })); + CAPTURE(static_cast(behavior)); + + StreamFixture f(behavior); + f.agent.ws_timings.close = 200ms; + f.start(); + REQUIRE(f.printer.wait_for_ready_connections(1)); + + CHECK(f.stops_within(limit)); +} + +TEST_CASE("Stopping the status stream sends the printer a close frame", "[MoonrakerPrinterAgent][StatusStream]") +{ + // A stop while the stream reads, and one while it waits on the object list request. + const Behavior behavior = GENERATE(Behavior::AnswersPings, Behavior::StallsObjectList); + CAPTURE(static_cast(behavior)); + + StreamFixture f(behavior); + f.start(); + REQUIRE(f.printer.wait_for_ready_connections(1)); + + CHECK(f.stops_within(3s)); + CHECK(f.printer.wait_for_close_frames(1)); + CHECK(f.printer.close_frames() == 1); +} + +TEST_CASE("Stopping the status stream does not wait out the reconnect delay", "[MoonrakerPrinterAgent][StatusStream]") +{ + StreamFixture f(Behavior::HangsUp); + f.agent.ws_timings.reconnect_delay = 10s; + f.start(); + REQUIRE(f.printer.wait_for_ready_connections(1)); + // Lets the stream reach its reconnect wait. + std::this_thread::sleep_for(200ms); + + CHECK(f.stops_within(3s)); +} + +TEST_CASE("The status stream reconnects when the printer stops answering", "[MoonrakerPrinterAgent][StatusStream]") +{ + // An unanswered close ends at whichever of the handshake and close timeouts is shorter. + const auto [behavior, handshake, close] = GENERATE(table({ + {Behavior::Silent, 300ms, 1000ms}, + {Behavior::IgnoresClose, 300ms, 1000ms}, + {Behavior::IgnoresClose, 1000ms, 200ms}, + })); + CAPTURE(static_cast(behavior), handshake.count(), close.count()); + + StreamFixture f(behavior); + f.agent.ws_timings.handshake = handshake; + f.agent.ws_timings.close = close; + f.agent.ws_timings.idle = 400ms; + f.agent.ws_timings.reconnect_delay = 20ms; + f.start(); + + CHECK(f.printer.wait_for_ready_connections(2)); + CHECK(f.stops_within(3s)); +} + +TEST_CASE("The status stream reconnects at the shortest delay while the printer answers", "[MoonrakerPrinterAgent][StatusStream]") +{ + StreamFixture f(Behavior::HangsUp); + f.agent.ws_timings.reconnect_delay = 50ms; + f.start(); + + // Twelve 50 ms waits; a backoff that kept doubling would need over 10 s. + CHECK(f.printer.wait_for_ready_connections(12, 3s)); + CHECK(f.stops_within(3s)); +} + +TEST_CASE("The status stream keeps retrying a printer that never answers", "[MoonrakerPrinterAgent][StatusStream]") +{ + StreamFixture f(Behavior::HangsUpWithoutAnswer); + f.agent.ws_timings.reconnect_delay = 1ms; + f.start(); + + // The backoff stops doubling at 32 ms, so 20 attempts take well under the wait. + CHECK(f.printer.wait_for_ready_connections(20)); + CHECK(f.stops_within(3s)); +} + +TEST_CASE("A callback on the stream thread can stop the status stream", "[MoonrakerPrinterAgent][StatusStream]") +{ + std::promise stopped; + std::once_flag stopped_once; + StreamFixture f(Behavior::AnswersPings); + f.agent.set_on_local_message_fn([&](std::string, std::string) { + std::call_once(stopped_once, [&] { + f.agent.stop_status_stream(); + stopped.set_value(); + }); + }); + f.start(); + + REQUIRE(stopped.get_future().wait_for(5s) == std::future_status::ready); + CHECK(f.stops_within(3s)); +} + +TEST_CASE("A quiet printer that is still up keeps reporting its status", "[MoonrakerPrinterAgent][StatusStream]") +{ + Reports reports; + StreamFixture f(Behavior::AnswersPings); + f.agent.ws_timings.idle = 400ms; + f.agent.ws_timings.heartbeat = 300ms; + reports.attach(f.agent); + f.start(); + + // The status the printer sent, then two heartbeats. + REQUIRE(reports.wait_for(3)); + const auto times = reports.times(); + // The steady clock is compared in whole milliseconds, so allow 1 ms of rounding. + CHECK(times[1] - times[0] >= 299ms); + CHECK(times[2] - times[1] >= 299ms); + CHECK(f.stops_within(3s)); +} + +TEST_CASE("The status stream sends no heartbeat while the printer has nothing new to report", "[MoonrakerPrinterAgent][StatusStream]") +{ + const Behavior behavior = GENERATE(Behavior::Chatters, Behavior::AnswersPingsWithoutStatus); + CAPTURE(static_cast(behavior)); + + Reports reports; + StreamFixture f(behavior); + f.agent.ws_timings.idle = 400ms; + f.agent.ws_timings.heartbeat = 800ms; + reports.attach(f.agent); + f.start(); + REQUIRE(f.printer.wait_for_ready_connections(1)); + + // The chattering printer's status, and nothing from the one that never sent a status. + const std::size_t expected = behavior == Behavior::Chatters ? 1 : 0; + std::this_thread::sleep_for(1500ms); + CHECK(reports.times().size() == expected); + CHECK(f.stops_within(3s)); +} + +TEST_CASE("A disconnect during the connection queries keeps the status stream from starting", "[MoonrakerPrinterAgent][StatusStream]") +{ + StreamFixture f(Behavior::StallsStatusQuery); + PrinterConnectionParams params; + params.dev_id = "printer"; + params.host = f.printer.host(); + params.port = f.printer.port(); + f.agent.connect_printer(params); + REQUIRE(f.printer.wait_for_http_requests(1)); + + f.agent.disconnect_printer(); + f.printer.release(); + // The query has returned once the printer hangs up on it, and a stream would connect right after. + REQUIRE(f.printer.wait_for_http_hang_ups(1)); + CHECK_FALSE(f.printer.wait_for_ready_connections(1, 500ms)); +} diff --git a/tests/slic3rutils/test_orca_cloud_agent.cpp b/tests/slic3rutils/test_orca_cloud_agent.cpp index 99c4180a9a..485b662c0b 100644 --- a/tests/slic3rutils/test_orca_cloud_agent.cpp +++ b/tests/slic3rutils/test_orca_cloud_agent.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include @@ -23,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -196,29 +194,6 @@ private: std::vector> m_connections; }; -// Sets an environment variable for the lifetime of the guard and restores the previous value. -class ScopedEnvVar -{ -public: - ScopedEnvVar(std::string name, const std::string& value) : m_name(std::move(name)) - { - if (const char* old = boost::nowide::getenv(m_name.c_str())) - m_previous = old; - boost::nowide::setenv(m_name.c_str(), value.c_str(), 1); - } - ~ScopedEnvVar() - { - if (m_previous) - boost::nowide::setenv(m_name.c_str(), m_previous->c_str(), 1); - else - boost::nowide::unsetenv(m_name.c_str()); - } - -private: - std::string m_name; - std::optional m_previous; -}; - // What the agent reported through its callbacks, recorded on whichever thread delivers it so the // assertions can run on the test thread. struct CallbackLog diff --git a/tests/slic3rutils/test_plugin_install.cpp b/tests/slic3rutils/test_plugin_install.cpp index 0f3b9a7fcf..ac7f826ed8 100644 --- a/tests/slic3rutils/test_plugin_install.cpp +++ b/tests/slic3rutils/test_plugin_install.cpp @@ -3,6 +3,7 @@ #include #include +#include #include #include #include @@ -10,13 +11,17 @@ #include #include #include +#include "catch2/catch_message.hpp" #include "plugin_test_utils.hpp" +#include "test_utils.hpp" #include #include #include +#include + using namespace Slic3r; namespace fs = boost::filesystem; @@ -31,6 +36,14 @@ fs::path write_py_file(const fs::path& dir, const std::string& filename, const s return p; } +// The shared production helper: makes the path absolute and lexically normalized and, on +// Windows, prefixes it with the extended-length "\\?\" form, so the test can create, verify and +// clean up a tree past MAX_PATH even with LongPathsEnabled off. Identity on other platforms. +fs::path to_extended_path(const fs::path& p) +{ + return Slic3r::extended_path(p); +} + } // namespace TEST_CASE("install_plugin rejects a cloud UUID containing path traversal", "[PluginInstall]") @@ -184,3 +197,59 @@ TEST_CASE("an unsubscribed cloud plugin follows its header version", "[PluginIns REQUIRE(read_install_state(plugin_dir, scanned)); CHECK(scanned.installed_version == "1.0.0"); } + +TEST_CASE("extract_zip_to_directory writes entries under a destination longer than MAX_PATH", + "[PluginInstall][PluginFsUtils]") +{ + ScopedTemporaryDir dir("deep-extract"); + + const fs::path wheel = dir.path() / "deep_pkg-1.0-py3-none-any.whl"; + const std::string payload = "print('hello from a deep path')\n"; + { + Zipper zipper(wheel.string(), Zipper::NO_COMPRESSION); + zipper.add_entry("pkg/", "", 0); // explicit directory entry + zipper.add_entry("pkg/module.py", payload.data(), payload.size()); + zipper.finalize(); + } + + // A single 240-char component keeps every filename below the NTFS 255 limit while pushing the + // full destination (temp dir + component) past the 260-char MAX_PATH the Win32 APIs enforce + // when LongPathsEnabled is off. + const fs::path destination = dir.path() / std::string(240, 'd'); + REQUIRE(destination.string().size() > 260); + + std::string error; + REQUIRE(extract_zip_to_directory(wheel, destination, error)); + INFO("extract error: " << error); + CHECK(error.empty()); + + // Verify through a long-path-capable path, otherwise the check itself is bounded by MAX_PATH. + const fs::path module_py = destination / "pkg" / "module.py"; + REQUIRE(fs::exists(to_extended_path(module_py))); + REQUIRE(fs::is_regular_file(to_extended_path(module_py))); + + // Remove the deep subtree here: ScopedTemporaryDir's plain remove_all cannot reach past + // MAX_PATH on Windows. + boost::system::error_code ec; + fs::remove_all(to_extended_path(destination), ec); + CHECK_FALSE(ec); +} + +TEST_CASE("extract_zip_to_directory rejects an entry that escapes the destination", + "[PluginInstall][PluginFsUtils]") +{ + ScopedTemporaryDir dir("escape-extract"); + + const fs::path wheel = dir.path() / "evil-1.0-py3-none-any.whl"; + { + Zipper zipper(wheel.string(), Zipper::NO_COMPRESSION); + zipper.add_entry("pkg/module.py", "print('ok')\n", 12); + zipper.add_entry("../escape.txt", "escaped\n", 8); + zipper.finalize(); + } + + std::string error; + CHECK_FALSE(extract_zip_to_directory(wheel, dir.path() / "out", error)); + CHECK_THAT(error, Catch::Matchers::ContainsSubstring("escapes the plugin package")); + CHECK_FALSE(fs::exists(dir.path() / "escape.txt")); +} diff --git a/tests/slic3rutils/test_plugin_lifecycle.cpp b/tests/slic3rutils/test_plugin_lifecycle.cpp index 58a4f1a079..0a1a94dcef 100644 --- a/tests/slic3rutils/test_plugin_lifecycle.cpp +++ b/tests/slic3rutils/test_plugin_lifecycle.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -14,8 +15,13 @@ #include #include #include "plugin_test_utils.hpp" +#include "test_utils.hpp" #include +#include +#include +#include +#include #include #include @@ -615,8 +621,22 @@ TEST_CASE("Python module release removes package submodules and owned sys.path", // Ensure the next import executes the new submodule rather than reusing a stale package child. write_package("'new'"); - boost::system::error_code ec; - fs::remove_all(package_root / "__pycache__", ec); + { + // The rewrite can keep the old mtime and size, so drop the bytecode wherever the + // interpreter caches it. + PythonGILState gil; + REQUIRE(gil); + PyObjectPtr util(PyImport_ImportModule("importlib.util")); + REQUIRE(util); + for (const char* file : {"__init__.py", "sub.py"}) { + PyObjectPtr source(PyUnicode_DecodeFSDefault((package_root / file).string().c_str())); + REQUIRE(source); + PyObjectPtr cached(PyObject_CallMethod(util.get(), "cache_from_source", "O", source.get())); + REQUIRE(cached); + boost::system::error_code ec; + fs::remove(fs::path(PyUnicode_AsUTF8(cached.get())), ec); + } + } paths.clear(); modules.clear(); @@ -1054,3 +1074,43 @@ TEST_CASE("Unloading a plugin that is not loaded is a no-op", "[PluginLifecycle] CHECK(manager.unload_plugin("No_Such_Plugin")); CHECK_FALSE(manager.is_plugin_loaded("No_Such_Plugin")); } + +namespace { + +// CA certificates in the default client context, as a plugin's urllib or http.client request would +// verify against. +int default_context_ca_count() +{ + pybind11::gil_scoped_acquire gil; + const pybind11::dict stats = pybind11::module_::import("ssl").attr("create_default_context")().attr("cert_store_stats")(); + return stats["x509_ca"].cast(); +} + +} // namespace + +TEST_CASE("The bundled Python trusts the system CA certificates", "[PluginLifecycle][Python]") +{ + // The app runs this before plugins load; on Linux it is what points OpenSSL at the distro bundle. + Http::tls_global_init(); + ScopedPluginManager plugin_system; + if (!plugin_system.initialized) + SKIP("Bundled Python interpreter unavailable: " + PythonInterpreter::instance().last_error()); + + CHECK(default_context_ca_count() > 0); +} + +#ifndef _WIN32 // Windows adds its system store whatever SSL_CERT_FILE names. +TEST_CASE("SSL_CERT_FILE still overrides the bundled Python's default CA certificates", "[PluginLifecycle][Python]") +{ + // Existing but empty: Linux's CurlGlobalInit replaces an SSL_CERT_FILE that names a missing file. + ScopedTemporaryFile empty_bundle(".pem"); + std::ofstream(empty_bundle.string()).close(); + ScopedEnvVar ssl_cert_file{"SSL_CERT_FILE", empty_bundle.string()}; + + ScopedPluginManager plugin_system; + if (!plugin_system.initialized) + SKIP("Bundled Python interpreter unavailable: " + PythonInterpreter::instance().last_error()); + + CHECK(default_context_ca_count() == 0); +} +#endif diff --git a/tests/slic3rutils/test_sequential_clearance.cpp b/tests/slic3rutils/test_sequential_clearance.cpp new file mode 100644 index 0000000000..8068212a32 --- /dev/null +++ b/tests/slic3rutils/test_sequential_clearance.cpp @@ -0,0 +1,162 @@ +#include +#include +#include + +#include "catch2/matchers/catch_matchers.hpp" +#include "fff_print/test_helpers.hpp" +#include "slic3r/GUI/SequentialPrintClearance.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace Slic3r; +using namespace Slic3r::GUI; +using Catch::Matchers::WithinAbs; + +namespace { + +SequentialClearanceInstance instance(coord_t x, coord_t y, double height) +{ + return {height, BoundingBox(Point(x, y), Point(x + 5, y + 10)), + Polygon{Point(x, y), Point(x + 5, y), Point(x + 5, y + 10), Point(x, y + 10)}}; +} + +} // namespace + +TEST_CASE("Sequential clearance preserves model print order when objects move", "[SequentialClearance][Regression]") +{ + const coord_t last_y = GENERATE(-20, 20); + std::vector instances{instance(20, 0, 50.), instance(0, last_y, 50.)}; + const auto warnings = sequential_clearance_height_polygons(instances, 200., 30., 10.); + + REQUIRE(warnings.size() == 1); + CHECK(warnings.front().first == instance(20, 0, 50.).hull_polygon); + CHECK_THAT(warnings.front().second, WithinAbs(30., 1e-6)); +} + +TEST_CASE("Sequential clearance handles chains of overlapping Y ranges", "[SequentialClearance][Regression]") +{ + // A overlaps B, B overlaps C, but A does not overlap C. Combining X order + // for overlaps with Y order otherwise formed the cycle B < A < C < B. + std::vector instances{ + instance(20, 0, 50.), instance(10, 8, 50.), instance(0, 16, 50.)}; + const auto warnings = sequential_clearance_height_polygons(instances, 200., 30., 10.); + + REQUIRE(warnings.size() == 2); + CHECK(warnings[0].first == instance(20, 0, 50.).hull_polygon); + CHECK(warnings[1].first == instance(10, 8, 50.).hull_polygon); + CHECK_THAT(warnings[0].second, WithinAbs(10., 1e-6)); + CHECK_THAT(warnings[1].second, WithinAbs(10., 1e-6)); +} + +TEST_CASE("Sequential clearance applies rod height only to positive Y overlap", "[SequentialClearance]") +{ + const coord_t next_y = GENERATE(9, 10, 11); + std::vector instances{instance(0, 0, 50.), instance(20, next_y, 50.)}; + const auto warnings = sequential_clearance_height_polygons(instances, 200., 30., 10.); + + REQUIRE(warnings.size() == 1); + CHECK(warnings.front().first == instances.front().hull_polygon); + CHECK_THAT(warnings.front().second, WithinAbs(next_y < 10 ? 10. : 30., 1e-6)); +} + +TEST_CASE("Sequential clearance allows the last object up to printable height", "[SequentialClearance]") +{ + std::vector instances; + CHECK(sequential_clearance_height_polygons(instances, 200., 30., 10.).empty()); + + instances.push_back(instance(0, 0, 200.)); + CHECK(sequential_clearance_height_polygons(instances, 200., 30., 10.).empty()); + + instances.front().instance_height = 201.; + const auto warnings = sequential_clearance_height_polygons(instances, 200., 30., 10.); + REQUIRE(warnings.size() == 1); + CHECK_THAT(warnings.front().second, WithinAbs(200., 1e-6)); +} + +TEST_CASE("Sequential clearance warns the same rotated copy as print validation", "[SequentialClearance][Regression]") +{ + constexpr double rod_height = 10.; + constexpr double lid_height = 30.; + constexpr double printable_height = 200.; + Model model = Test::model("rotated copies", make_cube(10., 10., 50.)); + ModelObject* object = model.objects.front(); + object->instances.front()->set_offset(Vec3d(150., 80., 0.)); + ModelInstance* rotated = object->add_instance(); + rotated->set_offset(Vec3d(50., 80., 0.)); + rotated->set_rotation(Z, PI / 2.); + + DynamicPrintConfig config = DynamicPrintConfig::full_print_config(); + config.set_deserialize_strict({{"print_sequence", "by object"}, {"extruder_clearance_radius", 20.}, + {"extruder_clearance_height_to_lid", lid_height}, {"extruder_clearance_height_to_rod", rod_height}, + {"printable_height", printable_height}}); + Print print; + print.auto_assign_extruders(object); + print.apply(model, config); + Polygons polygons; + std::vector> validation_warnings; + Print::sequential_print_clearance_valid(print, &polygons, &validation_warnings); + + std::map print_order; + for (const PrintObject* print_object : print.objects()) + for (const PrintInstance& print_instance : print_object->instances()) + print_order.emplace(print_instance.model_instance->id(), print_instance.model_instance->arrange_order); + + std::vector instances; + for (size_t i = 0; i < object->instances.size(); ++i) { + Polygon hull = object->convex_hull_2d(object->instances[i]->get_matrix()); + instances.push_back({object->get_instance_max_z(i), hull.bounding_box(), hull, object->instances[i]->id()}); + } + const Polygon expected_warning = instances[1].hull_polygon; + REQUIRE(validation_warnings.size() == 1); + CHECK(validation_warnings.front().first.bounding_box().contains(instances[1].bounding_box.center())); + CHECK_FALSE(validation_warnings.front().first.bounding_box().contains(instances[0].bounding_box.center())); + + sort_sequential_clearance_instances(instances.begin(), instances.end(), print_order); + const auto warnings = sequential_clearance_height_polygons(instances, printable_height, lid_height, rod_height); + REQUIRE(warnings.size() == 1); + CHECK(warnings.front().first == expected_warning); + CHECK_THAT(warnings.front().second, WithinAbs(rod_height, 1e-6)); +} + +TEST_CASE("Sequential clearance keeps copy order when print order is unavailable", "[SequentialClearance]") +{ + std::vector instances{instance(20, 0, 50.), instance(0, 0, 50.)}; + instances[0].instance_id = ObjectID(1); + instances[1].instance_id = ObjectID(2); + std::map print_order{{ObjectID(1), 2}, {ObjectID(2), 1}}; + + SECTION("No validation order") { print_order.clear(); } + SECTION("New copy missing from print") { print_order.erase(ObjectID(2)); } + SECTION("Copy has not been ordered") { print_order[ObjectID(2)] = 0; } + SECTION("Copy has an invalid order") { print_order[ObjectID(2)] = -1; } + + sort_sequential_clearance_instances(instances.begin(), instances.end(), print_order); + CHECK(instances[0].instance_id == ObjectID(1)); + CHECK(instances[1].instance_id == ObjectID(2)); +} + +TEST_CASE("Sequential clearance keeps object order when sorting copies", "[SequentialClearance]") +{ + std::vector instances(4, instance(0, 0, 50.)); + for (size_t i = 0; i < instances.size(); ++i) + instances[i].instance_id = ObjectID(instances.size() - i); + const std::map print_order{{ObjectID(1), 1}, {ObjectID(2), 2}, {ObjectID(3), 3}, {ObjectID(4), 4}}; + + // The two objects were reordered in the model since the last validation. + sort_sequential_clearance_instances(instances.begin(), instances.begin() + 2, print_order); + sort_sequential_clearance_instances(instances.begin() + 2, instances.end(), print_order); + CHECK(instances[0].instance_id == ObjectID(3)); + CHECK(instances[1].instance_id == ObjectID(4)); + CHECK(instances[2].instance_id == ObjectID(1)); + CHECK(instances[3].instance_id == ObjectID(2)); +} diff --git a/tests/slic3rutils/test_shortcuts.cpp b/tests/slic3rutils/test_shortcuts.cpp index 5e6b61ea58..f143e6371d 100644 --- a/tests/slic3rutils/test_shortcuts.cpp +++ b/tests/slic3rutils/test_shortcuts.cpp @@ -126,6 +126,55 @@ TEST_CASE("Only modified or non-printable chords qualify as menu accelerators", CHECK(registry.accelerator(Shortcut::KeyboardShortcuts).empty()); } +TEST_CASE("Typing, caret, deletion and clipboard chords edit text", "[Shortcuts]") +{ + CHECK(KeyChord{ 'A' }.edits_text()); + CHECK(KeyChord{ 'A', wxMOD_SHIFT }.edits_text()); + CHECK(KeyChord{ WXK_SPACE }.edits_text()); + CHECK(KeyChord{ WXK_BACK }.edits_text()); + CHECK(KeyChord{ WXK_DELETE }.edits_text()); + CHECK(KeyChord{ WXK_BACK, wxMOD_CONTROL }.edits_text()); + CHECK(KeyChord{ WXK_LEFT, wxMOD_SHIFT }.edits_text()); + CHECK(KeyChord{ WXK_RIGHT, wxMOD_CONTROL | wxMOD_SHIFT }.edits_text()); + CHECK(KeyChord{ WXK_HOME }.edits_text()); + CHECK(KeyChord{ WXK_END, wxMOD_CONTROL }.edits_text()); + CHECK(KeyChord{ WXK_DELETE, wxMOD_SHIFT }.edits_text()); + CHECK(KeyChord{ WXK_INSERT }.edits_text()); + CHECK(KeyChord{ WXK_INSERT, wxMOD_SHIFT }.edits_text()); + CHECK(KeyChord{ WXK_INSERT, wxMOD_CONTROL }.edits_text()); + CHECK(KeyChord{ WXK_PAGEUP, wxMOD_SHIFT }.edits_text()); + CHECK(KeyChord{ WXK_RETURN }.edits_text()); + CHECK(KeyChord{ WXK_TAB, wxMOD_SHIFT }.edits_text()); + CHECK(KeyChord{ WXK_ESCAPE }.edits_text()); + CHECK(KeyChord{ WXK_PAGEDOWN }.edits_text()); + for (int key : { 'A', 'C', 'V', 'X', 'Y', 'Z' }) + CHECK(KeyChord{ key, wxMOD_CONTROL }.edits_text()); + CHECK(KeyChord{ 'Z', wxMOD_CONTROL | wxMOD_SHIFT }.edits_text()); + + CHECK_FALSE(KeyChord{ WXK_TAB, wxMOD_CONTROL }.edits_text()); + CHECK_FALSE(KeyChord{ WXK_RETURN, wxMOD_CONTROL }.edits_text()); + CHECK_FALSE(KeyChord{ WXK_PAGEDOWN, wxMOD_CONTROL }.edits_text()); + CHECK_FALSE(KeyChord{ WXK_ESCAPE, wxMOD_CONTROL }.edits_text()); + CHECK_FALSE(KeyChord{ 'S', wxMOD_CONTROL }.edits_text()); + CHECK_FALSE(KeyChord{ 'S', wxMOD_CONTROL | wxMOD_SHIFT }.edits_text()); + CHECK_FALSE(KeyChord{ '0', wxMOD_CONTROL }.edits_text()); + CHECK_FALSE(KeyChord{ WXK_F5 }.edits_text()); + CHECK_FALSE(KeyChord{}.edits_text()); +#ifdef __APPLE__ + CHECK(KeyChord{ 'E', wxMOD_ALT }.edits_text()); + CHECK(KeyChord{ 'K', wxMOD_RAW_CONTROL }.edits_text()); + CHECK(KeyChord{ WXK_LEFT, wxMOD_ALT }.edits_text()); + CHECK(KeyChord{ WXK_LEFT, wxMOD_CONTROL }.edits_text()); + CHECK_FALSE(KeyChord{ WXK_LEFT, wxMOD_RAW_CONTROL }.edits_text()); + CHECK_FALSE(KeyChord{ 'E', wxMOD_CONTROL | wxMOD_ALT }.edits_text()); +#else + CHECK(KeyChord{ 'Q', wxMOD_CONTROL | wxMOD_ALT }.edits_text()); + CHECK_FALSE(KeyChord{ 'E', wxMOD_ALT }.edits_text()); + CHECK_FALSE(KeyChord{ WXK_LEFT, wxMOD_ALT }.edits_text()); + CHECK_FALSE(KeyChord{ WXK_LEFT, wxMOD_CONTROL | wxMOD_ALT }.edits_text()); +#endif +} + TEST_CASE("Chords the desktop keeps for itself are recognized", "[Shortcuts]") { #ifdef _WIN32 @@ -187,6 +236,21 @@ TEST_CASE("Default bindings never collide inside a context", "[Shortcuts]") } } +TEST_CASE("No default Global binding except the Speed Dial's Space edits text", "[Shortcuts]") +{ + ShortcutRegistry registry; + size_t checked = 0; + for (size_t i = 0; i < size_t(Shortcut::Count); ++i) { + const ShortcutInfo& info = shortcut_info(Shortcut(i)); + if ((info.contexts & context_bit(ShortcutContext::Global)) == 0 || info.id == Shortcut::SpeedDial) + continue; + CAPTURE(info.key); + CHECK_FALSE(registry.binding(info.id).edits_text()); + ++checked; + } + CHECK(checked > 0); +} + TEST_CASE("Shift and Ctrl variants of stepping shortcuts are left unbound", "[Shortcuts]") { ShortcutRegistry registry; diff --git a/tests/test_utils.hpp b/tests/test_utils.hpp index d0817ce128..cffa05cb15 100644 --- a/tests/test_utils.hpp +++ b/tests/test_utils.hpp @@ -10,10 +10,13 @@ #include #include +#include #include #include +#include #include +#include #if defined(WIN32) || defined(_WIN32) #define PATH_SEPARATOR R"(\)" @@ -197,4 +200,27 @@ private: boost::filesystem::path m_previous; }; +// Sets an environment variable for the lifetime of the guard and restores the previous value. +class ScopedEnvVar +{ +public: + ScopedEnvVar(std::string name, const std::string& value) : m_name(std::move(name)) + { + if (const char* old = boost::nowide::getenv(m_name.c_str())) + m_previous = old; + boost::nowide::setenv(m_name.c_str(), value.c_str(), 1); + } + ~ScopedEnvVar() + { + if (m_previous) + boost::nowide::setenv(m_name.c_str(), m_previous->c_str(), 1); + else + boost::nowide::unsetenv(m_name.c_str()); + } + +private: + std::string m_name; + std::optional m_previous; +}; + #endif // SLIC3R_TEST_UTILS