mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-23 17:02:39 +00:00
Compare commits
20
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b205a8559e | ||
|
|
0335d76d30 | ||
|
|
3e56d25f64 | ||
|
|
4c149b69eb | ||
|
|
57cb60e20f | ||
|
|
8ffe84b1dd | ||
|
|
f4268a0eec | ||
|
|
17e2adc283 | ||
|
|
d87f7e462c | ||
|
|
617df79260 | ||
|
|
0a6a42ecb5 | ||
|
|
762e474433 | ||
|
|
115d6dde46 | ||
|
|
9da2975424 | ||
|
|
7b3228d10d | ||
|
|
2de58e557b | ||
|
|
514ab02525 | ||
|
|
d7688a27d0 | ||
|
|
c2965a1336 | ||
|
|
a587859e84 |
@@ -14,6 +14,7 @@ on:
|
||||
- 'resources/**'
|
||||
- ".github/workflows/build_*.yml"
|
||||
- 'scripts/flatpak/**'
|
||||
- 'snap/**'
|
||||
- 'scripts/msix/**'
|
||||
- 'tests/**'
|
||||
|
||||
@@ -32,6 +33,7 @@ on:
|
||||
- 'build_release_vs2022.bat'
|
||||
- 'build_release_macos.sh'
|
||||
- 'scripts/flatpak/**'
|
||||
- 'snap/**'
|
||||
- 'scripts/msix/**'
|
||||
- 'tests/**'
|
||||
|
||||
@@ -55,11 +57,23 @@ jobs:
|
||||
build_linux:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
# Build both arches on every event (PRs included), through the same
|
||||
# build_check_cache -> build_deps -> build_orca chain (AppImage + snap).
|
||||
# aarch64 always uses the GitHub-hosted arm runner (there is no arm
|
||||
# self-hosted server). amd64's empty arch is load-bearing: it keeps the
|
||||
# historical 'linux-clang' deps cache key and the unsuffixed asset names.
|
||||
matrix:
|
||||
include:
|
||||
- arch: ""
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-lnx-server' || 'ubuntu-24.04' }}
|
||||
- arch: "aarch64"
|
||||
os: ubuntu-24.04-arm
|
||||
# Don't run scheduled builds on forks:
|
||||
if: ${{ !cancelled() && (github.event_name != 'schedule' || github.repository == 'OrcaSlicer/OrcaSlicer') }}
|
||||
uses: ./.github/workflows/build_check_cache.yml
|
||||
with:
|
||||
os: ${{ vars.SELF_HOSTED && 'orca-lnx-server' || 'ubuntu-24.04' }}
|
||||
os: ${{ matrix.os }}
|
||||
arch: ${{ matrix.arch }}
|
||||
build-deps-only: ${{ inputs.build-deps-only || false }}
|
||||
secrets: inherit
|
||||
build_windows:
|
||||
@@ -99,7 +113,9 @@ jobs:
|
||||
secrets: inherit
|
||||
unit_tests:
|
||||
name: Unit Tests
|
||||
runs-on: ${{ vars.SELF_HOSTED && 'orca-lnx-server' || 'ubuntu-24.04' }}
|
||||
# Tests are built on the aarch64 leg by default (faster GitHub arm runner),
|
||||
# so run them there; self-hosted builds them on the amd64 server instead.
|
||||
runs-on: ${{ vars.SELF_HOSTED && 'orca-lnx-server' || 'ubuntu-24.04-arm' }}
|
||||
needs: build_linux
|
||||
if: ${{ !cancelled() && success() }}
|
||||
steps:
|
||||
@@ -237,4 +253,3 @@ jobs:
|
||||
asset_name: OrcaSlicer-Linux-flatpak_nightly_${{ matrix.variant.arch }}.flatpak
|
||||
asset_content_type: application/octet-stream
|
||||
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
|
||||
|
||||
|
||||
@@ -33,8 +33,10 @@ jobs:
|
||||
- name: set outputs
|
||||
id: set_outputs
|
||||
env:
|
||||
# Keep macOS cache keys and paths architecture-specific.
|
||||
cache-os: ${{ runner.os == 'macOS' && format('macos-{0}', inputs.arch) || (runner.os == 'Windows' && 'windows' || 'linux-clang') }}
|
||||
# Keep macOS/Linux cache keys architecture-specific. amd64 Linux passes
|
||||
# no arch (key stays 'linux-clang', preserving the existing cache);
|
||||
# aarch64 gets its own 'linux-clang-aarch64' key.
|
||||
cache-os: ${{ runner.os == 'macOS' && format('macos-{0}', inputs.arch) || (runner.os == 'Windows' && 'windows' || format('linux-clang{0}', inputs.arch && format('-{0}', inputs.arch) || '')) }}
|
||||
dep-folder-name: ${{ runner.os == 'macOS' && format('/{0}', inputs.arch) || '/OrcaSlicer_dep' }}
|
||||
output-cmd: ${{ runner.os == 'Windows' && '$env:GITHUB_OUTPUT' || '"$GITHUB_OUTPUT"'}}
|
||||
run: |
|
||||
|
||||
@@ -65,6 +65,15 @@ jobs:
|
||||
echo "ver_pure=$ver_pure" >> $GITHUB_ENV
|
||||
echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
|
||||
echo "git_commit_hash=$git_commit_hash" >> $GITHUB_ENV
|
||||
# Per-arch Linux naming, computed once: amd64 keeps the historical
|
||||
# unsuffixed names (arch_suffix empty); snap_arch is snapcraft's token.
|
||||
# Unused on macOS/Windows.
|
||||
if [ '${{ inputs.arch }}' = 'aarch64' ]; then
|
||||
echo "arch_suffix=_aarch64" >> $GITHUB_ENV
|
||||
echo "snap_arch=arm64" >> $GITHUB_ENV
|
||||
else
|
||||
echo "snap_arch=amd64" >> $GITHUB_ENV
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Get the version and date on Windows
|
||||
@@ -153,14 +162,6 @@ jobs:
|
||||
run: |
|
||||
./build_release_macos.sh -u -x ${{ !vars.SELF_HOSTED && '-1' || '' }} -a universal -t 10.15
|
||||
|
||||
- name: Delete intermediate per-arch artifacts
|
||||
if: runner.os == 'macOS' && inputs.macos-combine-only
|
||||
uses: geekyeggo/delete-artifact@v6
|
||||
with:
|
||||
name: |
|
||||
OrcaSlicer_Mac_bundle_arm64_${{ github.sha }}
|
||||
OrcaSlicer_Mac_bundle_x86_64_${{ github.sha }}
|
||||
|
||||
# Thanks to RaySajuuk, it's working now
|
||||
- name: Sign app and notary
|
||||
if: github.repository == 'OrcaSlicer/OrcaSlicer' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) && runner.os == 'macOS' && inputs.macos-combine-only
|
||||
@@ -171,6 +172,8 @@ jobs:
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||
CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }}
|
||||
run: |
|
||||
# Load the `retry` helper (retries flaky commands such as `hdiutil create`).
|
||||
source ${{ github.workspace }}/scripts/retry.sh
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
|
||||
@@ -193,7 +196,7 @@ jobs:
|
||||
rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/*
|
||||
cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer.app ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/
|
||||
ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/Applications
|
||||
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_dmg -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
retry hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_dmg -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
|
||||
# Create separate OrcaSlicer_profile_validator DMG if the app exists
|
||||
@@ -202,7 +205,7 @@ jobs:
|
||||
rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/*
|
||||
cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/
|
||||
ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/Applications
|
||||
hdiutil create -volname "OrcaSlicer Profile Validator" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg -ov -format UDZO OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
retry hdiutil create -volname "OrcaSlicer Profile Validator" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg -ov -format UDZO OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
fi
|
||||
|
||||
@@ -220,11 +223,13 @@ jobs:
|
||||
if: github.ref != 'refs/heads/main' && runner.os == 'macOS' && inputs.macos-combine-only
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
# Load the `retry` helper (retries flaky commands such as `hdiutil create`).
|
||||
source ${{ github.workspace }}/scripts/retry.sh
|
||||
mkdir -p ${{ github.workspace }}/build/universal/OrcaSlicer_dmg
|
||||
rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/*
|
||||
cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer.app ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/
|
||||
ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_dmg/Applications
|
||||
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_dmg -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
retry hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_dmg -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
|
||||
|
||||
# Create separate OrcaSlicer_profile_validator DMG if the app exists
|
||||
if [ -f "${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app/Contents/MacOS/OrcaSlicer_profile_validator" ]; then
|
||||
@@ -232,9 +237,19 @@ jobs:
|
||||
rm -rf ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/*
|
||||
cp -R ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer_profile_validator.app ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/
|
||||
ln -sfn /Applications ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg/Applications
|
||||
hdiutil create -volname "OrcaSlicer Profile Validator" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg -ov -format UDZO OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
retry hdiutil create -volname "OrcaSlicer Profile Validator" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer_profile_validator_dmg -ov -format UDZO OrcaSlicer_profile_validator_Mac_universal_${{ env.ver }}.dmg
|
||||
fi
|
||||
|
||||
# Delete the per-arch bundles only after signing/DMG creation succeeded, so a
|
||||
# failed run keeps them available for a re-run instead of forcing a full rebuild.
|
||||
- name: Delete intermediate per-arch artifacts
|
||||
if: success() && runner.os == 'macOS' && inputs.macos-combine-only
|
||||
uses: geekyeggo/delete-artifact@v6
|
||||
with:
|
||||
name: |
|
||||
OrcaSlicer_Mac_bundle_arm64_${{ github.sha }}
|
||||
OrcaSlicer_Mac_bundle_x86_64_${{ github.sha }}
|
||||
|
||||
- name: Upload artifacts mac
|
||||
if: runner.os == 'macOS' && inputs.macos-combine-only
|
||||
uses: actions/upload-artifact@v7
|
||||
@@ -401,16 +416,54 @@ jobs:
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
./build_linux.sh -istrlL
|
||||
# Build + tar the unit tests (-t) only on the leg that runs them: the
|
||||
# aarch64 leg by default (faster GitHub arm runner), or amd64 when using
|
||||
# self-hosted runners (no arm self-hosted server). unit_tests downloads
|
||||
# this tarball. The profile validator is built with -s, so amd64 keeps it.
|
||||
tests=${{ (!vars.SELF_HOSTED && inputs.arch == 'aarch64') || (vars.SELF_HOSTED && inputs.arch != 'aarch64') }}
|
||||
if $tests; then flags=-istrlL; else flags=-isrlL; fi
|
||||
./build_linux.sh "$flags"
|
||||
./scripts/check_appimage_libs.sh ./build/package ./build/package/bin/orca-slicer
|
||||
mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
||||
chmod +x ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
||||
tar -cvpf build_tests.tar build/tests
|
||||
appimage=./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}${{ env.arch_suffix }}_${{ env.ver }}.AppImage
|
||||
mv -n ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage "$appimage"
|
||||
chmod +x "$appimage"
|
||||
if $tests; then tar -cvpf build_tests.tar build/tests; fi
|
||||
|
||||
# Build the snap right here, reusing the AppDir we just produced
|
||||
# (build/package): the compiled binary + bundled libs + resources are
|
||||
# repackaged as-is, for both amd64 and aarch64. Skipped on PRs (snapcraft
|
||||
# adds several minutes per arch). The snap is Store-only; it is never
|
||||
# attached to a GitHub release.
|
||||
- name: Free disk space for snap build
|
||||
if: runner.os == 'Linux' && !vars.SELF_HOSTED && github.event_name != 'pull_request'
|
||||
run: sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /opt/hostedtoolcache || true
|
||||
- name: Build snap
|
||||
if: runner.os == 'Linux' && !vars.SELF_HOSTED && github.event_name != 'pull_request'
|
||||
id: snapbuild
|
||||
uses: snapcore/action-build@v1
|
||||
- name: Upload snap artifact
|
||||
if: ${{ ! env.ACT && runner.os == 'Linux' && !vars.SELF_HOSTED && github.event_name != 'pull_request' }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer-Linux-snap_${{ env.ver }}_${{ env.snap_arch }}.snap
|
||||
path: ${{ steps.snapbuild.outputs.snap }}
|
||||
retention-days: 5
|
||||
if-no-files-found: error
|
||||
# Nightly -> Snap Store 'edge'. NOTE: classic confinement means the Store
|
||||
# holds uploads for manual review until classic is granted (snap/README.md).
|
||||
- name: Publish snap to edge (nightly)
|
||||
if: github.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED
|
||||
uses: snapcore/action-publish@v1
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
|
||||
with:
|
||||
snap: ${{ steps.snapbuild.outputs.snap }}
|
||||
release: edge
|
||||
|
||||
# Use tar because upload-artifacts won't always preserve directory structure
|
||||
# and doesn't preserve file permissions
|
||||
- name: Upload Test Artifact
|
||||
if: runner.os == 'Linux'
|
||||
if: runner.os == 'Linux' && ((!vars.SELF_HOSTED && inputs.arch == 'aarch64') || (vars.SELF_HOSTED && inputs.arch != 'aarch64'))
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ${{ github.sha }}-tests
|
||||
@@ -420,7 +473,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Run external slicer regression tests
|
||||
if: runner.os == 'Linux'
|
||||
if: runner.os == 'Linux' && inputs.arch != 'aarch64'
|
||||
timeout-minutes: 20
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -430,7 +483,7 @@ jobs:
|
||||
python3 "$test_repo_dir/run_test.py" "${{ github.workspace }}/build/package/bin/orca-slicer"
|
||||
|
||||
- name: Build orca_custom_preset_tests
|
||||
if: github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED
|
||||
if: github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED && inputs.arch != 'aarch64'
|
||||
working-directory: ${{ github.workspace }}/build/src/Release
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -442,11 +495,11 @@ jobs:
|
||||
if: ${{ ! env.ACT && runner.os == 'Linux' }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_Linux_ubuntu_${{ env.ubuntu-ver }}_${{ env.ver }}
|
||||
path: './build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage'
|
||||
name: OrcaSlicer_Linux_ubuntu_${{ env.ubuntu-ver }}${{ env.arch_suffix }}_${{ env.ver }}
|
||||
path: "./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}${{ env.arch_suffix }}_${{ env.ver }}.AppImage"
|
||||
|
||||
- name: Upload OrcaSlicer_profile_validator Ubuntu
|
||||
if: ${{ ! env.ACT && runner.os == 'Linux' && !vars.SELF_HOSTED }}
|
||||
if: ${{ ! env.ACT && runner.os == 'Linux' && !vars.SELF_HOSTED && inputs.arch != 'aarch64' }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: OrcaSlicer_profile_validator_Linux_ubuntu_${{ env.ubuntu-ver }}_${{ env.ver }}
|
||||
@@ -458,12 +511,12 @@ jobs:
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
release_id: 137995723
|
||||
asset_path: ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_${{ env.ver }}.AppImage
|
||||
asset_name: OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}_nightly.AppImage
|
||||
asset_path: ./build/OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}${{ env.arch_suffix }}_${{ env.ver }}.AppImage
|
||||
asset_name: OrcaSlicer_Linux_AppImage${{ env.ubuntu-ver-str }}${{ env.arch_suffix }}_nightly.AppImage
|
||||
asset_content_type: application/octet-stream
|
||||
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
|
||||
- name: Deploy Ubuntu release
|
||||
if: ${{ github.repository == 'OrcaSlicer/OrcaSlicer' && ! env.ACT && github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED }}
|
||||
if: ${{ github.repository == 'OrcaSlicer/OrcaSlicer' && ! env.ACT && github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED && inputs.arch != 'aarch64' }}
|
||||
uses: rickstaa/action-create-tag@v1
|
||||
with:
|
||||
tag: "nightly-builds"
|
||||
@@ -472,7 +525,7 @@ jobs:
|
||||
message: "nightly-builds"
|
||||
|
||||
- name: Deploy Ubuntu OrcaSlicer_profile_validator release
|
||||
if: ${{ github.repository == 'OrcaSlicer/OrcaSlicer' && ! env.ACT && github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED }}
|
||||
if: ${{ github.repository == 'OrcaSlicer/OrcaSlicer' && ! env.ACT && github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED && inputs.arch != 'aarch64' }}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
@@ -483,7 +536,7 @@ jobs:
|
||||
max_releases: 1
|
||||
|
||||
- name: Deploy orca_custom_preset_tests
|
||||
if: ${{ github.repository == 'OrcaSlicer/OrcaSlicer' && ! env.ACT && github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED }}
|
||||
if: ${{ github.repository == 'OrcaSlicer/OrcaSlicer' && ! env.ACT && github.ref == 'refs/heads/main' && runner.os == 'Linux' && !vars.SELF_HOSTED && inputs.arch != 'aarch64' }}
|
||||
uses: WebFreak001/deploy-nightly@v3.2.0
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label}
|
||||
|
||||
@@ -79,6 +79,7 @@ jobs:
|
||||
-p 'OrcaSlicer_Mac_universal_*' \
|
||||
-p 'OrcaSlicer_Linux_ubuntu_*' \
|
||||
-p 'OrcaSlicer-Linux-flatpak_*' \
|
||||
-p 'OrcaSlicer-Linux-snap_*' \
|
||||
-p 'PDB'
|
||||
echo "Downloaded artifact folders:"
|
||||
ls -1 artifacts
|
||||
@@ -101,6 +102,9 @@ jobs:
|
||||
find artifacts -type f -name '*.AppImage' -exec cp -v {} upload/ \;
|
||||
# Flatpak bundles (x86_64 + aarch64).
|
||||
find artifacts -type f -name '*.flatpak' -exec cp -v {} upload/ \;
|
||||
# Snaps are intentionally NOT copied here: they go to the Snap Store
|
||||
# only (see the "Publish snaps to the Snap Store" step), not to the
|
||||
# GitHub release.
|
||||
# Windows debug symbols (PDB archive, for developers).
|
||||
find artifacts -type f -name 'Debug_PDB_*.7z' -exec cp -v {} upload/ \;
|
||||
|
||||
@@ -126,3 +130,30 @@ jobs:
|
||||
gh release upload "$TAG" upload/* --repo "$GITHUB_REPOSITORY" --clobber
|
||||
echo "Uploaded to draft release: $TAG"
|
||||
gh release view "$TAG" --repo "$GITHUB_REPOSITORY" --json assets --jq '.assets[].name'
|
||||
|
||||
- name: Publish snaps to the Snap Store
|
||||
# Snaps ship to the Store only (not as release assets). Channel comes from
|
||||
# the tag suffix; nightly -> edge is handled in the build workflows.
|
||||
# NOTE: classic confinement means the Store holds uploads for manual
|
||||
# review until classic is granted (see snap/README.md).
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mapfile -t snaps < <(find artifacts -type f -name '*.snap')
|
||||
if [ ${#snaps[@]} -eq 0 ]; then
|
||||
echo "::warning::No .snap artifacts in run $RUN_ID; skipping Snap Store publish."
|
||||
exit 0
|
||||
fi
|
||||
case "$TAG" in
|
||||
*-rc*) channel=candidate ;;
|
||||
*-beta*|*-alpha*) channel=beta ;;
|
||||
*) channel=stable ;;
|
||||
esac
|
||||
echo "Releasing $TAG to Snap Store channel: $channel"
|
||||
sudo snap install snapcraft --classic
|
||||
for s in "${snaps[@]}"; do
|
||||
echo "::group::snapcraft upload $s --release=$channel"
|
||||
snapcraft upload "$s" --release="$channel"
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
||||
@@ -159,8 +159,32 @@ flatpak run com.orcaslicer.OrcaSlicer
|
||||
|
||||
It can also be installed through graphical software managers (KDE Discover, GNOME Software, etc.) when Flathub is enabled. Search for **OrcaSlicer** in your software center.
|
||||
|
||||
### Snap Store
|
||||
|
||||
OrcaSlicer is available from the Snap Store:
|
||||
|
||||
[](https://snapcraft.io/orcaslicer)
|
||||
|
||||
```shell
|
||||
sudo snap install orcaslicer --classic
|
||||
```
|
||||
|
||||
Use a different channel for pre-releases or bleeding-edge builds:
|
||||
|
||||
```shell
|
||||
sudo snap install orcaslicer --classic --candidate # release candidates (vX.Y.Z-rc)
|
||||
sudo snap install orcaslicer --classic --beta # alpha / beta pre-releases
|
||||
sudo snap install orcaslicer --classic --edge # nightly builds
|
||||
```
|
||||
|
||||
The snap uses classic confinement, so it has full hardware and filesystem access just like the
|
||||
AppImage — including USB/serial printers, removable media, network shares, and 3D mice
|
||||
(3Dconnexion SpaceMouse via `spacenavd`). No extra setup is required after install.
|
||||
|
||||
### AppImage
|
||||
|
||||
AppImages are published for both **x86_64** and **aarch64** (ARM64). Pick the file matching your CPU — the ARM64 build has `aarch64` in its name (e.g. `OrcaSlicer_Linux_AppImage_Ubuntu2404_aarch64_*.AppImage`).
|
||||
|
||||
1. Download App image from the [releases page](https://github.com/OrcaSlicer/OrcaSlicer/releases).
|
||||
2. Double click the downloaded file to run it.
|
||||
|
||||
|
||||
Vendored
+6
@@ -10,7 +10,13 @@ if (APPLE AND CMAKE_OSX_ARCHITECTURES)
|
||||
set(_context_arch_line "-DBOOST_CONTEXT_ARCHITECTURE:STRING=${CMAKE_OSX_ARCHITECTURES}")
|
||||
endif ()
|
||||
|
||||
set(_options "")
|
||||
if (MSVC AND DEP_DEBUG)
|
||||
set(_options "FORWARD_CONFIG")
|
||||
endif ()
|
||||
|
||||
orcaslicer_add_cmake_project(Boost
|
||||
${_options}
|
||||
URL "https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.gz"
|
||||
URL_HASH SHA256=4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95
|
||||
LIST_SEPARATOR |
|
||||
|
||||
Vendored
+14
-6
@@ -155,17 +155,25 @@ if (NOT _is_multi AND NOT CMAKE_BUILD_TYPE)
|
||||
endif ()
|
||||
|
||||
function(orcaslicer_add_cmake_project projectname)
|
||||
cmake_parse_arguments(P_ARGS "" "INSTALL_DIR;BUILD_COMMAND;INSTALL_COMMAND" "CMAKE_ARGS" ${ARGN})
|
||||
cmake_parse_arguments(P_ARGS "FORWARD_CONFIG" "INSTALL_DIR;BUILD_COMMAND;INSTALL_COMMAND" "CMAKE_ARGS" ${ARGN})
|
||||
|
||||
set(_configs_line -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE})
|
||||
if (_is_multi OR MSVC)
|
||||
if (ORCA_INCLUDE_DEBUG_INFO AND NOT DEP_DEBUG)
|
||||
if (P_ARGS_FORWARD_CONFIG)
|
||||
set(_configs_line -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE})
|
||||
elseif (ORCA_INCLUDE_DEBUG_INFO AND NOT DEP_DEBUG)
|
||||
set(_configs_line "-DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELWITHDEBINFO} -DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
||||
else ()
|
||||
set(_configs_line "")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (P_ARGS_FORWARD_CONFIG)
|
||||
set(_target_config "$<CONFIG>")
|
||||
else()
|
||||
set(_target_config "Release")
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
set(_gen CMAKE_GENERATOR "${DEP_MSVC_GEN}" CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}")
|
||||
else()
|
||||
@@ -208,8 +216,8 @@ if (NOT IS_CROSS_COMPILE OR NOT APPLE)
|
||||
${DEP_CMAKE_OPTS}
|
||||
${P_ARGS_CMAKE_ARGS}
|
||||
${P_ARGS_UNPARSED_ARGUMENTS}
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config Release -- ${_build_j}
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config Release
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config ${_target_config} -- ${_build_j}
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config ${_target_config}
|
||||
)
|
||||
|
||||
if (FLATPAK)
|
||||
@@ -251,8 +259,8 @@ else()
|
||||
${DEP_CMAKE_OPTS}
|
||||
${P_ARGS_CMAKE_ARGS}
|
||||
${P_ARGS_UNPARSED_ARGUMENTS}
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config Release -- ${_build_j}
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config Release
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config ${_target_config} -- ${_build_j}
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config ${_target_config}
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
Vendored
+6
@@ -1,4 +1,10 @@
|
||||
set(_options "")
|
||||
if (MSVC AND DEP_DEBUG)
|
||||
set(_options "FORWARD_CONFIG")
|
||||
endif ()
|
||||
|
||||
orcaslicer_add_cmake_project(Draco
|
||||
${_options}
|
||||
URL https://github.com/google/draco/archive/refs/tags/1.5.7.zip
|
||||
URL_HASH SHA256=27b72ba2d5ff3d0a9814ad40d4cb88f8dc89a35491c0866d952473f8f9416b77
|
||||
)
|
||||
Vendored
+5
@@ -1,7 +1,11 @@
|
||||
if (MSVC)
|
||||
set(_use_IPP "-DWITH_IPP=ON")
|
||||
if (DEP_DEBUG)
|
||||
set(_options "FORWARD_CONFIG")
|
||||
endif ()
|
||||
else ()
|
||||
set(_use_IPP "-DWITH_IPP=OFF")
|
||||
set(_options "")
|
||||
endif ()
|
||||
|
||||
if (IN_GIT_REPO)
|
||||
@@ -9,6 +13,7 @@ if (IN_GIT_REPO)
|
||||
endif ()
|
||||
|
||||
orcaslicer_add_cmake_project(OpenCV
|
||||
${_options}
|
||||
URL https://github.com/opencv/opencv/archive/refs/tags/4.6.0.tar.gz
|
||||
URL_HASH SHA256=1ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277
|
||||
PATCH_COMMAND git apply ${OpenCV_DIRECTORY_FLAG} --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-vs.patch ${CMAKE_CURRENT_LIST_DIR}/0002-clang19-macos.patch
|
||||
|
||||
@@ -1123,18 +1123,17 @@ private:
|
||||
|
||||
std::vector<RawShape> objs,excludes;
|
||||
for (const Item &item : items_) {
|
||||
if (item.isFixed()) continue;
|
||||
objs.push_back(item.transformedShape());
|
||||
if (item.isFixed())
|
||||
excludes.push_back(item.transformedShape());
|
||||
else
|
||||
objs.push_back(item.transformedShape());
|
||||
}
|
||||
if (objs.empty())
|
||||
return;
|
||||
// Without fixed items this inner-fit NFP can exceed clipper's range and crash MSVC.
|
||||
if (!excludes.empty())
|
||||
{ // find a best position inside NFP of fixed items (excluded regions), so the center of pile is cloest to bed center
|
||||
RawShape objs_convex_hull = sl::convexHull(objs);
|
||||
for (const Item &item : items_) {
|
||||
if (item.isFixed()) {
|
||||
excludes.push_back(item.transformedShape());
|
||||
}
|
||||
}
|
||||
|
||||
auto nfps = calcnfp(objs_convex_hull, excludes, bbin, Lvl<MaxNfpLevel::value>());
|
||||
if (nfps.empty()) {
|
||||
|
||||
+1425
-3814
File diff suppressed because it is too large
Load Diff
+3651
-8981
File diff suppressed because it is too large
Load Diff
+3183
-7275
File diff suppressed because it is too large
Load Diff
+4109
-10474
File diff suppressed because it is too large
Load Diff
+1870
-4999
File diff suppressed because it is too large
Load Diff
+4055
-10592
File diff suppressed because it is too large
Load Diff
+3737
-10721
File diff suppressed because it is too large
Load Diff
+3357
-8239
File diff suppressed because it is too large
Load Diff
+3801
-9738
File diff suppressed because it is too large
Load Diff
+2769
-6157
File diff suppressed because it is too large
Load Diff
+3199
-7327
File diff suppressed because it is too large
Load Diff
+3910
-9024
File diff suppressed because it is too large
Load Diff
+4430
-9875
File diff suppressed because it is too large
Load Diff
+3666
-8954
File diff suppressed because it is too large
Load Diff
+3534
-9038
File diff suppressed because it is too large
Load Diff
+3460
-8330
File diff suppressed because it is too large
Load Diff
+4527
-9730
File diff suppressed because it is too large
Load Diff
+1275
-1049
File diff suppressed because it is too large
Load Diff
+3254
-7772
File diff suppressed because it is too large
Load Diff
+3120
-7276
File diff suppressed because it is too large
Load Diff
+3694
-8092
File diff suppressed because it is too large
Load Diff
+2546
-5469
File diff suppressed because it is too large
Load Diff
+2495
-5396
File diff suppressed because it is too large
Load Diff
@@ -146,16 +146,16 @@ text = Fine-tuning for flow rate\nDid you know that flow rate can be fine-tuned
|
||||
text = Split your prints into plates\nDid you know that you can split a model that has a lot of parts into individual plates ready to print? This will simplify the process of keeping track of all the parts.
|
||||
|
||||
[hint:Speed up your print with Adaptive Layer Height]
|
||||
text = Speed up your print with Adaptive Layer Height\nDid you know that you can print a model even faster, by using the Adaptive Layer Height option? Check it out!
|
||||
text = Speed up your print with Adaptive Layer Height\nDid you know that you can print a model even faster by using the Adaptive Layer Height option? Check it out!
|
||||
|
||||
[hint:Support painting]
|
||||
text = Support painting\nDid you know that you can paint the location of your supports? This feature makes it easy to place the support material only on the sections of the model that actually need it.
|
||||
|
||||
[hint:Different types of supports]
|
||||
text = Different types of supports\nDid you know that you can choose from multiple types of supports? Tree supports work great for organic models, while saving filament and improving print speed. Check them out!
|
||||
text = Different types of supports\nDid you know that you can choose from multiple types of supports? Tree supports work great for organic models while saving filament and improving print speed. Check them out!
|
||||
|
||||
[hint:Printing Silk Filament]
|
||||
text = Printing Silk Filament\nDid you know that Silk filament needs special consideration to print it successfully? Higher temperature and lower speed are always recommended for the best results.
|
||||
text = Printing Silk Filament\nDid you know that Silk filament needs special consideration to print successfully? A higher temperature and lower speed are always recommended for the best results.
|
||||
|
||||
[hint:Brim for better adhesion]
|
||||
text = Brim for better adhesion\nDid you know that when printed models have a small contact interface with the printing surface, it's recommended to use a brim?
|
||||
@@ -167,13 +167,13 @@ text = Set parameters for multiple objects\nDid you know that you can set slicin
|
||||
text = Stack objects\nDid you know that you can stack objects as a whole one?
|
||||
|
||||
[hint:Flush into support/objects/infill]
|
||||
text = Flush into support/objects/infill\nDid you know that you can reduce wasted filament by flushing it into support/objects/infill during filament change?
|
||||
text = Flush into support/objects/infill\nDid you know that you can reduce wasted filament by flushing it into support/objects/infill during filament changes?
|
||||
|
||||
[hint:Improve strength]
|
||||
text = Improve strength\nDid you know that you can use more wall loops and higher sparse infill density to improve the strength of the model?
|
||||
|
||||
[hint:When do you need to print with the printer door opened]
|
||||
text = When do you need to print with the printer door opened?\nDid 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? More info about this in the Wiki.
|
||||
text = When do you need to print with the printer door opened?\nDid 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.
|
||||
|
||||
[hint:Avoid warping]
|
||||
text = Avoid warping\nDid you know that when printing materials that are prone to warping such as ABS, appropriately increasing the heatbed temperature can reduce the probability of warping?
|
||||
|
||||
@@ -10,18 +10,18 @@ const float EPSILON = 0.0001;
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 128.0
|
||||
#define LIGHT_TOP_DIFFUSE (0.85 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.35 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 32.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_FRONT_SPECULAR (0.28 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_FRONT_SHININESS 64.0
|
||||
#define LIGHT_FRONT_DIFFUSE (0.35 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_FRONT_SPECULAR (0.12 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_FRONT_SHININESS 16.0
|
||||
|
||||
#define INTENSITY_AMBIENT 0.22
|
||||
#define WINDOW_REFLECTION_INTENSITY 0.55
|
||||
#define INTENSITY_AMBIENT 0.25
|
||||
#define WINDOW_REFLECTION_INTENSITY 0.30
|
||||
|
||||
struct PrintVolumeDetection
|
||||
{
|
||||
@@ -162,11 +162,11 @@ vec3 compute_window_reflection(vec3 normal, vec3 view_dir)
|
||||
float bars = 1.0;
|
||||
|
||||
// Fresnel effect for edge glow
|
||||
float fresnel = pow(1.0 - max(dot(normal, view_dir), 0.0), 1.0);
|
||||
float fresnel = pow(1.0 - max(dot(normal, view_dir), 0.0), 1.2);
|
||||
float facing = smoothstep(-0.4, 0.6, reflect_light.z);
|
||||
|
||||
float intensity = window_light * bars * (0.25 + 0.25 * fresnel) * facing;
|
||||
intensity = clamp(intensity, 0.0, 0.45);
|
||||
float intensity = window_light * bars * (0.15 + 0.15 * fresnel) * facing;
|
||||
intensity = clamp(intensity, 0.0, 0.25);
|
||||
|
||||
return vec3(intensity);
|
||||
}
|
||||
|
||||
@@ -10,18 +10,18 @@ const float EPSILON = 0.0001;
|
||||
|
||||
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
|
||||
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
|
||||
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.8 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 128.0
|
||||
#define LIGHT_TOP_DIFFUSE (0.85 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SPECULAR (0.35 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_TOP_SHININESS 32.0
|
||||
|
||||
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
|
||||
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
|
||||
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_FRONT_SPECULAR (0.28 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_FRONT_SHININESS 64.0
|
||||
#define LIGHT_FRONT_DIFFUSE (0.35 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_FRONT_SPECULAR (0.12 * INTENSITY_CORRECTION)
|
||||
#define LIGHT_FRONT_SHININESS 16.0
|
||||
|
||||
#define INTENSITY_AMBIENT 0.22
|
||||
#define WINDOW_REFLECTION_INTENSITY 0.55
|
||||
#define INTENSITY_AMBIENT 0.25
|
||||
#define WINDOW_REFLECTION_INTENSITY 0.30
|
||||
|
||||
struct PrintVolumeDetection
|
||||
{
|
||||
@@ -164,12 +164,13 @@ vec3 compute_window_reflection(vec3 normal, vec3 view_dir)
|
||||
// No bars - just pure circular glass
|
||||
float bars = 1.0;
|
||||
|
||||
// Fresnel effect for edge glow
|
||||
float fresnel = pow(1.0 - max(dot(normal, view_dir), 0.0), 1.0);
|
||||
|
||||
float fresnel = pow(1.0 - max(dot(normal, view_dir), 0.0), 1.2);
|
||||
float facing = smoothstep(-0.4, 0.6, reflect_light.z);
|
||||
|
||||
float intensity = window_light * bars * (0.25 + 0.25 * fresnel) * facing;
|
||||
intensity = clamp(intensity, 0.0, 0.45);
|
||||
|
||||
float intensity = window_light * bars * (0.15 + 0.15 * fresnel) * facing;
|
||||
intensity = clamp(intensity, 0.0, 0.25);
|
||||
|
||||
return vec3(intensity);
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ private:
|
||||
// The basic Display. This is almost just an interface but will do all the
|
||||
// initialization and show the fps values. Overriding the render_scene is
|
||||
// needed to show the scene content. The specific method of displaying the
|
||||
// scene is up the the particular implementation (OpenCSG or other screen space
|
||||
// scene is up the particular implementation (OpenCSG or other screen space
|
||||
// boolean algorithms)
|
||||
class Display : public Scene::Listener
|
||||
{
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# Sourceable helper: `retry <cmd...>` runs a command, retrying up to 3 times
|
||||
# with a 5-minute wait between attempts. Useful for flaky commands such as
|
||||
# `hdiutil create` intermittently failing with "Resource busy".
|
||||
retry() {
|
||||
local attempt=1 max_attempts=3 delay=300
|
||||
until "$@"; do
|
||||
if [ "$attempt" -ge "$max_attempts" ]; then
|
||||
echo "::error::Command failed after $attempt attempts: $*"
|
||||
return 1
|
||||
fi
|
||||
echo "Attempt $attempt failed: $*. Retrying in $((delay / 60)) minutes..."
|
||||
sleep "$delay"
|
||||
attempt=$((attempt + 1))
|
||||
done
|
||||
}
|
||||
@@ -23,7 +23,7 @@ if %FULL_MODE%==1 (
|
||||
call :prepareGettextList "%list_file%" "%filtered_list%" "%missing_list%"
|
||||
if "!has_sources!"=="1" (
|
||||
if not exist "%generated_i18n%" mkdir "%generated_i18n%"
|
||||
.\tools\xgettext.exe --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost -f "%filtered_list%" -o "%generated_pot%"
|
||||
.\tools\xgettext.exe --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost --no-wrap -f "%filtered_list%" -o "%generated_pot%"
|
||||
if errorlevel 1 (
|
||||
set "script_exit_code=1"
|
||||
) else (
|
||||
@@ -122,7 +122,7 @@ exit /b %errorlevel%
|
||||
set "lang=%name:OrcaSlicer_=%"
|
||||
if %FULL_MODE%==1 if exist "%pot_file%" (
|
||||
set "merged_file=%TEMP%\orca_gettext_merged_%RANDOM%_%RANDOM%.po"
|
||||
.\tools\msgmerge.exe -N -o "!merged_file!" "%file%" "%pot_file%"
|
||||
.\tools\msgmerge.exe -N --no-wrap -o "!merged_file!" "%file%" "%pot_file%"
|
||||
if errorlevel 1 (
|
||||
if exist "!merged_file!" del "!merged_file!"
|
||||
echo Error encountered with msgmerge command for language !lang!.
|
||||
|
||||
@@ -85,7 +85,7 @@ if $FULL_MODE; then
|
||||
generated_pot_file="${generated_i18n_dir}/OrcaSlicer.pot"
|
||||
|
||||
mkdir -p "$generated_i18n_dir"
|
||||
xgettext --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost -f "$filtered_list" -o "$generated_pot_file"
|
||||
xgettext --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost --no-wrap -f "$filtered_list" -o "$generated_pot_file"
|
||||
python3 scripts/HintsToPot.py ./resources "$generated_i18n_dir"
|
||||
|
||||
if [ -f "$pot_file" ] && files_equal_ignoring_pot_date "$pot_file" "$generated_pot_file"; then
|
||||
@@ -108,7 +108,7 @@ do
|
||||
if [ -f "$dir/OrcaSlicer_${lang}.po" ]; then
|
||||
if $FULL_MODE && [ -f "$pot_file" ]; then
|
||||
merged_po=$(mktemp)
|
||||
if ! msgmerge -N -o "$merged_po" "$dir/OrcaSlicer_${lang}.po" "$pot_file"; then
|
||||
if ! msgmerge -N --no-wrap -o "$merged_po" "$dir/OrcaSlicer_${lang}.po" "$pot_file"; then
|
||||
echo "Error encountered with msgmerge command for language ${lang}."
|
||||
rm -f "$merged_po"
|
||||
exit 1
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
# Snap packaging
|
||||
|
||||
OrcaSlicer ships a [snap](https://snapcraft.io/orcaslicer) built by **repackaging the AppImage
|
||||
build output** (`build/package`) — the compiled binary, bundled private libraries and resources
|
||||
are reused as-is.
|
||||
|
||||
The snap uses **classic confinement**: like the AppImage, it runs in the host namespace and
|
||||
resolves the desktop stack (GTK / WebKitGTK / GStreamer / GLU) from the host. Classic is required
|
||||
for full hardware/filesystem access — notably the **3D mouse** (3Dconnexion SpaceMouse via the host
|
||||
`spacenavd` socket at `/run/spnav.sock`), which no strict-confinement interface can reach.
|
||||
|
||||
- `snapcraft.yaml` — the manifest (`plugin: dump` of `build/package`, classic confinement).
|
||||
- `local/launcher` — the runtime wrapper (sets `LD_LIBRARY_PATH`, `LC_NUMERIC=C`, `SPNAV_SOCKET`).
|
||||
|
||||
## CI flow
|
||||
|
||||
| Trigger | Where | Snap action |
|
||||
|---|---|---|
|
||||
| push to `main` | `build_orca.yml` (amd64 + aarch64) | build both arches + publish to **edge** |
|
||||
| PR | (none) | snap is not built on PRs (the AppImage build still runs) |
|
||||
| release (manual) | `publish_release.yml` | push the build run's `.snap` artifacts to the channel below |
|
||||
|
||||
The snap is **Store-only** — unlike the AppImage/Flatpak it is *not* attached to GitHub releases
|
||||
(a downloaded `.snap` is useless without `snap install`). Both arches go through the same
|
||||
`build_orca.yml` Linux build, reusing the AppDir (`build/package`) it just produced for the snap.
|
||||
`build_all.yml`'s `build_linux` job matrixes over amd64 and aarch64 on every event; aarch64 always
|
||||
uses a GitHub-hosted arm runner (amd64 honors the self-hosted runner when configured).
|
||||
|
||||
## Channel mapping (tag suffix → Snap Store channel)
|
||||
|
||||
| Tag | Channel |
|
||||
|---|---|
|
||||
| `vX.Y.Z` (release) | `stable` |
|
||||
| `-rc` / `-rcN` | `candidate` |
|
||||
| `-beta` / `-alpha` | `beta` |
|
||||
| nightly (push to `main`) | `edge` |
|
||||
|
||||
## One-time maintainer setup
|
||||
|
||||
1. `snapcraft login` then `snapcraft register orcaslicer` (the name must be free; if not, change
|
||||
`name:` in `snapcraft.yaml` and the asset names in the workflows).
|
||||
2. **Request classic confinement** for `orcaslicer` on the [snapcraft forum](https://forum.snapcraft.io/)
|
||||
(Store Requests category). Justification: a desktop slicer needs the host `spacenavd` socket
|
||||
(`/run/spnav.sock`) for 3D mice plus arbitrary user/network filesystem paths that strict
|
||||
interfaces cannot provide. **Until this is granted, uploads to every channel are held for manual
|
||||
review**, so the automated publish below will not go live yet.
|
||||
3. Export CI credentials:
|
||||
`snapcraft export-login --snaps orcaslicer --channels stable,candidate,beta,edge --acls package_push,package_release exported.txt`
|
||||
4. Add the file contents as the GitHub Actions secret **`SNAPCRAFT_STORE_CREDENTIALS`**.
|
||||
|
||||
## Notes
|
||||
|
||||
- Cross-distro library behavior matches the AppImage (relies on host libs): the host must provide
|
||||
the GTK/WebKitGTK/GStreamer/GLU/OpenGL stack (the same packages the AppImage documents).
|
||||
- The `classic`/`library` snapcraft linters are silenced in `snapcraft.yaml` because they assume a
|
||||
self-contained snap and would flag every host-resolved library. Runtime smoke tests are the real
|
||||
check.
|
||||
|
||||
## Local build / test
|
||||
|
||||
```shell
|
||||
sudo snap install snapcraft --classic
|
||||
sudo snap install lxd && sudo lxd init --auto
|
||||
./build_linux.sh -dsir -l -L # produces build/package
|
||||
snapcraft # -> orcaslicer_<ver>_amd64.snap
|
||||
sudo snap install --dangerous --classic ./orcaslicer_*.snap
|
||||
snap run orcaslicer
|
||||
# Smoke test: load an STL, slice, USB/serial printer, network share, and a SpaceMouse if available.
|
||||
```
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# Snap launch wrapper for OrcaSlicer (classic confinement).
|
||||
#
|
||||
# Classic confinement runs in the host namespace and uses host libraries, just
|
||||
# like the AppImage. This wrapper sets up only the load-bearing environment and
|
||||
# execs the binary. It deliberately does NOT reuse the AppImage's orca-slicer-env
|
||||
# (which probes the host for WebKitGTK and exit 1's if absent, and sets LC_ALL=C
|
||||
# which would break translations) nor the Flatpak entrypoint (which assumes /app).
|
||||
|
||||
# Keep the C numeric locale (decimal separator) without overriding the UI
|
||||
# language, matching the Flatpak entrypoint. Otherwise some locales corrupt
|
||||
# G-code coordinates.
|
||||
export LC_NUMERIC=C
|
||||
|
||||
# Resolve OrcaSlicer's bundled private libraries first (OpenSSL 1.1.x, CURL,
|
||||
# etc.). The desktop stack (GTK / WebKitGTK / GStreamer / GLU) resolves from the
|
||||
# host, exactly as in the AppImage.
|
||||
export LD_LIBRARY_PATH="$SNAP/lib/orca-runtime:$SNAP/bin${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
|
||||
# 3D mouse (3Dconnexion SpaceMouse via the host spacenavd daemon). Classic
|
||||
# confinement can reach the host socket; mirrors the Flatpak's SPNAV_SOCKET env.
|
||||
export SPNAV_SOCKET=/run/spnav.sock
|
||||
|
||||
exec "$SNAP/bin/orca-slicer" "$@"
|
||||
@@ -0,0 +1,89 @@
|
||||
name: orcaslicer
|
||||
# Snap name must be lowercase with no dots; it has to be registered in the Snap
|
||||
# Store before the first upload (`snapcraft register orcaslicer`).
|
||||
base: core24
|
||||
adopt-info: metadata # version (from version.inc) + summary/description (from the metainfo)
|
||||
grade: stable
|
||||
# Classic confinement: like the AppImage, OrcaSlicer runs in the host namespace
|
||||
# and uses host libraries. This is required for full hardware/filesystem access —
|
||||
# notably the 3D mouse (SpaceMouse via the host spacenavd socket at
|
||||
# /run/spnav.sock), which no strict-confinement interface can reach.
|
||||
# NOTE: classic confinement must be granted once by the Snap Store (forum request)
|
||||
# before uploads to any channel are accepted. See snap/README.md.
|
||||
confinement: classic
|
||||
license: AGPL-3.0-only
|
||||
icon: resources/images/OrcaSlicer_192px.png
|
||||
compression: lzo # faster first-launch decompression for a large (~1 GB) snap
|
||||
|
||||
# As with the AppImage, the desktop stack (GTK / WebKitGTK / GStreamer / GLU) is
|
||||
# resolved from the host, not bundled. The classic/library linters assume a
|
||||
# self-contained snap and would flag every host-resolved library, so silence them;
|
||||
# runtime smoke tests are the real check (see snap/README.md).
|
||||
lint:
|
||||
ignore:
|
||||
- classic
|
||||
- library
|
||||
|
||||
platforms:
|
||||
amd64:
|
||||
arm64:
|
||||
|
||||
apps:
|
||||
orcaslicer:
|
||||
command: bin/launcher # snap/local/launcher (NOT the AppImage orca-slicer-env)
|
||||
common-id: com.orcaslicer.OrcaSlicer # ties the app to the AppStream component id
|
||||
desktop: usr/share/applications/com.orcaslicer.OrcaSlicer.desktop
|
||||
|
||||
parts:
|
||||
# The compiled application, reused verbatim from the AppImage build output
|
||||
# (build/package = bin/orca-slicer + lib/orca-runtime + resources + share).
|
||||
# Dumped at the snap root so the binary finds its data at bin/../resources,
|
||||
# exactly as it does inside the AppImage. The host supplies the desktop stack
|
||||
# (GTK / WebKitGTK / GStreamer / GLU) just as it does for the AppImage.
|
||||
orcaslicer:
|
||||
plugin: dump
|
||||
source: build/package
|
||||
|
||||
# Desktop integration + Store metadata. Reuses the existing desktop file,
|
||||
# metainfo and icon (no forks). Mirrors the Flatpak post-install step.
|
||||
metadata:
|
||||
plugin: nil
|
||||
parse-info: [usr/share/metainfo/com.orcaslicer.OrcaSlicer.metainfo.xml]
|
||||
build-packages: [desktop-file-utils]
|
||||
override-build: |
|
||||
set -e
|
||||
# AppStream metainfo (drives the Store listing: summary, description, screenshots)
|
||||
install -Dm644 "$CRAFT_PROJECT_DIR/scripts/flatpak/com.orcaslicer.OrcaSlicer.metainfo.xml" \
|
||||
"$CRAFT_PART_INSTALL/usr/share/metainfo/com.orcaslicer.OrcaSlicer.metainfo.xml"
|
||||
|
||||
# Desktop entry: reuse the canonical one, point Exec/Icon at the snap.
|
||||
install -Dm644 "$CRAFT_PROJECT_DIR/src/dev-utils/platform/unix/com.orcaslicer.OrcaSlicer.desktop" \
|
||||
"$CRAFT_PART_INSTALL/usr/share/applications/com.orcaslicer.OrcaSlicer.desktop"
|
||||
desktop-file-edit \
|
||||
--set-key=Exec --set-value="orcaslicer %U" \
|
||||
--set-icon="orcaslicer" \
|
||||
"$CRAFT_PART_INSTALL/usr/share/applications/com.orcaslicer.OrcaSlicer.desktop"
|
||||
|
||||
# Icons (name must match the desktop Icon= key and the snap name).
|
||||
install -Dm644 "$CRAFT_PROJECT_DIR/resources/images/OrcaSlicer.svg" \
|
||||
"$CRAFT_PART_INSTALL/usr/share/icons/hicolor/scalable/apps/orcaslicer.svg"
|
||||
install -Dm644 "$CRAFT_PROJECT_DIR/resources/images/OrcaSlicer_192px.png" \
|
||||
"$CRAFT_PART_INSTALL/usr/share/icons/hicolor/192x192/apps/orcaslicer.png"
|
||||
|
||||
# Ship the bundled fonts in a fontconfig-scanned directory so Pango knows
|
||||
# them before initialization (avoids the AddPrivateFont/ensure_faces crash
|
||||
# the Flatpak guards against).
|
||||
install -d "$CRAFT_PART_INSTALL/usr/share/fonts/OrcaSlicer"
|
||||
install -m644 "$CRAFT_PROJECT_DIR"/resources/fonts/*.ttf \
|
||||
"$CRAFT_PART_INSTALL/usr/share/fonts/OrcaSlicer/"
|
||||
|
||||
# Version straight from version.inc (single source of truth, same as AppImage/Flatpak).
|
||||
ver=$(grep 'set(SoftFever_VERSION' "$CRAFT_PROJECT_DIR/version.inc" | cut -d '"' -f2)
|
||||
craftctl set version="$ver"
|
||||
|
||||
# Minimal snap launch wrapper (replaces the AppImage orca-slicer-env / Flatpak entrypoint).
|
||||
launcher:
|
||||
plugin: dump
|
||||
source: snap/local
|
||||
organize:
|
||||
launcher: bin/launcher
|
||||
+13
-6
@@ -6058,9 +6058,9 @@ int CLI::run(int argc, char **argv)
|
||||
}
|
||||
(dynamic_cast<Print*>(print))->is_BBL_printer() = is_bbl_vendor_preset;
|
||||
|
||||
StringObjectException warning;
|
||||
std::vector<StringObjectException> warnings;
|
||||
print_fff->set_check_multi_filaments_compatibility(!allow_mix_temp);
|
||||
auto err = print->validate(&warning);
|
||||
auto err = print->validate(&warnings);
|
||||
if (!err.string.empty()) {
|
||||
if ((STRING_EXCEPT_LAYER_HEIGHT_EXCEEDS_LIMIT == err.type) && no_check) {
|
||||
BOOST_LOG_TRIVIAL(warning) << "got warnings: "<< err.string << std::endl;
|
||||
@@ -6094,8 +6094,9 @@ int CLI::run(int argc, char **argv)
|
||||
flush_and_exit(validate_error);
|
||||
}
|
||||
}
|
||||
else if (!warning.string.empty()) {
|
||||
BOOST_LOG_TRIVIAL(warning) << "got warnings: "<< warning.string << std::endl;
|
||||
else if (!warnings.empty()) {
|
||||
for (const auto& w : warnings)
|
||||
BOOST_LOG_TRIVIAL(warning) << "got warnings: "<< w.string << std::endl;
|
||||
}
|
||||
|
||||
if (print->empty()) {
|
||||
@@ -6115,8 +6116,14 @@ int CLI::run(int argc, char **argv)
|
||||
BOOST_LOG_TRIVIAL(info) << "set print's callback to cli_status_callback.";
|
||||
print->set_status_callback(cli_status_callback);
|
||||
g_cli_callback_mgr.set_plate_info(index+1, (plate_to_slice== 0)?partplate_list.get_plate_count():1);
|
||||
if (!warning.string.empty()) {
|
||||
PrintBase::SlicingStatus slicing_status{4, warning.string, 0, 0};
|
||||
if (!warnings.empty()) {
|
||||
std::string warning_text;
|
||||
for (const auto& w : warnings) {
|
||||
if (!warning_text.empty())
|
||||
warning_text += "\n";
|
||||
warning_text += w.string;
|
||||
}
|
||||
PrintBase::SlicingStatus slicing_status{4, warning_text, 0, 0};
|
||||
cli_status_callback(slicing_status);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -276,6 +276,9 @@ void AppConfig::set_defaults()
|
||||
if (get(SETTING_OPENGL_PHONG_BASIC_PLATE_SHADOWS).empty())
|
||||
set_bool(SETTING_OPENGL_PHONG_BASIC_PLATE_SHADOWS, false);
|
||||
|
||||
if (get(SETTING_OPENGL_PHONG_SMOOTH_NORMALS).empty())
|
||||
set_bool(SETTING_OPENGL_PHONG_SMOOTH_NORMALS, false);
|
||||
|
||||
if (get(SETTING_OPENGL_PHONG_SSAO).empty())
|
||||
set_bool(SETTING_OPENGL_PHONG_SSAO, false);
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ using namespace nlohmann;
|
||||
#define SETTING_OPENGL_SHADING_MODEL "opengl_shading_model"
|
||||
#define SETTING_OPENGL_PHONG_BASIC_PLATE_SHADOWS "opengl_phong_basic_plate_shadows"
|
||||
#define SETTING_OPENGL_PHONG_SSAO "opengl_phong_ssao"
|
||||
#define SETTING_OPENGL_PHONG_SMOOTH_NORMALS "opengl_phong_smooth_normals"
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define BAMBU_NETWORK_AGENT_VERSION_LEGACY "01.10.01.09"
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Slic3r::Arachne::LinearAlg2D
|
||||
{
|
||||
|
||||
/*!
|
||||
* Returns the determinant of the 2D matrix defined by the the vectors ab and ap as rows.
|
||||
* Returns the determinant of the 2D matrix defined by the vectors ab and ap as rows.
|
||||
*
|
||||
* The returned value is zero for \p p lying (approximately) on the line going through \p a and \p b
|
||||
* The value is positive for values lying to the left and negative for values lying to the right when looking from \p a to \p b.
|
||||
|
||||
+17
-2
@@ -879,7 +879,9 @@ void make_brim(const Print& print, PrintTryCancel try_cancel, Polygons& islands_
|
||||
std::map<ObjectID, ExtrusionEntityCollection>& brimMap,
|
||||
std::map<ObjectID, ExtrusionEntityCollection>& supportBrimMap,
|
||||
std::vector<std::pair<ObjectID, unsigned int>> &objPrintVec,
|
||||
std::vector<unsigned int>& printExtruders)
|
||||
std::vector<unsigned int>& printExtruders,
|
||||
std::map<ObjectID, ExPolygons>* objectBrimAreasOut,
|
||||
std::map<ObjectID, ExPolygons>* supportBrimAreasOut)
|
||||
{
|
||||
std::map<ObjectID, double> brim_width_map;
|
||||
std::map<ObjectID, ExPolygons> brimAreaMap;
|
||||
@@ -928,12 +930,25 @@ void make_brim(const Print& print, PrintTryCancel try_cancel, Polygons& islands_
|
||||
for (size_t iia = 0; iia < islands_area.size(); ++iia)
|
||||
islands_area[iia].translate(plate_shift);
|
||||
|
||||
// Orca: keep translated brim footprints for skirt grouping.
|
||||
auto translate_area_map = [plate_shift](const std::map<ObjectID, ExPolygons>& src) {
|
||||
std::map<ObjectID, ExPolygons> dst = src;
|
||||
for (auto& [_, areas] : dst)
|
||||
for (ExPolygon& area : areas)
|
||||
area.translate(plate_shift);
|
||||
return dst;
|
||||
};
|
||||
if (objectBrimAreasOut != nullptr)
|
||||
*objectBrimAreasOut = translate_area_map(brimAreaMap);
|
||||
if (supportBrimAreasOut != nullptr)
|
||||
*supportBrimAreasOut = translate_area_map(supportBrimAreaMap);
|
||||
|
||||
const bool combine_brims = print.config().combine_brims.value;
|
||||
const bool is_by_object = (print.config().print_sequence == PrintSequence::ByObject);
|
||||
const bool can_combine_brims = combine_brims && !is_by_object;
|
||||
|
||||
if (!can_combine_brims) {
|
||||
// Orca: Generate brims separately for each object when multiple extruders are used
|
||||
// Orca: Generate brims separately when brims cannot be combined.
|
||||
for (auto iter = brimAreaMap.begin(); iter != brimAreaMap.end(); ++iter) {
|
||||
if (!iter->second.empty()) {
|
||||
brimMap.insert(std::make_pair(iter->first, makeBrimInfill(iter->second, print, islands_area)));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef slic3r_Brim_hpp_
|
||||
#define slic3r_Brim_hpp_
|
||||
|
||||
#include "ExPolygon.hpp"
|
||||
#include "Point.hpp"
|
||||
|
||||
#include<map>
|
||||
@@ -19,7 +20,9 @@ void make_brim(const Print& print, PrintTryCancel try_cancel,
|
||||
Polygons& islands_area, std::map<ObjectID, ExtrusionEntityCollection>& brimMap,
|
||||
std::map<ObjectID, ExtrusionEntityCollection>& supportBrimMap,
|
||||
std::vector<std::pair<ObjectID, unsigned int>>& objPrintVec,
|
||||
std::vector<unsigned int>& printExtruders);
|
||||
std::vector<unsigned int>& printExtruders,
|
||||
std::map<ObjectID, ExPolygons>* objectBrimAreasOut = nullptr,
|
||||
std::map<ObjectID, ExPolygons>* supportBrimAreasOut = nullptr);
|
||||
|
||||
// BBS: automatically make brim
|
||||
ExtrusionEntityCollection make_brim_auto(const Print &print, PrintTryCancel try_cancel, Polygons &islands_area);
|
||||
|
||||
@@ -520,7 +520,7 @@ ClipperLib::Paths expolygon_offset(const Slic3r::ExPolygon &expolygon, const flo
|
||||
|
||||
// This is a safe variant of the polygons offset, tailored for multiple ExPolygons.
|
||||
// It is required, that the input expolygons do not overlap and that the holes of each ExPolygon don't intersect with their respective outer contours.
|
||||
// Each ExPolygon is offsetted separately. For outer offset, the the offsetted ExPolygons shall be united outside of this function.
|
||||
// Each ExPolygon is offsetted separately. For outer offset, the offsetted ExPolygons shall be united outside of this function.
|
||||
template<typename ExPolygonVector>
|
||||
static std::pair<ClipperLib::Paths, size_t> expolygons_offset_raw(const ExPolygonVector &expolygons, const float delta, ClipperLib::JoinType joinType, double miterLimit)
|
||||
{
|
||||
|
||||
@@ -1025,7 +1025,7 @@ void mark_boundary_segments_touching_infill(
|
||||
#endif // INFILL_DEBUG_OUTPUT
|
||||
|
||||
EdgeGrid::Grid grid;
|
||||
// Make sure that the the grid is big enough for queries against the thick segment.
|
||||
// Make sure that the grid is big enough for queries against the thick segment.
|
||||
grid.set_bbox(boundary_bbox.inflated(distance_colliding * 1.43));
|
||||
// Inflate the bounding box by a thick line width.
|
||||
grid.create(boundary, coord_t(std::max(clip_distance, distance_colliding) + scale_(10.)));
|
||||
|
||||
@@ -2318,7 +2318,7 @@ static std::vector<MonotonicRegionLink> chain_monotonic_regions(
|
||||
constexpr float const pheromone_evaporation = 0.1f;
|
||||
// Evaporation rate to diversify paths taken by individual ants.
|
||||
constexpr float const pheromone_diversification = 0.1f;
|
||||
// Probability at which to take the next best path. Otherwise take the the path based on the cost distribution.
|
||||
// Probability at which to take the next best path. Otherwise take the path based on the cost distribution.
|
||||
constexpr float const probability_take_best = 0.9f;
|
||||
// Exponents of the cost function.
|
||||
constexpr float const pheromone_alpha = 1.f; // pheromone exponent
|
||||
|
||||
@@ -61,7 +61,7 @@ static inline FlowRole opt_key_to_flow_role(const std::string &opt_key)
|
||||
|
||||
static inline void throw_on_missing_variable(const std::string &opt_key, const char *dependent_opt_key)
|
||||
{
|
||||
throw FlowErrorMissingVariable((boost::format(L("Failed to calculate line width of %1%. Cannot get value of \"%2%\" ")) % opt_key % dependent_opt_key).str());
|
||||
throw FlowErrorMissingVariable((boost::format(L("Failed to calculate line width of %1%. Cannot get value of \u201c%2%\u201d ")) % opt_key % dependent_opt_key).str());
|
||||
}
|
||||
|
||||
// Used to provide hints to the user on default extrusion width values, and to provide reasonable values to the PlaceholderParser.
|
||||
|
||||
+59
-42
@@ -1816,10 +1816,10 @@ std::vector<GCode::LayerToPrint> GCode::collect_layers_to_print(const PrintObjec
|
||||
std::string warning;
|
||||
size_t i = 0;
|
||||
for (i = 0; i < std::min(warning_ranges.size(), size_t(5)); ++i)
|
||||
warning += Slic3r::format(_(L("Object can't be printed for empty layer between %1% and %2%.")),
|
||||
warning += Slic3r::format(_(L("The object has empty layers between %1% and %2% and can\u2019t be printed.")),
|
||||
warning_ranges[i].first, warning_ranges[i].second) + "\n";
|
||||
warning += Slic3r::format(_(L("Object: %1%")), object.model_object()->name) + "\n"
|
||||
+ _(L("Maybe parts of the object at these height are too thin, or the object has faulty mesh"));
|
||||
+ _(L("Parts of the object at these heights may be too thin or the object may have a faulty mesh."));
|
||||
|
||||
const_cast<Print*>(object.print())->active_step_add_warning(
|
||||
PrintStateBase::WarningLevel::CRITICAL, warning, PrintStateBase::SlicingEmptyGcodeLayers);
|
||||
@@ -2752,7 +2752,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
}
|
||||
if (initial_extruder_id == static_cast<unsigned int>(-1))
|
||||
// No object to print was found, cancel the G-code export.
|
||||
throw Slic3r::SlicingError(_(L("No object can be printed. Maybe too small")));
|
||||
throw Slic3r::SlicingError(_(L("No object can be printed. It may be too small.")));
|
||||
// We don't allow switching of extruders per layer by Model::custom_gcode_per_print_z in sequential mode.
|
||||
// Use the extruder IDs collected from Regions.
|
||||
this->set_extruders(print.extruders());
|
||||
@@ -2768,7 +2768,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
max_additional_fan = temp_max_additional_fan;
|
||||
if (tool_ordering.all_extruders().empty())
|
||||
// No object to print was found, cancel the G-code export.
|
||||
throw Slic3r::SlicingError(_(L("No object can be printed. Maybe too small")));
|
||||
throw Slic3r::SlicingError(_(L("No object can be printed. It may be too small.")));
|
||||
has_wipe_tower = print.has_wipe_tower() && tool_ordering.has_wipe_tower();
|
||||
// Orca: support all extruder priming
|
||||
initial_extruder_id = (wipe_tower_type == WipeTowerType::Type2 && has_wipe_tower && !print.config().single_extruder_multi_material_priming) ?
|
||||
@@ -5151,44 +5151,30 @@ LayerResult GCode::process_layer(
|
||||
bool has_insert_wrapping_detection_gcode = false;
|
||||
|
||||
// Extrude the skirt, brim, support, perimeters, infill ordered by the extruders.
|
||||
// Orca: Print unified global brim before any object.
|
||||
// Only do this if `combine_brims` is enabled and we are printing by layer.
|
||||
if (first_layer && sequence_by_layer && m_config.combine_brims && !print.m_brimMap.empty()) {
|
||||
const ObjectID unified_object_id = [&]() -> ObjectID {
|
||||
ObjectID id;
|
||||
bool found = false;
|
||||
for (const auto& [obj_id, brim] : print.m_brimMap) {
|
||||
const bool has_printable_entities = std::any_of(brim.entities.begin(), brim.entities.end(),
|
||||
[](const ExtrusionEntity* ee) { return ee != nullptr; });
|
||||
if (!has_printable_entities)
|
||||
continue;
|
||||
if (found)
|
||||
return ObjectID();
|
||||
id = obj_id;
|
||||
found = true;
|
||||
}
|
||||
return found ? id : ObjectID();
|
||||
}();
|
||||
|
||||
if (unified_object_id.valid()) {
|
||||
const auto it = print.m_brimMap.find(unified_object_id);
|
||||
if (it != print.m_brimMap.end()) {
|
||||
this->set_origin(0., 0.);
|
||||
for (const ExtrusionEntity* ee : it->second.entities)
|
||||
if (ee != nullptr)
|
||||
gcode += this->extrude_entity(*ee, "brim", m_config.support_speed.value);
|
||||
|
||||
// Mark brim as printed for this object to avoid per-object brim emission later.
|
||||
this->m_objsWithBrim.erase(unified_object_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (unsigned int extruder_id : layer_tools.extruders)
|
||||
{
|
||||
if (print.config().skirt_type == stCombined && !print.skirt().empty())
|
||||
gcode += generate_skirt(print, print.skirt(), Point(0, 0), layer.object()->config().skirt_start_angle, layer_tools, layer,
|
||||
extruder_id);
|
||||
if ((print.config().skirt_type == stCombined ||
|
||||
(print.config().skirt_type == stPerObject && print.config().print_sequence == PrintSequence::ByLayer)) &&
|
||||
!print.skirt_groups().empty()) {
|
||||
bool skirt_generated_for_current_print_z = false;
|
||||
for (const ExtrusionEntityCollection& skirt_group : print.skirt_groups()) {
|
||||
if (skirt_group.empty())
|
||||
continue;
|
||||
|
||||
// Orca: each grouped skirt is emitted as its own collection so higher skirt layers
|
||||
// follow the same per-group behavior as the first layer.
|
||||
if (first_layer)
|
||||
m_skirt_done.clear();
|
||||
else if (skirt_generated_for_current_print_z && !m_skirt_done.empty())
|
||||
m_skirt_done.pop_back();
|
||||
|
||||
std::string skirt_gcode = generate_skirt(print, skirt_group, Point(0, 0), layer.object()->config().skirt_start_angle,
|
||||
layer_tools, layer, extruder_id);
|
||||
if (!skirt_gcode.empty())
|
||||
skirt_generated_for_current_print_z = true;
|
||||
gcode += std::move(skirt_gcode);
|
||||
}
|
||||
}
|
||||
|
||||
if (print.config().print_sequence == PrintSequence::ByLayer && m_enable_exclude_object && print.config().support_object_skip_flush.value) {
|
||||
std::vector<size_t> filament_instances_id;
|
||||
@@ -5289,7 +5275,38 @@ LayerResult GCode::process_layer(
|
||||
}
|
||||
}
|
||||
|
||||
// We are almost ready to print. However, we must go through all the objects twice to print the the overridden extrusions first (infill/perimeter wiping feature):
|
||||
// Orca: Print unified global brim after the skirt and before any object.
|
||||
// Only do this if `combine_brims` is enabled and we are printing by layer.
|
||||
if (first_layer && sequence_by_layer && m_config.combine_brims && !print.m_brimMap.empty()) {
|
||||
const ObjectID unified_object_id = [&]() -> ObjectID {
|
||||
ObjectID id;
|
||||
for (const auto& [obj_id, brim] : print.m_brimMap) {
|
||||
const bool has_printable_entities = std::any_of(brim.entities.begin(), brim.entities.end(),
|
||||
[](const ExtrusionEntity* ee) { return ee != nullptr; });
|
||||
if (!has_printable_entities)
|
||||
continue;
|
||||
|
||||
if (id.valid())
|
||||
return ObjectID();
|
||||
|
||||
id = obj_id;
|
||||
}
|
||||
return id;
|
||||
}();
|
||||
|
||||
if (unified_object_id.valid() && this->m_objsWithBrim.find(unified_object_id) != this->m_objsWithBrim.end()) {
|
||||
const ExtrusionEntityCollection& unified_brim = print.m_brimMap.at(unified_object_id);
|
||||
this->set_origin(0., 0.);
|
||||
for (const ExtrusionEntity* ee : unified_brim.entities)
|
||||
if (ee != nullptr)
|
||||
gcode += this->extrude_entity(*ee, "brim", m_config.support_speed.value);
|
||||
|
||||
// Mark brim as printed for this object to avoid per-object brim emission later.
|
||||
this->m_objsWithBrim.erase(unified_object_id);
|
||||
}
|
||||
}
|
||||
|
||||
// We are almost ready to print. However, we must go through all the objects twice to print the overridden extrusions first (infill/perimeter wiping feature):
|
||||
std::vector<ObjectByExtruder::Island::Region> by_region_per_copy_cache;
|
||||
for (int print_wipe_extrusions = is_anything_overridden; print_wipe_extrusions>=0; --print_wipe_extrusions) {
|
||||
if (is_anything_overridden && print_wipe_extrusions == 0)
|
||||
@@ -5327,7 +5344,7 @@ LayerResult GCode::process_layer(
|
||||
gcode += std::move(skirt_gcode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const auto& inst = instance_to_print.print_object.instances()[instance_to_print.instance_id];
|
||||
const LayerToPrint &layer_to_print = layers[instance_to_print.layer_id];
|
||||
// To control print speed of the 1st object layer printed over raft interface.
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
#include <cctype>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@@ -282,4 +283,81 @@ std::string AdaptivePAProcessor::process_layer(std::string &&gcode) {
|
||||
return output.str();
|
||||
}
|
||||
|
||||
std::string AdaptivePAProcessor::validate_adaptive_pa_model(const std::string& model_str)
|
||||
{
|
||||
if (model_str.empty())
|
||||
return {}; // Empty model is valid
|
||||
|
||||
std::istringstream model_stream(model_str);
|
||||
std::string line;
|
||||
int line_number = 0;
|
||||
|
||||
while (std::getline(model_stream, line)) {
|
||||
++line_number;
|
||||
|
||||
// Trim whitespace
|
||||
const auto first = line.find_first_not_of(" \t\r\n");
|
||||
if (first == std::string::npos)
|
||||
continue; // Skip empty lines
|
||||
|
||||
const auto last = line.find_last_not_of(" \t\r\n");
|
||||
line = line.substr(first, last - first + 1);
|
||||
|
||||
// Only numbers, commas and dots are allowed (no letters or other characters)
|
||||
for (char c : line) {
|
||||
if (!std::isdigit(static_cast<unsigned char>(c)) && c != ',' && c != '.') {
|
||||
return "Line " + std::to_string(line_number) +
|
||||
": only numbers, commas and dots are allowed";
|
||||
}
|
||||
}
|
||||
|
||||
// Count commas to validate format (should be exactly 2 for 3 values)
|
||||
int comma_count = 0;
|
||||
for (char c : line) {
|
||||
if (c == ',') comma_count++;
|
||||
}
|
||||
|
||||
if (comma_count != 2) {
|
||||
return "Line " + std::to_string(line_number) +
|
||||
": must contain exactly 3 comma-separated values (PA, flow, acceleration)";
|
||||
}
|
||||
|
||||
// Parse and validate the values
|
||||
try {
|
||||
std::istringstream line_stream(line);
|
||||
std::string value;
|
||||
|
||||
// Parse PA
|
||||
if (!std::getline(line_stream, value, ','))
|
||||
return "Line " + std::to_string(line_number) + ": missing PA value";
|
||||
double pa = std::stod(value);
|
||||
|
||||
// Parse flow
|
||||
if (!std::getline(line_stream, value, ','))
|
||||
return "Line " + std::to_string(line_number) + ": missing flow value";
|
||||
double flow = std::stod(value);
|
||||
|
||||
// Parse acceleration
|
||||
if (!std::getline(line_stream, value, ','))
|
||||
return "Line " + std::to_string(line_number) + ": missing acceleration value";
|
||||
double accel = std::stod(value);
|
||||
|
||||
// Validate constraints
|
||||
if (pa >= 2.0) {
|
||||
return "Line " + std::to_string(line_number) + ": PA value must be less than 2";
|
||||
}
|
||||
if (flow <= pa) {
|
||||
return "Line " + std::to_string(line_number) + ": flow value must be greater than PA value";
|
||||
}
|
||||
if (accel <= flow) {
|
||||
return "Line " + std::to_string(line_number) + ": acceleration value must be greater than flow value";
|
||||
}
|
||||
} catch (const std::exception&) {
|
||||
return "Line " + std::to_string(line_number) + ": invalid numeric value";
|
||||
}
|
||||
}
|
||||
|
||||
return {}; // All validations passed
|
||||
}
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
@@ -54,6 +54,20 @@ public:
|
||||
*/
|
||||
void resetPreviousPA(double PA){ m_last_predicted_pa = PA; };
|
||||
|
||||
/**
|
||||
* @brief Validates an adaptive pressure advance model string.
|
||||
*
|
||||
* Checks that:
|
||||
* - Each non-empty line has exactly 3 comma-separated values (PA, flow, accel)
|
||||
* - PA value is less than 2
|
||||
* - Flow value is greater than PA value
|
||||
* - Accel value is greater than flow value
|
||||
*
|
||||
* @param model_str The model string to validate (typically from config)
|
||||
* @return Empty string if valid, or an error message describing the first issue found
|
||||
*/
|
||||
static std::string validate_adaptive_pa_model(const std::string& model_str);
|
||||
|
||||
private:
|
||||
GCode &m_gcodegen; ///< Reference to the GCode object.
|
||||
std::unordered_map<unsigned int, std::unique_ptr<AdaptivePAInterpolator>> m_AdaptivePAInterpolators; ///< Map between Interpolator objects and tool ID's
|
||||
|
||||
@@ -462,10 +462,10 @@ std::string GCodeWriter::set_input_shaping(char axis, float damp, float freq, st
|
||||
break;
|
||||
}
|
||||
case gcfMarlinLegacy: {
|
||||
throw std::runtime_error(_u8L("Input shaping is not supported by Marlin < 2.1.2.\nCheck your firmware version and update your G-code flavor to ´Marlin 2´"));
|
||||
throw std::runtime_error(_u8L("Input shaping is not supported by Marlin < 2.1.2.\nCheck your firmware version and update your G-code flavor to ´Marlin 2´."));
|
||||
}
|
||||
default:
|
||||
throw std::runtime_error(_u8L("Input shaping is only supported by Klipper, RepRapFirmware and Marlin 2"));
|
||||
throw std::runtime_error(_u8L("Input shaping is only supported by Klipper, RepRapFirmware and Marlin 2."));
|
||||
}
|
||||
if (!gcode.str().empty()) {
|
||||
if (GCodeWriter::full_gcode_comment) {
|
||||
|
||||
@@ -1236,7 +1236,7 @@ std::vector<Vec2d> edge_offset_contour_intersections(
|
||||
// 2) offset_distance == dmin_new -> one duplicate point is found.
|
||||
// If 2) is ignored, then two tangentially touching offset curves are created.
|
||||
// If not ignored, then the two offset curves merge at this double point.
|
||||
// We should merge the contours while pushing the the two copies of the tangent point away a bit.
|
||||
// We should merge the contours while pushing the two copies of the tangent point away a bit.
|
||||
dmin = dmin_new;
|
||||
num_intersections = (offset_distance > dmin) + 1;
|
||||
}
|
||||
|
||||
+8
-14
@@ -225,7 +225,7 @@ _finished:
|
||||
}
|
||||
|
||||
if (model.objects.empty())
|
||||
throw Slic3r::RuntimeError(_L("The supplied file couldn't be read because it's empty"));
|
||||
throw Slic3r::RuntimeError(_L("The supplied file couldn\'t be read because it\'s empty."));
|
||||
|
||||
for (ModelObject *o : model.objects)
|
||||
o->input_file = input_file;
|
||||
@@ -337,7 +337,7 @@ Model Model::read_from_file(const std::string&
|
||||
}
|
||||
#endif
|
||||
else
|
||||
throw Slic3r::RuntimeError(_L("Unknown file format. Input file must have .stl, .obj, .amf(.xml) extension."));
|
||||
throw Slic3r::RuntimeError(_L("Unknown file format: input file must have .stl, .obj, or .amf(.xml) extension."));
|
||||
|
||||
if (is_cb_cancel) {
|
||||
Model empty_model;
|
||||
@@ -352,7 +352,7 @@ Model Model::read_from_file(const std::string&
|
||||
}
|
||||
|
||||
if (model.objects.empty())
|
||||
throw Slic3r::RuntimeError(_L("The supplied file couldn't be read because it's empty"));
|
||||
throw Slic3r::RuntimeError(_L("The supplied file couldn\'t be read because it\'s empty."));
|
||||
|
||||
for (ModelObject *o : model.objects)
|
||||
o->input_file = input_file;
|
||||
@@ -399,7 +399,7 @@ Model Model::read_from_archive(const std::string& input_file, DynamicPrintConfig
|
||||
else if (boost::algorithm::iends_with(input_file, ".zip.amf"))
|
||||
result = load_amf(input_file.c_str(), config, config_substitutions, &model, &is_bbl_3mf);
|
||||
else
|
||||
throw Slic3r::RuntimeError(_L("Unknown file format. Input file must have .3mf or .zip.amf extension."));
|
||||
throw Slic3r::RuntimeError(_L("Unknown file format: input file must have .3mf or .zip.amf extension."));
|
||||
|
||||
if (out_file_type != En3mfType::From_Prusa) {
|
||||
if (is_orca_3mf)
|
||||
@@ -696,8 +696,7 @@ unsigned int Model::update_print_volume_state(const BuildVolume &build_volume)
|
||||
num_printable += model_object->update_instances_print_volume_state(build_volume);
|
||||
//BBS: add logs for build_volume
|
||||
const BoundingBoxf3& print_volume = build_volume.bounding_volume();
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", print_volume {%1%, %2%, %3%} to {%4%, %5%, %6%}, got %7% printable istances")\
|
||||
%print_volume.min.x() %print_volume.min.y() %print_volume.min.z()%print_volume.max.x() %print_volume.max.y() %print_volume.max.z() %num_printable;
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", print_volume {%1%, %2%, %3%} to {%4%, %5%, %6%}, got %7% printable istances") %print_volume.min.x() %print_volume.min.y() %print_volume.min.z()%print_volume.max.x() %print_volume.max.y() %print_volume.max.z() %num_printable;
|
||||
return num_printable;
|
||||
}
|
||||
|
||||
@@ -2127,10 +2126,7 @@ void ModelObject::split(ModelObjectPtrs* new_objects, const bool remap_paint)
|
||||
|
||||
if (is_multi_volume_object) {
|
||||
// BBS: volume geometry not changed, so we can keep the paint facets
|
||||
#define COPY_FACETS(f) \
|
||||
if (new_vol->f.timestamp() == volume->f.timestamp()) \
|
||||
new_vol->f.reset(); /* BBS: let next assign take effect */ \
|
||||
new_vol->f.assign(volume->f)
|
||||
#define COPY_FACETS(f) if (new_vol->f.timestamp() == volume->f.timestamp()) new_vol->f.reset(); /* BBS: let next assign take effect */ new_vol->f.assign(volume->f)
|
||||
|
||||
COPY_FACETS(supported_facets);
|
||||
COPY_FACETS(seam_facets);
|
||||
@@ -2372,8 +2368,7 @@ unsigned int ModelObject::update_instances_print_volume_state(const BuildVolume
|
||||
unsigned int num_printable = 0;
|
||||
//BBS: add logs for build_volume
|
||||
//const BoundingBoxf3& print_volume = build_volume.bounding_volume();
|
||||
//BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", print_volume {%1%, %2%, %3%} to {%4%, %5%, %6%}")\
|
||||
// %print_volume.min.x() %print_volume.min.y() %print_volume.min.z()%print_volume.max.x() %print_volume.max.y() %print_volume.max.z();
|
||||
//BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", print_volume {%1%, %2%, %3%} to {%4%, %5%, %6%}") // %print_volume.min.x() %print_volume.min.y() %print_volume.min.z()%print_volume.max.x() %print_volume.max.y() %print_volume.max.z();
|
||||
for (ModelInstance* model_instance : this->instances) {
|
||||
if (model_instance->update_print_volume_state(build_volume) == ModelInstancePVS_Inside) {
|
||||
//BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", object %1%'s instance inside print volum")%this->name;
|
||||
@@ -3434,8 +3429,7 @@ ModelInstanceEPrintVolumeState ModelInstance::calc_print_volume_state(const Buil
|
||||
BoundingBoxf3 bb = vol->get_convex_hull().bounding_box();
|
||||
Vec3d size = bb.size();
|
||||
if ((size.x() == 0.f) || (size.y() == 0.f) || (size.z() == 0.f)) {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", object %1%'s vol %2% is empty, skip it, box: {%3%, %4%, %5%} to {%6%, %7%, %8%}")%this->object->name %vol->name\
|
||||
%bb.min.x() %bb.min.y() %bb.min.z()%bb.max.x() %bb.max.y() %bb.max.z();
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", object %1%'s vol %2% is empty, skip it, box: {%3%, %4%, %5%} to {%6%, %7%, %8%}")%this->object->name %vol->name %bb.min.x() %bb.min.y() %bb.min.z()%bb.max.x() %bb.max.y() %bb.max.z();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ static bool clip_narrow_corner(
|
||||
bool blocked = forward == Blocked || backward == Blocked;
|
||||
assert(polygon.size() < 3 ||
|
||||
// Remaining triangle is CCW oriented. Both sides must be "blocked", but the other side may have not been
|
||||
// updated after the the p02 / p22 became united into a single point.
|
||||
// updated after the p02 / p22 became united into a single point.
|
||||
blocked ||
|
||||
// Remaining triangle is concave, however both of its arms are long.
|
||||
(forward == Far && backward == Far));
|
||||
|
||||
+248
-168
@@ -23,7 +23,9 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <numeric>
|
||||
#include <unordered_set>
|
||||
#include <sstream>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/log/trivial.hpp>
|
||||
@@ -670,13 +672,13 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||
//juedge the exclude area
|
||||
if (!intersection(exclude_polys, convex_hull_no_offset).empty()) {
|
||||
if (single_object_exception.string.empty()) {
|
||||
single_object_exception.string = (boost::format(L("%1% is too close to exclusion area, there may be collisions when printing.")) %instance.model_instance->get_object()->name).str();
|
||||
single_object_exception.string = (boost::format(L("%1% is too close to exclusion area. There may be collisions when printing.")) %instance.model_instance->get_object()->name).str();
|
||||
// single_object_exception.object = instance.model_instance->get_object();
|
||||
//ORCA: Pass ModelInstance instead of ModelObject
|
||||
single_object_exception.object = instance.model_instance;
|
||||
}
|
||||
else {
|
||||
single_object_exception.string += "\n"+(boost::format(L("%1% is too close to exclusion area, there may be collisions when printing.")) %instance.model_instance->get_object()->name).str();
|
||||
single_object_exception.string += "\n"+(boost::format(L("%1% is too close to exclusion area. There may be collisions when printing.")) %instance.model_instance->get_object()->name).str();
|
||||
single_object_exception.object = nullptr;
|
||||
}
|
||||
//if (polygons) {
|
||||
@@ -1039,7 +1041,7 @@ static StringObjectException layered_print_cleareance_valid(const Print &print,
|
||||
/*if (warning) {
|
||||
warning->string += L("Prime Tower is too close to exclusion area, there may be collisions when printing.\n");
|
||||
}*/
|
||||
return {L("Prime Tower") + L(" is too close to exclusion area, and collisions will be caused.\n")};
|
||||
return {L("Prime Tower") + L(" is too close to an exclusion area, and collisions will be caused.\n")};
|
||||
}
|
||||
if (print_config.enable_wrapping_detection.value && !intersection({wrapping_poly}, convex_hulls_temp).empty()) {
|
||||
return {L("Prime Tower") + L(" is too close to clumping detection area, and collisions will be caused.\n")};
|
||||
@@ -1256,9 +1258,22 @@ StringObjectException Print::check_multi_filament_valid(const Print& print)
|
||||
}
|
||||
|
||||
// Precondition: Print::validate() requires the Print::apply() to be called its invocation.
|
||||
//BBS: refine seq-print validation logic.....FIXME:StringObjectException *warning can only contain one warning, but there might be many warnings, need a vector<StringObjectException>
|
||||
StringObjectException Print::validate(StringObjectException *warning, Polygons* collison_polygons, std::vector<std::pair<Polygon, float>>* height_polygons) const
|
||||
//BBS: refine seq-print validation logic
|
||||
StringObjectException Print::validate(std::vector<StringObjectException> *warnings, Polygons* collison_polygons, std::vector<std::pair<Polygon, float>>* height_polygons) const
|
||||
{
|
||||
auto add_warning = [warnings](StringObjectException w) {
|
||||
w.is_warning = true;
|
||||
if (warnings != nullptr)
|
||||
warnings->push_back(std::move(w));
|
||||
};
|
||||
auto warn = [&](std::string msg, std::string opt_key = "", const ObjectBase* object = nullptr) {
|
||||
StringObjectException w;
|
||||
w.string = std::move(msg);
|
||||
w.opt_key = std::move(opt_key);
|
||||
w.object = object;
|
||||
add_warning(std::move(w));
|
||||
};
|
||||
|
||||
std::vector<unsigned int> extruders = this->extruders();
|
||||
unsigned int nozzles = m_config.nozzle_diameter.size();
|
||||
|
||||
@@ -1273,9 +1288,8 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
if (!ret.string.empty())
|
||||
{
|
||||
ret.type = STRING_EXCEPT_FILAMENTS_DIFFERENT_TEMP;
|
||||
if (ret.is_warning && warning != nullptr) {
|
||||
*warning = ret;
|
||||
//return {};
|
||||
if (ret.is_warning) {
|
||||
add_warning(ret);
|
||||
}else
|
||||
return ret;
|
||||
}
|
||||
@@ -1301,32 +1315,26 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
}
|
||||
else {
|
||||
//BBS
|
||||
auto ret = layered_print_cleareance_valid(*this, warning);
|
||||
StringObjectException layer_warning;
|
||||
auto ret = layered_print_cleareance_valid(*this, &layer_warning);
|
||||
if (!ret.string.empty()) {
|
||||
ret.type = STRING_EXCEPT_OBJECT_COLLISION_IN_LAYER_PRINT;
|
||||
return ret;
|
||||
}
|
||||
if (!layer_warning.string.empty())
|
||||
add_warning(layer_warning);
|
||||
}
|
||||
|
||||
if (m_config.enable_prime_tower) {
|
||||
for (const PrintObject* object : m_objects) {
|
||||
if (object->config().precise_z_height.value && warning != nullptr) {
|
||||
StringObjectException warningtemp;
|
||||
warningtemp.string = L("Enabling both precise Z height and the prime tower may cause slicing errors.");
|
||||
warningtemp.opt_key = "precise_z_height";
|
||||
warningtemp.is_warning = true;
|
||||
*warning = warningtemp;
|
||||
if (object->config().precise_z_height.value) {
|
||||
warn(L("Enabling both precise Z height and the prime tower may cause slicing errors."), "precise_z_height");
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (m_config.enable_wrapping_detection && warning!=nullptr) {
|
||||
StringObjectException warningtemp;
|
||||
warningtemp.string = L("A prime tower is required for clumping detection; otherwise, there may be flaws on the model.");
|
||||
warningtemp.opt_key = "enable_prime_tower";
|
||||
warningtemp.is_warning = true;
|
||||
*warning = warningtemp;
|
||||
}
|
||||
if (m_config.enable_wrapping_detection)
|
||||
warn(L("A prime tower is required for clumping detection; otherwise, there may be flaws on the model."), "enable_prime_tower");
|
||||
}
|
||||
|
||||
if (m_config.spiral_mode) {
|
||||
@@ -1343,7 +1351,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
if (std::any_of(all_regions.begin() + 1, all_regions.end(), [ra = all_regions.front()](const auto rb) {
|
||||
return !Layer::is_perimeter_compatible(ra, rb);
|
||||
})) {
|
||||
return {L("The spiral vase mode does not work when an object contains more than one materials."), nullptr, "spiral_mode"};
|
||||
return {L("Spiral (vase) mode does not work when an object contains more than one material."), nullptr, "spiral_mode"};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1422,8 +1430,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
if (nozzle_diam - EPSILON > first_nozzle_diam || nozzle_diam + EPSILON < first_nozzle_diam
|
||||
|| std::abs((filament_diam - first_filament_diam) / first_filament_diam) > 0.1) {
|
||||
// return { L("Different nozzle diameters and different filament diameters may not work well when prime tower is enabled. It's very experimental, please proceed with caucious.") };
|
||||
warning->string = L("Different nozzle diameters and different filament diameters may not work well when the prime tower is enabled. It's very experimental, so please proceed with caution.");
|
||||
warning->opt_key = "nozzle_diameter";
|
||||
warn(L("Different nozzle diameters and different filament diameters may not work well when the prime tower is enabled. It's very experimental, so please proceed with caution."), "nozzle_diameter");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1440,14 +1447,14 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
return { L("The prime tower is currently only supported for the Marlin, RepRap/Sprinter, RepRapFirmware and Repetier G-code flavors.")};
|
||||
|
||||
if ((m_config.print_sequence == PrintSequence::ByObject) && extruders.size() > 1)
|
||||
return { L("The prime tower is not supported in \"By object\" print."), nullptr, "enable_prime_tower" };
|
||||
return { L("A prime tower is not supported in \u201cBy object\u201d print."), nullptr, "enable_prime_tower" };
|
||||
|
||||
// BBS: When prime tower is on, object layer and support layer must be aligned. So support gap should be multiple of object layer height.
|
||||
for (size_t i = 0; i < m_objects.size(); i++) {
|
||||
const PrintObject* object = m_objects[i];
|
||||
const SlicingParameters& slicing_params = object->slicing_parameters();
|
||||
if (object->config().adaptive_layer_height) {
|
||||
return { L("The prime tower is not supported when adaptive layer height is on. It requires that all objects have the same layer height."), object, "adaptive_layer_height" };
|
||||
return { L("A prime tower is not supported when adaptive layer height is on. It requires that all objects have the same layer height."), object, "adaptive_layer_height" };
|
||||
}
|
||||
|
||||
if (!object->config().enable_support)
|
||||
@@ -1455,7 +1462,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
|
||||
double gap_layers = slicing_params.gap_object_support / slicing_params.layer_height;
|
||||
if (gap_layers - (int)gap_layers > EPSILON) {
|
||||
return {L("The prime tower requires \"support gap\" to be multiple of layer height."), object};
|
||||
return {L("A prime tower requires any \u201csupport gap\u201d to be a multiple of layer height."), object};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1468,9 +1475,9 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
const SlicingParameters &slicing_params = object->slicing_parameters();
|
||||
if (std::abs(slicing_params.first_print_layer_height - slicing_params0.first_print_layer_height) > EPSILON ||
|
||||
std::abs(slicing_params.layer_height - slicing_params0.layer_height ) > EPSILON)
|
||||
return {L("The prime tower requires that all objects have the same layer heights."), object, "initial_layer_print_height"};
|
||||
return {L("A prime tower requires that all objects have the same layer height."), object, "initial_layer_print_height"};
|
||||
if (slicing_params.raft_layers() != slicing_params0.raft_layers())
|
||||
return {L("The prime tower requires that all objects are printed over the same number of raft layers."), object, "raft_layers"};
|
||||
return {L("A prime tower requires that all objects are printed over the same number of raft layers."), object, "raft_layers"};
|
||||
// BBS: support gap can be multiple of object layer height, remove _L()
|
||||
#if 0
|
||||
if (slicing_params0.gap_object_support != slicing_params.gap_object_support ||
|
||||
@@ -1478,7 +1485,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
return {L("The prime tower is only supported for multiple objects if they are printed with the same support_top_z_distance."), object};
|
||||
#endif
|
||||
if (!equal_layering(slicing_params, slicing_params0))
|
||||
return { L("The prime tower requires that all objects are sliced with the same layer heights."), object };
|
||||
return { L("A prime tower requires that all objects are sliced with the same layer height."), object };
|
||||
if (has_custom_layering) {
|
||||
auto &lh = layer_height_profile(i);
|
||||
auto &lh_tallest = layer_height_profile(tallest_object_idx);
|
||||
@@ -1544,10 +1551,10 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
if (extrusion_width_min == 0) {
|
||||
// Default "auto-generated" extrusion width is always valid.
|
||||
} else if (extrusion_width_min <= layer_height) {
|
||||
err_msg = L("Too small line width");
|
||||
err_msg = L("Line width too small");
|
||||
return false;
|
||||
} else if (extrusion_width_max > max_nozzle_diameter * MAX_LINE_WIDTH_MULTIPLIER) {
|
||||
err_msg = L("Too large line width");
|
||||
err_msg = L("Line width too large");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1569,7 +1576,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
// BBS
|
||||
#if 0
|
||||
if (this->has_wipe_tower() && object->config().independent_support_layer_height) {
|
||||
return {L("The prime tower requires that support has the same layer height with object."), object, "support_filament"};
|
||||
return {L("A prime tower requires that support has the same layer height as the object."), object, "support_filament"};
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1580,22 +1587,15 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
// Orca: use organic as default
|
||||
object->config().support_style == smsDefault) {
|
||||
|
||||
if (warning) {
|
||||
// Orca: check the support wall count and the base pattern
|
||||
if (object->config().tree_support_wall_count > 1 &&
|
||||
object->config().support_base_pattern != SupportMaterialPattern::smpNone &&
|
||||
object->config().support_base_pattern != SupportMaterialPattern::smpDefault) {
|
||||
warning->string = L("For Organic supports, two walls are supported only with the Hollow/Default base pattern.");
|
||||
warning->opt_key = "support_base_pattern";
|
||||
}
|
||||
// Orca: check the support wall count and the base pattern
|
||||
if (object->config().tree_support_wall_count > 1 &&
|
||||
object->config().support_base_pattern != SupportMaterialPattern::smpNone &&
|
||||
object->config().support_base_pattern != SupportMaterialPattern::smpDefault)
|
||||
warn(L("For Organic supports, two walls are supported only with the Hollow/Default base pattern."), "support_base_pattern");
|
||||
|
||||
// Orca: check if the Lightning base pattern selected
|
||||
if (object->config().support_base_pattern == SupportMaterialPattern::smpLightning) {
|
||||
warning->string = L(
|
||||
"The Lightning base pattern is not supported by this support type; Rectilinear will be used instead.");
|
||||
warning->opt_key = "support_base_pattern";
|
||||
}
|
||||
}
|
||||
// Orca: check if the Lightning base pattern selected
|
||||
if (object->config().support_base_pattern == SupportMaterialPattern::smpLightning)
|
||||
warn(L("The Lightning base pattern is not supported by this support type; Rectilinear will be used instead."), "support_base_pattern");
|
||||
|
||||
float extrusion_width = std::min(
|
||||
support_material_flow(object).width(),
|
||||
@@ -1607,28 +1607,23 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
if (object->config().tree_support_branch_diameter_organic < object->config().tree_support_tip_diameter)
|
||||
return { L("Organic support branch diameter must not be smaller than support tree tip diameter."), object, "tree_support_branch_diameter_organic" };
|
||||
}
|
||||
} else if (object->config().support_base_pattern == SupportMaterialPattern::smpLightning && warning) {
|
||||
} else if (object->config().support_base_pattern == SupportMaterialPattern::smpLightning) {
|
||||
// Orca: check if the Lightning base pattern selected
|
||||
warning->string = L("The Lightning base pattern is not supported by this support type; Rectilinear will be used instead.");
|
||||
warning->opt_key = "support_base_pattern";
|
||||
} else if (object->config().support_base_pattern == SupportMaterialPattern::smpNone && warning) {
|
||||
warn(L("The Lightning base pattern is not supported by this support type; Rectilinear will be used instead."), "support_base_pattern");
|
||||
} else if (object->config().support_base_pattern == SupportMaterialPattern::smpNone) {
|
||||
// Orca: check if the Hollow base pattern selected
|
||||
warning->string = L("The Hollow base pattern is not supported by this support type; Rectilinear will be used instead.");
|
||||
warning->opt_key = "support_base_pattern";
|
||||
warn(L("The Hollow base pattern is not supported by this support type; Rectilinear will be used instead."), "support_base_pattern");
|
||||
}
|
||||
}
|
||||
|
||||
// Do we have custom support data that would not be used?
|
||||
// Notify the user in that case.
|
||||
if (! object->has_support() && warning) {
|
||||
if (! object->has_support()) {
|
||||
for (const ModelVolume* mv : object->model_object()->volumes) {
|
||||
bool has_enforcers = mv->is_support_enforcer() ||
|
||||
(mv->is_model_part() && mv->supported_facets.has_facets(*mv, EnforcerBlockerType::ENFORCER));
|
||||
if (has_enforcers) {
|
||||
StringObjectException warningtemp;
|
||||
warningtemp.string = L("Support enforcers are used but support is not enabled. Please enable support.");
|
||||
warningtemp.object = object;
|
||||
*warning = warningtemp;
|
||||
warn(L("Support enforcers are used but support is not enabled. Please enable support."), "", object);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1682,7 +1677,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
return { err_msg, object, "bridge_line_width" };
|
||||
}
|
||||
if (!allow_thin_bridge_width && bridge_width <= layer_height) {
|
||||
err_msg = L("Too small line width");
|
||||
err_msg = L("Line width too small");
|
||||
return { err_msg, object, "bridge_line_width" };
|
||||
}
|
||||
}
|
||||
@@ -1780,7 +1775,11 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
}
|
||||
|
||||
// check if print speed/accel/jerk is higher than the maximum speed of the printer
|
||||
if (warning) {
|
||||
if (warnings) {
|
||||
// The motion-ability checks are mutually exclusive (gated on warning_key), so collect the
|
||||
// single one that fires into a local and push it once - separate from the precise-wall and
|
||||
// shrinkage warnings below.
|
||||
StringObjectException motion_warning;
|
||||
try {
|
||||
auto check_motion_ability_object_setting = [&](const std::vector<std::string>& keys_to_check, double limit) -> std::string {
|
||||
std::string warning_key;
|
||||
@@ -1811,7 +1810,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
if (!ignore_jerk_validation) {
|
||||
if (m_default_object_config.default_jerk == 1 || m_default_object_config.outer_wall_jerk == 1 ||
|
||||
m_default_object_config.inner_wall_jerk == 1) {
|
||||
warning->string = L("Setting the jerk speed too low could lead to artifacts on curved surfaces");
|
||||
motion_warning.string = L("Setting the jerk speed too low could lead to artifacts on curved surfaces");
|
||||
if (m_default_object_config.outer_wall_jerk == 1)
|
||||
warning_key = "outer_wall_jerk";
|
||||
else if (m_default_object_config.inner_wall_jerk == 1)
|
||||
@@ -1819,7 +1818,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
else
|
||||
warning_key = "default_jerk";
|
||||
|
||||
warning->opt_key = warning_key;
|
||||
motion_warning.opt_key = warning_key;
|
||||
}
|
||||
|
||||
if (warning_key.empty() && m_default_object_config.default_jerk > 0) {
|
||||
@@ -1829,20 +1828,20 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
warning_key.clear();
|
||||
warning_key = check_motion_ability_object_setting(jerk_to_check, max_jerk);
|
||||
if (!warning_key.empty()) {
|
||||
warning->string = L(
|
||||
motion_warning.string = L(
|
||||
"The jerk setting exceeds the printer's maximum jerk (machine_max_jerk_x/machine_max_jerk_y).\n"
|
||||
"Orca will automatically cap the jerk speed to ensure it doesn't surpass the printer's capabilities.\n"
|
||||
"You can adjust the maximum jerk setting in your printer's configuration to get higher speeds.");
|
||||
warning->opt_key = warning_key;
|
||||
motion_warning.opt_key = warning_key;
|
||||
}
|
||||
}
|
||||
}
|
||||
// check junction deviation
|
||||
else if (m_default_object_config.default_junction_deviation.value > max_junction_deviation) {
|
||||
warning->string = L( "Junction deviation setting exceeds the printer's maximum value (machine_max_junction_deviation).\n"
|
||||
motion_warning.string = L( "Junction deviation setting exceeds the printer's maximum value (machine_max_junction_deviation).\n"
|
||||
"Orca will automatically cap the junction deviation to ensure it doesn't surpass the printer's capabilities.\n"
|
||||
"You can adjust the machine_max_junction_deviation value in your printer's configuration to get higher limits.");
|
||||
warning->opt_key = "default_junction_deviation";
|
||||
motion_warning.opt_key = "default_junction_deviation";
|
||||
}
|
||||
|
||||
// check acceleration
|
||||
@@ -1877,12 +1876,12 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
};
|
||||
warning_key = check_motion_ability_object_setting(accel_to_check, max_accel);
|
||||
if (!warning_key.empty()) {
|
||||
warning->string = L("The acceleration setting exceeds the printer's maximum acceleration "
|
||||
motion_warning.string = L("The acceleration setting exceeds the printer's maximum acceleration "
|
||||
"(machine_max_acceleration_extruding).\nOrca will "
|
||||
"automatically cap the acceleration speed to ensure it doesn't surpass the printer's "
|
||||
"capabilities.\nYou can adjust the "
|
||||
"machine_max_acceleration_extruding value in your printer's configuration to get higher speeds.");
|
||||
warning->opt_key = warning_key;
|
||||
motion_warning.opt_key = warning_key;
|
||||
}
|
||||
if (support_travel_acc) {
|
||||
const auto max_travel = m_config.machine_max_acceleration_travel.values[0];
|
||||
@@ -1892,13 +1891,13 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
};
|
||||
warning_key = check_motion_ability_object_setting(accel_to_check, max_travel);
|
||||
if (!warning_key.empty()) {
|
||||
warning->string = L(
|
||||
motion_warning.string = L(
|
||||
"The travel acceleration setting exceeds the printer's maximum travel acceleration "
|
||||
"(machine_max_acceleration_travel).\nOrca will "
|
||||
"automatically cap the travel acceleration speed to ensure it doesn't surpass the printer's "
|
||||
"capabilities.\nYou can adjust the "
|
||||
"machine_max_acceleration_travel value in your printer's configuration to get higher speeds.");
|
||||
warning->opt_key = warning_key;
|
||||
motion_warning.opt_key = warning_key;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1924,19 +1923,34 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
// }
|
||||
|
||||
// check wall sequence and precise outer wall
|
||||
if (m_default_region_config.precise_outer_wall && m_default_region_config.wall_sequence != WallSequence::InnerOuter) {
|
||||
warning->string = L("The precise wall option will be ignored for outer-inner or inner-outer-inner wall sequences.");
|
||||
warning->opt_key = "precise_outer_wall";
|
||||
if (m_default_region_config.precise_outer_wall && m_default_region_config.wall_sequence != WallSequence::InnerOuter)
|
||||
warn(L("The precise wall option will be ignored for outer-inner or inner-outer-inner wall sequences."), "precise_outer_wall");
|
||||
|
||||
// check adaptive pressure advance model
|
||||
for (unsigned int extruder_id : extruders) {
|
||||
if (m_config.adaptive_pressure_advance.get_at(extruder_id) &&
|
||||
m_config.enable_pressure_advance.get_at(extruder_id)) {
|
||||
|
||||
const std::string pa_model = m_config.adaptive_pressure_advance_model.get_at(extruder_id);
|
||||
if (!pa_model.empty()) {
|
||||
std::string validation_error = AdaptivePAProcessor::validate_adaptive_pa_model(pa_model);
|
||||
if (!validation_error.empty()) {
|
||||
warn(L("The Adaptive Pressure Advance model for one or more extruders may contain invalid values."),
|
||||
"adaptive_pressure_advance_model");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (std::exception& e) {
|
||||
BOOST_LOG_TRIVIAL(warning) << "Orca: validate motion ability failed: " << e.what() << std::endl;
|
||||
}
|
||||
if (!motion_warning.string.empty())
|
||||
add_warning(motion_warning);
|
||||
}
|
||||
if (!this->has_same_shrinkage_compensations()){
|
||||
warning->string = L("Filament shrinkage will not be used because filament shrinkage for the used filaments does not match.");
|
||||
warning->opt_key = "";
|
||||
}
|
||||
if (!this->has_same_shrinkage_compensations())
|
||||
warn(L("Filament shrinkage will not be used because filament shrinkage for the used filaments does not match."));
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -2442,7 +2456,10 @@ void Print::process(long long *time_cost_with_cache, bool use_cache)
|
||||
start_time = (long long)Slic3r::Utils::get_current_time_utc();
|
||||
|
||||
m_skirt.clear();
|
||||
m_skirt_groups.clear();
|
||||
m_skirt_convex_hull.clear();
|
||||
m_objectBrimAreas.clear();
|
||||
m_supportBrimAreas.clear();
|
||||
m_first_layer_convex_hull.points.clear();
|
||||
for (PrintObject *object : m_objects) object->m_skirt.clear();
|
||||
|
||||
@@ -2536,7 +2553,7 @@ void Print::process(long long *time_cost_with_cache, bool use_cache)
|
||||
if (this->has_brim()) {
|
||||
Polygons islands_area;
|
||||
make_brim(*this, this->make_try_cancel(), islands_area, m_brimMap,
|
||||
m_supportBrimMap, objPrintVec, printExtruders);
|
||||
m_supportBrimMap, objPrintVec, printExtruders, &m_objectBrimAreas, &m_supportBrimAreas);
|
||||
for (Polygon& poly_ex : islands_area)
|
||||
poly_ex.douglas_peucker(SCALED_RESOLUTION);
|
||||
for (Polygon &poly : union_(this->first_layer_islands(), islands_area))
|
||||
@@ -2658,11 +2675,13 @@ void Print::_make_skirt()
|
||||
skirt_height_z = std::max(skirt_height_z, object->m_layers[skirt_layers-1]->print_z);
|
||||
}
|
||||
|
||||
// Collect points from all layers contained in skirt height.
|
||||
Points points;
|
||||
struct ObjectSkirtHull {
|
||||
PrintObject* object;
|
||||
Polygon hull;
|
||||
};
|
||||
|
||||
// BBS
|
||||
std::map<PrintObject*, Polygon> object_convex_hulls;
|
||||
// Orca: build one local occupied hull per object from object and support geometry up to skirt height.
|
||||
std::vector<ObjectSkirtHull> object_convex_hulls;
|
||||
for (PrintObject *object : m_objects) {
|
||||
Points object_points;
|
||||
// Get object layers up to skirt_height_z.
|
||||
@@ -2680,30 +2699,13 @@ void Print::_make_skirt()
|
||||
layer->support_fills.collect_points(object_points);
|
||||
}
|
||||
|
||||
object_convex_hulls.insert({ object, Slic3r::Geometry::convex_hull(object_points) });
|
||||
|
||||
// Repeat points for each object copy.
|
||||
for (const PrintInstance &instance : object->instances()) {
|
||||
Points copy_points = object_points;
|
||||
for (Point &pt : copy_points)
|
||||
pt += instance.shift;
|
||||
append(points, copy_points);
|
||||
}
|
||||
object_convex_hulls.push_back({ object, Slic3r::Geometry::convex_hull(object_points) });
|
||||
}
|
||||
|
||||
// Include the wipe tower.
|
||||
append(points, this->first_layer_wipe_tower_corners());
|
||||
|
||||
// Unless draft shield is enabled, include all brims as well.
|
||||
if (config().draft_shield == dsDisabled)
|
||||
append(points, m_first_layer_convex_hull.points);
|
||||
|
||||
if (points.size() < 3)
|
||||
// At least three points required for a convex hull.
|
||||
if (object_convex_hulls.empty())
|
||||
return;
|
||||
|
||||
this->throw_if_canceled();
|
||||
Polygon convex_hull = Slic3r::Geometry::convex_hull(points);
|
||||
|
||||
// Skirt may be printed on several layers, having distinct layer heights,
|
||||
// but loops must be aligned so can't vary width/spacing
|
||||
@@ -2725,13 +2727,13 @@ void Print::_make_skirt()
|
||||
}
|
||||
}
|
||||
|
||||
// Initial offset of the brim inner edge from the object (possible with a support & raft).
|
||||
// The skirt will touch the brim if the brim is extruded.
|
||||
auto distance = float(scale_(m_config.skirt_distance.value - spacing/2.));
|
||||
// Draw outlines from outside to inside.
|
||||
// Initial skirt centerline offset from the occupied outline.
|
||||
// The skirt will touch the occupied outline if skirt_distance is zero.
|
||||
// Generate loops inward to outward; callers reverse them before G-code export.
|
||||
// Loop while we have less skirts than required or any extruder hasn't reached the min length if any.
|
||||
std::vector<coordf_t> extruded_length(extruders.size(), 0.);
|
||||
if (m_config.skirt_type == stCombined) {
|
||||
auto append_skirt_loops_for_hull = [&](const Polygon& hull, ExtrusionEntityCollection& dst, bool collect_skirt_hull) {
|
||||
float distance = float(scale_(m_config.skirt_distance.value - spacing/2.));
|
||||
std::vector<coordf_t> extruded_length(extruders.size(), 0.);
|
||||
for (size_t i = m_config.skirt_loops, extruder_idx = 0; i > 0; -- i) {
|
||||
this->throw_if_canceled();
|
||||
// Offset the skirt outside.
|
||||
@@ -2739,8 +2741,8 @@ void Print::_make_skirt()
|
||||
// Generate the skirt centerline.
|
||||
Polygon loop;
|
||||
{
|
||||
// BBS. skirt_distance is defined as the gap between skirt and outer most brim, so no need to add max_brim_width
|
||||
Polygons loops = offset(convex_hull, distance, ClipperLib::jtRound, float(scale_(0.1)));
|
||||
// Orca: the hull already represents the occupied outline used for this skirt.
|
||||
Polygons loops = offset(hull, distance, ClipperLib::jtRound, float(scale_(0.1)));
|
||||
Geometry::simplify_polygons(loops, scale_(0.05), &loops);
|
||||
if (loops.empty())
|
||||
break;
|
||||
@@ -2756,7 +2758,7 @@ void Print::_make_skirt()
|
||||
(float)initial_layer_print_height // this will be overridden at G-code export time
|
||||
)));
|
||||
eloop.paths.back().polyline = Polyline3(loop.split_at_first_point());
|
||||
m_skirt.append(eloop);
|
||||
dst.append(eloop);
|
||||
if (m_config.min_skirt_length.value > 0) {
|
||||
// The skirt length is limited. Sum the total amount of filament length extruded, in mm.
|
||||
extruded_length[extruder_idx] += unscale<double>(loop.length()) * extruders_e_per_mm[extruder_idx];
|
||||
@@ -2772,69 +2774,147 @@ void Print::_make_skirt()
|
||||
++ extruder_idx;
|
||||
}
|
||||
} else {
|
||||
// The skirt lenght is not limited, extrude the skirt with the 1st extruder only.
|
||||
// The skirt length is not limited, extrude the skirt with the 1st extruder only.
|
||||
}
|
||||
}
|
||||
} else {
|
||||
m_skirt.clear();
|
||||
}
|
||||
// Brims were generated inside out, reverse to print the outmost contour first.
|
||||
m_skirt.reverse();
|
||||
|
||||
// Remember the outer edge of the last skirt line extruded as m_skirt_convex_hull.
|
||||
for (Polygon &poly : offset(convex_hull, distance + 0.5f * float(scale_(spacing)), ClipperLib::jtRound, float(scale_(0.1))))
|
||||
append(m_skirt_convex_hull, std::move(poly.points));
|
||||
if (collect_skirt_hull)
|
||||
for (Polygon &poly : offset(hull, distance + 0.5f * float(scale_(spacing)), ClipperLib::jtRound, float(scale_(0.1))))
|
||||
append(m_skirt_convex_hull, std::move(poly.points));
|
||||
};
|
||||
|
||||
if (m_config.skirt_type == stPerObject) {
|
||||
// BBS
|
||||
for (auto obj_cvx_hull : object_convex_hulls) {
|
||||
double object_skirt_distance = float(scale_(m_config.skirt_distance.value - spacing/2.));
|
||||
PrintObject* object = obj_cvx_hull.first;
|
||||
object->m_skirt.clear();
|
||||
extruded_length.assign(extruded_length.size(), 0.);
|
||||
for (size_t i = m_config.skirt_loops.value, extruder_idx = 0; i > 0; -- i) {
|
||||
object_skirt_distance += float(scale_(spacing));
|
||||
Polygon loop;
|
||||
{
|
||||
// BBS. skirt_distance is defined as the gap between skirt and outer most brim, so no need to add max_brim_width
|
||||
Polygons loops = offset(obj_cvx_hull.second, object_skirt_distance, ClipperLib::jtRound, float(scale_(0.1)));
|
||||
Geometry::simplify_polygons(loops, scale_(0.05), &loops);
|
||||
if (loops.empty())
|
||||
break;
|
||||
loop = loops.front();
|
||||
}
|
||||
m_skirt.clear();
|
||||
m_skirt_groups.clear();
|
||||
|
||||
// Extrude the skirt loop.
|
||||
ExtrusionLoop eloop(elrSkirt);
|
||||
eloop.paths.emplace_back(ExtrusionPath(
|
||||
ExtrusionPath(
|
||||
erSkirt,
|
||||
(float)mm3_per_mm, // this will be overridden at G-code export time
|
||||
flow.width(),
|
||||
(float)initial_layer_print_height // this will be overridden at G-code export time
|
||||
)));
|
||||
eloop.paths.back().polyline = Polyline3(loop.split_at_first_point());
|
||||
object->m_skirt.append(std::move(eloop));
|
||||
if (m_config.min_skirt_length.value > 0) {
|
||||
// The skirt length is limited. Sum the total amount of filament length extruded, in mm.
|
||||
extruded_length[extruder_idx] += unscale<double>(loop.length()) * extruders_e_per_mm[extruder_idx];
|
||||
if (extruded_length[extruder_idx] < m_config.min_skirt_length.value) {
|
||||
// Not extruded enough yet with the current extruder. Add another loop.
|
||||
if (i == 1)
|
||||
++ i;
|
||||
} else {
|
||||
assert(extruded_length[extruder_idx] >= m_config.min_skirt_length.value);
|
||||
// Enough extruded with the current extruder. Extrude with the next one,
|
||||
// until the prescribed number of skirt loops is extruded.
|
||||
if (extruder_idx + 1 < extruders.size())
|
||||
++ extruder_idx;
|
||||
}
|
||||
} else {
|
||||
// The skirt lenght is not limited, extrude the skirt with the 1st extruder only.
|
||||
}
|
||||
if (m_config.skirt_type == stPerObject && m_config.print_sequence == PrintSequence::ByObject) {
|
||||
for (const ObjectSkirtHull& object_hull : object_convex_hulls) {
|
||||
object_hull.object->m_skirt.clear();
|
||||
append_skirt_loops_for_hull(object_hull.hull, object_hull.object->m_skirt, false);
|
||||
object_hull.object->m_skirt.reverse();
|
||||
}
|
||||
} else if (m_config.skirt_type == stCombined || m_config.skirt_type == stPerObject) {
|
||||
struct SkirtGroupItem {
|
||||
Points occupied_points;
|
||||
bool emits_skirt;
|
||||
};
|
||||
|
||||
// Orca: group items represent occupied first-layer areas. Object items emit skirts;
|
||||
// obstacle-only items, such as wipe tower, only force nearby object groups to merge.
|
||||
std::vector<SkirtGroupItem> group_items;
|
||||
const coord_t grouping_offset = scale_(m_config.skirt_distance.value + m_config.skirt_loops.value * spacing);
|
||||
for (const ObjectSkirtHull& object_hull : object_convex_hulls) {
|
||||
PrintObject* object = object_hull.object;
|
||||
Points occupied_points;
|
||||
for (const PrintInstance &instance : object->instances()) {
|
||||
Points copy_points = object_hull.hull.points;
|
||||
for (Point &pt : copy_points)
|
||||
pt += instance.shift;
|
||||
append(occupied_points, copy_points);
|
||||
}
|
||||
|
||||
auto append_brim_points = [&occupied_points](const ExPolygons& areas) {
|
||||
for (const ExPolygon& area : areas)
|
||||
append(occupied_points, area.contour.points);
|
||||
};
|
||||
if (auto it = m_objectBrimAreas.find(object->id()); it != m_objectBrimAreas.end())
|
||||
append_brim_points(it->second);
|
||||
if (auto it = m_supportBrimAreas.find(object->id()); it != m_supportBrimAreas.end())
|
||||
append_brim_points(it->second);
|
||||
if (occupied_points.size() < 3)
|
||||
continue;
|
||||
|
||||
// Orca: include the object's brim/support-brim footprint before checking skirt collisions.
|
||||
group_items.push_back({ std::move(occupied_points), true });
|
||||
}
|
||||
|
||||
// Orca: the wipe tower contributes occupied area, but does not emit a skirt by itself.
|
||||
Points wipe_tower_points = this->first_layer_wipe_tower_corners();
|
||||
if (wipe_tower_points.size() >= 3)
|
||||
group_items.push_back({ std::move(wipe_tower_points), false });
|
||||
|
||||
std::vector<size_t> parent(group_items.size());
|
||||
std::iota(parent.begin(), parent.end(), 0);
|
||||
// Orca: union-find keeps collision merging local without repeatedly rebuilding item lists.
|
||||
auto find_parent = [&parent](size_t idx) {
|
||||
while (parent[idx] != idx) {
|
||||
parent[idx] = parent[parent[idx]];
|
||||
idx = parent[idx];
|
||||
}
|
||||
return idx;
|
||||
};
|
||||
auto unite = [&parent, &find_parent](size_t a, size_t b) {
|
||||
a = find_parent(a);
|
||||
b = find_parent(b);
|
||||
if (a != b)
|
||||
parent[b] = a;
|
||||
};
|
||||
|
||||
// Orca: combined skirt is the same grouping model with all items forced into one group.
|
||||
if (m_config.skirt_type == stCombined && !group_items.empty())
|
||||
for (size_t i = 1; i < group_items.size(); ++i)
|
||||
unite(0, i);
|
||||
|
||||
auto build_grouped_points = [&]() {
|
||||
struct GroupData {
|
||||
Points points;
|
||||
bool emits_skirt = false;
|
||||
};
|
||||
|
||||
std::map<size_t, GroupData> grouped;
|
||||
for (size_t i = 0; i < group_items.size(); ++i) {
|
||||
GroupData& group = grouped[find_parent(i)];
|
||||
append(group.points, group_items[i].occupied_points);
|
||||
group.emits_skirt = group.emits_skirt || group_items[i].emits_skirt;
|
||||
}
|
||||
return grouped;
|
||||
};
|
||||
|
||||
bool groups_changed = m_config.skirt_type == stPerObject;
|
||||
while (groups_changed) {
|
||||
groups_changed = false;
|
||||
auto grouped_points = build_grouped_points();
|
||||
std::vector<std::pair<size_t, Polygon>> group_envelopes;
|
||||
for (const auto& [root, group] : grouped_points) {
|
||||
if (group.points.size() < 3)
|
||||
continue;
|
||||
|
||||
// Orca: emitting groups are expanded to their final skirt reach; obstacle groups are not.
|
||||
Polygon envelope = Geometry::convex_hull(group.points);
|
||||
if (group.emits_skirt) {
|
||||
// Orca: merge groups when a skirt envelope intersects another group or obstacle.
|
||||
Polygons envelopes = offset(envelope, grouping_offset, ClipperLib::jtRound, float(scale_(0.1)));
|
||||
if (envelopes.empty())
|
||||
continue;
|
||||
envelope = std::move(envelopes.front());
|
||||
}
|
||||
group_envelopes.emplace_back(root, std::move(envelope));
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < group_envelopes.size(); ++i) {
|
||||
for (size_t j = i + 1; j < group_envelopes.size(); ++j) {
|
||||
const size_t root_i = find_parent(group_envelopes[i].first);
|
||||
const size_t root_j = find_parent(group_envelopes[j].first);
|
||||
if (root_i != root_j && !intersection(group_envelopes[i].second, group_envelopes[j].second).empty()) {
|
||||
unite(root_i, root_j);
|
||||
groups_changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto grouped_points = build_grouped_points();
|
||||
for (auto& [_, group] : grouped_points) {
|
||||
if (!group.emits_skirt || group.points.size() < 3)
|
||||
continue;
|
||||
// Orca: after merging, use the occupied outline directly; do not add skirt distance twice.
|
||||
ExtrusionEntityCollection group_skirt;
|
||||
append_skirt_loops_for_hull(Geometry::convex_hull(group.points), group_skirt, true);
|
||||
if (!group_skirt.empty()) {
|
||||
group_skirt.reverse();
|
||||
// Orca: keep m_skirt as a flattened compatibility mirror for preview/extents.
|
||||
m_skirt.append(group_skirt.entities);
|
||||
m_skirt_groups.push_back(std::move(group_skirt));
|
||||
}
|
||||
object->m_skirt.reverse();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -932,7 +932,7 @@ public:
|
||||
}
|
||||
|
||||
// Returns an empty string if valid, otherwise returns an error message.
|
||||
StringObjectException validate(StringObjectException *warning = nullptr, Polygons* collison_polygons = nullptr, std::vector<std::pair<Polygon, float>>* height_polygons = nullptr) const override;
|
||||
StringObjectException validate(std::vector<StringObjectException> *warnings = nullptr, Polygons* collison_polygons = nullptr, std::vector<std::pair<Polygon, float>>* height_polygons = nullptr) const override;
|
||||
double skirt_first_layer_height() const;
|
||||
Flow brim_flow() const;
|
||||
Flow skirt_flow() const;
|
||||
@@ -971,6 +971,7 @@ public:
|
||||
PrintRegionPtrs& print_regions_mutable() { return m_print_regions; }
|
||||
std::vector<size_t> layers_sorted_for_object(float start, float end, std::vector<LayerPtrs> &layers_of_objects, std::vector<BoundingBox> &boundingBox_for_objects, VecOfPoints& objects_instances_shift);
|
||||
const ExtrusionEntityCollection& skirt() const { return m_skirt; }
|
||||
const std::vector<ExtrusionEntityCollection>& skirt_groups() const { return m_skirt_groups; }
|
||||
// Convex hull of the 1st layer extrusions, for bed leveling and placing the initial purge line.
|
||||
// It encompasses the object extrusions, support extrusions, skirt, brim, wipe tower.
|
||||
// It does NOT encompass user extrusions generated by custom G-code,
|
||||
@@ -1144,9 +1145,13 @@ private:
|
||||
|
||||
// Ordered collections of extrusion paths to build skirt loops and brim.
|
||||
ExtrusionEntityCollection m_skirt;
|
||||
std::vector<ExtrusionEntityCollection> m_skirt_groups;
|
||||
// BBS: collecting extrusion paths to build brim by objs
|
||||
std::map<ObjectID, ExtrusionEntityCollection> m_brimMap;
|
||||
std::map<ObjectID, ExtrusionEntityCollection> m_supportBrimMap;
|
||||
// Orca: cached occupied brim footprints used when grouping per-object skirts.
|
||||
std::map<ObjectID, ExPolygons> m_objectBrimAreas;
|
||||
std::map<ObjectID, ExPolygons> m_supportBrimAreas;
|
||||
// Convex hull of the 1st layer extrusions.
|
||||
// It encompasses the object extrusions, support extrusions, skirt, brim, wipe tower.
|
||||
// It does NOT encompass user extrusions generated by custom G-code,
|
||||
|
||||
@@ -83,7 +83,7 @@ std::string PrintBase::output_filename(const std::string &format, const std::str
|
||||
filename.replace_extension(default_ext);
|
||||
return filename.string();
|
||||
} catch (std::runtime_error &err) {
|
||||
throw Slic3r::PlaceholderParserError(L("Failed processing of the filename_format template.") + "\n" + err.what());
|
||||
throw Slic3r::PlaceholderParserError(L("Processing of the filename_format template failed.") + "\n" + err.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ struct StringObjectException
|
||||
std::string string;
|
||||
ObjectBase const *object = nullptr;
|
||||
std::string opt_key;
|
||||
StringExceptionType type; // warning type for tips
|
||||
StringExceptionType type = STRING_EXCEPT_NOT_DEFINED; // warning type for tips
|
||||
bool is_warning = false;
|
||||
std::vector<std::string> params; // warning params for tips
|
||||
};
|
||||
@@ -396,7 +396,7 @@ public:
|
||||
|
||||
// Validate the print, return empty string if valid, return error if process() cannot (or should not) be started.
|
||||
//BBS: add more paremeters to validate
|
||||
virtual StringObjectException validate(StringObjectException *warning = nullptr, Polygons* collison_polygons = nullptr, std::vector<std::pair<Polygon, float>>* height_polygons = nullptr) const { return {}; }
|
||||
virtual StringObjectException validate(std::vector<StringObjectException> *warnings = nullptr, Polygons* collison_polygons = nullptr, std::vector<std::pair<Polygon, float>>* height_polygons = nullptr) const { return {}; }
|
||||
|
||||
enum ApplyStatus {
|
||||
// No change after the Print::apply() call.
|
||||
|
||||
+161
-260
File diff suppressed because it is too large
Load Diff
@@ -613,7 +613,7 @@ std::string SLAPrint::output_filename(const std::string &filename_base) const
|
||||
return this->PrintBase::output_filename(m_print_config.filename_format.value, ".sl1", filename_base, &config);
|
||||
}
|
||||
|
||||
StringObjectException SLAPrint::validate(StringObjectException *exception, Polygons *collison_polygons, std::vector<std::pair<Polygon, float>> *height_polygons) const
|
||||
StringObjectException SLAPrint::validate(std::vector<StringObjectException> *warnings, Polygons *collison_polygons, std::vector<std::pair<Polygon, float>> *height_polygons) const
|
||||
{
|
||||
for(SLAPrintObject * po : m_objects) {
|
||||
|
||||
|
||||
@@ -488,7 +488,7 @@ public:
|
||||
|
||||
const SLAPrintStatistics& print_statistics() const { return m_print_statistics; }
|
||||
|
||||
StringObjectException validate(StringObjectException * warning = nullptr,
|
||||
StringObjectException validate(std::vector<StringObjectException> * warnings = nullptr,
|
||||
Polygons * collison_polygons = nullptr,
|
||||
std::vector<std::pair<Polygon, float>> *height_polygons = nullptr) const override;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <libslic3r/MeshBoolean.hpp>
|
||||
#include <libslic3r/TriangleMeshSlicer.hpp>
|
||||
|
||||
// Need the cylinder method for the the drainholes in hollowing step
|
||||
// Need the cylinder method for the drainholes in hollowing step
|
||||
#include <libslic3r/SLA/SupportTreeBuilder.hpp>
|
||||
|
||||
#include <libslic3r/SLA/Concurrency.hpp>
|
||||
|
||||
@@ -1197,7 +1197,7 @@ void sample_overhang_area(
|
||||
point_count += poly.size();
|
||||
const size_t min_support_points = std::max(coord_t(1), std::min(coord_t(3), coord_t(total_length(overhang_area) / connect_length)));
|
||||
if (point_count <= min_support_points) {
|
||||
// add the outer wall (of the overhang) to ensure it is correct supported instead. Try placing the support points in a way that they fully support the outer wall, instead of just the with half of the the support line width.
|
||||
// add the outer wall (of the overhang) to ensure it is correct supported instead. Try placing the support points in a way that they fully support the outer wall, instead of just the with half of the support line width.
|
||||
// I assume that even small overhangs are over one line width wide, so lets try to place the support points in a way that the full support area generated from them
|
||||
// will support the overhang (if this is not done it may only be half). This WILL NOT be the case when supporting an angle of about < 60 degrees so there is a fallback,
|
||||
// as some support is better than none.
|
||||
@@ -1378,7 +1378,7 @@ static void generate_initial_areas(
|
||||
}
|
||||
#if 0
|
||||
// If the xy distance overrides the z distance, some support needs to be inserted further down.
|
||||
//=> Analyze which support points do not fit on this layer and check if they will fit a few layers down (while adding them an infinite amount of layers down would technically be closer the the setting description, it would not produce reasonable results. )
|
||||
//=> Analyze which support points do not fit on this layer and check if they will fit a few layers down (while adding them an infinite amount of layers down would technically be closer the setting description, it would not produce reasonable results. )
|
||||
if (! min_xy_dist) {
|
||||
LineInformations overhang_lines;
|
||||
{
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
// Enable rendering of objects using environment map
|
||||
#define ENABLE_ENVIRONMENT_MAP 0
|
||||
// Enable smoothing of objects normals
|
||||
#define ENABLE_SMOOTH_NORMALS 0
|
||||
|
||||
// Enable rendering markers for options in preview as fixed screen size points
|
||||
#define ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS 1
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ std::string MZ_Archive::get_errorstr(mz_zip_error mz_err)
|
||||
case MZ_ZIP_TOO_MANY_FILES:
|
||||
return L("too many files");
|
||||
case MZ_ZIP_FILE_TOO_LARGE:
|
||||
return L("file too large");
|
||||
return L("File too large");
|
||||
case MZ_ZIP_UNSUPPORTED_METHOD:
|
||||
return L("unsupported method");
|
||||
case MZ_ZIP_UNSUPPORTED_ENCRYPTION:
|
||||
@@ -106,7 +106,7 @@ std::string MZ_Archive::get_errorstr(mz_zip_error mz_err)
|
||||
case MZ_ZIP_INVALID_HEADER_OR_CORRUPTED:
|
||||
return L("invalid header or corrupted");
|
||||
case MZ_ZIP_UNSUPPORTED_MULTIDISK:
|
||||
return L("unsupported multidisk");
|
||||
return L("Saving to RAID is not supported.");
|
||||
case MZ_ZIP_DECOMPRESSION_FAILED:
|
||||
return L("decompression failed");
|
||||
case MZ_ZIP_COMPRESSION_FAILED:
|
||||
@@ -138,13 +138,13 @@ std::string MZ_Archive::get_errorstr(mz_zip_error mz_err)
|
||||
case MZ_ZIP_INVALID_FILENAME:
|
||||
return L("invalid filename");
|
||||
case MZ_ZIP_BUF_TOO_SMALL:
|
||||
return L("buffer too small");
|
||||
return L("Buffer too small");
|
||||
case MZ_ZIP_INTERNAL_ERROR:
|
||||
return L("internal error");
|
||||
case MZ_ZIP_FILE_NOT_FOUND:
|
||||
return L("file not found");
|
||||
case MZ_ZIP_ARCHIVE_TOO_LARGE:
|
||||
return L("archive too large");
|
||||
return L("Archive too large");
|
||||
case MZ_ZIP_VALIDATION_FAILED:
|
||||
return L("validation failed");
|
||||
case MZ_ZIP_WRITE_CALLBACK_FAILED:
|
||||
|
||||
@@ -758,13 +758,9 @@ int GLVolumeCollection::load_object_volume(
|
||||
GLVolume& v = *this->volumes.back();
|
||||
v.set_color(color_from_model_volume(*model_volume));
|
||||
v.name = model_volume->name;
|
||||
|
||||
#if ENABLE_SMOOTH_NORMALS
|
||||
v.model.init_from(mesh, true);
|
||||
#else
|
||||
|
||||
v.model.init_from(*mesh);
|
||||
if (need_raycaster) { v.mesh_raycaster = std::make_unique<GUI::MeshRaycaster>(mesh); }
|
||||
#endif // ENABLE_SMOOTH_NORMALS
|
||||
v.composite_id = GLVolume::CompositeID(obj_idx, volume_idx, instance_idx);
|
||||
|
||||
if (model_volume->is_model_part())
|
||||
@@ -815,13 +811,9 @@ void GLVolumeCollection::load_object_auxiliary(
|
||||
const ModelInstance& model_instance = *print_object->model_object()->instances[instance_idx.first];
|
||||
this->volumes.emplace_back(new GLVolume((milestone == slaposPad) ? GLVolume::SLA_PAD_COLOR : GLVolume::SLA_SUPPORT_COLOR));
|
||||
GLVolume& v = *this->volumes.back();
|
||||
#if ENABLE_SMOOTH_NORMALS
|
||||
v.model.init_from(mesh, true);
|
||||
#else
|
||||
v.model.init_from(mesh);
|
||||
v.model.set_color((milestone == slaposPad) ? GLVolume::SLA_PAD_COLOR : GLVolume::SLA_SUPPORT_COLOR);
|
||||
v.mesh_raycaster = std::make_unique<GUI::MeshRaycaster>(std::make_shared<const TriangleMesh>(mesh));
|
||||
#endif // ENABLE_SMOOTH_NORMALS
|
||||
v.composite_id = GLVolume::CompositeID(obj_idx, -int(milestone), (int)instance_idx.first);
|
||||
v.geometry_id = std::pair<size_t, size_t>(timestamp, model_instance.id().id);
|
||||
// Create a copy of the convex hull mesh for each instance. Use a move operator on the last instance.
|
||||
|
||||
@@ -69,7 +69,7 @@ void AMSSetting::create()
|
||||
|
||||
// tip line1
|
||||
m_tip_Insert_material_line1 = new Label(m_panel_Insert_material,
|
||||
_L("The AMS will automatically read the filament information when inserting a new Bambu Lab filament. This takes about 20 seconds.")
|
||||
_L("The AMS will automatically read the filament information when inserting a new Bambu Lab filament spool. This takes about 20 seconds.")
|
||||
);
|
||||
m_tip_Insert_material_line1->SetFont(::Label::Body_13);
|
||||
m_tip_Insert_material_line1->SetForegroundColour(AMS_SETTING_GREY700);
|
||||
@@ -112,7 +112,7 @@ void AMSSetting::create()
|
||||
m_checkbox_starting_auto_read->Bind(wxEVT_TOGGLEBUTTON, &AMSSetting::on_starting_read, this);
|
||||
m_sizer_starting->Add(m_checkbox_starting_auto_read, 0, wxALIGN_CENTER_VERTICAL);
|
||||
m_sizer_starting->Add(0, 0, 0, wxLEFT, 12);
|
||||
m_title_starting_auto_read = new wxStaticText(m_panel_body, wxID_ANY, _L("Power on update"), wxDefaultPosition,wxDefaultSize, 0);
|
||||
m_title_starting_auto_read = new wxStaticText(m_panel_body, wxID_ANY, _L("Update on startup"), wxDefaultPosition,wxDefaultSize, 0);
|
||||
m_title_starting_auto_read->SetFont(::Label::Head_13);
|
||||
m_title_starting_auto_read->SetForegroundColour(AMS_SETTING_GREY800);
|
||||
m_title_starting_auto_read->Wrap(AMS_SETTING_BODY_WIDTH);
|
||||
@@ -125,7 +125,7 @@ void AMSSetting::create()
|
||||
m_sizer_starting_tip_inline = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
m_tip_starting_line1 = new Label(m_panel_body,
|
||||
_L("The AMS will automatically read the information of inserted filament on start-up. It will take about 1 minute. The reading process will roll the filament spools.")
|
||||
_L("The AMS will automatically read the information of inserted filament on start-up. It will take about 1 minute. The reading process will rotate the filament spools.")
|
||||
);
|
||||
m_tip_starting_line1->SetFont(::Label::Body_13);
|
||||
m_tip_starting_line1->SetForegroundColour(AMS_SETTING_GREY700);
|
||||
|
||||
@@ -44,7 +44,7 @@ void AboutDialogLogo::onRepaint(wxEvent &event)
|
||||
CopyrightsDialog::CopyrightsDialog()
|
||||
: DPIDialog(static_cast<wxWindow*>(wxGetApp().mainframe), wxID_ANY, from_u8((boost::format("%1% - %2%")
|
||||
% (wxGetApp().is_editor() ? SLIC3R_APP_FULL_NAME : GCODEVIEWER_APP_NAME)
|
||||
% _utf8(L("Portions copyright"))).str()),
|
||||
% _utf8(L("License Info"))).str()),
|
||||
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||
{
|
||||
this->SetFont(wxGetApp().normal_font());
|
||||
@@ -337,7 +337,7 @@ AboutDialog::AboutDialog()
|
||||
m_html->Bind(wxEVT_HTML_LINK_CLICKED, &AboutDialog::onLinkClicked, this);
|
||||
}
|
||||
//Add "Portions copyright" button
|
||||
Button* button_portions = new Button(this,_L("Portions copyright"));
|
||||
Button* button_portions = new Button(this,_L("License Info"));
|
||||
button_portions->SetStyle(ButtonStyle::Regular, ButtonType::Window);
|
||||
|
||||
wxBoxSizer *copyright_button_ver = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
@@ -1686,7 +1686,7 @@ AmsMapingTipPopup::AmsMapingTipPopup(wxWindow *parent)
|
||||
m_title_enable_ams->Wrap(-1);
|
||||
sizer_enable_ams->Add(m_title_enable_ams, 0, 0, 0);
|
||||
|
||||
m_tip_enable_ams = new wxStaticText(m_panel_enable_ams, wxID_ANY, _L("Print with filaments in the AMS"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_tip_enable_ams = new wxStaticText(m_panel_enable_ams, wxID_ANY, _L("Print with filament in the AMS"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_tip_enable_ams->SetMinSize(wxSize(FromDIP(200), FromDIP(50)));
|
||||
m_tip_enable_ams->Wrap(FromDIP(200));
|
||||
m_tip_enable_ams->SetForegroundColour(*wxBLACK);
|
||||
@@ -1722,7 +1722,7 @@ AmsMapingTipPopup::AmsMapingTipPopup(wxWindow *parent)
|
||||
m_title_disable_ams->Wrap(-1);
|
||||
sizer_disable_ams->Add(m_title_disable_ams, 0, 0, 0);
|
||||
|
||||
m_tip_disable_ams = new wxStaticText(m_panel_disable_ams, wxID_ANY, _L("Print with the filament mounted on the back of chassis"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_tip_disable_ams = new wxStaticText(m_panel_disable_ams, wxID_ANY, _L("Print with filament on external spool"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_tip_disable_ams->SetMinSize(wxSize(FromDIP(200), FromDIP(50)));
|
||||
m_tip_disable_ams->Wrap(FromDIP(200));
|
||||
m_tip_disable_ams->SetForegroundColour(*wxBLACK);
|
||||
@@ -1783,9 +1783,7 @@ AmsHumidityTipPopup::AmsHumidityTipPopup(wxWindow* parent)
|
||||
humidity_level_list = new AmsHumidityLevelList(this);
|
||||
curr_humidity_img = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("hum_level1_light", this, 132), wxDefaultPosition, wxSize(FromDIP(132), FromDIP(132)), 0);
|
||||
|
||||
m_staticText_note = new Label(this, _L("Please change the desiccant when it is too wet. "
|
||||
"The indicator may not represent accurately in following cases: when the lid is open or the desiccant pack is changed. "
|
||||
"It take hours to absorb the moisture, and low temperatures also slow down the process."));
|
||||
m_staticText_note = new Label(this, _L("Please change the desiccant when it is too wet. The indicator may not represent accurately in following cases: when the lid is open or the desiccant pack is changed. It takes a few hours to absorb the moisture, and low temperatures also slow down the process."));
|
||||
m_staticText_note->SetMinSize(wxSize(FromDIP(680), -1));
|
||||
m_staticText_note->SetMaxSize(wxSize(FromDIP(680), -1));
|
||||
m_staticText_note->Wrap(FromDIP(680));
|
||||
@@ -2021,7 +2019,7 @@ AmsIntroducePopup::AmsIntroducePopup(wxWindow* parent)
|
||||
m_staticText_top->Wrap(-1);
|
||||
bSizer4->Add(m_staticText_top, 0, wxALL, 5);
|
||||
|
||||
m_staticText_bottom = new Label(this, _L("Print using materials mounted on the back of the case"));
|
||||
m_staticText_bottom = new Label(this, _L("Print using filament on external spool."));
|
||||
m_staticText_bottom->Wrap(-1);
|
||||
m_staticText_bottom->SetFont(::Label::Body_13);
|
||||
m_staticText_bottom->SetForegroundColour(wxColour("#6B6B6B"));
|
||||
@@ -2057,13 +2055,13 @@ void AmsIntroducePopup::set_mode(bool enable_ams)
|
||||
{
|
||||
if (enable_ams) {
|
||||
m_staticText_top->SetLabelText(_L("Enable AMS"));
|
||||
m_staticText_bottom->SetLabelText(_L("Print with filaments in AMS"));
|
||||
m_staticText_bottom->SetLabelText(_L("Print with filament in AMS"));
|
||||
m_img_enable_ams->Show();
|
||||
m_img_disable_ams->Hide();
|
||||
}
|
||||
else {
|
||||
m_staticText_top->SetLabelText(_L("Do not Enable AMS"));
|
||||
m_staticText_bottom->SetLabelText(_L("Print with filaments mounted on the back of the chassis"));
|
||||
m_staticText_bottom->SetLabelText(_L("Print with filament on external spool"));
|
||||
m_staticText_bottom->SetMinSize(wxSize(FromDIP(180), -1));
|
||||
m_staticText_bottom->Wrap(FromDIP(180));
|
||||
m_img_enable_ams->Hide();
|
||||
@@ -2437,7 +2435,7 @@ void AmsReplaceMaterialDialog::update_to_nozzle(int nozzle_id)
|
||||
}
|
||||
else if (!m_obj->GetFilaSystem()->IsAutoRefillEnabled())
|
||||
{
|
||||
label_txt->SetLabelText(_L("AMS filament backup is not enabled, please enable it in the AMS settings."));
|
||||
label_txt->SetLabelText(_L("AMS filament backup is not enabled; please enable it in the AMS settings."));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -380,17 +380,17 @@ void AuFile::on_input_enter(wxCommandEvent &evt)
|
||||
}
|
||||
|
||||
if (m_valid_type == Valid && new_file_name.empty()) {
|
||||
info_line = _L("The name is not allowed to be empty.");
|
||||
info_line = _L("The name field is not allowed to be empty.");
|
||||
m_valid_type = NoValid;
|
||||
}
|
||||
|
||||
if (m_valid_type == Valid && new_file_name.find_first_of(' ') == 0) {
|
||||
info_line = _L("The name is not allowed to start with space character.");
|
||||
info_line = _L("The name is not allowed to start with a space.");
|
||||
m_valid_type = NoValid;
|
||||
}
|
||||
|
||||
if (m_valid_type == Valid && new_file_name.find_last_of(' ') == new_file_name.length() - 1) {
|
||||
info_line = _L("The name is not allowed to end with space character.");
|
||||
info_line = _L("The name is not allowed to end with a space.");
|
||||
m_valid_type = NoValid;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,12 +77,11 @@ std::pair<std::string, std::vector<size_t>> SlicingProcessCompletedEvent::format
|
||||
try {
|
||||
this->rethrow_exception();
|
||||
} catch (const std::bad_alloc &ex) {
|
||||
wxString errmsg = GUI::from_u8(boost::format(_utf8(L("A error occurred. Maybe memory of system is not enough or it's a bug "
|
||||
"of the program"))).str());
|
||||
wxString errmsg = GUI::from_u8(boost::format(_utf8(L("An error occurred. The system may have run out of memory, or a bug may have occurred."))).str());
|
||||
error = std::string(errmsg.ToUTF8()) + "\n" + std::string(ex.what());
|
||||
} catch (const HardCrash &ex) {
|
||||
error = GUI::format(_u8L("A fatal error occurred: \"%1%\""), ex.what()) + "\n" +
|
||||
_u8L("Please save project and restart the program.");
|
||||
_u8L("Please save your project and restart the application.");
|
||||
} catch (PlaceholderParserError &ex) {
|
||||
error = ex.what();
|
||||
monospace = 1;
|
||||
@@ -200,7 +199,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...")));
|
||||
m_fff_print->set_status(80, _utf8(L("Processing G-Code from previous file\u2026")));
|
||||
wxCommandEvent evt(m_event_slicing_completed_id);
|
||||
// Post the Slicing Finished message for the G-code viewer to update.
|
||||
// Passing the timestamp
|
||||
@@ -675,13 +674,13 @@ bool BackgroundSlicingProcess::empty() const
|
||||
return m_print->empty();
|
||||
}
|
||||
|
||||
StringObjectException BackgroundSlicingProcess::validate(StringObjectException *warning, Polygons* collison_polygons, std::vector<std::pair<Polygon, float>>* height_polygons)
|
||||
StringObjectException BackgroundSlicingProcess::validate(std::vector<StringObjectException> *warnings, Polygons* collison_polygons, std::vector<std::pair<Polygon, float>>* height_polygons)
|
||||
{
|
||||
assert(m_print != nullptr);
|
||||
assert(m_print == m_fff_print);
|
||||
|
||||
m_fff_print->is_BBL_printer() = wxGetApp().preset_bundle->is_bbl_vendor();
|
||||
return m_print->validate(warning, collison_polygons, height_polygons);
|
||||
return m_print->validate(warnings, collison_polygons, height_polygons);
|
||||
}
|
||||
|
||||
// Apply config over the print. Returns false, if the new config values caused any of the already
|
||||
@@ -869,7 +868,7 @@ void BackgroundSlicingProcess::export_gcode()
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
throw Slic3r::ExportError(_utf8(L("Unknown error when exporting G-code.")));
|
||||
throw Slic3r::ExportError(_utf8(L("Unknown error with G-code export")));
|
||||
}
|
||||
switch (copy_ret_val) {
|
||||
case CopyFileResult::SUCCESS: break; // no error
|
||||
@@ -920,7 +919,7 @@ void BackgroundSlicingProcess::prepare_upload()
|
||||
m_print->set_status(95, _utf8(L("Running post-processing scripts")));
|
||||
std::string error_message;
|
||||
if (copy_file(m_temp_output_path, source_path.string(), error_message) != SUCCESS)
|
||||
throw Slic3r::RuntimeError(_utf8(L("Copying of the temporary G-code to the output G-code failed")));
|
||||
throw Slic3r::RuntimeError(_utf8(L("Copying of the temporary G-code to the output G-code failed.")));
|
||||
m_upload_job.upload_data.upload_path = m_fff_print->print_statistics().finalize_output_path(m_upload_job.upload_data.upload_path.string());
|
||||
// Orca: skip post-processing scripts for BBL printers as we have run them already in finalize_gcode()
|
||||
// todo: do we need to copy the file?
|
||||
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
bool empty() const;
|
||||
// Validate the print. Returns an empty string if valid, returns an error message if invalid.
|
||||
// Call validate before calling start().
|
||||
StringObjectException validate(StringObjectException *warning = nullptr, Polygons* collison_polygons = nullptr, std::vector<std::pair<Polygon, float>>* height_polygons = nullptr);
|
||||
StringObjectException validate(std::vector<StringObjectException> *warnings = nullptr, Polygons* collison_polygons = nullptr, std::vector<std::pair<Polygon, float>>* height_polygons = nullptr);
|
||||
|
||||
// Set the export path of the G-code.
|
||||
// Once the path is set, the G-code
|
||||
|
||||
@@ -566,7 +566,7 @@ void BedShapePanel::load_stl()
|
||||
model = Model::read_from_file(file_name);
|
||||
}
|
||||
catch (std::exception &) {
|
||||
show_error(this, _L("Error! Invalid model"));
|
||||
show_error(this, _L("Error: invalid model"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -578,7 +578,7 @@ void BedShapePanel::load_stl()
|
||||
return;
|
||||
}
|
||||
if (expolygons.size() > 1) {
|
||||
show_error(this, _L("The selected file contains several disjoint areas. This is not supported."));
|
||||
show_error(this, _L("The selected file contains several disjointed areas. This is not supported."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@ wxString get_fail_reason(int code)
|
||||
return _L("Failed to publish login request");
|
||||
|
||||
else if (code == BAMBU_NETWORK_ERR_BIND_GET_PRINTER_TICKET_TIMEOUT)
|
||||
return _L("Get ticket from device timeout");
|
||||
return _L("Timeout getting ticket from device");
|
||||
|
||||
else if (code == BAMBU_NETWORK_ERR_BIND_GET_CLOUD_TICKET_TIMEOUT)
|
||||
return _L("Get ticket from server timeout");
|
||||
return _L("Timeout getting ticket from server");
|
||||
|
||||
else if (code == BAMBU_NETWORK_ERR_BIND_POST_TICKET_TO_CLOUD_FAILED)
|
||||
return _L("Failed to post ticket to server");
|
||||
|
||||
@@ -304,7 +304,7 @@ void HistoryWindow::reqeust_history_result(MachineObject* obj)
|
||||
cali_info.use_nozzle_volume_type = false;
|
||||
cali_info.use_extruder_id = false;
|
||||
CalibUtils::emit_get_PA_calib_infos(cali_info);
|
||||
m_tips->SetLabel(_L("Refreshing the historical Flow Dynamics Calibration records"));
|
||||
m_tips->SetLabel(_L("Refreshing the previous Flow Dynamics Calibration records"));
|
||||
BOOST_LOG_TRIVIAL(info) << "request calib history";
|
||||
}
|
||||
}
|
||||
@@ -476,7 +476,7 @@ int HistoryWindow::get_extruder_id()
|
||||
void HistoryWindow::on_click_new_button(wxCommandEvent& event)
|
||||
{
|
||||
if (curr_obj && curr_obj->get_printer_series() == PrinterSeries::SERIES_P1P && m_calib_results_history.size() >= 16) {
|
||||
MessageDialog msg_dlg(nullptr, wxString::Format(_L("This machine type can only hold %d history results per nozzle."), 16), wxEmptyString, wxICON_WARNING | wxOK);
|
||||
MessageDialog msg_dlg(nullptr, wxString::Format(_L("This machine type can only hold %d historical results per nozzle."), 16), wxEmptyString, wxICON_WARNING | wxOK);
|
||||
msg_dlg.ShowModal();
|
||||
return;
|
||||
}
|
||||
@@ -913,8 +913,7 @@ void NewCalibrationHistoryDialog::on_ok(wxCommandEvent &event)
|
||||
|
||||
if (iter != m_history_results.end()) {
|
||||
|
||||
wxString duplicate_name_info = wxString::Format(_L("There is already a historical calibration result with the same name: %s. Only one of the results with the same name "
|
||||
"is saved. Are you sure you want to override the historical result?"), m_new_result.name);
|
||||
wxString duplicate_name_info = wxString::Format(_L("There is already a previous calibration result with the same name: %s. Only one result with a name is saved. Are you sure you want to overwrite the previous result\?"), m_new_result.name);
|
||||
|
||||
duplicate_name_info = wxString::Format(_L("Within the same extruder, the name(%s) must be unique when the filament type, nozzle diameter, and nozzle flow are the same.\n"
|
||||
"Are you sure you want to override the historical result?"), m_new_result.name);
|
||||
|
||||
@@ -805,10 +805,7 @@ void PressureAdvanceWizard::on_cali_start()
|
||||
curr_obj->manual_pa_cali_method = pa_cali_method;
|
||||
|
||||
if (curr_obj->get_printer_series() != PrinterSeries::SERIES_X1 && curr_obj->pa_calib_tab.size() >= MAX_PA_HISTORY_RESULTS_NUMS) {
|
||||
MessageDialog msg_dlg(nullptr, wxString::Format(_L("This machine type can only hold 16 history results per nozzle. "
|
||||
"You can delete the existing historical results and then start calibration. "
|
||||
"Or you can continue the calibration, but you cannot create new calibration historical results.\n"
|
||||
"Do you still want to continue the calibration?"), MAX_PA_HISTORY_RESULTS_NUMS), wxEmptyString, wxICON_WARNING | wxYES | wxCANCEL);
|
||||
MessageDialog msg_dlg(nullptr, wxString::Format(_L("This machine type can only hold 16 historical results per nozzle. You can delete the existing historical results and then start calibration. Or you can continue the calibration, but you cannot create new calibration historical results.\nDo you still want to continue the calibration\?"), MAX_PA_HISTORY_RESULTS_NUMS), wxEmptyString, wxICON_WARNING | wxYES | wxCANCEL);
|
||||
if (msg_dlg.ShowModal() != wxID_YES) {
|
||||
return;
|
||||
}
|
||||
@@ -930,8 +927,7 @@ bool PressureAdvanceWizard::can_save_cali_result(const std::vector<PACalibResult
|
||||
|
||||
if (!same_pa_names.empty()) {
|
||||
same_pa_names.erase(same_pa_names.size() - 2);
|
||||
wxString duplicate_name_info = wxString::Format(_L("There is already a historical calibration result with the same name: %s. Only one of the results with the same name "
|
||||
"is saved. Are you sure you want to override the historical result?"), same_pa_names);
|
||||
wxString duplicate_name_info = wxString::Format(_L("There is already a previous calibration result with the same name: %s. Only one result with a name is saved. Are you sure you want to overwrite the previous result\?"), same_pa_names);
|
||||
|
||||
if (curr_obj->is_multi_extruders())
|
||||
duplicate_name_info = wxString::Format(_L("Within the same extruder, the name(%s) must be unique when the filament type, nozzle diameter, and nozzle flow are the same.\n"
|
||||
@@ -943,7 +939,7 @@ bool PressureAdvanceWizard::can_save_cali_result(const std::vector<PACalibResult
|
||||
}
|
||||
|
||||
if (curr_obj->get_printer_series() != PrinterSeries::SERIES_X1 && curr_obj->pa_calib_tab.size() >= MAX_PA_HISTORY_RESULTS_NUMS) {
|
||||
MessageDialog msg_dlg(nullptr, wxString::Format(_L("This machine type can only hold %d history results per nozzle. This result will not be saved."), MAX_PA_HISTORY_RESULTS_NUMS),
|
||||
MessageDialog msg_dlg(nullptr, wxString::Format(_L("This machine type can only hold %d historical results per nozzle. This result will not be saved."), MAX_PA_HISTORY_RESULTS_NUMS),
|
||||
wxEmptyString, wxICON_WARNING | wxOK);
|
||||
msg_dlg.ShowModal();
|
||||
return false;
|
||||
|
||||
@@ -326,7 +326,7 @@ void CalibrationCaliPage::update_subtask(MachineObject* obj)
|
||||
prepare_text = wxString::Format(_L("Cloud Slicing..."));
|
||||
}
|
||||
else {
|
||||
prepare_text = wxString::Format(_L("In Cloud Slicing Queue, there are %s tasks ahead."), std::to_string(obj->queue_number));
|
||||
prepare_text = wxString::Format(_L("In Cloud Slicing Queue, there are %s tasks ahead of you."), std::to_string(obj->queue_number));
|
||||
show_percent = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -601,7 +601,7 @@ PAPageHelpPanel::PAPageHelpPanel(wxWindow* parent, bool ground_panel, wxWindowID
|
||||
wxBoxSizer* top_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
top_sizer->AddSpacer(FromDIP(10));
|
||||
|
||||
auto help_text_title = new Label(this, _L("How to use calibration result?"));
|
||||
auto help_text_title = new Label(this, _L("How can I use calibration results\?"));
|
||||
help_text_title->SetFont(Label::Head_14);
|
||||
top_sizer->Add(help_text_title, 0, wxLEFT | wxRIGHT, left_align_padding);
|
||||
|
||||
|
||||
@@ -1882,12 +1882,12 @@ void CalibrationPresetPage::show_status(CaliPresetPageStatus status)
|
||||
Enable_Send_Button(false);
|
||||
}
|
||||
else if (status == CaliPresetPageStatus::CaliPresetStatusNeedForceUpgrading) {
|
||||
wxString msg_text = _L("Cannot send the print job to a printer whose firmware is required to get updated.");
|
||||
wxString msg_text = _L("Cannot send the print job to a printer whose firmware must be updated.");
|
||||
update_print_status_msg(msg_text, true);
|
||||
Enable_Send_Button(false);
|
||||
}
|
||||
else if (status == CaliPresetPageStatus::CaliPresetStatusNeedConsistencyUpgrading) {
|
||||
wxString msg_text = _L("Cannot send the print job to a printer whose firmware is required to get updated.");
|
||||
wxString msg_text = _L("Cannot send the print job to a printer whose firmware must be updated.");
|
||||
update_print_status_msg(msg_text, true);
|
||||
Enable_Send_Button(false);
|
||||
}
|
||||
|
||||
@@ -116,10 +116,7 @@ void CalibrationPAStartPage::create_page(wxWindow* parent)
|
||||
|
||||
create_about(parent,
|
||||
_L("About this calibration"),
|
||||
_L("Please find the details of Flow Dynamics Calibration from our wiki.\
|
||||
\n\nUsually the calibration is unnecessary. When you start a single color/material print, with the \"flow dynamics calibration\" option checked in the print start menu, the printer will follow the old way, calibrate the filament before the print; When you start a multi color/material print, the printer will use the default compensation parameter for the filament during every filament switch which will have a good result in most cases.\
|
||||
\n\nPlease note that there are a few cases that can make the calibration results unreliable, such as insufficient adhesion on the build plate. Improving adhesion can be achieved by washing the build plate or applying glue. For more information on this topic, please refer to our Wiki.\
|
||||
\n\nThe calibration results have about 10 percent jitter in our test, which may cause the result not exactly the same in each calibration. We are still investigating the root cause to do improvements with new updates."));
|
||||
_L("Please find the details of Flow Dynamics Calibration from our wiki.\n\nUsually the calibration is unnecessary. When you start a single color/material print, with the \"flow dynamics calibration\" option checked in the print start menu, the printer will follow the old way, calibrate the filament before the print; When you start a multi color/material print, the printer will use the default compensation parameter for the filament during every filament switch which will have a good result in most cases.\n\nPlease note that there are a few cases that can make the calibration results unreliable, such as insufficient adhesion on the build plate. Improving adhesion can be achieved by washing the build plate or applying glue. For more information on this topic, please refer to our Wiki.\n\nThe calibration results have about 10 percent jitter in our test, which may cause the result not exactly the same in each calibration. We are still investigating the root cause to do improvements with new updates."));
|
||||
m_top_sizer->Add(m_about_title);
|
||||
m_top_sizer->Add(m_about_content);
|
||||
m_top_sizer->AddSpacer(PRESET_GAP);
|
||||
@@ -255,9 +252,7 @@ void CalibrationFlowRateStartPage::create_page(wxWindow* parent)
|
||||
auto_cali_title->SetMinSize({CALIBRATION_START_PAGE_TEXT_MAX_LENGTH, -1});
|
||||
|
||||
auto auto_cali_content = new Label(this,
|
||||
_L("Auto Flow Rate Calibration utilizes Bambu Lab's Micro-Lidar technology, directly measuring the calibration patterns. However, please be advised that the efficacy and accuracy of this method may be compromised with specific types of materials. Particularly, filaments that are transparent or semi-transparent, sparkling-particled, or have a high-reflective finish may not be suitable for this calibration and can produce less-than-desirable results.\
|
||||
\n\nThe calibration results may vary between each calibration or filament. We are still improving the accuracy and compatibility of this calibration through firmware updates over time.\
|
||||
\n\nCaution: Flow Rate Calibration is an advanced process, to be attempted only by those who fully understand its purpose and implications. Incorrect usage can lead to sub-par prints or printer damage. Please make sure to carefully read and understand the process before doing it."));
|
||||
_L("Auto Flow Rate Calibration utilizes Bambu Lab\'s Micro-Lidar technology, directly measuring the calibration patterns. However, please be advised that the efficacy and accuracy of this method may be compromised with specific types of materials. Particularly, filaments that are transparent or semi-transparent, have sparkles, or have a highly-reflective finish may not be suitable for this calibration and can produce less-than-desirable results.\n\nThe calibration results may vary between each calibration or filament. We are still improving the accuracy and compatibility of this calibration through firmware updates over time.\n\nCaution: Flow Rate Calibration is an advanced process, to be attempted only by those who fully understand its purpose and implications. Incorrect usage can lead to sub-par prints or printer damage. Please make sure to carefully read and understand the process before doing it."));
|
||||
auto_cali_content->SetFont(Label::Body_14);
|
||||
auto_cali_content->Wrap(CALIBRATION_START_PAGE_TEXT_MAX_LENGTH);
|
||||
auto_cali_content->SetMinSize({CALIBRATION_START_PAGE_TEXT_MAX_LENGTH, -1});
|
||||
|
||||
@@ -9,13 +9,29 @@
|
||||
#include "libslic3r/MaterialType.hpp"
|
||||
#include "MsgDialog.hpp"
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
#include "libslic3r/GCode/AdaptivePAProcessor.hpp"
|
||||
#include "Plater.hpp"
|
||||
|
||||
#include <sstream>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
namespace {
|
||||
|
||||
std::string trim_copy(const std::string& text)
|
||||
{
|
||||
const auto first = text.find_first_not_of(" \t\r\n");
|
||||
if (first == std::string::npos)
|
||||
return {};
|
||||
|
||||
const auto last = text.find_last_not_of(" \t\r\n");
|
||||
return text.substr(first, last - first + 1);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void ConfigManipulation::apply(DynamicPrintConfig* config, DynamicPrintConfig* new_config)
|
||||
{
|
||||
bool modified = false;
|
||||
@@ -109,8 +125,7 @@ void ConfigManipulation::check_nozzle_temperature_range(DynamicPrintConfig *conf
|
||||
|
||||
if (config->has("nozzle_temperature")) {
|
||||
if (config->opt_int("nozzle_temperature", 0) < temperature_range_low || config->opt_int("nozzle_temperature", 0) > temperature_range_high) {
|
||||
wxString msg_text = _(L("Nozzle may be blocked when the temperature is out of recommended range.\n"
|
||||
"Please make sure whether to use the temperature to print.\n\n"));
|
||||
wxString msg_text = _(L("The nozzle may become clogged when the temperature is out of the recommended range.\nPlease make sure whether to use this temperature to print.\n\n"));
|
||||
msg_text += wxString::Format(_L("The recommended nozzle temperature for this filament type is [%d, %d] degrees Celsius."), temperature_range_low, temperature_range_high);
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||
is_msg_dlg_already_exist = true;
|
||||
@@ -132,8 +147,7 @@ void ConfigManipulation::check_nozzle_temperature_initial_layer_range(DynamicPri
|
||||
if (config->opt_int("nozzle_temperature_initial_layer", 0) < temperature_range_low ||
|
||||
config->opt_int("nozzle_temperature_initial_layer", 0) > temperature_range_high)
|
||||
{
|
||||
wxString msg_text = _(L("Nozzle may be blocked when the temperature is out of recommended range.\n"
|
||||
"Please make sure whether to use the temperature to print.\n\n"));
|
||||
wxString msg_text = _(L("The nozzle may become clogged when the temperature is out of the recommended range.\nPlease make sure whether to use this temperature to print.\n\n"));
|
||||
msg_text += wxString::Format(_L("The recommended nozzle temperature for this filament type is [%d, %d] degrees Celsius."), temperature_range_low, temperature_range_high);
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||
is_msg_dlg_already_exist = true;
|
||||
@@ -143,6 +157,30 @@ void ConfigManipulation::check_nozzle_temperature_initial_layer_range(DynamicPri
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigManipulation::check_adaptive_pressure_advance_model(DynamicPrintConfig* config)
|
||||
{
|
||||
if (is_msg_dlg_already_exist || !config->has("adaptive_pressure_advance_model"))
|
||||
return;
|
||||
|
||||
const auto* model = config->option<ConfigOptionStrings>("adaptive_pressure_advance_model");
|
||||
if (model == nullptr || model->values.empty())
|
||||
return;
|
||||
|
||||
std::string raw_model;
|
||||
for (const std::string& chunk : model->values)
|
||||
raw_model += chunk;
|
||||
|
||||
std::string error = AdaptivePAProcessor::validate_adaptive_pa_model(raw_model);
|
||||
if (!error.empty()) {
|
||||
wxString msg_text = _L("Adaptive Pressure Advance model validation failed:\n");
|
||||
msg_text += from_u8(error);
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||
is_msg_dlg_already_exist = true;
|
||||
dialog.ShowModal();
|
||||
is_msg_dlg_already_exist = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ConfigManipulation::check_filament_max_volumetric_speed(DynamicPrintConfig *config)
|
||||
{
|
||||
@@ -152,7 +190,7 @@ void ConfigManipulation::check_filament_max_volumetric_speed(DynamicPrintConfig
|
||||
float max_volumetric_speed = config->has("filament_max_volumetric_speed") ? config->opt_float("filament_max_volumetric_speed", (float) 0.5) : 0.5;
|
||||
// BBS: limite the min max_volumetric_speed
|
||||
if (max_volumetric_speed < 0.5) {
|
||||
const wxString msg_text = _(L("Too small max volumetric speed.\nReset to 0.5."));
|
||||
const wxString msg_text = _(L("Too small max volumetric speed.\nValue was reset to 0.5"));
|
||||
MessageDialog dialog(nullptr, msg_text, "", wxICON_WARNING | wxOK);
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
is_msg_dlg_already_exist = true;
|
||||
@@ -172,8 +210,7 @@ void ConfigManipulation::check_chamber_temperature(DynamicPrintConfig* config)
|
||||
int chamber_min_temp, chamber_max_temp;
|
||||
if (MaterialType::get_chamber_temperature_range(filament_type, chamber_min_temp, chamber_max_temp)) {
|
||||
if (chamber_max_temp < config->option<ConfigOptionInts>("chamber_temperature")->get_at(0)) {
|
||||
wxString msg_text = wxString::Format(_L("Current chamber temperature is higher than the material's safe temperature, this may result in material softening and clogging. "
|
||||
"The maximum safe temperature for the material is %d"), chamber_max_temp);
|
||||
wxString msg_text = wxString::Format(_L("Current chamber temperature is higher than the material\'s safe temperature; this may result in material softening and nozzle clogs. The maximum safe temperature for the material is %d"), chamber_max_temp);
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||
is_msg_dlg_already_exist = true;
|
||||
dialog.ShowModal();
|
||||
@@ -200,7 +237,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
||||
auto gpreset = GUI::wxGetApp().preset_bundle->printers.get_edited_preset();
|
||||
if (layer_height < EPSILON)
|
||||
{
|
||||
const wxString msg_text = _(L("Too small layer height.\nReset to 0.2."));
|
||||
const wxString msg_text = _(L("Layer height too small\nIt has been reset to 0.2"));
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
is_msg_dlg_already_exist = true;
|
||||
@@ -227,7 +264,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
||||
//BBS: ironing_spacing shouldn't be too small or equal to zero
|
||||
if (config->opt_float("ironing_spacing") < 0.05)
|
||||
{
|
||||
const wxString msg_text = _(L("Too small ironing spacing.\nReset to 0.1."));
|
||||
const wxString msg_text = _(L("Ironing spacing too small\nIt has been reset to 0.1"));
|
||||
MessageDialog dialog(nullptr, msg_text, "", wxICON_WARNING | wxOK);
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
is_msg_dlg_already_exist = true;
|
||||
@@ -238,7 +275,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
||||
}
|
||||
if (config->opt_float("support_ironing_spacing") < 0.05)
|
||||
{
|
||||
const wxString msg_text = _(L("Too small ironing spacing.\nReset to 0.1."));
|
||||
const wxString msg_text = _(L("Ironing spacing too small\nIt has been reset to 0.1"));
|
||||
MessageDialog dialog(nullptr, msg_text, "", wxICON_WARNING | wxOK);
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
is_msg_dlg_already_exist = true;
|
||||
@@ -262,10 +299,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
||||
|
||||
if (abs(config->option<ConfigOptionFloat>("xy_hole_compensation")->value) > 2)
|
||||
{
|
||||
const wxString msg_text = _(L("This setting is only used for model size tunning with small value in some cases.\n"
|
||||
"For example, when model size has small error and hard to be assembled.\n"
|
||||
"For large size tuning, please use model scale function.\n\n"
|
||||
"The value will be reset to 0."));
|
||||
const wxString msg_text = _(L("This setting is only used for tuning model size by small amounts.\nFor example, when the model size has small errors or when tolerances are incorrect. For large adjustments, please use the model scale function.\n\nThe value will be reset to 0."));
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
is_msg_dlg_already_exist = true;
|
||||
@@ -277,10 +311,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
||||
|
||||
if (abs(config->option<ConfigOptionFloat>("xy_contour_compensation")->value) > 2)
|
||||
{
|
||||
const wxString msg_text = _(L("This setting is only used for model size tunning with small value in some cases.\n"
|
||||
"For example, when model size has small error and hard to be assembled.\n"
|
||||
"For large size tuning, please use model scale function.\n\n"
|
||||
"The value will be reset to 0."));
|
||||
const wxString msg_text = _(L("This setting is only used for tuning model size by small amounts.\nFor example, when the model size has small errors or when tolerances are incorrect. For large adjustments, please use the model scale function.\n\nThe value will be reset to 0."));
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
is_msg_dlg_already_exist = true;
|
||||
@@ -292,10 +323,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
||||
|
||||
if (config->option<ConfigOptionFloat>("elefant_foot_compensation")->value > 1)
|
||||
{
|
||||
const wxString msg_text = _(L("Too large elephant foot compensation is unreasonable.\n"
|
||||
"If really have serious elephant foot effect, please check other settings.\n"
|
||||
"For example, whether bed temperature is too high.\n\n"
|
||||
"The value will be reset to 0."));
|
||||
const wxString msg_text = _(L("The elephant foot compensation value is too large.\nIf there are significant elephant foot issues, please check other settings.\nThe bed temperature may be too high, for example.\n\nThe value will be reset to 0."));
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||
DynamicPrintConfig new_conf = *config;
|
||||
is_msg_dlg_already_exist = true;
|
||||
@@ -1074,9 +1102,7 @@ int ConfigManipulation::show_spiral_mode_settings_dialog(bool is_object_config)
|
||||
msg_text += _(L(" But machines with I3 structure will not generate timelapse videos."));
|
||||
}
|
||||
if (!is_object_config)
|
||||
msg_text += "\n\n" + _(L("Change these settings automatically?\n"
|
||||
"Yes - Change these settings and enable spiral mode automatically\n"
|
||||
"No - Give up using spiral mode this time"));
|
||||
msg_text += "\n\n" + _(L("Change these settings automatically\?\nYes - Change these settings and enable spiral/vase mode automatically\nNo - Cancel enabling spiral mode"));
|
||||
|
||||
MessageDialog dialog(wxGetApp().plater(), msg_text, "",
|
||||
wxICON_WARNING | (!is_object_config ? wxYES | wxNO : wxOK));
|
||||
|
||||
@@ -77,6 +77,7 @@ public:
|
||||
void check_nozzle_recommended_temperature_range(DynamicPrintConfig *config);
|
||||
void check_nozzle_temperature_range(DynamicPrintConfig* config);
|
||||
void check_nozzle_temperature_initial_layer_range(DynamicPrintConfig* config);
|
||||
void check_adaptive_pressure_advance_model(DynamicPrintConfig* config);
|
||||
void check_filament_max_volumetric_speed(DynamicPrintConfig *config);
|
||||
void check_chamber_temperature(DynamicPrintConfig* config);
|
||||
void set_is_BBL_Printer(bool is_bbl_printer) { is_BBL_Printer = is_bbl_printer; };
|
||||
|
||||
@@ -159,7 +159,7 @@ void ConnectPrinterDialog::on_button_confirm(wxCommandEvent &event)
|
||||
wxString code = m_textCtrl_code->GetTextCtrl()->GetValue();
|
||||
for (char c : code) {
|
||||
if (!(('0' <= c && c <= '9') || ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'))) {
|
||||
show_error(this, _L("Invalid input."));
|
||||
show_error(this, _L("Invalid input"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1049,7 +1049,7 @@ wxWindow *CreateFilamentPresetDialog::create_dialog_buttons()
|
||||
|
||||
if (!m_can_not_find_vendor_checkbox->GetValue()) {
|
||||
if (_L("Select Vendor") == vendor_str) {
|
||||
MessageDialog dlg(this, _L("Vendor is not selected, please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
MessageDialog dlg(this, _L("Vendor is not selected; please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return;
|
||||
@@ -1058,7 +1058,7 @@ wxWindow *CreateFilamentPresetDialog::create_dialog_buttons()
|
||||
}
|
||||
} else {
|
||||
if (m_filament_custom_vendor_input->GetTextCtrl()->GetValue().empty()) {
|
||||
MessageDialog dlg(this, _L("Custom vendor is missing, please input custom vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
MessageDialog dlg(this, _L("Custom vendor missing; please input custom vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return;
|
||||
@@ -1087,7 +1087,7 @@ wxWindow *CreateFilamentPresetDialog::create_dialog_buttons()
|
||||
wxString serial_str = m_filament_serial_input->GetTextCtrl()->GetValue();
|
||||
std::string serial_name;
|
||||
if (serial_str.empty()) {
|
||||
MessageDialog dlg(this, _L("Filament serial is not entered, please enter serial."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
MessageDialog dlg(this, _L("Filament serial missing; please input serial."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return;
|
||||
@@ -1098,7 +1098,7 @@ wxWindow *CreateFilamentPresetDialog::create_dialog_buttons()
|
||||
serial_name = remove_special_key(serial_name);
|
||||
|
||||
if (vendor_name.empty() || serial_name.empty()) {
|
||||
MessageDialog dlg(this, _L("There may be escape characters in the vendor or serial input of filament. Please delete and re-enter."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
MessageDialog dlg(this, _L("There may be disallowed characters in the vendor or serial input of the filament. Please delete and re-enter."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return;
|
||||
@@ -1112,7 +1112,7 @@ wxWindow *CreateFilamentPresetDialog::create_dialog_buttons()
|
||||
return;
|
||||
}
|
||||
if (m_can_not_find_vendor_checkbox->GetValue() && str_is_all_digit(vendor_name)) {
|
||||
MessageDialog dlg(this, _L("The vendor cannot be a number. Please re-enter."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
MessageDialog dlg(this, _L("The vendor cannot be a number; please re-enter."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return;
|
||||
@@ -1129,8 +1129,7 @@ wxWindow *CreateFilamentPresetDialog::create_dialog_buttons()
|
||||
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
||||
if (preset_bundle->filaments.is_alias_exist(filament_preset_name)) {
|
||||
MessageDialog dlg(this,
|
||||
wxString::Format(_L("The Filament name %s you created already exists.\n"
|
||||
"If you continue, the preset created will be displayed with its full name. Do you want to continue?"),
|
||||
wxString::Format(_L("The Filament name %s you created already exists.\nIf you continue, the preset created will be displayed with its full name. Do you want to continue\?"),
|
||||
from_u8(filament_preset_name)),
|
||||
wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
if (wxID_YES != dlg.ShowModal()) { return; }
|
||||
@@ -1593,8 +1592,7 @@ CreatePrinterPresetDialog::CreatePrinterPresetDialog(wxWindow *parent)
|
||||
m_page1 = new wxScrolledWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
|
||||
m_page1->SetBackgroundColour(*wxWHITE);
|
||||
m_page1->SetScrollRate(5, 5);
|
||||
m_page2 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize);\
|
||||
m_page2->SetBackgroundColour(*wxWHITE);
|
||||
m_page2 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize); m_page2->SetBackgroundColour(*wxWHITE);
|
||||
|
||||
create_printer_page1(m_page1);
|
||||
create_printer_page2(m_page2);
|
||||
@@ -1756,7 +1754,7 @@ wxBoxSizer *CreatePrinterPresetDialog::create_printer_item(wxWindow *parent)
|
||||
m_select_model->SetLabelColor(*wxBLACK);
|
||||
}
|
||||
} else {
|
||||
MessageDialog dlg(this, _L("The model was not found, please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
MessageDialog dlg(this, _L("The model was not found; please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
}
|
||||
|
||||
@@ -2190,7 +2188,7 @@ bool CreatePrinterPresetDialog::load_system_and_user_presets_with_curr_model(Pre
|
||||
}
|
||||
if (m_printer_preset_vendor_selected.id.empty() || m_printer_preset_model_selected.id.empty()) {
|
||||
BOOST_LOG_TRIVIAL(info) << "selected id was not found";
|
||||
MessageDialog dlg(this, _L("Preset path was not found, please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
MessageDialog dlg(this, _L("Preset path was not found; please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return false;
|
||||
}
|
||||
@@ -2211,7 +2209,7 @@ bool CreatePrinterPresetDialog::load_system_and_user_presets_with_curr_model(Pre
|
||||
|
||||
if (preset_path.empty()) {
|
||||
BOOST_LOG_TRIVIAL(info) << "Preset path was not found";
|
||||
MessageDialog dlg(this, _L("Preset path was not found, please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
MessageDialog dlg(this, _L("Preset path was not found; please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return false;
|
||||
@@ -2248,7 +2246,7 @@ bool CreatePrinterPresetDialog::load_system_and_user_presets_with_curr_model(Pre
|
||||
varient = model_varient.substr(index_at + 3, index_nozzle - index_at - 4);
|
||||
} else {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "get nozzle failed";
|
||||
MessageDialog dlg(this, _L("The nozzle diameter was not found, please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
MessageDialog dlg(this, _L("The nozzle diameter was not found; please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return false;
|
||||
}
|
||||
@@ -2259,7 +2257,7 @@ bool CreatePrinterPresetDialog::load_system_and_user_presets_with_curr_model(Pre
|
||||
if (temp_printer_preset) {
|
||||
m_printer_preset = new Preset(*temp_printer_preset);
|
||||
} else {
|
||||
MessageDialog dlg(this, _L("The printer preset was not found, please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
MessageDialog dlg(this, _L("The printer preset was not found; please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return false;
|
||||
}
|
||||
@@ -2275,7 +2273,7 @@ bool CreatePrinterPresetDialog::load_system_and_user_presets_with_curr_model(Pre
|
||||
}
|
||||
if (preset_path.empty()) {
|
||||
BOOST_LOG_TRIVIAL(info) << "Preset path was not found";
|
||||
MessageDialog dlg(this, _L("Preset path was not found, please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
MessageDialog dlg(this, _L("Preset path was not found; please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return false;
|
||||
@@ -2762,7 +2760,7 @@ wxWindow *CreatePrinterPresetDialog::create_page2_dialog_buttons(wxWindow *paren
|
||||
}
|
||||
|
||||
if (!save_printable_area_config(m_printer_preset)) {
|
||||
MessageDialog dlg(this, _L("You have entered an illegal input in the printable area section on the first page. Please check before creating it."),
|
||||
MessageDialog dlg(this, _L("You have entered a disallowed character in the printable area section on the first page. Please use only numbers."),
|
||||
wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
show_page1();
|
||||
@@ -2783,9 +2781,7 @@ wxWindow *CreatePrinterPresetDialog::create_page2_dialog_buttons(wxWindow *paren
|
||||
// Confirm if the printer preset has a duplicate name
|
||||
if (!rewritten && preset_bundle->printers.find_preset(printer_preset_name)) {
|
||||
MessageDialog dlg(this,
|
||||
_L("The printer preset you created already has a preset with the same name. Do you want to overwrite it?\n\tYes: Overwrite the printer preset with the "
|
||||
"same name, and filament and process presets with the same preset name will be recreated \nand filament and process presets without the same preset name will be reserve.\n\tCancel: Do not create a preset, return to the "
|
||||
"creation interface."),
|
||||
_L("The printer preset you created already has a preset with the same name. Do you want to overwrite it\?\n\tYes: Overwrite the printer preset with the same name, and filament and process presets with the same preset name will be recreated \nand filament and process presets without the same preset name will be reserved.\n\tCancel: Do not create a preset; return to the creation interface."),
|
||||
wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES | wxCANCEL | wxYES_DEFAULT | wxCENTRE);
|
||||
int res = dlg.ShowModal();
|
||||
if (res == wxID_YES) {
|
||||
@@ -3044,7 +3040,7 @@ void CreatePrinterPresetDialog::on_select_printer_model(wxCommandEvent &e)
|
||||
return;
|
||||
}
|
||||
|
||||
MessageDialog dlg(this, _L("Vendor was not found, please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
MessageDialog dlg(this, _L("Vendor was not found; please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return;
|
||||
}
|
||||
@@ -3317,7 +3313,7 @@ bool CreatePrinterPresetDialog::validate_input_valid()
|
||||
std::string vendor_name = get_printer_vendor();
|
||||
std::string model_name = get_printer_model();
|
||||
if ((vendor_name.empty() || model_name.empty())) {
|
||||
MessageDialog dlg(this, _L("You have not selected the vendor and model or entered the custom vendor and model."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
MessageDialog dlg(this, _L("You have not selected the vendor and model or input the custom vendor and model."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return false;
|
||||
@@ -3348,7 +3344,7 @@ bool CreatePrinterPresetDialog::validate_input_valid()
|
||||
} else if (curr_selected_printer_type == m_create_type.create_nozzle) {
|
||||
wxString printer_name = m_select_printer->GetStringSelection();
|
||||
if (printer_name.empty()) {
|
||||
MessageDialog dlg(this, _L("You have not yet selected the printer to replace the nozzle, please choose."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
MessageDialog dlg(this, _L("You have not yet selected the printer to replace the nozzle for; please choose a printer."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
|
||||
wxYES | wxYES_DEFAULT | wxCENTRE);
|
||||
dlg.ShowModal();
|
||||
return false;
|
||||
@@ -3482,8 +3478,7 @@ CreatePresetSuccessfulDialog::CreatePresetSuccessfulDialog(wxWindow *parent, con
|
||||
break;
|
||||
case FILAMENT:
|
||||
success_text = new wxStaticText(this, wxID_ANY, _L("Filament Created"));
|
||||
wxString prompt_text = _L("Please go to filament setting to edit your presets if you need.\nPlease note that nozzle temperature, hot bed temperature, and maximum "
|
||||
"volumetric speed has a significant impact on printing quality. Please set them carefully.");
|
||||
wxString prompt_text = _L("Please go to filament settings to edit your presets if you need to.\nPlease note that nozzle temperature, hot bed temperature, and maximum volumetric speed each have a significant impact on printing quality. Please set them carefully.");
|
||||
wxString sync_text = sync_user_preset_need_enabled ? _L("\n\nOrca has detected that your user presets synchronization function is not enabled, "
|
||||
"which may result in unsuccessful Filament settings on the Device page.\n"
|
||||
"Click \"Sync user presets\" to enable the synchronization function.") : "";
|
||||
@@ -3691,8 +3686,7 @@ std::string ExportConfigsDialog::initial_file_name(const wxString &path, const s
|
||||
std::string export_path = into_u8(path);
|
||||
boost::filesystem::path printer_export_path = (boost::filesystem::path(export_path) / file_name).make_preferred();
|
||||
if (boost::filesystem::exists(printer_export_path)) {
|
||||
MessageDialog dlg(this, wxString::Format(_L("The '%s' folder already exists in the current directory. Do you want to clear it and rebuild it.\nIf not, a time suffix will be "
|
||||
"added, and you can modify the name after creation."), file_name), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
MessageDialog dlg(this, wxString::Format(_L("The \'%s\' folder already exists in the current directory. Do you want to clear it and rebuild it\?\nIf not, a time suffix will be added, and you can modify the name after creation."), file_name), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
|
||||
int res = dlg.ShowModal();
|
||||
if (wxID_YES == res) {
|
||||
try {
|
||||
@@ -3864,7 +3858,7 @@ void ExportConfigsDialog::select_curr_radiobox(std::vector<std::pair<RadioBox *,
|
||||
wxString printer_name = wxString::FromUTF8(preset_name);
|
||||
m_preset_sizer->Add(create_checkbox(m_presets_window, preset.second, printer_name, m_preset), 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, FromDIP(5));
|
||||
}
|
||||
m_serial_text->SetLabel(_L("Only display printer names with changes to printer, filament, and process presets."));
|
||||
m_serial_text->SetLabel(_L("Only display printers with changes to printer, filament, and process presets are displayed."));
|
||||
}else if (export_type == m_exprot_type.filament_bundle) {
|
||||
for (std::pair<std::string, std::vector<std::pair<std::string, Preset*>>> filament_name_to_preset : m_filament_name_to_presets) {
|
||||
if (filament_name_to_preset.second.empty()) continue;
|
||||
@@ -4302,7 +4296,7 @@ wxBoxSizer *ExportConfigsDialog::create_select_printer(wxWindow *parent)
|
||||
wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
wxBoxSizer * optionSizer = new wxBoxSizer(wxVERTICAL);
|
||||
m_serial_text = new wxStaticText(parent, wxID_ANY, _L("Please select a type you want to export"), wxDefaultPosition, wxDefaultSize);
|
||||
m_serial_text = new wxStaticText(parent, wxID_ANY, _L("Please select a preset type you want to export"), wxDefaultPosition, wxDefaultSize);
|
||||
optionSizer->Add(m_serial_text, 0, wxEXPAND | wxALL, 0);
|
||||
optionSizer->SetMinSize(OPTION_SIZE);
|
||||
horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL, FromDIP(10));
|
||||
|
||||
@@ -202,7 +202,7 @@ void DailyTipsDataRenderer::render_text(const ImVec2& start_pos, const ImVec2& s
|
||||
|
||||
// wiki
|
||||
if (!m_data.wiki_url.empty()) {
|
||||
std::string tips_line = _u8L("For more information, please check out Wiki");
|
||||
std::string tips_line = _u8L("For more information, please check out our Wiki");
|
||||
std::string wiki_part_text = _u8L("Wiki");
|
||||
std::string first_part_text = tips_line.substr(0, tips_line.find(wiki_part_text));
|
||||
ImVec2 wiki_part_size = ImGui::CalcTextSize(wiki_part_text.c_str());
|
||||
|
||||
@@ -645,7 +645,7 @@ DesktopIntegrationDialog::DesktopIntegrationDialog(wxWindow *parent)
|
||||
|
||||
|
||||
wxBoxSizer *btn_szr = new wxBoxSizer(wxHORIZONTAL);
|
||||
wxButton *btn_perform = new wxButton(this, wxID_ANY, _L("Perform"));
|
||||
wxButton *btn_perform = new wxButton(this, wxID_ANY, _L("Apply"));
|
||||
btn_szr->Add(btn_perform, 0, wxALL, 10);
|
||||
|
||||
btn_perform->Bind(wxEVT_BUTTON, [this](wxCommandEvent &) { DesktopIntegrationDialog::perform_desktop_integration(); EndModal(wxID_ANY); });
|
||||
|
||||
@@ -165,7 +165,7 @@ void DeviceErrorDialog::init_button_list()
|
||||
init_button(FILAMENT_EXTRUDED, _L("Filament Extruded, Continue"));
|
||||
init_button(RETRY_FILAMENT_EXTRUDED, _L("Not Extruded Yet, Retry"));
|
||||
init_button(CONTINUE, _L("Finished, Continue"));
|
||||
init_button(LOAD_VIRTUAL_TRAY, _L("Load Filament"));
|
||||
init_button(LOAD_VIRTUAL_TRAY, _L("Load"));
|
||||
init_button(OK_BUTTON, _L("OK"));
|
||||
init_button(FILAMENT_LOAD_RESUME, _L("Filament Loaded, Resume"));
|
||||
init_button(JUMP_TO_LIVEVIEW, _L("View Liveview"));
|
||||
|
||||
@@ -38,7 +38,7 @@ DownloadProgressDialog::DownloadProgressDialog(wxString title)
|
||||
wxString install_failed_url = wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-get-network-plugin");
|
||||
|
||||
wxString download_failed_msg = _L("Failed to download the plug-in. Please check your firewall settings and VPN software and retry.");
|
||||
wxString install_failed_msg = _L("Failed to install the plug-in. The plug-in file may be in use. Please restart OrcaSlicer and try again. Also check whether it is blocked or deleted by anti-virus software.");
|
||||
wxString install_failed_msg = _L("Failed to install the plug-in. The plug-in file may be in use. Please restart OrcaSlicer and try again. Also check whether it is blocked or has been deleted by anti-virus software.");
|
||||
|
||||
SetBackgroundColour(*wxWHITE);
|
||||
wxBoxSizer *m_sizer_main = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
@@ -86,7 +86,7 @@ void ExtrusionCalibration::create()
|
||||
select_sizer->Add(m_comboBox_filament, 0, wxEXPAND);
|
||||
select_sizer->Add(0, EXTRUSION_CALIBRATION_WIDGET_GAP, 0, 0);
|
||||
|
||||
auto bed_type_sel_text = new wxStaticText(m_step_1_panel, wxID_ANY, _L("Bed Type"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
auto bed_type_sel_text = new wxStaticText(m_step_1_panel, wxID_ANY, _L("Plate Type"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
select_sizer->Add(bed_type_sel_text, 0, wxALIGN_LEFT);
|
||||
select_sizer->AddSpacer(FromDIP(4));
|
||||
|
||||
@@ -170,7 +170,7 @@ void ExtrusionCalibration::create()
|
||||
m_error_text->SetForegroundColour(wxColour(208, 27, 27));
|
||||
m_error_text->Hide();
|
||||
|
||||
m_button_cali = new Button(m_step_1_panel, _L("Start calibration"));
|
||||
m_button_cali = new Button(m_step_1_panel, _L("Start"));
|
||||
m_button_cali->SetStyle(ButtonStyle::Confirm, ButtonType::Choice);
|
||||
m_button_cali->Bind(wxEVT_BUTTON, &ExtrusionCalibration::on_click_cali, this);
|
||||
|
||||
@@ -239,7 +239,7 @@ void ExtrusionCalibration::create()
|
||||
m_button_save_result->SetStyle(ButtonStyle::Confirm, ButtonType::Choice);
|
||||
m_button_save_result->Bind(wxEVT_BUTTON, &ExtrusionCalibration::on_click_save, this);
|
||||
|
||||
m_button_last_step = new Button(m_step_2_panel, _L("Last Step")); // Back for english
|
||||
m_button_last_step = new Button(m_step_2_panel, _L("Back")); // Back for english
|
||||
m_button_last_step->SetStyle(ButtonStyle::Regular, ButtonType::Choice);
|
||||
m_button_last_step->Bind(wxEVT_BUTTON, &ExtrusionCalibration::on_click_last, this);
|
||||
|
||||
@@ -712,12 +712,12 @@ void ExtrusionCalibration::post_select_event() {
|
||||
void ExtrusionCalibration::set_step(int step_index)
|
||||
{
|
||||
if (step_index == 2) {
|
||||
wxString title_text = wxString::Format("%s - %s 2/2", _L("Dynamic flow Calibration"), _L("Step"));
|
||||
wxString title_text = wxString::Format("%s - %s 2/2", _L("Dynamic flow calibration"), _L("Step"));
|
||||
SetTitle(title_text);
|
||||
m_step_1_panel->Hide();
|
||||
m_step_2_panel->Show();
|
||||
} else {
|
||||
wxString title_text = wxString::Format("%s - %s 1/2", _L("Dynamic flow Calibration"), _L("Step"));
|
||||
wxString title_text = wxString::Format("%s - %s 1/2", _L("Dynamic flow calibration"), _L("Step"));
|
||||
SetTitle(title_text);
|
||||
m_step_1_panel->Show();
|
||||
m_step_2_panel->Hide();
|
||||
|
||||
@@ -367,7 +367,7 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true
|
||||
}
|
||||
|
||||
wxString label = m_opt.full_label.empty() ? _(m_opt.label) : _(m_opt.full_label);
|
||||
show_error(m_parent, from_u8((boost::format(_utf8(L("%s can't be a percentage"))) % into_u8(label)).str()));
|
||||
show_error(m_parent, from_u8((boost::format(_utf8(L("%s can\u2019t be a percentage"))) % into_u8(label)).str()));
|
||||
set_value(double_to_string(m_opt.min), true);
|
||||
m_value = double(m_opt.min);
|
||||
break;
|
||||
|
||||
@@ -2795,7 +2795,7 @@ void GCodeViewer::render_all_plates_stats(const std::vector<const GCodeProcessor
|
||||
ImGui::Dummy(ImVec2(0.0f, ImGui::GetFontSize() * 0.1));
|
||||
ImGui::Dummy({ window_padding, window_padding });
|
||||
ImGui::SameLine();
|
||||
imgui.title(_u8L("Total Estimation"));
|
||||
imgui.title(_u8L("Total estimation"));
|
||||
|
||||
ImGui::Dummy({ window_padding, window_padding });
|
||||
ImGui::SameLine();
|
||||
@@ -3681,8 +3681,8 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||
append_headers({{_u8L("Line Type"), offsets[0]}, {_u8L("Time"), offsets[1]}, {"%", offsets[2]}, {_u8L("Usage"), offsets[3]}, {_u8L("Display"), offsets[5]}});
|
||||
break;
|
||||
}
|
||||
case libvgcode::EViewType::Height: { imgui.title(_u8L("Layer Height (mm)")); break; }
|
||||
case libvgcode::EViewType::Width: { imgui.title(_u8L("Line Width (mm)")); break; }
|
||||
case libvgcode::EViewType::Height: { imgui.title(_u8L("Layer height (mm)")); break; }
|
||||
case libvgcode::EViewType::Width: { imgui.title(_u8L("Line width (mm)")); break; }
|
||||
case libvgcode::EViewType::Speed:
|
||||
{
|
||||
imgui.title(_u8L("Speed (mm/s)"));
|
||||
@@ -3703,7 +3703,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||
imgui.title(_u8L("Jerk (mm/s)"));
|
||||
break;
|
||||
}
|
||||
case libvgcode::EViewType::FanSpeed: { imgui.title(_u8L("Fan Speed (%)")); break; }
|
||||
case libvgcode::EViewType::FanSpeed: { imgui.title(_u8L("Fan speed (%)")); break; }
|
||||
case libvgcode::EViewType::Temperature: { imgui.title(_u8L("Temperature (°C)")); break; }
|
||||
// ORCA: Add Pressure Advance visualization support
|
||||
case libvgcode::EViewType::PressureAdvance:{ imgui.title(_u8L("Pressure Advance")); break; }
|
||||
@@ -3851,7 +3851,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||
}
|
||||
else if (type == libvgcode::EOptionType::ToolChanges) {
|
||||
const auto option_values = option_stats(type);
|
||||
append_option_item_with_type(type, libvgcode::convert(m_viewer.get_option_color(libvgcode::EOptionType::ToolChanges)), _u8L("Filament Changes"), visible,
|
||||
append_option_item_with_type(type, libvgcode::convert(m_viewer.get_option_color(libvgcode::EOptionType::ToolChanges)), _u8L("Filament changes"), visible,
|
||||
option_values[0], option_values[1], option_values[2], option_values[3]);
|
||||
}
|
||||
else if (type == libvgcode::EOptionType::Wipes) {
|
||||
@@ -4548,7 +4548,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||
|
||||
// total estimated printing time section
|
||||
ImGui::Spacing();
|
||||
std::string time_title = m_viewer.get_view_type() == libvgcode::EViewType::FeatureType ? _u8L("Total Estimation") : _u8L("Time Estimation");
|
||||
std::string time_title = m_viewer.get_view_type() == libvgcode::EViewType::FeatureType ? _u8L("Total estimation") : _u8L("Time Estimation");
|
||||
auto can_show_mode_button = [this](libvgcode::ETimeMode mode) {
|
||||
std::vector<std::string> time_strs;
|
||||
for (size_t i = 0; i < m_print_statistics.modes.size(); ++i) {
|
||||
|
||||
@@ -2435,7 +2435,7 @@ void GLCanvas3D::mirror_selection(Axis axis)
|
||||
transformation_type.set_relative();
|
||||
m_selection.setup_cache();
|
||||
m_selection.mirror(axis, transformation_type);
|
||||
do_mirror(L("Mirror Object"));
|
||||
do_mirror(L("Mirror object"));
|
||||
// BBS
|
||||
//wxGetApp().obj_manipul()->set_dirty();
|
||||
}
|
||||
@@ -2793,22 +2793,14 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
|
||||
TriangleMesh mesh = print_object->get_mesh(slaposDrillHoles);
|
||||
assert(! mesh.empty());
|
||||
mesh.transform(sla_print->sla_trafo(*m_model->objects[volume.object_idx()]).inverse());
|
||||
#if ENABLE_SMOOTH_NORMALS
|
||||
volume.model.init_from(mesh, true);
|
||||
#else
|
||||
volume.model.init_from(mesh);
|
||||
volume.mesh_raycaster = std::make_unique<GUI::MeshRaycaster>(std::make_shared<TriangleMesh>(mesh));
|
||||
#endif // ENABLE_SMOOTH_NORMALS
|
||||
}
|
||||
else {
|
||||
// Reload the original volume.
|
||||
#if ENABLE_SMOOTH_NORMALS
|
||||
volume.model.init_from(m_model->objects[volume.object_idx()]->volumes[volume.volume_idx()]->mesh(), true);
|
||||
#else
|
||||
const TriangleMesh& new_mesh = m_model->objects[volume.object_idx()]->volumes[volume.volume_idx()]->mesh();
|
||||
volume.model.init_from(new_mesh);
|
||||
volume.mesh_raycaster = std::make_unique<GUI::MeshRaycaster>(std::make_shared<TriangleMesh>(new_mesh));
|
||||
#endif // ENABLE_SMOOTH_NORMALS
|
||||
}
|
||||
}
|
||||
//FIXME it is an ugly hack to write the timestamp into the "offsets" field to not have to add another member variable
|
||||
@@ -3664,7 +3656,7 @@ void GLCanvas3D::on_key(wxKeyEvent& evt)
|
||||
thiz = this;
|
||||
translationProcessor = TranslationProcessor(
|
||||
[this]() {
|
||||
do_move(L("Tool Move"));
|
||||
do_move(L("Tool move"));
|
||||
m_gizmos.update_data();
|
||||
|
||||
// BBS
|
||||
@@ -4654,7 +4646,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
||||
m_layers_editing.accept_changes(*this);
|
||||
}
|
||||
else if (m_mouse.drag.move_volume_idx != -1 && m_mouse.dragging) {
|
||||
do_move(L("Move Object"));
|
||||
do_move(L("Move object"));
|
||||
// BBS
|
||||
//wxGetApp().obj_manipul()->set_dirty();
|
||||
// Let the plater know that the dragging finished, so a delayed refresh
|
||||
@@ -5799,7 +5791,7 @@ bool GLCanvas3D::_render_orient_menu(float left, float right, float bottom, floa
|
||||
imgui->set_next_window_pos(x, y, ImGuiCond_Always, 1.0f, 0.0f);
|
||||
#endif
|
||||
|
||||
imgui->begin(_L("Auto Orientation options"), ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoCollapse);
|
||||
imgui->begin(_L("Auto orientation options"), ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoCollapse);
|
||||
|
||||
OrientSettings settings = get_orient_settings();
|
||||
OrientSettings& settings_out = get_orient_settings();
|
||||
@@ -9525,7 +9517,7 @@ void GLCanvas3D::_render_assemble_control()
|
||||
ImVec2 window_padding = ImGui::GetStyle().WindowPadding;
|
||||
|
||||
imgui->set_next_window_pos(canvas_w / 2, canvas_h - 10.0f * get_scale(), ImGuiCond_Always, 0.5f, 1.0f);
|
||||
imgui->begin(_L("Assemble Control"), ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar);
|
||||
imgui->begin(_L("Assembly Control"), ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar);
|
||||
|
||||
ImGui::AlignTextToFramePadding();
|
||||
float tooltip_button_width;
|
||||
@@ -10001,11 +9993,7 @@ void GLCanvas3D::_load_sla_shells()
|
||||
const TriangleMesh& mesh, const ColorRGBA& color, bool outside_printer_detection_enabled) {
|
||||
m_volumes.volumes.emplace_back(new GLVolume(color));
|
||||
GLVolume& v = *m_volumes.volumes.back();
|
||||
#if ENABLE_SMOOTH_NORMALS
|
||||
v.model.init_from(mesh, true);
|
||||
#else
|
||||
v.model.init_from(mesh);
|
||||
#endif // ENABLE_SMOOTH_NORMALS
|
||||
v.shader_outside_printer_detection_enabled = outside_printer_detection_enabled;
|
||||
v.composite_id.volume_id = volume_id;
|
||||
v.set_instance_offset(unscale(instance.shift.x(), instance.shift.y(), 0.0));
|
||||
@@ -10111,7 +10099,7 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
||||
}
|
||||
case EWarning::ObjectOutside: text = _u8L("An object is laid over the plate boundaries."); break;
|
||||
case EWarning::ToolHeightOutside: text = _u8L("A G-code path goes beyond the max print height."); error = ErrorType::SLICING_ERROR; break;
|
||||
case EWarning::ToolpathOutside: text = _u8L("A G-code path goes beyond the plate boundaries."); error = ErrorType::SLICING_ERROR; break;
|
||||
case EWarning::ToolpathOutside: text = _u8L("A G-code path goes beyond plate boundaries."); error = ErrorType::SLICING_ERROR; break;
|
||||
case EWarning::TPUPrintableError: {
|
||||
text = _u8L("Not support printing 2 or more TPU filaments.");
|
||||
error = ErrorType::SLICING_ERROR;
|
||||
|
||||
+40
-15
@@ -14,18 +14,20 @@
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
|
||||
#if ENABLE_SMOOTH_NORMALS
|
||||
#if defined(L)
|
||||
#undef L
|
||||
#endif
|
||||
|
||||
#include <igl/per_face_normals.h>
|
||||
#include <igl/per_corner_normals.h>
|
||||
#include <igl/per_vertex_normals.h>
|
||||
#endif // ENABLE_SMOOTH_NORMALS
|
||||
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
#if ENABLE_SMOOTH_NORMALS
|
||||
static void smooth_normals_corner(const TriangleMesh& mesh, std::vector<stl_normal>& normals)
|
||||
{
|
||||
using MapMatrixXfUnaligned = Eigen::Map<const Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor | Eigen::DontAlign>>;
|
||||
@@ -41,7 +43,7 @@ static void smooth_normals_corner(const TriangleMesh& mesh, std::vector<stl_norm
|
||||
Eigen::Index(face_normals.size()), 3).cast<double>();
|
||||
Eigen::MatrixXd out_normals;
|
||||
|
||||
igl::per_corner_normals(vertices, indices, in_normals, 1.0, out_normals);
|
||||
igl::per_corner_normals(vertices, indices, 1.0, out_normals);
|
||||
|
||||
normals = std::vector<stl_normal>(mesh.its.vertices.size());
|
||||
for (size_t i = 0; i < mesh.its.indices.size(); ++i) {
|
||||
@@ -50,7 +52,6 @@ static void smooth_normals_corner(const TriangleMesh& mesh, std::vector<stl_norm
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // ENABLE_SMOOTH_NORMALS
|
||||
|
||||
void GLModel::Geometry::add_vertex(const Vec2f& position)
|
||||
{
|
||||
@@ -455,17 +456,41 @@ void GLModel::init_from(const indexed_triangle_set& its)
|
||||
data.reserve_vertices(3 * its.indices.size());
|
||||
data.reserve_indices(3 * its.indices.size());
|
||||
|
||||
// vertices + indices
|
||||
unsigned int vertices_counter = 0;
|
||||
for (uint32_t i = 0; i < its.indices.size(); ++i) {
|
||||
const stl_triangle_vertex_indices face = its.indices[i];
|
||||
const stl_vertex vertex[3] = { its.vertices[face[0]], its.vertices[face[1]], its.vertices[face[2]] };
|
||||
const stl_vertex n = face_normal_normalized(vertex);
|
||||
for (size_t j = 0; j < 3; ++j) {
|
||||
data.add_vertex(vertex[j], n);
|
||||
// Read user preference: smooth normals enabled
|
||||
const bool realistic_mode = wxGetApp().app_config != nullptr && wxGetApp().app_config->get_bool(SETTING_OPENGL_REALISTIC_MODE);
|
||||
const bool smooth_normals_enabled = wxGetApp().app_config != nullptr && wxGetApp().app_config->get_bool(SETTING_OPENGL_PHONG_SMOOTH_NORMALS);
|
||||
|
||||
if (realistic_mode && smooth_normals_enabled) {
|
||||
// Use per-corner smooth normals (via IGL)
|
||||
using MapMatrixXfUnaligned = Eigen::Map<const Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor | Eigen::DontAlign>>;
|
||||
using MapMatrixXiUnaligned = Eigen::Map<const Eigen::Matrix<int, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor | Eigen::DontAlign>>;
|
||||
Eigen::MatrixXd vertices = MapMatrixXfUnaligned(its.vertices.front().data(), Eigen::Index(its.vertices.size()), 3).cast<double>();
|
||||
Eigen::MatrixXi indices = MapMatrixXiUnaligned(its.indices.front().data(), Eigen::Index(its.indices.size()), 3);
|
||||
Eigen::MatrixXd corner_normals;
|
||||
igl::per_corner_normals(vertices, indices, 5.0, corner_normals);
|
||||
|
||||
unsigned int vertices_counter = 0;
|
||||
for (uint32_t i = 0; i < its.indices.size(); ++i) {
|
||||
const stl_triangle_vertex_indices face = its.indices[i];
|
||||
for (size_t j = 0; j < 3; ++j) {
|
||||
const Vec3f normal = corner_normals.row(Eigen::Index(i * 3 + j)).cast<float>();
|
||||
data.add_vertex(its.vertices[face[j]], normal);
|
||||
}
|
||||
data.add_triangle(vertices_counter, vertices_counter + 1, vertices_counter + 2);
|
||||
vertices_counter += 3;
|
||||
}
|
||||
} else {
|
||||
//Original flat (per-face) normals
|
||||
unsigned int vertices_counter = 0;
|
||||
for (uint32_t i = 0; i < its.indices.size(); ++i) {
|
||||
const stl_triangle_vertex_indices face = its.indices[i];
|
||||
const stl_vertex vertex[3] = {its.vertices[face[0]], its.vertices[face[1]], its.vertices[face[2]]};
|
||||
const stl_vertex n = face_normal_normalized(vertex);
|
||||
for (size_t j = 0; j < 3; ++j)
|
||||
data.add_vertex(vertex[j], n);
|
||||
data.add_triangle(vertices_counter, vertices_counter + 1, vertices_counter + 2);
|
||||
vertices_counter += 3;
|
||||
}
|
||||
vertices_counter += 3;
|
||||
data.add_triangle(vertices_counter - 3, vertices_counter - 2, vertices_counter - 1);
|
||||
}
|
||||
|
||||
// update bounding box
|
||||
|
||||
@@ -403,7 +403,7 @@ void show_substitutions_info(const PresetsConfigSubstitutions& presets_config_su
|
||||
add_config_substitutions(substitution.substitutions, changes);
|
||||
}
|
||||
|
||||
InfoDialog msg(nullptr, _L("Configuration package was loaded, but some values were not recognized."), substitution_message(changes), true);
|
||||
InfoDialog msg(nullptr, _L("The configuration package was loaded, but some values were not recognized."), substitution_message(changes), true);
|
||||
msg.ShowModal();
|
||||
}
|
||||
|
||||
@@ -413,7 +413,7 @@ void show_substitutions_info(const ConfigSubstitutions& config_substitutions, co
|
||||
add_config_substitutions(config_substitutions, changes);
|
||||
|
||||
InfoDialog msg(nullptr,
|
||||
format_wxstr(_L("Configuration file \"%1%\" was loaded, but some values were not recognized."), from_u8(filename)),
|
||||
format_wxstr(_L("The configuration file \u201c%1%\u201d was loaded, but some values were not recognized."), from_u8(filename)),
|
||||
substitution_message(changes), true);
|
||||
msg.ShowModal();
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user