Merge branch 'SoftFever:main' into main

This commit is contained in:
VOLUMIC 2025-06-25 11:21:44 +02:00 committed by GitHub
commit aeea69706e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2093 changed files with 125997 additions and 49988 deletions

View file

@ -4,4 +4,7 @@ build_*/
build/
localization/
sandboxes/
resources/
resources/*
!resources/web/
!resources/dailytip
!resources/shaders

View file

@ -1,2 +1,2 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG BASE_IMAGE
FROM ${BASE_IMAGE}

View file

@ -1,14 +1,14 @@
{
"name": "OrcaSlicer",
"build": {
"dockerfile": "Dockerfile",
"args": {
"PLATFORM": "linux/amd64",
"BASE_IMAGE": "mcr.microsoft.com/devcontainers/cpp:ubuntu-20.04"
},
"options": ["--platform=linux/amd64"]
"dockerfile": "Dockerfile",
"args": {
"PLATFORM": "linux/amd64",
"BASE_IMAGE": "mcr.microsoft.com/devcontainers/cpp:ubuntu-22.04"
},
"options": ["--platform=linux/amd64"]
},
"runArgs": ["--env-file", "/tmp/devcontainer.env"],
"runArgs": ["--platform=linux/amd64"],
"features": {
"ghcr.io/devcontainers/features/desktop-lite:1": {
"password": "orca"
@ -16,16 +16,13 @@
},
"customizations": {
"vscode": {
"settings": {
"settings": {
"cmake.configureArgs": [
"-DSLIC3R_GTK=3",
"-DBBL_RELEASE_TO_PUBLIC=1",
"-DBBL_INTERNAL_TESTING=0",
"-DSLIC3R_STATIC=1",
"-DCMAKE_PREFIX_PATH=${workspaceFolder}/deps/build/destdir/usr/local"
],
"cmake.buildToolArgs": [
"-l${containerEnv:CORES}"
]
},
@ -47,10 +44,6 @@
"otherPortsAttributes": {
"onAutoForward": "ignore"
},
"initializeCommand": {
"Setup Temporary Env File": "echo \"CORES=`nproc --all`\" > /tmp/devcontainer.env"
},
"onCreateCommand": {
"Set postCreate executable flag": "chmod +x .devcontainer/postCreate.sh"
},

View file

@ -3,12 +3,13 @@
apt update
apt upgrade -y
build_linux="./build_linux.sh -u"
echo "-----------------------------------------"
echo "Running BuildLinux.sh with update flag..."
echo "Running ${build_linux}..."
echo "-----------------------------------------"
./BuildLinux.sh -u
${build_linux}
echo "------------------------------"
echo "Installing missing packages..."
echo "------------------------------"
apt install -y libgl1-mesa-dev m4 autoconf libtool
apt install -y libgl1-mesa-dev m4 autoconf libtool

View file

@ -22,6 +22,7 @@ deps/build-linux/*
**/.DS_Store
install_*
build_*/
!build_linux.sh
SVG
Dockerfile
DockerBuild.sh

2
.gitattributes vendored
View file

@ -0,0 +1,2 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

View file

@ -13,6 +13,7 @@ on:
- 'localization/**'
- 'resources/**'
- ".github/workflows/build_*.yml"
- 'flatpak/**'
pull_request:
branches:
@ -24,9 +25,10 @@ on:
- '**/CMakeLists.txt'
- 'version.inc'
- ".github/workflows/build_*.yml"
- 'BuildLinux.sh'
- 'build_linux.sh'
- 'build_release_vs2022.bat'
- 'build_release_macos.sh'
- 'flatpak/**'
workflow_dispatch: # allows for manual dispatch
inputs:
@ -47,11 +49,10 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
# Deprecate 20.04appimage
# - os: ubuntu-20.04
- os: ubuntu-24.04
- os: windows-latest
- os: macos-14
arch: x86_64
- os: macos-14
arch: arm64
uses: ./.github/workflows/build_check_cache.yml
@ -63,7 +64,7 @@ jobs:
flatpak:
name: "Flatpak"
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-46
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-47
options: --privileged
volumes:
- /usr/local/lib/android:/usr/local/lib/android

View file

@ -30,13 +30,12 @@ jobs:
- name: set outputs
id: set_outputs
env:
underscore-arch: ${{ inputs.os == 'macos-14' && '_' || ''}}${{ inputs.os == 'macos-14' && inputs.arch || '' }} # if is macos, make a string that does "_{arch}", else output nothing
dash-arch: ${{ inputs.os == 'macos-14' && '-' || ''}}${{ inputs.os == 'macos-14' && inputs.arch || '' }} # if is macos, make a string that does "-{arch}", else output nothing
dep-folder-name: ${{ (inputs.os == 'windows-latest' || inputs.os == 'macos-14') && 'OrcaSlicer_dep' || 'destdir' }}
# todo: this is mad! refactor other build scripts to use same name
dep-folder-name: ${{ inputs.os == 'windows-latest' && '/OrcaSlicer_dep' || inputs.os == 'macos-14' && '' || inputs.os != 'macos-14' && '/destdir' || '' }}
output-cmd: ${{ inputs.os == 'windows-latest' && '$env:GITHUB_OUTPUT' || '"$GITHUB_OUTPUT"'}}
run: |
echo cache-key=${{ inputs.os }}${{ env.dash-arch }}-cache-orcaslicer_deps-build-${{ hashFiles('deps/**') }} >> ${{ env.output-cmd }}
echo cache-path=${{ github.workspace }}/deps/build${{ env.underscore-arch }}/${{ env.dep-folder-name }}${{ env.underscore-arch }} >> ${{ env.output-cmd }}
echo cache-key=${{ inputs.os }}-cache-orcaslicer_deps-build-${{ hashFiles('deps/**') }} >> ${{ env.output-cmd }}
echo cache-path=${{ github.workspace }}/deps/build${{ env.dep-folder-name }} >> ${{ env.output-cmd }}
- name: load cache
id: cache_deps

View file

@ -74,12 +74,14 @@ jobs:
if: inputs.os == 'macos-14'
working-directory: ${{ github.workspace }}
run: |
brew install automake texinfo ninja libtool
brew install automake texinfo libtool
brew list
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}
mkdir -p ${{ github.workspace }}/deps/build_${{ inputs.arch }}/OrcaSlicer_dep_${{ inputs.arch }}
brew uninstall --ignore-dependencies zstd
./build_release_macos.sh -dpx -a ${{ inputs.arch }} -t 10.15 -1
./build_release_macos.sh -dx -a universal -t 10.15 -1
for arch in arm64 x86_64; do
(cd "${{ github.workspace }}/deps/build/${arch}" && \
find . -mindepth 1 -maxdepth 1 ! -name 'OrcaSlicer_dep' -exec rm -rf {} +)
done
brew install zstd
@ -95,7 +97,7 @@ jobs:
libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules pkgconf \
libglu1-mesa-dev libcairo2-dev libgtk-3-dev libsoup2.4-dev libwebkit2gtk-${{ env.webkit-ver }}-dev \
libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-bad libosmesa6-dev wget sudo autoconf curl libunwind-dev texinfo
gstreamer1.0-plugins-bad wget sudo autoconf curl libunwind-dev texinfo
- name: Build on Ubuntu
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
@ -103,20 +105,20 @@ jobs:
run: |
mkdir -p ${{ github.workspace }}/deps/build
mkdir -p ${{ github.workspace }}/deps/build/destdir
sudo ./BuildLinux.sh -ur
sudo ./build_linux.sh -ur
sudo chown $USER -R ./
./BuildLinux.sh -dr
./build_linux.sh -dr
cd deps/build
tar -czvf OrcaSlicer_dep_ubuntu_$(date +"%Y%m%d").tar.gz destdir
# Upload Artifacts
- name: Upload Mac ${{ inputs.arch }} artifacts
if: inputs.os == 'macos-14'
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_dep_mac_${{ inputs.arch }}_${{ env.date }}
path: ${{ github.workspace }}/deps/build_${{ inputs.arch }}/OrcaSlicer_dep*.tar.gz
# - name: Upload Mac ${{ inputs.arch }} artifacts
# if: inputs.os == 'macos-14'
# uses: actions/upload-artifact@v4
# with:
# name: OrcaSlicer_dep_mac_${{ env.date }}
# path: ${{ github.workspace }}/deps/build/OrcaSlicer_dep*.tar.gz
- name: Upload Windows artifacts
if: inputs.os == 'windows-latest'

View file

@ -81,10 +81,9 @@ jobs:
- name: Install tools mac
if: inputs.os == 'macos-14'
run: |
brew install ninja libtool
brew install libtool
brew list
mkdir -p ${{ github.workspace }}/deps/build_${{inputs.arch}}
mkdir -p ${{ github.workspace }}/deps/build_${{inputs.arch}}/OrcaSlicer_dep_${{inputs.arch}}
mkdir -p ${{ github.workspace }}/deps/build
- name: Free disk space
if: inputs.os == 'macos-14'
@ -98,7 +97,7 @@ jobs:
if: inputs.os == 'macos-14'
working-directory: ${{ github.workspace }}
run: |
./build_release_macos.sh -s -n -x -a ${{inputs.arch}} -t 10.15 -1
./build_release_macos.sh -s -n -x -a universal -t 10.15 -1
# Thanks to RaySajuuk, it's working now
- name: Sign app and notary
@ -119,27 +118,27 @@ jobs:
security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $P12_PASSWORD $KEYCHAIN_PATH
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer/OrcaSlicer.app
ln -s /Applications ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer/Applications
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg
codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build/universal/OrcaSlicer/OrcaSlicer.app
ln -s /Applications ${{ github.workspace }}/build/universal/OrcaSlicer/Applications
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer -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
xcrun notarytool store-credentials "notarytool-profile" --apple-id "${{ secrets.APPLE_DEV_ACCOUNT }}" --team-id "${{ secrets.TEAM_ID }}" --password "${{ secrets.APP_PWD }}"
xcrun notarytool submit "OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg" --keychain-profile "notarytool-profile" --wait
xcrun stapler staple OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg
xcrun notarytool submit "OrcaSlicer_Mac_universal_${{ env.ver }}.dmg" --keychain-profile "notarytool-profile" --wait
xcrun stapler staple OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
- name: Create DMG without notary
if: github.ref != 'refs/heads/main' && inputs.os == 'macos-14'
working-directory: ${{ github.workspace }}
run: |
ln -s /Applications ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer/Applications
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build_${{inputs.arch}}/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg
ln -s /Applications ${{ github.workspace }}/build/universal/OrcaSlicer/Applications
hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build/universal/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
- name: Upload artifacts mac
if: inputs.os == 'macos-14'
uses: actions/upload-artifact@v4
with:
name: OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}
path: ${{ github.workspace }}/OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg
name: OrcaSlicer_Mac_universal_${{ env.ver }}
path: ${{ github.workspace }}/OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
- name: Deploy Mac release
if: github.ref == 'refs/heads/main' && inputs.os == 'macos-14'
@ -147,8 +146,8 @@ jobs:
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}
release_id: 137995723
asset_path: ${{ github.workspace }}/OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg
asset_name: OrcaSlicer_Mac_${{inputs.arch}}_${{ env.ver }}.dmg
asset_path: ${{ github.workspace }}/OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
asset_name: OrcaSlicer_Mac_universal_${{ env.ver }}.dmg
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
@ -244,13 +243,13 @@ jobs:
${{ env.apt-cmd }} install -y autoconf build-essential cmake curl eglexternalplatform-dev \
extra-cmake-modules file git libcairo2-dev libcurl4-openssl-dev libdbus-1-dev libglew-dev libglu1-mesa-dev \
libglu1-mesa-dev libgstreamer1.0-dev libgstreamerd-3-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev \
libgtk-3-dev libgtk-3-dev libmspack-dev libosmesa6-dev libsecret-1-dev libsoup2.4-dev libssl-dev libudev-dev libwayland-dev \
libgtk-3-dev libgtk-3-dev libmspack-dev libsecret-1-dev libsoup2.4-dev libssl-dev libudev-dev libwayland-dev \
libwebkit2gtk-${{ env.webkit-ver }}-dev libxkbcommon-dev locales locales-all m4 pkgconf sudo wayland-protocols wget ${{ env.libfuse2-pkg }}
- name: Install dependencies from BuildLinux.sh
- name: Install dependencies from build_linux.sh
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
shell: bash
run: sudo ./BuildLinux.sh -ur
run: sudo ./build_linux.sh -ur
- name: Fix permissions
if: inputs.os == 'ubuntu-20.04' || inputs.os == 'ubuntu-24.04'
@ -263,12 +262,12 @@ jobs:
env:
ubuntu-ver-str: ${{ (inputs.os == 'ubuntu-24.04' && '_Ubuntu2404') || '' }}
run: |
./BuildLinux.sh -isr
./build_linux.sh -isr
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
- name: Build orca_custom_preset_tests
if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04'
if: github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-24.04'
working-directory: ${{ github.workspace }}/build/src
shell: bash
run: |
@ -308,7 +307,7 @@ jobs:
message: "nightly-builds"
- name: Deploy orca_custom_preset_tests
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-20.04' }}
if: ${{ ! env.ACT && github.ref == 'refs/heads/main' && inputs.os == 'ubuntu-24.04' }}
uses: WebFreak001/deploy-nightly@v3.2.0
with:
upload_url: https://uploads.github.com/repos/SoftFever/OrcaSlicer/releases/137995723/assets{?name,label}

View file

@ -1,195 +0,0 @@
#!/bin/bash
export ROOT=$(dirname $(readlink -f ${0}))
set -e # exit on first error
function check_available_memory_and_disk() {
FREE_MEM_GB=$(free -g -t | grep 'Mem' | rev | cut -d" " -f1 | rev)
MIN_MEM_GB=10
FREE_DISK_KB=$(df -k . | tail -1 | awk '{print $4}')
MIN_DISK_KB=$((10 * 1024 * 1024))
if [ ${FREE_MEM_GB} -le ${MIN_MEM_GB} ]; then
echo -e "\nERROR: Orca Slicer Builder requires at least ${MIN_MEM_GB}G of 'available' mem (systen has only ${FREE_MEM_GB}G available)"
echo && free -h && echo
exit 2
fi
if [[ ${FREE_DISK_KB} -le ${MIN_DISK_KB} ]]; then
echo -e "\nERROR: Orca Slicer Builder requires at least $(echo ${MIN_DISK_KB} |awk '{ printf "%.1fG\n", $1/1024/1024; }') (systen has only $(echo ${FREE_DISK_KB} | awk '{ printf "%.1fG\n", $1/1024/1024; }') disk free)"
echo && df -h . && echo
exit 1
fi
}
function usage() {
echo "Usage: ./BuildLinux.sh [-1][-b][-c][-d][-i][-r][-s][-u]"
echo " -1: limit builds to 1 core (where possible)"
echo " -b: build in debug mode"
echo " -c: force a clean build"
echo " -d: build deps (optional)"
echo " -h: this help output"
echo " -i: Generate appimage (optional)"
echo " -r: skip ram and disk checks (low ram compiling)"
echo " -s: build orca-slicer (optional)"
echo " -u: update and build dependencies (optional and need sudo)"
echo "For a first use, you want to 'sudo ./BuildLinux.sh -u'"
echo " and then './BuildLinux.sh -dsi'"
}
unset name
while getopts ":1bcdghirsu" opt; do
case ${opt} in
1 )
export CMAKE_BUILD_PARALLEL_LEVEL=1
;;
b )
BUILD_DEBUG="1"
;;
c )
CLEAN_BUILD=1
;;
d )
BUILD_DEPS="1"
;;
h ) usage
exit 0
;;
i )
BUILD_IMAGE="1"
;;
r )
SKIP_RAM_CHECK="1"
;;
s )
BUILD_ORCA="1"
;;
u )
UPDATE_LIB="1"
;;
esac
done
if [ ${OPTIND} -eq 1 ]
then
usage
exit 0
fi
DISTRIBUTION=$(awk -F= '/^ID=/ {print $2}' /etc/os-release | tr -d '"')
DISTRIBUTION_LIKE=$(awk -F= '/^ID_LIKE=/ {print $2}' /etc/os-release | tr -d '"')
# Check for direct distribution match to Ubuntu/Debian
if [ "${DISTRIBUTION}" == "ubuntu" ] || [ "${DISTRIBUTION}" == "linuxmint" ]; then
DISTRIBUTION="debian"
# Check if distribution is Debian/Ubuntu-like based on ID_LIKE
elif [[ "${DISTRIBUTION_LIKE}" == *"debian"* ]] || [[ "${DISTRIBUTION_LIKE}" == *"ubuntu"* ]]; then
DISTRIBUTION="debian"
fi
if [ ! -f ./linux.d/${DISTRIBUTION} ]
then
echo "Your distribution does not appear to be currently supported by these build scripts"
exit 1
fi
source ./linux.d/${DISTRIBUTION}
echo "FOUND_GTK3=${FOUND_GTK3}"
if [[ -z "${FOUND_GTK3_DEV}" ]]
then
echo "Error, you must install the dependencies before."
echo "Use option -u with sudo"
exit 1
fi
echo "Changing date in version..."
{
# change date in version
sed -i "s/+UNKNOWN/_$(date '+%F')/" version.inc
}
echo "done"
if ! [[ -n "${SKIP_RAM_CHECK}" ]]
then
check_available_memory_and_disk
fi
if [[ -n "${BUILD_DEPS}" ]]
then
echo "Configuring dependencies..."
BUILD_ARGS="-DDEP_WX_GTK3=ON"
if [[ -n "${CLEAN_BUILD}" ]]
then
rm -fr deps/build
fi
if [ ! -d "deps/build" ]
then
mkdir deps/build
fi
if [[ -n "${BUILD_DEBUG}" ]]
then
# have to build deps with debug & release or the cmake won't find everything it needs
if [ ! -d "deps/build/release" ]
then
mkdir deps/build/release
fi
cmake -S deps -B deps/build/release -G Ninja -DDESTDIR="${PWD}/deps/build/destdir" -DDEP_DOWNLOAD_DIR="${PWD}/deps/DL_CACHE" ${BUILD_ARGS}
cmake --build deps/build/release
BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug"
fi
echo "cmake -S deps -B deps/build -G Ninja ${BUILD_ARGS}"
cmake -S deps -B deps/build -G Ninja ${BUILD_ARGS}
cmake --build deps/build
fi
if [[ -n "${BUILD_ORCA}" ]]
then
echo "Configuring OrcaSlicer..."
if [[ -n "${CLEAN_BUILD}" ]]
then
rm -fr build
fi
BUILD_ARGS=""
if [[ -n "${FOUND_GTK3_DEV}" ]]
then
BUILD_ARGS="-DSLIC3R_GTK=3"
fi
if [[ -n "${BUILD_DEBUG}" ]]
then
BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug -DBBL_INTERNAL_TESTING=1"
else
BUILD_ARGS="${BUILD_ARGS} -DBBL_RELEASE_TO_PUBLIC=1 -DBBL_INTERNAL_TESTING=0"
fi
echo -e "cmake -S . -B build -G Ninja -DCMAKE_PREFIX_PATH="${PWD}/deps/build/destdir/usr/local" -DSLIC3R_STATIC=1 ${BUILD_ARGS}"
cmake -S . -B build -G Ninja \
-DCMAKE_PREFIX_PATH="${PWD}/deps/build/destdir/usr/local" \
-DSLIC3R_STATIC=1 \
-DORCA_TOOLS=ON \
${BUILD_ARGS}
echo "done"
echo "Building OrcaSlicer ..."
cmake --build build --target OrcaSlicer
echo "Building OrcaSlicer_profile_validator .."
cmake --build build --target OrcaSlicer_profile_validator
./run_gettext.sh
echo "done"
fi
if [[ -e ${ROOT}/build/src/BuildLinuxImage.sh ]]; then
# Give proper permissions to script
chmod 755 ${ROOT}/build/src/BuildLinuxImage.sh
echo "[9/9] Generating Linux app..."
pushd build
if [[ -n "${BUILD_IMAGE}" ]]
then
${ROOT}/build/src/BuildLinuxImage.sh -i
else
${ROOT}/build/src/BuildLinuxImage.sh
fi
popd
echo "done"
fi

View file

@ -1,5 +1,50 @@
cmake_minimum_required(VERSION 3.13)
# Verify that your CMake version is exactly 3.31.x series or lower on windows
if ( ((MSVC) OR (WIN32)) AND (${CMAKE_VERSION} VERSION_GREATER_EQUAL "4.0") )
message(FATAL_ERROR "Only cmake versions between 3.13.x and 3.31.x is supported on windows. Detected version: ${CMAKE_VERSION}")
endif()
if (WIN32)
# Detect known CI environments
set(IS_CI FALSE)
if(DEFINED ENV{CI})
set(IS_CI TRUE)
elseif(DEFINED ENV{GITHUB_ACTIONS})
set(IS_CI TRUE)
elseif(DEFINED ENV{GITLAB_CI})
set(IS_CI TRUE)
elseif(DEFINED ENV{TF_BUILD})
set(IS_CI TRUE)
elseif(DEFINED ENV{BUILD_NUMBER}) # Jenkins
set(IS_CI TRUE)
endif()
# Detect common misconfiguration (Strawberry Perl in PATH before CMake)
# We use ENV to check the PATH order
string(REPLACE "\\" "/" ENV_PATH "$ENV{PATH}")
string(FIND "${ENV_PATH}" "Strawberry/c/bin" STRAWBERRY_POS)
string(FIND "${ENV_PATH}" "Program Files/CMake/bin" CMAKE_POS)
if (STRAWBERRY_POS GREATER -1 AND CMAKE_POS GREATER -1 AND STRAWBERRY_POS LESS CMAKE_POS)
set(_warning_text "
#############################################################
Detected Strawberry Perl's 'c/bin' appearing before CMake in PATH.
This is known to cause CMake to misbehave (e.g., missing modules).
Please adjust your PATH so that:
C:\\Program Files\\CMake\\bin
appears before:
C:\\Strawberry\\c\\bin
You can do this in Environment Variables settings.
#############################################################
")
if(NOT IS_CI)
message(FATAL_ERROR "${_warning_text}")
endif()
endif()
endif ()
if (APPLE)
# if CMAKE_OSX_DEPLOYMENT_TARGET is not set, set it to 11.3
if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
@ -63,6 +108,15 @@ set(SLIC3R_GTK "2" CACHE STRING "GTK version to use with wxWidgets on Linux")
set(IS_CROSS_COMPILE FALSE)
option (COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." OFF)
if (${COLORED_OUTPUT})
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options (-fdiagnostics-color=always)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options (-fcolor-diagnostics)
endif ()
endif ()
if (APPLE)
set(CMAKE_FIND_FRAMEWORK LAST)
set(CMAKE_FIND_APPBUNDLE LAST)
@ -182,7 +236,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT WIN32)
# Add DEBUG flags to debug builds.
add_compile_options("$<$<CONFIG:DEBUG>:-DDEBUG>")
add_compile_definitions("$<IF:$<CONFIG:Debug>,DEBUG,NDEBUG>")
endif()
# To be able to link libslic3r with the Perl XS module.
@ -219,7 +273,7 @@ if(WIN32)
if(WIN10SDK_INCLUDE_PATH)
message("Building with Win10 Netfabb STL fixing service support")
add_definitions(-DHAS_WIN10SDK)
include_directories("${WIN10SDK_INCLUDE_PATH}")
include_directories(SYSTEM "${WIN10SDK_INCLUDE_PATH}")
else()
message("Building without Win10 Netfabb STL fixing service support")
endif()
@ -247,7 +301,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
find_package(Threads REQUIRED)
find_package(DBus REQUIRED)
include_directories(${DBUS_INCLUDE_DIRS})
include_directories(SYSTEM ${DBUS_INCLUDE_DIRS})
endif()
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX)
@ -309,7 +363,7 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMP
add_compile_options(-Wno-unknown-pragmas)
endif()
# Bit of a hack for flatpak building: compress the debug info with zstd to save space in CI
# Bit of a hack for flatpak building: compress the debug info with zstd to save space in CI
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13.0)
add_compile_options(-gz=zstd)
endif()
@ -356,11 +410,11 @@ message(STATUS "LIBDIR: ${LIBDIR}")
message(STATUS "LIBDIR_BIN: ${LIBDIR_BIN}")
# For the bundled boost libraries (boost::nowide)
include_directories(${LIBDIR})
include_directories(SYSTEM ${LIBDIR})
# For generated header files
include_directories(${LIBDIR_BIN}/platform)
include_directories(SYSTEM ${LIBDIR_BIN}/platform)
# For ligigl
include_directories(${LIBDIR}/libigl)
include_directories(SYSTEM ${LIBDIR}/libigl)
if(WIN32)
add_definitions(-D_USE_MATH_DEFINES -D_WIN32 -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
@ -430,7 +484,10 @@ endif()
# set(Boost_COMPILER "-mgw81")
# boost::process was introduced first in version 1.64.0,
# boost::beast::detail::base64 was introduced first in version 1.66.0
find_package(Boost 1.66 REQUIRED COMPONENTS system filesystem thread log log_setup locale regex chrono atomic date_time iostreams program_options)
if(POLICY CMP0167)
cmake_policy(SET CMP0167 NEW)
endif()
find_package(Boost 1.83.0 REQUIRED COMPONENTS system filesystem thread log log_setup locale regex chrono atomic date_time iostreams program_options nowide)
add_library(boost_libs INTERFACE)
add_library(boost_headeronly INTERFACE)
@ -447,7 +504,7 @@ endif()
function(slic3r_remap_configs targets from_Cfg to_Cfg)
if(MSVC)
string(TOUPPER ${from_Cfg} from_CFG)
foreach(tgt ${targets})
if(TARGET ${tgt})
set_target_properties(${tgt} PROPERTIES MAP_IMPORTED_CONFIG_${from_CFG} ${to_Cfg})
@ -456,7 +513,7 @@ function(slic3r_remap_configs targets from_Cfg to_Cfg)
endif()
endfunction()
target_include_directories(boost_headeronly INTERFACE ${Boost_INCLUDE_DIRS})
target_include_directories(boost_headeronly SYSTEM INTERFACE ${Boost_INCLUDE_DIRS})
target_link_libraries(boost_libs INTERFACE boost_headeronly ${Boost_LIBRARIES})
# Find and configure intel-tbb
@ -466,7 +523,7 @@ endif()
set(TBB_DEBUG 1)
set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo Release "")
find_package(TBB REQUIRED)
# include_directories(${TBB_INCLUDE_DIRS})
# include_directories(SYSTEM ${TBB_INCLUDE_DIRS})
# add_definitions(${TBB_DEFINITIONS})
# if(MSVC)
# # Suppress implicit linking of the TBB libraries by the Visual Studio compiler.
@ -508,7 +565,7 @@ if (SLIC3R_STATIC AND NOT SLIC3R_STATIC_EXCLUDE_CURL)
find_package(OpenSSL REQUIRED)
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
target_include_directories(libcurl INTERFACE ${OPENSSL_INCLUDE_DIR})
target_include_directories(libcurl SYSTEM INTERFACE ${OPENSSL_INCLUDE_DIR})
target_link_libraries(libcurl INTERFACE ${OPENSSL_LIBRARIES})
endif()
endif()
@ -574,7 +631,7 @@ add_custom_target(gettext_make_pot
COMMAND xgettext --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost
-f "${BBL_L18N_DIR}/list.txt"
-o "${BBL_L18N_DIR}/OrcaSlicer.pot"
COMMAND hintsToPot ${SLIC3R_RESOURCES_DIR} ${BBL_L18N_DIR}
COMMAND hintsToPot ${SLIC3R_RESOURCES_DIR} ${BBL_L18N_DIR}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generate pot file from strings in the source tree"
)
@ -629,11 +686,9 @@ endif ()
find_path(SPNAV_INCLUDE_DIR spnav.h)
if (SPNAV_INCLUDE_DIR)
find_library(HAVE_SPNAV spnav)
if (HAVE_SPNAV)
find_library(SPNAV_LIB NAMES libspnav.a) # Force linking libspnav statically
if (SPNAV_LIB)
add_definitions(-DHAVE_SPNAV)
add_library(libspnav SHARED IMPORTED)
target_link_libraries(libspnav INTERFACE spnav)
message(STATUS "SPNAV library found")
else()
message(STATUS "SPNAV library NOT found, Spacenavd not supported")
@ -734,7 +789,7 @@ function(orcaslicer_copy_dlls target config postfix output_dlls)
PARENT_SCOPE
)
endfunction()
@ -761,7 +816,7 @@ endif()
if (NOT WIN32 AND NOT APPLE)
set(SLIC3R_APP_CMD "orca-slicer")
configure_file(${LIBDIR}/platform/unix/build_appimage.sh.in ${CMAKE_CURRENT_BINARY_DIR}/build_appimage.sh @ONLY)
configure_file(${LIBDIR}/platform/unix/build_appimage.sh.in ${CMAKE_CURRENT_BINARY_DIR}/build_appimage.sh USE_SOURCE_PERMISSIONS @ONLY)
endif()
option(BUILD_BBS_TEST_TOOLS "Build bbs test tools" OFF)
@ -774,7 +829,7 @@ endif()
if (WIN32)
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "./resources")
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries)
include(InstallRequiredSystemLibraries)
install (PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ".")
elseif (SLIC3R_FHS)
# CMAKE_INSTALL_FULL_DATAROOTDIR: read-only architecture-independent data root (share)

View file

@ -32,7 +32,6 @@ RUN apt-get update && apt-get install -y \
libgstreamer-plugins-good1.0-dev \
libgtk-3-dev \
libgtk-3-dev \
libosmesa6-dev \
libsecret-1-dev \
libsoup2.4-dev \
libssl3 \
@ -65,17 +64,17 @@ WORKDIR OrcaSlicer
# These can run together, but we run them seperate for podman caching
# Update System dependencies
RUN ./BuildLinux.sh -u
RUN ./build_linux.sh -u
# Build dependencies in ./deps
RUN ./BuildLinux.sh -dr
RUN ./build_linux.sh -dr
# Build slic3r
RUN ./BuildLinux.sh -sr
RUN ./build_linux.sh -sr
# Build AppImage
ENV container podman
RUN ./BuildLinux.sh -ir
RUN ./build_linux.sh -ir
# It's easier to run Orca Slicer as the same username,
# UID and GID as your workstation. Since we bind mount

220
README.md
View file

@ -1,129 +1,130 @@
<h1> <p "font-size:200px;"><img align="left" src="https://github.com/SoftFever/OrcaSlicer/blob/main/resources/images/OrcaSlicer.ico" width="100"> Orca Slicer</p> </h1>
[![Build all](https://github.com/SoftFever/OrcaSlicer/actions/workflows/build_all.yml/badge.svg?branch=main)](https://github.com/SoftFever/OrcaSlicer/actions/workflows/build_all.yml)
<br>Orca Slicer is an open source slicer for FDM printers.
Orca Slicer is an open source Next-Gen Slicing Software for Precision 3D Prints.
Optimize your prints with ultra-fast slicing, intelligent support generation, and seamless printer compatibility—engineered for perfection.
Join our Discord community here:<br>
<a href="https://discord.gg/P4VE9UY9gJ"><img src="https://img.shields.io/static/v1?message=Discord&logo=discord&label=&color=7289DA&logoColor=white&labelColor=&style=for-the-badge" height="35" alt="discord logo"/> </a>
<h3>🚨🚨🚨Important Security Alert🚨🚨🚨</h3>
## Official links and community
The only official platforms for OrcaSlicer are **our GitHub project page**, <a href="https://www.orcaslicer.com/">**orcaslicer.com**</a>, and the <a href="https://discord.gg/P4VE9UY9gJ">**official Discord channel**</a>.
#### Official Website:
<a href="https://orcaslicer.com/" style="font-size:2em;"><strong>orcaslicer.com</strong></a>
Please be aware that "**orcaslicer.net**", "**orcaslicer.co**" or "**orca-slicer.com**" are NOT an official website for OrcaSlicer and may be potentially malicious. These sites appear to use AI-generated content, lacking genuine context and seems to exist solely to profit from advertisements. Worse, it may redirect download links to harmful sources. For your safety, avoid downloading OrcaSlicer from this site as the links may be compromised.
#### Github Repository:
<a href="https://github.com/SoftFever/OrcaSlicer"><img src="https://img.shields.io/badge/OrcaSlicer-181717?style=flat&logo=github&logoColor=white" width="200" alt="GitHub Logo"/> </a>
If you see the above sites in your searches, report them as spam or unsafe to the search engine. This small action will assist everyone.
#### Follow us:
<a href="https://twitter.com/real_OrcaSlicer"><img src="https://img.shields.io/badge/real__OrcaSlicer-000000?style=flat&logo=x&logoColor=white" width="200" alt="X Logo"/> </a>
We deeply value our OrcaSlicer community and appreciate all the social groups that support us. However, it is crucial to address the risk posed by any group that falsely claims to be official or misleads its members. If you encounter such a group or are part of one, please assist by encouraging the group owner to add a clear disclaimer or by alerting its members.
#### Join our Discord community:
<a href="https://discord.gg/P4VE9UY9gJ"><img src="https://img.shields.io/badge/-Discord-5865F2?style=flat&logo=discord&logoColor=fff" width="200" alt="discord logo"/> </a>
Thank you for your vigilance and support in keeping our community safe!
> [!CAUTION]
> There are multiple unofficial and potentially malicious websites pretending to be related to OrcaSlicer. These sites may redirect you to dangerous downloads or contain misleading information.
>
> If you come across any of these in search results, please report them as unsafe or spam to help keep the community secure.
# Main features
- Auto-calibration for all printers
- Sandwich (inner-outer-inner) mode - An improved version of the `External Perimeters First` mode
- [Precise wall](https://github.com/SoftFever/OrcaSlicer/wiki/Precise-wall)
- Polyholes conversion support: [SuperSlicer Wiki: Polyholes](https://github.com/supermerill/SuperSlicer/wiki/Polyholes)
- Klipper support
- More granular controls
- Additional features can be found in the [change notes](https://github.com/SoftFever/OrcaSlicer/releases/)
- **[Advanced Calibration Tools](https://github.com/SoftFever/OrcaSlicer/wiki/Calibration)**
Comprehensive suite: temperature towers, flow rate, retraction & more for optimal performance.
- **[Precise Wall](https://github.com/SoftFever/OrcaSlicer/wiki/quality_settings_precision#precise-wall) and [Seam Control](https://github.com/SoftFever/OrcaSlicer/wiki/quality_settings_seam)**
Adjust outer wall spacing and apply scarf seams to enhance print accuracy.
- **Sandwich Mode and [Polyholes](https://github.com/SoftFever/OrcaSlicer/wiki/quality_settings_precision#polyholes) Support**
Use varied infill patterns and accurate hole shapes for improved clarity.
- **Overhang and Support Optimization**
Modify geometry for printable overhangs with precise support placement.
- **Granular Controls and Customization**
Fine-tune print speed, layer height, pressure, and temperature with precision.
- **Network Printer Support**
Seamless integration with Klipper, PrusaLink, and OctoPrint for remote control.
- **Mouse Ear Brims & Adaptive Bed Mesh**
Automatic brims and adaptive mesh calibration ensure consistent adhesion.
- **User-Friendly Interface**
Intuitive drag-and-drop design with pre-made profiles for popular printers.
- **Open-Source & Community Driven**
Regular updates fueled by continuous community contributions.
- **Wide Printer Compatibility**
Supports a broad range of printers: Bambu Lab, Prusa, Creality, Voron, and more.
- Additional features can be found in the [change notes](https://github.com/SoftFever/OrcaSlicer/releases/)
# Wiki
The wiki below aims to provide a detailed explanation of the slicer settings, including how to maximize their use and how to calibrate and set up your printer.
Please note that the wiki is a work in progress. We appreciate your patience as we continue to develop and improve it!
**[Access the wiki here](https://github.com/SoftFever/OrcaSlicer/wiki)**
**[Access the wiki here](https://github.com/SoftFever/OrcaSlicer/wiki)**
**[Contribute to the wiki](https://github.com/SoftFever/OrcaSlicer/wiki/How-to-wiki)**
# Download
### Stable Release
## Stable Release
📥 **[Download the Latest Stable Release](https://github.com/SoftFever/OrcaSlicer/releases/latest)**
Visit our GitHub Releases page for the latest stable version of Orca Slicer, recommended for most users.
### Nightly Builds
## Nightly Builds
🌙 **[Download the Latest Nightly Build](https://github.com/SoftFever/OrcaSlicer/releases/tag/nightly-builds)**
Explore the latest developments in Orca Slicer with our nightly builds. Feedback on these versions is highly appreciated.
# How to install
**Windows**:
1. Download the installer for your preferred version from the [releases page](https://github.com/SoftFever/OrcaSlicer/releases).
- *For convenience there is also a portable build available.*
- *If you have troubles to run the build, you might need to install following runtimes:*
- [MicrosoftEdgeWebView2RuntimeInstallerX64](https://github.com/SoftFever/OrcaSlicer/releases/download/v1.0.10-sf2/MicrosoftEdgeWebView2RuntimeInstallerX64.exe)
- [Details of this runtime](https://aka.ms/webview2)
- [Alternative Download Link Hosted by Microsoft](https://go.microsoft.com/fwlink/p/?LinkId=2124703)
- [vcredist2019_x64](https://github.com/SoftFever/OrcaSlicer/releases/download/v1.0.10-sf2/vcredist2019_x64.exe)
- [Alternative Download Link Hosted by Microsoft](https://aka.ms/vs/17/release/vc_redist.x64.exe)
- This file may already be available on your computer if you've installed visual studio. Check the following location: `%VCINSTALLDIR%Redist\MSVC\v142`
## Windows
Download the **Windows Installer exe** for your preferred version from the [releases page](https://github.com/SoftFever/OrcaSlicer/releases).
- *For convenience there is also a portable build available.*
<details>
<summary>Troubleshooting</summary>
- *If you have troubles to run the build, you might need to install following runtimes:*
- [MicrosoftEdgeWebView2RuntimeInstallerX64](https://github.com/SoftFever/OrcaSlicer/releases/download/v1.0.10-sf2/MicrosoftEdgeWebView2RuntimeInstallerX64.exe)
- [Details of this runtime](https://aka.ms/webview2)
- [Alternative Download Link Hosted by Microsoft](https://go.microsoft.com/fwlink/p/?LinkId=2124703)
- [vcredist2019_x64](https://github.com/SoftFever/OrcaSlicer/releases/download/v1.0.10-sf2/vcredist2019_x64.exe)
- [Alternative Download Link Hosted by Microsoft](https://aka.ms/vs/17/release/vc_redist.x64.exe)
- This file may already be available on your computer if you've installed visual studio. Check the following location: `%VCINSTALLDIR%Redist\MSVC\v142`
</details>
Windows Package Manager:
```shell
winget install --id=SoftFever.OrcaSlicer --e
```
## Mac:
1. Download the DMG for your computer: `arm64` version for Apple Silicon and `x86_64` for Intel CPU.
2. Drag OrcaSlicer.app to Application folder.
3. *If you want to run a build from a PR, you also need to follow the instructions below:*
<details>
<summary>Quarantine</summary>
**Mac**:
1. Download the DMG for your computer: `arm64` version for Apple Silicon and `x86_64` for Intel CPU.
2. Drag OrcaSlicer.app to Application folder.
3. *If you want to run a build from a PR, you also need to follow the instructions below:*
<details quarantine>
- Option 1 (You only need to do this once. After that the app can be opened normally.):
- Step 1: Hold _cmd_ and right click the app, from the context menu choose **Open**.
- Step 2: A warning window will pop up, click _Open_
- Option 2:
Execute this command in terminal: `xattr -dr com.apple.quarantine /Applications/OrcaSlicer.app`
```console
softfever@mac:~$ xattr -dr com.apple.quarantine /Applications/OrcaSlicer.app
- Step 2: A warning window will pop up, click _Open_
- Option 2:
Execute this command in terminal:
```shell
xattr -dr com.apple.quarantine /Applications/OrcaSlicer.app`
```
- Option 3:
- Option 3:
- Step 1: open the app, a warning window will pop up
![image](./SoftFever_doc/mac_cant_open.png)
- Step 2: in `System Settings` -> `Privacy & Security`, click `Open Anyway`:
![image](./SoftFever_doc/mac_security_setting.png)
![mac_cant_open](./SoftFever_doc/mac_cant_open.png)
- Step 2: in `System Settings` -> `Privacy & Security`, click `Open Anyway`:
![mac_security_setting](./SoftFever_doc/mac_security_setting.png)
</details>
**Linux (Ubuntu)**:
1. If you run into trouble executing it, try this command in the terminal:
## Linux (Ubuntu):
1. If you run into trouble executing it, try this command in the terminal:
`chmod +x /path_to_appimage/OrcaSlicer_Linux.AppImage`
# How to compile
- Windows 64-bit
- Tools needed: Visual Studio 2019, Cmake, git, git-lfs, Strawberry Perl.
- You will require cmake version 3.14 or later, which is available [on their website](https://cmake.org/download/).
- Strawberry Perl is [available on their GitHub repository](https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/).
- Run `build_release.bat` in `x64 Native Tools Command Prompt for VS 2019`
- Note: Don't forget to run `git lfs pull` after cloning the repository to download tools on Windows
- Mac 64-bit
- Tools needed: Xcode, Cmake, git, gettext, libtool, automake, autoconf, texinfo
- You can install most of them by running `brew install cmake gettext libtool automake autoconf texinfo`
- run `build_release_macos.sh`
- To build and debug in Xcode:
- run `Xcode.app`
- open ``build_`arch`/OrcaSlicer.Xcodeproj``
- menu bar: Product => Scheme => OrcaSlicer
- menu bar: Product => Scheme => Edit Scheme...
- Run => Info tab => Build Configuration: `RelWithDebInfo`
- Run => Options tab => Document Versions: uncheck `Allow debugging when browsing versions`
- menu bar: Product => Run
# How to Compile
All updated build instructions for Windows, macOS, and Linux are now available on the official [OrcaSlicer Wiki - How to build](https://github.com/SoftFever/OrcaSlicer/wiki/How-to-build) page.
- Linux (All Distros)
- Docker
- Dependencies: Docker [Installation Instructions](https://www.docker.com/get-started/), git
- clone this repository `git clone https://github.com/SoftFever/OrcaSlicer`
- run `cd OrcaSlicer`
- run `./DockerBuild.sh`
- To run OrcaSlicer:
- run `./DockerRun.sh`
- For most common errors, open `DockerRun.sh` and read the comments.
- Ubuntu
- Dependencies **Will be auto installed with the shell script**: `libmspack-dev libgstreamerd-3-dev libsecret-1-dev libwebkit2gtk-4.0-dev libosmesa6-dev libssl-dev libcurl4-openssl-dev eglexternalplatform-dev libudev-dev libdbus-1-dev extra-cmake-modules libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev cmake git texinfo`
- run 'sudo ./BuildLinux.sh -u'
- run './BuildLinux.sh -dsir'
Please refer to the wiki to ensure you're following the latest and most accurate steps for your platform.
# Note:
# Klipper Note:
If you're running Klipper, it's recommended to add the following configuration to your `printer.cfg` file.
```
```gcode
# Enable object exclusion
[exclude_object]
@ -133,57 +134,52 @@ resolution: 0.1
```
# Supports
**Orca Slicer** is an open-source project and I'm deeply grateful to all my sponsors and backers.
Their generous support enables me to purchase filaments and other essential 3D printing materials for the project.
**Orca Slicer** is an open-source project and I'm deeply grateful to all my sponsors and backers.
Their generous support enables me to purchase filaments and other essential 3D printing materials for the project.
Thank you! :)
### Sponsors:
## Sponsors:
<table>
<tr>
<td>
<a href="https://qidi3d.com/">
<img src="SoftFever_doc\sponsor_logos\QIDI.png" alt="QIDI" width="96" height="">
<a href="https://qidi3d.com/" style="display:inline-block; border-radius:8px; background:#fff;">
<img src="SoftFever_doc\sponsor_logos\QIDI.png" alt="QIDI" width="100" height="100">
</a>
</td>
<td>
<a href="https://bigtree-tech.com/">
<img src="SoftFever_doc\sponsor_logos\BigTreeTech.png" alt="BIGTREE TECH" width="96" height="">
<a href="https://bigtree-tech.com/" style="display:inline-block; border-radius:8px; background:#222;">
<img src="SoftFever_doc\sponsor_logos\BigTreeTech.png" alt="BIGTREE TECH" width="100" height="100">
</a>
</td>
</tr>
</table>
### Backers:
**Ko-fi supporters**: [Backers list](https://github.com/user-attachments/files/16147016/Supporters_638561417699952499.csv)
## Support me
<a href="https://github.com/sponsors/SoftFever"><img src="https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86" width="130"></a>
<a href="https://ko-fi.com/G2G5IP3CP"><img src="https://ko-fi.com/img/githubbutton_sm.svg" width="200"></a>
[![PayPal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/softfever3d)
## Backers:
**Ko-fi supporters** ☕: [Backers list](https://github.com/user-attachments/files/16147016/Supporters_638561417699952499.csv)
## Support me
<a href="https://github.com/sponsors/SoftFever"><img src="https://img.shields.io/badge/GitHub%20Sponsors-30363D?style=flat&logo=GitHub-Sponsors&logoColor=EA4AAA" height="50"></a>
<a href="https://ko-fi.com/G2G5IP3CP"><img src="https://img.shields.io/badge/Support_me_on_Ko--fi-FF5E5B?style=flat&logo=ko-fi&logoColor=white" height="50"></a>
<a href="https://paypal.me/softfever3d"><img src="https://img.shields.io/badge/PayPal-003087?style=flat&logo=paypal&logoColor=fff" height="50"></a>
## Some background
OrcaSlicer is originally forked from Bambu Studio, it was previously known as BambuStudio-SoftFever.
Bambu Studio is forked from [PrusaSlicer](https://github.com/prusa3d/PrusaSlicer) by Prusa Research, which is from [Slic3r](https://github.com/Slic3r/Slic3r) by Alessandro Ranellucci and the RepRap community.
Orca Slicer incorporates a lot of features from SuperSlicer by @supermerill
Orca Slicer's logo is designed by community member Justin Levine(@freejstnalxndr)
OrcaSlicer was originally forked from Bambu Studio, it was previously known as BambuStudio-SoftFever.
[Bambu Studio](https://github.com/bambulab/BambuStudio) is forked from [PrusaSlicer](https://github.com/prusa3d/PrusaSlicer) by Prusa Research, which is from [Slic3r](https://github.com/Slic3r/Slic3r) by Alessandro Ranellucci and the RepRap community.
Orca Slicer incorporates a lot of features from [SuperSlicer](https://github.com/supermerill/SuperSlicer) by @supermerill
Orca Slicer's logo is designed by community member Justin Levine(@freejstnalxndr).
# License
Orca Slicer is licensed under the GNU Affero General Public License, version 3. Orca Slicer is based on Bambu Studio by BambuLab.
**Orca Slicer** is licensed under the GNU Affero General Public License, version 3. Orca Slicer is based on Bambu Studio by BambuLab.
Bambu Studio is licensed under the GNU Affero General Public License, version 3. Bambu Studio is based on PrusaSlicer by PrusaResearch.
**Bambu Studio** is licensed under the GNU Affero General Public License, version 3. Bambu Studio is based on PrusaSlicer by PrusaResearch.
PrusaSlicer is licensed under the GNU Affero General Public License, version 3. PrusaSlicer is owned by Prusa Research. PrusaSlicer is originally based on Slic3r by Alessandro Ranellucci.
**PrusaSlicer** is licensed under the GNU Affero General Public License, version 3. PrusaSlicer is owned by Prusa Research. PrusaSlicer is originally based on Slic3r by Alessandro Ranellucci.
Slic3r is licensed under the GNU Affero General Public License, version 3. Slic3r was created by Alessandro Ranellucci with the help of many other contributors.
**Slic3r** is licensed under the GNU Affero General Public License, version 3. Slic3r was created by Alessandro Ranellucci with the help of many other contributors.
The GNU Affero General Public License, version 3 ensures that if you use any part of this software in any way (even behind a web server), your software must be released under the same license.
Orca Slicer includes a pressure advance calibration pattern test adapted from Andrew Ellis' generator, which is licensed under GNU General Public License, version 3. Ellis' generator is itself adapted from a generator developed by Sineos for Marlin, which is licensed under GNU General Public License, version 3.
The Bambu networking plugin is based on non-free libraries from BambuLab. It is optional to the Orca Slicer and provides extended functionalities for Bambulab printer users.

217
build_linux.sh Executable file
View file

@ -0,0 +1,217 @@
#!/usr/bin/env bash
SCRIPT_NAME=$(basename "$0")
SCRIPT_PATH=$(dirname $(readlink -f ${0}))
pushd ${SCRIPT_PATH} > /dev/null
set -e # Exit immediately if a command exits with a non-zero status.
function check_available_memory_and_disk() {
FREE_MEM_GB=$(free --gibi --total | grep 'Mem' | rev | cut --delimiter=" " --fields=1 | rev)
MIN_MEM_GB=10
FREE_DISK_KB=$(df --block-size=1K . | tail -1 | awk '{print $4}')
MIN_DISK_KB=$((10 * 1024 * 1024))
if [[ ${FREE_MEM_GB} -le ${MIN_MEM_GB} ]] ; then
echo -e "\nERROR: Orca Slicer Builder requires at least ${MIN_MEM_GB}G of 'available' mem (system has only ${FREE_MEM_GB}G available)"
echo && free --human && echo
echo "Invoke with -r to skip RAM and disk checks."
exit 2
fi
if [[ ${FREE_DISK_KB} -le ${MIN_DISK_KB} ]] ; then
echo -e "\nERROR: Orca Slicer Builder requires at least $(echo ${MIN_DISK_KB} |awk '{ printf "%.1fG\n", $1/1024/1024; }') (system has only $(echo ${FREE_DISK_KB} | awk '{ printf "%.1fG\n", $1/1024/1024; }') disk free)"
echo && df --human-readable . && echo
echo "Invoke with -r to skip ram and disk checks."
exit 1
fi
}
function usage() {
echo "Usage: ./${SCRIPT_NAME} [-1][-b][-c][-d][-h][-i][-j N][-p][-r][-s][-u]"
echo " -1: limit builds to one core (where possible)"
echo " -j N: limit builds to N cores (where possible)"
echo " -b: build in debug mode"
echo " -c: force a clean build"
echo " -C: enable ANSI-colored compile output (GNU/Clang only)"
echo " -d: download and build dependencies in ./deps/ (build prerequisite)"
echo " -h: prints this help text"
echo " -i: build the Orca Slicer AppImage (optional)"
echo " -p: boost ccache hit rate by disabling precompiled headers (default: ON)"
echo " -r: skip RAM and disk checks (low RAM compiling)"
echo " -s: build the Orca Slicer (optional)"
echo " -u: install system dependencies (asks for sudo password; build prerequisite)"
echo "For a first use, you want to './${SCRIPT_NAME} -u'"
echo " and then './${SCRIPT_NAME} -dsi'"
}
SLIC3R_PRECOMPILED_HEADERS="ON"
unset name
while getopts ":1j:bcCdhiprsu" opt ; do
case ${opt} in
1 )
export CMAKE_BUILD_PARALLEL_LEVEL=1
;;
j )
export CMAKE_BUILD_PARALLEL_LEVEL=$OPTARG
;;
b )
BUILD_DEBUG="1"
;;
c )
CLEAN_BUILD=1
;;
C )
COLORED_OUTPUT="-DCOLORED_OUTPUT=ON"
;;
d )
BUILD_DEPS="1"
;;
h ) usage
exit 0
;;
i )
BUILD_IMAGE="1"
;;
p )
SLIC3R_PRECOMPILED_HEADERS="OFF"
;;
r )
SKIP_RAM_CHECK="1"
;;
s )
BUILD_ORCA="1"
;;
u )
UPDATE_LIB="1"
;;
esac
done
if [ ${OPTIND} -eq 1 ] ; then
usage
exit 0
fi
# cmake 4.x compatibility workaround
export CMAKE_POLICY_VERSION_MINIMUM=3.5
DISTRIBUTION=$(awk -F= '/^ID=/ {print $2}' /etc/os-release | tr -d '"')
DISTRIBUTION_LIKE=$(awk -F= '/^ID_LIKE=/ {print $2}' /etc/os-release | tr -d '"')
# Check for direct distribution match to Ubuntu/Debian
if [ "${DISTRIBUTION}" == "ubuntu" ] || [ "${DISTRIBUTION}" == "linuxmint" ] ; then
DISTRIBUTION="debian"
# Check if distribution is Debian/Ubuntu-like based on ID_LIKE
elif [[ "${DISTRIBUTION_LIKE}" == *"debian"* ]] || [[ "${DISTRIBUTION_LIKE}" == *"ubuntu"* ]] ; then
DISTRIBUTION="debian"
elif [[ "${DISTRIBUTION_LIKE}" == *"arch"* ]] ; then
DISTRIBUTION="arch"
fi
if [ ! -f ./linux.d/${DISTRIBUTION} ] ; then
echo "Your distribution \"${DISTRIBUTION}\" is not supported by system-dependency scripts in ./linux.d/"
echo "Please resolve dependencies manually and contribute a script for your distribution to upstream."
exit 1
else
echo "resolving system dependencies for distribution \"${DISTRIBUTION}\" ..."
source ./linux.d/${DISTRIBUTION}
fi
echo "FOUND_GTK3=${FOUND_GTK3}"
if [[ -z "${FOUND_GTK3_DEV}" ]] ; then
echo "Error, you must install the dependencies before."
echo "Use option -u with sudo"
exit 1
fi
echo "Changing date in version..."
{
# change date in version
sed --in-place "s/+UNKNOWN/_$(date '+%F')/" version.inc
}
echo "done"
if ! [[ -n "${SKIP_RAM_CHECK}" ]] ; then
check_available_memory_and_disk
fi
if [[ -n "${BUILD_DEPS}" ]] ; then
echo "Configuring dependencies..."
BUILD_ARGS="${DEPS_EXTRA_BUILD_ARGS} -DDEP_WX_GTK3=ON"
if [[ -n "${CLEAN_BUILD}" ]]
then
rm -fr deps/build
fi
if [ ! -d "deps/build" ]
then
mkdir deps/build
fi
if [[ -n "${BUILD_DEBUG}" ]] ; then
# build deps with debug and release else cmake will not find required sources
if [ ! -d "deps/build/release" ] ; then
mkdir deps/build/release
fi
cmake -S deps -B deps/build/release -DSLIC3R_PCH=${SLIC3R_PRECOMPILED_HEADERS} -G Ninja -DDESTDIR="${SCRIPT_PATH}/deps/build/destdir" -DDEP_DOWNLOAD_DIR="${SCRIPT_PATH}/deps/DL_CACHE" ${COLORED_OUTPUT} ${BUILD_ARGS}
cmake --build deps/build/release
BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug"
fi
echo "cmake -S deps -B deps/build -G Ninja ${BUILD_ARGS}"
cmake -S deps -B deps/build -G Ninja ${COLORED_OUTPUT} ${BUILD_ARGS}
cmake --build deps/build
fi
if [[ -n "${BUILD_ORCA}" ]] ; then
echo "Configuring OrcaSlicer..."
if [[ -n "${CLEAN_BUILD}" ]] ; then
rm --force --recursive build
fi
BUILD_ARGS="${ORCA_EXTRA_BUILD_ARGS}"
if [[ -n "${FOUND_GTK3_DEV}" ]] ; then
BUILD_ARGS="${BUILD_ARGS} -DSLIC3R_GTK=3"
fi
if [[ -n "${BUILD_DEBUG}" ]] ; then
BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug -DBBL_INTERNAL_TESTING=1"
else
BUILD_ARGS="${BUILD_ARGS} -DBBL_RELEASE_TO_PUBLIC=1 -DBBL_INTERNAL_TESTING=0"
fi
CMAKE_CMD="cmake -S . -B build -G Ninja \
-DSLIC3R_PCH=${SLIC3R_PRECOMPILED_HEADERS} \
-DCMAKE_PREFIX_PATH="${SCRIPT_PATH}/deps/build/destdir/usr/local" \
-DSLIC3R_STATIC=1 \
-DORCA_TOOLS=ON \
${COLORED_OUTPUT} \
${BUILD_ARGS}"
echo -e "${CMAKE_CMD}"
${CMAKE_CMD}
echo "done"
echo "Building OrcaSlicer ..."
cmake --build build --target OrcaSlicer
echo "Building OrcaSlicer_profile_validator .."
cmake --build build --target OrcaSlicer_profile_validator
./run_gettext.sh
echo "done"
fi
if [[ -n "${BUILD_IMAGE}" || -n "${BUILD_ORCA}" ]] ; then
pushd build > /dev/null
echo "[9/9] Generating Linux app..."
build_linux_image="./src/build_linux_image.sh"
if [[ -e ${build_linux_image} ]] ; then
extra_script_args=""
if [[ -n "${BUILD_IMAGE}" ]] ; then
extra_script_args="-i"
fi
${build_linux_image} ${extra_script_args}
echo "done"
fi
popd > /dev/null # build
fi
popd > /dev/null # ${SCRIPT_PATH}

View file

@ -3,7 +3,7 @@
set -e
set -o pipefail
while getopts ":dpa:snt:xbc:hu" opt; do
while getopts ":dpa:snt:xbc:h" opt; do
case "${opt}" in
d )
export BUILD_TARGET="deps"
@ -37,19 +37,15 @@ while getopts ":dpa:snt:xbc:hu" opt; do
1 )
export CMAKE_BUILD_PARALLEL_LEVEL=1
;;
u )
export BUILD_UNIVERSAL="1"
;;
h ) echo "Usage: ./build_release_macos.sh [-d]"
echo " -d: Build deps only"
echo " -a: Set ARCHITECTURE (arm64 or x86_64)"
echo " -a: Set ARCHITECTURE (arm64 or x86_64 or universal)"
echo " -s: Build slicer only"
echo " -n: Nightly build"
echo " -t: Specify minimum version of the target platform, default is 11.3"
echo " -x: Use Ninja CMake generator, default is Xcode"
echo " -b: Build without reconfiguring CMake"
echo " -c: Set CMake build configuration, default is Release"
echo " -u: Build universal binary (both arm64 and x86_64)"
echo " -1: Use single job for building"
exit 0
;;
@ -61,16 +57,8 @@ done
# Set defaults
if [ -z "$ARCH" ]; then
if [ "1." == "$BUILD_UNIVERSAL". ]; then
ARCH="universal"
else
ARCH="$(uname -m)"
fi
export ARCH
fi
if [ "1." == "$BUILD_UNIVERSAL". ]; then
echo "Universal build enabled - will create a combined arm64/x86_64 binary"
export ARCH
fi
if [ -z "$BUILD_CONFIG" ]; then
@ -119,10 +107,10 @@ echo
# fi
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_BUILD_DIR="$PROJECT_DIR/build_$ARCH"
PROJECT_BUILD_DIR="$PROJECT_DIR/build/$ARCH"
DEPS_DIR="$PROJECT_DIR/deps"
DEPS_BUILD_DIR="$DEPS_DIR/build_$ARCH"
DEPS="$DEPS_BUILD_DIR/OrcaSlicer_dep_$ARCH"
DEPS_BUILD_DIR="$DEPS_DIR/build/$ARCH"
DEPS="$DEPS_BUILD_DIR/OrcaSlicer_deps"
# Fix for Multi-config generators
if [ "$SLICER_CMAKE_GENERATOR" == "Xcode" ]; then
@ -132,133 +120,133 @@ else
fi
function build_deps() {
echo "Building deps..."
(
set -x
mkdir -p "$DEPS"
cd "$DEPS_BUILD_DIR"
if [ "1." != "$BUILD_ONLY". ]; then
cmake .. \
-G "${DEPS_CMAKE_GENERATOR}" \
-DDESTDIR="$DEPS" \
-DOPENSSL_ARCH="darwin64-${ARCH}-cc" \
-DCMAKE_BUILD_TYPE="$BUILD_CONFIG" \
-DCMAKE_OSX_ARCHITECTURES:STRING="${ARCH}" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}"
# iterate over two architectures: x86_64 and arm64
for _ARCH in x86_64 arm64; do
# if ARCH is universal or equal to _ARCH
if [ "$ARCH" == "universal" ] || [ "$ARCH" == "$_ARCH" ]; then
PROJECT_BUILD_DIR="$PROJECT_DIR/build/$_ARCH"
DEPS_BUILD_DIR="$DEPS_DIR/build/$_ARCH"
DEPS="$DEPS_BUILD_DIR/OrcaSlicer_dep"
echo "Building deps..."
(
set -x
mkdir -p "$DEPS"
cd "$DEPS_BUILD_DIR"
if [ "1." != "$BUILD_ONLY". ]; then
cmake "${DEPS_DIR}" \
-G "${DEPS_CMAKE_GENERATOR}" \
-DDESTDIR="$DEPS" \
-DOPENSSL_ARCH="darwin64-${_ARCH}-cc" \
-DCMAKE_BUILD_TYPE="$BUILD_CONFIG" \
-DCMAKE_OSX_ARCHITECTURES:STRING="${_ARCH}" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}"
fi
cmake --build . --config "$BUILD_CONFIG" --target deps
)
fi
cmake --build . --config "$BUILD_CONFIG" --target deps
)
done
}
function pack_deps() {
echo "Packing deps..."
(
set -x
mkdir -p "$DEPS"
cd "$DEPS_BUILD_DIR"
tar -zcvf "OrcaSlicer_dep_mac_${ARCH}_$(date +"%Y%m%d").tar.gz" "OrcaSlicer_dep_$ARCH"
cd "$DEPS_DIR"
tar -zcvf "OrcaSlicer_dep_mac_${ARCH}_$(date +"%Y%m%d").tar.gz" "build"
)
}
function build_slicer() {
echo "Building slicer..."
(
set -x
mkdir -p "$PROJECT_BUILD_DIR"
cd "$PROJECT_BUILD_DIR"
if [ "1." != "$BUILD_ONLY". ]; then
cmake .. \
-G "${SLICER_CMAKE_GENERATOR}" \
-DBBL_RELEASE_TO_PUBLIC=1 \
-DCMAKE_PREFIX_PATH="$DEPS/usr/local" \
-DCMAKE_INSTALL_PREFIX="$PWD/OrcaSlicer" \
-DCMAKE_BUILD_TYPE="$BUILD_CONFIG" \
-DCMAKE_MACOSX_RPATH=ON \
-DCMAKE_INSTALL_RPATH="${DEPS}/usr/local" \
-DCMAKE_MACOSX_BUNDLE=ON \
-DCMAKE_OSX_ARCHITECTURES="${ARCH}" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}"
fi
cmake --build . --config "$BUILD_CONFIG" --target "$SLICER_BUILD_TARGET"
)
# iterate over two architectures: x86_64 and arm64
for _ARCH in x86_64 arm64; do
# if ARCH is universal or equal to _ARCH
if [ "$ARCH" == "universal" ] || [ "$ARCH" == "$_ARCH" ]; then
echo "Verify localization with gettext..."
(
cd "$PROJECT_DIR"
./run_gettext.sh
)
PROJECT_BUILD_DIR="$PROJECT_DIR/build/$_ARCH"
DEPS_BUILD_DIR="$DEPS_DIR/build/$_ARCH"
DEPS="$DEPS_BUILD_DIR/OrcaSlicer_dep"
echo "Fix macOS app package..."
(
cd "$PROJECT_BUILD_DIR"
mkdir -p OrcaSlicer
cd OrcaSlicer
# remove previously built app
rm -rf ./OrcaSlicer.app
# fully copy newly built app
cp -pR "../src$BUILD_DIR_CONFIG_SUBDIR/OrcaSlicer.app" ./OrcaSlicer.app
# fix resources
resources_path=$(readlink ./OrcaSlicer.app/Contents/Resources)
rm ./OrcaSlicer.app/Contents/Resources
cp -R "$resources_path" ./OrcaSlicer.app/Contents/Resources
# delete .DS_Store file
find ./OrcaSlicer.app/ -name '.DS_Store' -delete
)
echo "Building slicer for $_ARCH..."
(
set -x
mkdir -p "$PROJECT_BUILD_DIR"
cd "$PROJECT_BUILD_DIR"
if [ "1." != "$BUILD_ONLY". ]; then
cmake "${PROJECT_DIR}" \
-G "${SLICER_CMAKE_GENERATOR}" \
-DBBL_RELEASE_TO_PUBLIC=1 \
-DCMAKE_PREFIX_PATH="$DEPS/usr/local" \
-DCMAKE_INSTALL_PREFIX="$PWD/OrcaSlicer" \
-DCMAKE_BUILD_TYPE="$BUILD_CONFIG" \
-DCMAKE_MACOSX_RPATH=ON \
-DCMAKE_INSTALL_RPATH="${DEPS}/usr/local" \
-DCMAKE_MACOSX_BUNDLE=ON \
-DCMAKE_OSX_ARCHITECTURES="${_ARCH}" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_DEPLOYMENT_TARGET}"
fi
cmake --build . --config "$BUILD_CONFIG" --target "$SLICER_BUILD_TARGET"
)
# extract version
# export ver=$(grep '^#define SoftFever_VERSION' ../src/libslic3r/libslic3r_version.h | cut -d ' ' -f3)
# ver="_V${ver//\"}"
# echo $PWD
# if [ "1." != "$NIGHTLY_BUILD". ];
# then
# ver=${ver}_dev
# fi
echo "Verify localization with gettext..."
(
cd "$PROJECT_DIR"
./run_gettext.sh
)
# zip -FSr OrcaSlicer${ver}_Mac_${ARCH}.zip OrcaSlicer.app
echo "Fix macOS app package..."
(
cd "$PROJECT_BUILD_DIR"
mkdir -p OrcaSlicer
cd OrcaSlicer
# remove previously built app
rm -rf ./OrcaSlicer.app
# fully copy newly built app
cp -pR "../src$BUILD_DIR_CONFIG_SUBDIR/OrcaSlicer.app" ./OrcaSlicer.app
# fix resources
resources_path=$(readlink ./OrcaSlicer.app/Contents/Resources)
rm ./OrcaSlicer.app/Contents/Resources
cp -R "$resources_path" ./OrcaSlicer.app/Contents/Resources
# delete .DS_Store file
find ./OrcaSlicer.app/ -name '.DS_Store' -delete
)
# extract version
# export ver=$(grep '^#define SoftFever_VERSION' ../src/libslic3r/libslic3r_version.h | cut -d ' ' -f3)
# ver="_V${ver//\"}"
# echo $PWD
# if [ "1." != "$NIGHTLY_BUILD". ];
# then
# ver=${ver}_dev
# fi
# zip -FSr OrcaSlicer${ver}_Mac_${_ARCH}.zip OrcaSlicer.app
fi
done
}
function build_universal() {
echo "Building universal binary..."
# Save current ARCH
ORIGINAL_ARCH="$ARCH"
# Build x86_64
ARCH="x86_64"
PROJECT_BUILD_DIR="$PROJECT_DIR/build_$ARCH"
DEPS_BUILD_DIR="$DEPS_DIR/build_$ARCH"
DEPS="$DEPS_BUILD_DIR/OrcaSlicer_dep_$ARCH"
build_deps
build_slicer
# Build arm64
ARCH="arm64"
PROJECT_BUILD_DIR="$PROJECT_DIR/build_$ARCH"
DEPS_BUILD_DIR="$DEPS_DIR/build_$ARCH"
DEPS="$DEPS_BUILD_DIR/OrcaSlicer_dep_$ARCH"
build_deps
build_slicer
# Restore original ARCH
ARCH="$ORIGINAL_ARCH"
PROJECT_BUILD_DIR="$PROJECT_DIR/build_$ARCH"
DEPS_BUILD_DIR="$DEPS_DIR/build_$ARCH"
DEPS="$DEPS_BUILD_DIR/OrcaSlicer_dep_$ARCH"
PROJECT_BUILD_DIR="$PROJECT_DIR/build/$ARCH"
# Create universal binary
echo "Creating universal binary..."
PROJECT_BUILD_DIR="$PROJECT_DIR/build_Universal"
# PROJECT_BUILD_DIR="$PROJECT_DIR/build_Universal"
mkdir -p "$PROJECT_BUILD_DIR/OrcaSlicer"
UNIVERSAL_APP="$PROJECT_BUILD_DIR/OrcaSlicer/Universal_OrcaSlicer.app"
UNIVERSAL_APP="$PROJECT_BUILD_DIR/OrcaSlicer/OrcaSlicer.app"
rm -rf "$UNIVERSAL_APP"
cp -R "$PROJECT_DIR/build_x86_64/OrcaSlicer/OrcaSlicer.app" "$UNIVERSAL_APP"
cp -R "$PROJECT_DIR/build/arm64/OrcaSlicer/OrcaSlicer.app" "$UNIVERSAL_APP"
# Get the binary path inside the .app bundle
BINARY_PATH="Contents/MacOS/OrcaSlicer"
# Create universal binary using lipo
lipo -create \
"$PROJECT_DIR/build_x86_64/OrcaSlicer/OrcaSlicer.app/$BINARY_PATH" \
"$PROJECT_DIR/build_arm64/OrcaSlicer/OrcaSlicer.app/$BINARY_PATH" \
"$PROJECT_DIR/build/x86_64/OrcaSlicer/OrcaSlicer.app/$BINARY_PATH" \
"$PROJECT_DIR/build/arm64/OrcaSlicer/OrcaSlicer.app/$BINARY_PATH" \
-output "$UNIVERSAL_APP/$BINARY_PATH"
echo "Universal binary created at $UNIVERSAL_APP"
@ -266,22 +254,14 @@ function build_universal() {
case "${BUILD_TARGET}" in
all)
if [ "1." == "$BUILD_UNIVERSAL". ]; then
build_universal
else
build_deps
build_slicer
fi
build_deps
build_slicer
;;
deps)
build_deps
;;
slicer)
if [ "1." == "$BUILD_UNIVERSAL". ]; then
build_universal
else
build_slicer
fi
build_slicer
;;
*)
echo "Unknown target: $BUILD_TARGET. Available targets: deps, slicer, all."
@ -289,6 +269,10 @@ case "${BUILD_TARGET}" in
;;
esac
if [ "$ARCH" = "universal" ] && [ "$BUILD_TARGET" != "deps" ]; then
build_universal
fi
if [ "1." == "$PACK_DEPS". ]; then
pack_deps
fi

View file

@ -37,14 +37,6 @@
<array>
<string>orcaslicer</string>
</array>
</dict>
<dict>
<key>CFBundleURLName</key>
<string>BambuStudio Downloads</string>
<key>CFBundleURLSchemes</key>
<array>
<string>bambustudioopen</string>
</array>
</dict>
</array>
<key>CFBundleDocumentTypes</key>

59
deps/CGAL/0001-clang19.patch vendored Normal file
View file

@ -0,0 +1,59 @@
--- a/BGL/include/CGAL/boost/graph/iterator.h 2022-10-07 19:04:41 UTC
+++ b/BGL/include/CGAL/boost/graph/iterator.h
@@ -213,18 +213,7 @@ class Halfedge_around_source_iterator { (public)
{}
#ifndef DOXYGEN_RUNNING
- // design patter: "safe bool"
- // will be replaced by explicit operator bool with C++11
- typedef void (Halfedge_around_source_iterator::*bool_type)() const;
- void this_type_does_not_support_comparisons() const {}
-
- operator bool_type() const
- {
- return (! (this->base() == nullptr)) ?
- &Halfedge_around_source_iterator::this_type_does_not_support_comparisons : 0;
- }
-
bool operator==( const Self& i) const {
CGAL_assertion( anchor == anchor);
return ( g == i.g) && ( pos == i.pos) && ( winding == i.winding);
@@ -313,18 +302,7 @@ class Halfedge_around_target_iterator { (public)
{}
#ifndef DOXYGEN_RUNNING
- // design patter: "safe bool"
- // will be replaced by explicit operator bool with C++11
- typedef void (Halfedge_around_target_iterator::*bool_type)() const;
- void this_type_does_not_support_comparisons() const {}
-
- operator bool_type() const
- {
- return (! (this->base() == nullptr)) ?
- &Halfedge_around_target_iterator::this_type_does_not_support_comparisons : 0;
- }
-
bool operator==( const Self& i) const {
CGAL_assertion( anchor == anchor);
return ( g == i.g) && ( pos == i.pos) && ( winding == i.winding);
@@ -411,18 +389,6 @@ class Halfedge_around_face_iterator { (public)
const value_type& operator * ( ) const { return pos; }
pointer operator -> ( ) { return &pos; }
const value_type* operator -> ( ) const { return &pos; }
-
- // design patter: "safe bool"
- // will be replaced by explicit operator bool with C++11
- typedef void (Halfedge_around_face_iterator::*bool_type)() const;
-
- void this_type_does_not_support_comparisons() const {}
-
- operator bool_type() const
- {
- return (! (this->base() == nullptr)) ?
- &Halfedge_around_face_iterator::this_type_does_not_support_comparisons : 0;
- }
bool operator==( const Self& i) const {
CGAL_assertion( anchor == anchor);

View file

@ -1,3 +1,7 @@
if (IN_GIT_REPO)
set(CGAL_DIRECTORY_FLAG --directory ${BINARY_DIR_REL}/dep_CGAL-prefix/src/dep_CGAL)
endif ()
orcaslicer_add_cmake_project(
CGAL
# GIT_REPOSITORY https://github.com/CGAL/cgal.git
@ -5,6 +9,7 @@ orcaslicer_add_cmake_project(
# For whatever reason, this keeps downloading forever (repeats downloads if finished)
URL https://github.com/CGAL/cgal/archive/refs/tags/v5.4.zip
URL_HASH SHA256=d7605e0a5a5ca17da7547592f6f6e4a59430a0bc861948974254d0de43eab4c0
PATCH_COMMAND git apply ${CGAL_DIRECTORY_FLAG} --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-clang19.patch
DEPENDS dep_Boost dep_GMP dep_MPFR
)

9
deps/CMakeLists.txt vendored
View file

@ -45,7 +45,7 @@ if (NPROC EQUAL 0)
endif ()
set(DESTDIR "${CMAKE_CURRENT_BINARY_DIR}/destdir" CACHE PATH "Destination directory")
set(DEP_DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/../DL_CACHE CACHE PATH "Path for downloaded source packages.")
set(DEP_DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/DL_CACHE CACHE PATH "Path for downloaded source packages.")
set(FLATPAK FALSE CACHE BOOL "Toggles various build settings for flatpak, like /usr/local in DESTDIR or not building wxwidgets")
if (NOT FLATPAK)
set(DESTDIR "${DESTDIR}/usr/local/")
@ -248,7 +248,6 @@ if(FLATPAK)
find_package(EXPAT)
find_package(CURL)
find_package(JPEG)
find_package(TIFF)
find_package(Freetype)
find_package(OpenSSL 1.1...<3.2)
find_package(CURL)
@ -321,12 +320,6 @@ if (NOT JPEG_FOUND)
set(JPEG_PKG dep_JPEG)
endif()
set(TIFF_PKG "")
if (NOT TIFF_FOUND)
include(TIFF/TIFF.cmake)
set(TIFF_PKG "dep_TIFF")
endif()
# flatpak builds wxwidgets separately
set(WXWIDGETS_PKG "")
if (NOT FLATPAK)

View file

@ -22,7 +22,6 @@ https://github.com/nigels-com/glew
* [Install build tools](#install-build-tools)
* [Build](#build-1)
* [Linux EGL](#linux-egl)
* [Linux OSMesa](#linux-osmesa)
* [Linux mingw-w64](#linux-mingw-w64)
* [Using cmake](#using-cmake)
* [Install build tools](#install-build-tools-1)
@ -95,11 +94,6 @@ _Note: you may need to call `make` in the **auto** folder first_
$ sudo apt install libegl1-mesa-dev
$ make SYSTEM=linux-egl
##### Linux OSMesa
$ sudo apt install libosmesa-dev
$ make SYSTEM=linux-osmesa
##### Linux mingw-w64
$ sudo apt install mingw-w64
@ -140,7 +134,6 @@ RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel c
| --------------- | ----------- |
| BUILD_UTILS | Build the `glewinfo` and `visualinfo` executables. |
| GLEW_REGAL | Build in Regal mode. |
| GLEW_OSMESA | Build in off-screen Mesa mode. |
| BUILD_FRAMEWORK | Build as MacOSX Framework. Setting `CMAKE_INSTALL_PREFIX` to `/Library/Frameworks` is recommended. |
### Windows

32
deps/GMP/0001-GMP_GCC15.patch vendored Normal file
View file

@ -0,0 +1,32 @@
--- GMP/acinclude.m4 2025-05-14 18:50:11.396354745 -0400
+++ GMP/acinclude.m4.2 2025-05-14 18:57:20.757853503 -0400
@@ -609,7 +609,7 @@
#if defined (__GNUC__) && ! defined (__cplusplus)
typedef unsigned long long t1;typedef t1*t2;
-void g(){}
+void g(int,t1 const*,t1,t2,t1 const*,int){}
void h(){}
static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
--- GMP/configure 2025-05-14 19:33:35.730593315 -0400
+++ GMP/configure 2025-05-14 19:35:37.805619186 -0400
@@ -6526,7 +6526,7 @@
#if defined (__GNUC__) && ! defined (__cplusplus)
typedef unsigned long long t1;typedef t1*t2;
-void g(){}
+void g(int,t1 const*,t1,t2,t1 const*,int){}
void h(){}
static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
@@ -8145,7 +8145,7 @@
#if defined (__GNUC__) && ! defined (__cplusplus)
typedef unsigned long long t1;typedef t1*t2;
-void g(){}
+void g(int,t1 const*,t1,t2,t1 const*,int){}
void h(){}
static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}

13
deps/GMP/GMP.cmake vendored
View file

@ -1,9 +1,13 @@
set(_srcdir ${CMAKE_CURRENT_LIST_DIR}/gmp)
if (IN_GIT_REPO)
set(GMP_DIRECTORY_FLAG --directory ${BINARY_DIR_REL}/dep_GMP-prefix/src/dep_GMP)
endif ()
if (MSVC)
set(_output ${DESTDIR}/include/gmp.h
${DESTDIR}/lib/libgmp-10.lib
set(_output ${DESTDIR}/include/gmp.h
${DESTDIR}/lib/libgmp-10.lib
${DESTDIR}/bin/libgmp-10.dll)
add_custom_command(
@ -12,7 +16,7 @@ if (MSVC)
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/lib/win${DEPS_BITS}/libgmp-10.lib ${DESTDIR}/lib/
COMMAND ${CMAKE_COMMAND} -E copy ${_srcdir}/lib/win${DEPS_BITS}/libgmp-10.dll ${DESTDIR}/bin/
)
add_custom_target(dep_GMP SOURCES ${_output})
else ()
@ -59,7 +63,8 @@ else ()
URL https://github.com/SoftFever/OrcaSlicer_deps/releases/download/gmp-6.2.1/gmp-6.2.1.tar.bz2
URL_HASH SHA256=eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/GMP
BUILD_IN_SOURCE ON
PATCH_COMMAND git apply ${GMP_DIRECTORY_FLAG} --verbose ${CMAKE_CURRENT_LIST_DIR}/0001-GMP_GCC15.patch
BUILD_IN_SOURCE ON
CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure ${_cross_compile_arg} --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}" ${_gmp_build_tgt}
BUILD_COMMAND make -j
INSTALL_COMMAND make install

View file

@ -25,7 +25,7 @@ else ()
endif ()
ExternalProject_Add(dep_MPFR
URL https://www.mpfr.org/mpfr-current/mpfr-4.2.2.tar.bz2
URL https://www.mpfr.org/mpfr-4.2.2/mpfr-4.2.2.tar.bz2
URL_HASH SHA256=9ad62c7dc910303cd384ff8f1f4767a655124980bb6d8650fe62c815a231bb7b
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/MPFR
BUILD_IN_SOURCE ON

View file

@ -195,3 +195,27 @@ index 5ae9899f..0a17372b 100644
if (!myFTLib->IsValid())
{
From 7236e83dcc1e7284e66dc61e612154617ef715d6 Mon Sep 17 00:00:00 2001
From: dpasukhi <dpasukhi@opencascade.com>
Date: Tue, 27 Aug 2024 11:33:29 +0100
Subject: [PATCH] 0033808: Coding - FreeType Use unsigned point and contour
indexing in `FT_Outline`
Changes to auto instead of specific type
---
src/StdPrs/StdPrs_BRepFont.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/StdPrs/StdPrs_BRepFont.cxx b/src/StdPrs/StdPrs_BRepFont.cxx
index ab2d9b3c9f..cd701879b1 100644
--- a/src/StdPrs/StdPrs_BRepFont.cxx
+++ b/src/StdPrs/StdPrs_BRepFont.cxx
@@ -457,7 +457,7 @@ Standard_Boolean StdPrs_BRepFont::renderGlyph (const Standard_Utf32Char theChar,
for (short aContour = 0, aStartIndex = 0; aContour < anOutline->n_contours; ++aContour)
{
const FT_Vector* aPntList = &anOutline->points[aStartIndex];
- const char* aTags = &anOutline->tags[aStartIndex];
+ const auto* aTags = &anOutline->tags[aStartIndex];
const short anEndIndex = anOutline->contours[aContour];
const short aPntsNb = (anEndIndex - aStartIndex) + 1;
aStartIndex = anEndIndex + 1;

54
deps/OpenCV/0002-clang19-macos.patch vendored Normal file
View file

@ -0,0 +1,54 @@
From 893b8113f04d408cc6177c6de19c9889a48faa24 Mon Sep 17 00:00:00 2001
From: Zixu Wang <zixu_wang@apple.com>
Date: Thu, 18 Jan 2024 11:12:00 -0800
Subject: [PATCH] Fix unused platform check and configuration for macOS
In a similar manner as zlib (https://github.com/madler/zlib/pull/895),
libpng contains a header configuration that's no longer valid and
hasn't been exercised for the macOS target.
- The target OS conditional macros are misused. Specifically
`TARGET_OS_MAC` covers all Apple targets, including iOS, and it
should not be checked with `#if defined` as they would always be
defined (to either 1 or 0) on Apple platforms.
- `#include <fp.h>` no longer works for the macOS target and results
in a compilation failure. macOS ships all required functions in
`math.h`, and clients should use `math.h` instead.
This problem has not been noticed until a recent extension in clang
(https://github.com/llvm/llvm-project/pull/74676) exposed the issue
and broke libpng builds on Apple platforms. The failure can be
reproduced now by adding `#include <TargetConditionals.h>` before the
block.
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
---
AUTHORS | 2 ++
pngpriv.h | 14 ++------------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/3rdparty/libpng/pngpriv.h b/3rdparty/libpng/pngpriv.h
index 6c7280cf53..190eb85cbf 100644
--- a/3rdparty/libpng/pngpriv.h
+++ b/3rdparty/libpng/pngpriv.h
@@ -556,18 +556,8 @@
*/
# include <float.h>
-# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
- /* We need to check that <math.h> hasn't already been included earlier
- * as it seems it doesn't agree with <fp.h>, yet we should really use
- * <fp.h> if possible.
- */
-# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
-# include <fp.h>
-# endif
-# else
-# include <math.h>
-# endif
+# include <math.h>
+
# if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
/* Amiga SAS/C: We must include builtin FPU functions when compiling using
* MATH=68881

View file

@ -11,7 +11,7 @@ endif ()
orcaslicer_add_cmake_project(OpenCV
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-vs2022.patch
PATCH_COMMAND git apply ${OpenCV_DIRECTORY_FLAG} --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-vs2022.patch ${CMAKE_CURRENT_LIST_DIR}/0002-clang19-macos.patch
CMAKE_ARGS
-DBUILD_SHARED_LIBS=0
-DBUILD_PERE_TESTS=OFF

29
deps/OpenVDB/0001-clang19.patch vendored Normal file
View file

@ -0,0 +1,29 @@
--- a/openvdb/openvdb/tree/NodeManager.h 2023-11-01 20:31:11 UTC
+++ b/openvdb/openvdb/tree/NodeManager.h
@@ -327,7 +327,7 @@ class NodeList (private)
void operator()(const NodeRange& range) const
{
for (typename NodeRange::Iterator it = range.begin(); it; ++it) {
- OpT::template eval(mNodeOp, it);
+ OpT::eval(mNodeOp, it);
}
}
const NodeOp mNodeOp;
@@ -347,7 +347,7 @@ class NodeList (private)
void operator()(const NodeRange& range) const
{
for (typename NodeRange::Iterator it = range.begin(); it; ++it) {
- OpT::template eval(mNodeOp, it);
+ OpT::eval(mNodeOp, it);
}
}
const NodeOp& mNodeOp;
@@ -372,7 +372,7 @@ class NodeList (private)
void operator()(const NodeRange& range)
{
for (typename NodeRange::Iterator it = range.begin(); it; ++it) {
- OpT::template eval(*mNodeOp, it);
+ OpT::eval(*mNodeOp, it);
}
}
void join(const NodeReducer& other)

View file

@ -6,10 +6,15 @@ else()
set(_build_static ON)
endif()
if (IN_GIT_REPO)
set(OPENVDB_DIRECTORY_FLAG --directory ${BINARY_DIR_REL}/dep_OpenVDB-prefix/src/dep_OpenVDB)
endif ()
orcaslicer_add_cmake_project(OpenVDB
# support vs2022, update to 8.2
URL https://github.com/tamasmeszaros/openvdb/archive/a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip
URL_HASH SHA256=f353e7b99bd0cbfc27ac9082de51acf32a8bc0b3e21ff9661ecca6f205ec1d81
PATCH_COMMAND git apply ${OPENVDB_DIRECTORY_FLAG} --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-clang19.patch
DEPENDS dep_TBB dep_Blosc dep_OpenEXR dep_Boost
CMAKE_ARGS
-DCMAKE_POSITION_INDEPENDENT_CODE=ON

29
deps/PNG/0002-clang19-macos.patch vendored Normal file
View file

@ -0,0 +1,29 @@
--- a/pngpriv.h 2025-04-20 19:36:04.000000000
+++ b/pngpriv.h 2025-04-20 19:35:55.000000000
@@ -511,24 +511,14 @@
* DBL_DIG Maximum number of decimal digits (can be set to any constant)
* DBL_MIN Smallest normalized fp number (can be set to an arbitrary value)
* DBL_MAX Maximum floating point number (can be set to an arbitrary value)
*/
# include <float.h>
-# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
- /* We need to check that <math.h> hasn't already been included earlier
- * as it seems it doesn't agree with <fp.h>, yet we should really use
- * <fp.h> if possible.
- */
-# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
-# include <fp.h>
-# endif
-# else
-# include <math.h>
-# endif
+# include <math.h>
+
# if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
/* Amiga SAS/C: We must include builtin FPU functions when compiling using
* MATH=68881
*/
# include <m68881.h>
# endif

4
deps/PNG/PNG.cmake vendored
View file

@ -12,7 +12,7 @@ if(APPLE AND IS_CROSS_COMPILE)
GIT_TAG v1.6.35
DEPENDS ${ZLIB_PKG}
PATCH_COMMAND ${GIT_EXECUTABLE} checkout -f -- . && git clean -df &&
${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/macos-arm64.patch
${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/macos-arm64.patch ${CMAKE_CURRENT_LIST_DIR}/0002-clang19-macos.patch
CMAKE_ARGS
-DPNG_SHARED=OFF
-DPNG_STATIC=ON
@ -24,7 +24,7 @@ if(APPLE AND IS_CROSS_COMPILE)
else ()
set(_patch_step "")
if (APPLE)
set(_patch_step PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/PNG.patch)
set(_patch_step PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/PNG.patch ${CMAKE_CURRENT_LIST_DIR}/0002-clang19-macos.patch)
endif ()
orcaslicer_add_cmake_project(PNG
# GIT_REPOSITORY https://github.com/glennrp/libpng.git

33
deps/TIFF/TIFF.cmake vendored
View file

@ -1,33 +0,0 @@
find_package(OpenGL QUIET REQUIRED)
if (APPLE)
message(STATUS "Compiling TIFF for macos ${CMAKE_SYSTEM_VERSION}.")
orcaslicer_add_cmake_project(TIFF
URL https://gitlab.com/libtiff/libtiff/-/archive/v4.3.0/libtiff-v4.3.0.zip
URL_HASH SHA256=4fca1b582c88319f3ad6ecd5b46320eadaf5eb4ef6f6c32d44caaae4a03d0726
DEPENDS ${ZLIB_PKG} ${PNG_PKG} dep_JPEG
CMAKE_ARGS
-Dlzma:BOOL=OFF
-Dwebp:BOOL=OFF
-Djbig:BOOL=OFF
-Dzstd:BOOL=OFF
-Dlibdeflate:BOOL=OFF
-Dpixarlog:BOOL=OFF
)
else()
orcaslicer_add_cmake_project(TIFF
URL https://gitlab.com/libtiff/libtiff/-/archive/v4.1.0/libtiff-v4.1.0.zip
URL_HASH SHA256=c56edfacef0a60c0de3e6489194fcb2f24c03dbb550a8a7de5938642d045bd32
DEPENDS ${ZLIB_PKG} ${PNG_PKG} dep_JPEG
CMAKE_ARGS
-Dlzma:BOOL=OFF
-Dwebp:BOOL=OFF
-Djbig:BOOL=OFF
-Dzstd:BOOL=OFF
-Dpixarlog:BOOL=OFF
)
endif()

View file

@ -26,7 +26,7 @@ orcaslicer_add_cmake_project(
wxWidgets
GIT_REPOSITORY "https://github.com/SoftFever/Orca-deps-wxWidgets"
GIT_SHALLOW ON
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} ${TIFF_PKG} ${JPEG_PKG}
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} ${JPEG_PKG}
CMAKE_ARGS
-DwxBUILD_PRECOMP=ON
${_wx_toolkit}
@ -52,7 +52,7 @@ orcaslicer_add_cmake_project(
-DwxUSE_LIBPNG=sys
-DwxUSE_ZLIB=sys
-DwxUSE_LIBJPEG=sys
-DwxUSE_LIBTIFF=sys
-DwxUSE_LIBTIFF=OFF
-DwxUSE_NANOSVG=OFF
-DwxUSE_EXPAT=sys
)

View file

@ -1,162 +0,0 @@
- [Flow rate](#Flow-rate)
- [Pressure Advance](#Pressure-Advance)
1. [Line method](#Line-method)
2. [Pattern method](#Pattern-method)
3. [Tower method](#Tower-method)
- [Temp tower](#Temp-tower)
- [Retraction test](#Retraction-test)
- [Orca Tolerance Test](#Orca-Tolerance-Test)
- [Advanced calibration](#Advanced-Calibration)
1. [Max Volumetric speed](#Max-Volumetric-speed)
2. [VFA]
> [!IMPORTANT]
> After completing the calibration process, remember to create a new project in order to exit the calibration mode.
> [!TIP]
> @ItsDeidara has made a webpage to help with the calculation. Check it out if those equations give you a headache [here](https://orcalibrate.com/).
# Flow rate
> [!WARNING]
> For Bambulab X1/X1C users, make sure you do not select the 'Flow calibration' option.
>
> ![uncheck](https://user-images.githubusercontent.com/103989404/221345187-3c317a46-4d85-4221-99b9-adb5c7f48026.jpeg)
![flowrate](./images/flow-calibration.gif)
Calibrating the flow rate involves a two-step process.
Steps
1. Select the printer, filament, and process you would like to use for the test.
2. Select `Pass 1` in the `Calibration` menu
3. A new project consisting of nine blocks will be created, each with a different flow rate modifier. Slice and print the project.
4. Examine the blocks and determine which one has the smoothest top surface.
![flowrate-pass1_resize](https://user-images.githubusercontent.com/103989404/210138585-98821729-b19e-4452-a08d-697f147d36f0.jpg)
![0-5](https://user-images.githubusercontent.com/103989404/210138714-63daae9c-6778-453a-afa9-9a976d61bfd5.jpg)
5. Update the flow ratio in the filament settings using the following equation: `FlowRatio_old*(100 + modifier)/100`. If your previous flow ratio was `0.98` and you selected the block with a flow rate modifier of `+5`, the new value should be calculated as follows: `0.98x(100+5)/100 = 1.029`.** Remember** to save the filament profile.
6. Perform the `Pass 2` calibration. This process is similar to `Pass 1`, but a new project with ten blocks will be generated. The flow rate modifiers for this project will range from `-9 to 0`.
7. Repeat steps 4. and 5. In this case, if your previous flow ratio was 1.029 and you selected the block with a flow rate modifier of -6, the new value should be calculated as follows: `1.029x(100-6)/100 = 0.96726`. **Remember** to save the filament profile.
![pass2](https://user-images.githubusercontent.com/103989404/210139072-f2fa91a6-4e3b-4d2a-81f2-c50155e1ff6d.jpg)
![-6](https://user-images.githubusercontent.com/103989404/210139131-ee224146-b242-4c1c-ac96-35ef0ca591f1.jpg)
![image](./images/flowcalibration_update_flowrate.jpg)
# Pressure Advance
Orca Slicer includes three approaches for calibrating the pressure advance value. Each method has its own advantages and disadvantages. It is important to note that each method has two versions: one for a direct drive extruder and one for a Bowden extruder. Make sure to select the appropriate version for your test.
> [!WARNING]
> For Marlin: Linear advance must be enabled in firmware (M900). **Not all printers have it enabled by default.**
> [!WARNING]
> For Bambulab X1/X1C users, make sure you do not select the 'Flow calibration' option when printings.
>
> ![uncheck](https://user-images.githubusercontent.com/103989404/221345187-3c317a46-4d85-4221-99b9-adb5c7f48026.jpeg)
### Line method
The line method is quick and straightforward to test. However, its accuracy highly depends on your first layer quality. It is suggested to turn on the bed mesh leveling for this test.
Steps:
1. Select the printer, filament, and process you would like to use for the test.
2. Print the project and check the result. You can select the value of the most even line and update your PA value in the filament settings.
3. In this test, a PA value of `0.016` appears to be optimal.
![pa_line](https://user-images.githubusercontent.com/103989404/210139630-8fd189e7-aa6e-4d03-90ab-84ab0e781f81.gif)
<img width="1003" alt="Screenshot 2022-12-31 at 12 11 10 PM" src="https://user-images.githubusercontent.com/103989404/210124449-dd828da8-a7e4-46b8-9fa2-8bed5605d9f6.png">
![line_0 016](https://user-images.githubusercontent.com/103989404/210140046-dc5adf6a-42e8-48cd-950c-5e81558da967.jpg)
![image](https://user-images.githubusercontent.com/103989404/210140079-61a4aba4-ae01-4988-9f8e-2a45a90cdb7d.png)
### Pattern method
The pattern method is adapted from [Andrew Ellis' pattern method generator](https://ellis3dp.com/Pressure_Linear_Advance_Tool/), which was itself derived from the [Marlin pattern method](https://marlinfw.org/tools/lin_advance/k-factor.html) developed by [Sineos](https://github.com/Sineos/k-factorjs).
[Instructions for using and reading the pattern method](https://ellis3dp.com/Print-Tuning-Guide/articles/pressure_linear_advance/pattern_method.html) are provided in [Ellis' Print Tuning Guide](https://ellis3dp.com/Print-Tuning-Guide/), with only a few Orca Slicer differences to note.
Test configuration window allow user to generate one or more tests in a single projects. Multiple tests will be placed on each plate with extra plates added if needed.
1. Single test \
![PA pattern single test](./images/pa/pa-pattern-single.png)
2. Batch mode testing (multiple tests on a sinle plate) \
![PA pattern batch mode](./images/pa/pa-pattern-batch.png)
Once test generated, one or more small rectangular prisms could be found on the plate, one for each test case. This object serves a few purposes:
1. The test pattern itself is added in as custom G-Code at each layer, same as you could do by hand actually. The rectangular prism gives us the layers in which to insert that G-Code. This also means that **you'll see the full test pattern when you move to the Preview pane**:
![PA pattern batch mode plater](./images/pa/pa-pattern-batch-plater.png)
2. The prism acts as a handle, enabling you to move the test pattern wherever you'd like on the plate by moving the prism
3. Each test object is pre-configured with target parameters which are reflected in the objects name. However, test parameters may be adjusted for each prism individually by referring to the object list pane:
![PA pattern batch mode object list](./images/pa/pa-pattern-batch-objects.png)
Next, Ellis' generator provided the ability to adjust specific printer, filament, and print profile settings. You can make these same changes in Orca Slicer by adjusting the settings in the Prepare pane as you would with any other print. When you initiate the calibration test, Ellis' default settings are applied. A few things to note about these settings:
1. Ellis specified line widths as a percent of filament diameter. The Orca pattern method does the same to provide its suggested defaults, making use of Ellis' percentages in combination with your specified nozzle diameter
2. In terms of line width, the pattern only makes use of the `Default` and `First layer` widths
3. In terms of speed, the pattern only uses the `First layer speed -> First layer` and `Other layers speed -> Outer wall` speeds
4. The infill pattern beneath the numbers cannot be changed becuase it's not actually an infill pattern pulled from the settings. All of the pattern G-Code is custom written, so that "infill" is, effectively, hand-drawn and so not processed through the usual channels that would enable Orca to recognize it as infill
### Tower method
The tower method may take a bit more time to complete, but it does not rely on the quality of the first layer.
The PA value for this test will be increased by 0.002 for every 1 mm increase in height. (**NOTE** 0.02 for Bowden)
Steps:
1. Select the printer, filament, and process you would like to use for the test.
2. Examine each corner of the print and mark the height that yields the best overall result.
3. I selected a height of 8 mm for this case, so the pressure advance value should be calculated as `PressureAdvanceStart+(PressureAdvanceStep x measured)` example: `0+(0.002 x 8) = 0.016`.
![tower](https://user-images.githubusercontent.com/103989404/210140231-e886b98d-280a-4464-9781-c74ed9b7d44e.jpg)
![tower_measure](https://user-images.githubusercontent.com/103989404/210140232-885b549b-e3b8-46b9-a24c-5229c9182408.jpg)
# Temp tower
![image](./images/temp_tower_test.gif)
Temp tower is a straightforward test. The temp tower is a vertical tower with multiple blocks, each printed at a different temperature. Once the print is complete, we can examine each block of the tower and determine the optimal temperature for the filament. The optimal temperature is the one that produces the highest quality print with the least amount of issues, such as stringing, layer adhesion, warping (overhang), and bridging.
![temp_tower](https://user-images.githubusercontent.com/103989404/221344534-40e1a629-450c-4ad5-a051-8e240e261a51.jpeg)
# Retraction test
![image](./images/retraction_test.gif)
This test generates a retraction tower automatically. The retraction tower is a vertical structure with multiple notches, each printed at a different retraction length. After the print is complete, we can examine each section of the tower to determine the optimal retraction length for the filament. The optimal retraction length is the shortest one that produces the cleanest tower.
![image](./images/retraction_test_dlg.png)
In the dialog, you can select the start and end retraction length, as well as the retraction length increment step. The default values are 0mm for the start retraction length, 2mm for the end retraction length, and 0.1mm for the step. These values are suitable for most direct drive extruders. However, for Bowden extruders, you may want to increase the start and end retraction lengths to 1mm and 6mm, respectively, and set the step to 0.2mm.
**Note**: When testing filaments such as PLA or ABS that have minimal oozing, the retraction settings can be highly effective. You may find that the retraction tower appears clean right from the start. In such situations, setting the retraction length to 0.2mm - 0.4mm using Orca Slicer should suffice.
On the other hand, if there is still a lot of stringing at the top of the tower, it is recommended to dry your filament and ensure that your nozzle is properly installed without any leaks.
![image](./images/retraction_test_print.jpg)
# Orca Tolerance Test
This tolerance test is specifically designed to assess the dimensional accuracy of your printer and filament. The model comprises a base and a hexagon tester. The base contains six hexagon hole, each with a different tolerance: 0.0mm, 0.05mm, 0.1mm, 0.2mm, 0.3mm, and 0.4mm. The dimensions of the hexagon tester are illustrated in the image.
![image](./images/tolerance_hole.jpg)
You can assess the tolerance using either an M6 Allen key or the printed hexagon tester.
![image](./images/OrcaToleranceTes_m6.jpg)
![image](./images/OrcaToleranceTest_print.jpg)
# Advanced Calibration
## Max Volumetric speed
This is a test designed to calibrate the maximum volumetric speed of the specific filament. The generic or 3rd party filament types may not have the correct volumetric flow rate set in the filament. This test will help you to find the maximum volumetric speed of the filament.
You will be promted to enter the settings for the test: start volumetric speed, end volumentric speed, and step. It is recommended to use the default values (5mm³/s start, 20mm³/s end, with a step of 0.5), unless you already have an idea of the lower or upper limit for your filament. Select "OK", slice the plate, and send it to the printer.
Once printed, take note of where the layers begin to fail and where the quality begins to suffer. Pay attention to changes from matte to shiny as well.
![image](./images/vmf_measurement_point.jpg)
Using calipers or a ruler, measure the height of the print at that point. Use the following calculation to determine the correct max flow value: `start + (height-measured * step)` . For example in the photo below, and using the default setting values, the print quality began to suffer at 19mm measured, so the calculation would be: `5 + (19 * 0.5)` , or `13mm³/s` using the default values. Enter your number into the "Max volumetric speed" value in the filament settings.
![image](./images/caliper_sample_mvf.jpg)
You can also return to OrcaSlicer in the "Preview" tab, make sure the color scheme "flow" is selected. Scroll down to the layer height that you measured, and click on the toolhead slider. This will indicate the max flow level for your filmanet.
![image](./images/max_volumetric_flow.jpg)
> [!NOTE]
> You may also choose to conservatively reduce the flow by 5-10% to ensure print quality.
***
*Credits:*
- *The Flowrate test and retraction test is inspired by [SuperSlicer](https://github.com/supermerill/SuperSlicer)*
- *The PA Line method is inspired by [K-factor Calibration Pattern](https://marlinfw.org/tools/lin_advance/k-factor.html)*
- *The PA Tower method is inspired by [Klipper](https://www.klipper3d.org/Pressure_Advance.html)*
- *The temp tower model is remixed from [Smart compact temperature calibration tower](https://www.thingiverse.com/thing:2729076)
- *The max flowrate test was inspired by Stefan(CNC Kitchen), and the model used in the test is a remix of his [Extrusion Test Structure](https://www.printables.com/model/342075-extrusion-test-structure).
- *ChatGPT* ;)

View file

@ -1,52 +0,0 @@
OrcaSlicer use `M141/M191` command to control active chamber heater.
If `Activate temperature control` is checked, OrcaSlicer will insert `M191` command at the beginning of the gcode(before `Machine G-code`).
![image](./images/activate_chamber_heater.jpg)
*Note: If the machine is equipped with an auxiliary fan, OrcaSlicer will automatically activate the fan during the heating period to help circulate air in the chamber.*
There are two chamber temperature variables available that we can use in `Machine G-code` to control the chamber temperature, if you prefer:
To access the chamber temperature set in the first filament, use:
`M191 S{chamber_temperature[0]}`
To use the overall chamber temperature, which is the highest chamber temperature set across all filaments, use:
`M191 S{overall_chamber_temperature}`
--------------------------Klipper--------------------------
If you are using Klipper, you can define these macros to control the active chamber heater.
Bellow is a reference configuration for Klipper.
*Note: Don't forget to change the pin name/values to the actual values you are using in the configuration*
```
[heater_generic chamber_heater]
heater_pin:PB10
max_power:1.0
# Orca note: here the temperature sensor should be the sensor you are using for chamber temperature, not the PTC sensor
sensor_type:NTC 100K MGB18-104F39050L32
sensor_pin:PA1
control = pid
pid_Kp = 63.418
pid_ki = 0.960
pid_kd = 1244.716
min_temp:0
max_temp:70
[gcode_macro M141]
gcode:
SET_HEATER_TEMPERATURE HEATER=chamber_heater TARGET={params.S|default(0)}
[gcode_macro M191]
gcode:
{% set s = params.S|float %}
{% if s == 0 %}
# If target temperature is 0, do nothing
M117 Chamber heating cancelled
{% else %}
SET_HEATER_TEMPERATURE HEATER=chamber_heater TARGET={s}
# Orca: uncomment the following line if you want to use heat bed to assist chamber heating
# M140 S100
TEMPERATURE_WAIT SENSOR="heater_generic chamber_heater" MINIMUM={s-1} MAXIMUM={s+1}
M117 Chamber at target temperature
{% endif %}
```

View file

@ -1,39 +1,93 @@
# Welcome to the OrcaSlicer WIKI!
Orca slicer is a powerful open source slicer for FFF (FDM) 3D Printers. This wiki page aims to provide an detailed explanation of the slicer settings, how to get the most out of them as well as how to calibrate and setup your printer.
Orca slicer is a powerful open source slicer for FFF (FDM) 3D Printers. This wiki page aims to provide an detailed explanation of the slicer settings, how to get the most out of them as well as how to calibrate and setup your printer.
The Wiki is work in progress so bear with us while we get it up and running!
- [Prepare](#prepare)
- [Print Settings, Tips and Tricks](#print-settings-tips-and-tricks)
- [Quality Settings](#quality-settings)
- [Speed Settings](#speed-settings)
- [Strength Settings](#strength-settings)
- [Material Settings](#material-settings)
- [Printer Settings](#printer-settings)
- [Printer Calibration](#printer-calibration)
- [Developer Section](#developer-section)
> [!NOTE]
> The Wiki is **Work In Progress** so bear with us while we get it up and running!
> Please consider contributing to the wiki following the [How to contribute to the wiki](How-to-wiki) guide.
## Prepare
First steps to prepare your model/s for printing.
- [STL Transformation](stl-transformation)
## Print Settings, Tips and Tricks
## Print Settings, Tips and Tricks (Work In Progress)
The below sections provide a detailed settings explanation as well as tips and tricks in setting these for optimal print results.
### Quality Settings
- [Layer Height Settings](quality_settings_layer_height)
- [Line Width Settings](quality_settings_line_width)
- [Seam Settings](quality_settings_seam)
- [Precise wall](Precise-wall)
- [Precision](quality_settings_precision)
- [Precise Wall](quality_settings_precision#precise-wall)
- [Precise Z Height](quality_settings_precision#precise-z-height)
- [Slice gap closing radius](quality_settings_precision#slice-gap-closing-radius)
- [Resolution](quality_settings_precision#resolution)
- [Arc fitting](quality_settings_precision#arc-fitting)
- [X-Y Compensation](quality_settings_precision#x-y-compensation)
- [Elephant foot compensation](quality_settings_precision#elephant-foot-compensation)
- [Precise wall](quality_settings_precision#precise-wall)
- [Precise Z Height](quality_settings_precision#precise-z-height)
- [Polyholes](quality_settings_precision#polyholes)
- [Wall generator](quality_settings_wall_generator)
### Speed Settings
- [Extrusion rate smoothing](extrusion-rate-smoothing)
### Multi material
- [Extrusion rate smoothing](speed_extrusion_rate_smoothing)
### Strength Settings
- [Infill](strength_settings_infill)
## Material Settings
- [Single Extruder Multimaterial](semm)
- [Pellet Printers (pellet flow coefficient)](pellet-flow-coefficient)
### Printer Settings
### Printer Settings:
- [Air filtration/Exhaust fan handling](air-filtration)
- [Auxiliary fan handling](Auxiliary-fan)
- [Chamber temperature control](chamber-temperature)
- [Adaptive Bed Mesh](adaptive-bed-mesh)
- [Using different bed types in Orca](bed-types)
- [Pellet Printers (pellet flow coefficient)](pellet-flow-coefficient)
## Printer Calibration
The guide below takes you through the key calibration tests in Orca - flow rate, pressure advance, print temperature, retraction, tolerances and maximum volumetric speed
- [Calibration Guide](./Calibration)
- [Adaptive Pressure Advance Guide](adaptive-pressure-advance)
The [Calibration Guide](Calibration) outlines Orcas key calibration tests and their suggested order of execution.
- [Temperature](temp-calib)
- [Flow Rate](flow-rate-calib)
- [Pressure Advance](pressure-advance-calib)
- [Adaptive Pressure Advance Guide](adaptive-pressure-advance-calib)
- [Retraction](retraction-calib)
- [Tolerance](tolerance-calib)
- Advanced:
- [Volumetric Speed](volumetric-speed-calib)
- [Cornering (Jerk & Junction Deviation)](cornering-calib)
- [Input Shaping](input-shaping-calib)
## Developer Section
- [How to build Orca Slicer](./How-to-build)
This is a documentation from someone exploring the code and is by no means complete or even completely accurate. Please edit the parts you might find inaccurate. This is probably going to be helpful nonetheless.
- [How to build Orca Slicer](How-to-build)
- [Localization and translation guide](Localization_guide)
- [Developer Reference](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/developer-reference/Home.md)
- [How to create profiles](./How-to-create-profiles)
- [How to create profiles](How-to-create-profiles)
- [How to contribute to the wiki](How-to-wiki)
- [Preset, PresetBundle and PresetCollection](Preset-and-bundle)
- [Plater, Sidebar, Tab, ComboBox](plater-sidebar-tab-combobox)
- [Slicing Call Hierarchy](slicing-hierarchy)

View file

@ -1,11 +0,0 @@
# How to compile
- Windows 64-bit
- Tools needed: Visual Studio 2019, Cmake, git, Strawberry Perl.
- Run `build_release.bat` in `x64 Native Tools Command Prompt for VS 2019`
- Mac 64-bit
- Tools needed: Xcode, Cmake, git, gettext
- run `build_release_macos.sh`
- Ubuntu
- run `BuildLinux.sh -udisr`

View file

@ -1,180 +0,0 @@
# Guide: Develop Profiles for OrcaSlicer
## Introduction
This guide will help you develop profiles for OrcaSlicer.
## High-level Overview
OrcaSlicer uses JSON files to store profiles. There are four types of profiles:
1. Printer model (type `machine_model`). Example: `Orca 3D Fuse1.json`
2. Printer variant (type `machine`). Example: `Orca 3D Fuse1 0.2 nozzle.json`
3. Filament (type `filament`). Example: `Generic PLA @Orca 3D Fuse1@.json`
4. Process (type `process`). Example: `0.10mm Standard @Orca 3D Fuse1 0.2.json`
Additionally, there is an overall meta file for each vendor (`Orca 3D.json`).
For easier understanding, let's consider a scenario with a printer manufacturer called `Orca 3D`. The manufacturer offers one printer model called `Fuse 1`, which supports 0.2/0.4/0.6/0.8mm nozzles and common market filaments.
In this case:
- Vendor profile: `Orca 3D`
- Printer profile: `Orca 3D Fuse1`
- Printer variant profile: `Orca 3D Fuse1 0.4 nozzle`
- Filament profile: `Generic PLA @Orca 3D Fuse1@`
- Process profile: `0.20mm Standard @Orca 3D Fuse1 0.4`
The profile name should be same as the filename without the `.json` extension in principal.
Naming conventions:
1. Vendor profile: `vendor_name.json`
2. Printer profile: `vendor_name` + `printer_name` + `.json`
3. Printer variant profile: `vendor_name` + `printer_variant_name` + `.json` (where `printer_variant_name` typically includes `printer_name` + `nozzle_diameter`)
4. Filament profile: `filament_vendor_name` + `filament_name` + " @" + `vendor_name` + `printer_name`/`printer_variant_name` + `.json`
5. Process profile: `layer_height` + `preset_name` + " @" + `vendor_name` + `printer_name`/`printer_variant_name` + `.json` (`preset_name` typically includes "standard," "fine," "fast," "draft," etc.)
A typical file structure for a vendor:
```
resources\profiles\
- Orca 3D.json
- Orca 3D\
- machine\
- Orca 3D Fuse1.json
- Orca 3D Fuse1 0.2 nozzle.json
- Orca 3D Fuse1 0.4 nozzle.json
- process\
- 0.10mm Standard @Orca 3D Fuse1 0.2.json
- 0.20mm Standard @Orca 3D Fuse1 0.4.json
- filament\
- Generic PLA @Orca 3D Fuse1@.json
```
**NOTE 1**: Use short vendor names in filenames to avoid excessive length.
**NOTE 2**: Filament profiles are **optional**. Create them only if the vendor has specifically tuned profiles for the given printer. See [Filament profiles](#filament-profiles) for details.
## Filament Profiles
OrcaSlicer features a global filament library called `OrcaFilamentLibrary`, which is automatically available for all printers. It includes generic filaments like `Generic PLA @System` and `Generic ABS @System` etc.
Printer vendors can override specific filaments in the global library for certain printer models by creating new filament profiles.
Relationship diagram:
```mermaid
graph TD;
OrcaFilamentLibrary-->Orca_3D_filament;
OrcaFilamentLibrary-->Vendor_A_filament;
OrcaFilamentLibrary-->Vendor_B_filament;
```
**NOTE**: Create new filament profiles only if you have truly specifically tuned the filament for the given printer. Otherwise, use the global library. The global library has a better chance to receive optimizations and updates from OrcaSlicer contributors, which will benefit users of all printers.
### Adding Filament Profiles to the Global Library
In this section, we will discuss how to add a new filament profile into the global library.
If you want to add a new generic profile into the global library, you need to create a new file in the `resources\profiles\OrcaFilamentLibrary\filament` folder. If a base type already exists in the global library, you can use this file as a base profile by inheriting it.
The following sample JSON file shows how to create a new generic filament profile `Generic PLA-GF @System` in the global library.
1. The first step is to create a new file in the `resources\profiles\OrcaFilamentLibrary\filament` folder. The file name should be `Generic PLA-GF @System.json`. Please note that we leave the `compatible_printers` field empty so that it is available for all printers.
```json
{
"type": "filament",
"filament_id": "GFL99",
"setting_id": "GFSA05",
"name": "Generic PLA-GF @System",
"from": "system",
"instantiation": "true",
"inherits": "fdm_filament_pla",
"filament_type": ["PLA-GF"],
"filament_flow_ratio": [
"0.96"
],
"compatible_printers": []
}
```
2. Register the profile in `resources\profiles\OrcaFilamentLibrary.json`:
```json
{
"name": "OrcaFilamentLibrary",
"version": "02.02.00.04",
"force_update": "0",
"description": "Orca Filament Library",
"filament_list": [
// ...
{
"name": "Generic PLA-GF @System",
"sub_path": "filament/Generic PLA-GF @System.json"
}
]
}
```
3. The last step is to validate the newly added filament profiles. You can run OrcaSlicer to verify if the filament you just added is available and usable. You can also use the [Orca profile validator](https://github.com/SoftFever/Orca_tools/releases/tag/1) tool to help debug any errors. **NOTE**: You need to delete the `%appdata%/OrcaSlicer/system` folder to force OrcaSlicer to reload your lastest changes.
The process is the same if you want to add a new brand filament profile into the global library. You need to create a new file in the `resources\profiles\OrcaFilamentLibrary\filament\brand_name` folder. The only difference is that you should put the file into the brand's own subfolder.`resources\profiles\OrcaFilamentLibrary\filament\brand_name`.
### Adding Filament Profiles to Printer Vendor Library
In this section, we will discuss how to add a new filament profile for a certain vendor.
If you want to add a new filament profile, whether it's a brand new profile or a specialized version of a global filament profile for a given printer, you need to create a new file in the `resources\profiles\vendor_name\filament` folder. If a base type already exists in the global library, you can use this file as a base profile by inheriting it.
Below is a sample JSON file showing how to create a specialized `Generic ABS` filament profile for the ToolChanger printer.
Please note that here we must leave the compatible_printers field non-empty, unlike in the global library.
```json
{
"type": "filament",
"setting_id": "GFB99_MTC_0",
"name": "Generic ABS @MyToolChanger",
"from": "system",
"instantiation": "true",
"inherits": "Generic ABS @System",
"filament_cooling_final_speed": [
"3.5"
],
"filament_cooling_initial_speed": [
"10"
],
"filament_cooling_moves": [
"2"
],
"filament_load_time": [
"10.5"
],
"filament_loading_speed": [
"10"
],
"filament_loading_speed_start": [
"50"
],
"filament_multitool_ramming": [
"1"
],
"filament_multitool_ramming_flow": [
"40"
],
"filament_stamping_distance": [
"45"
],
"filament_stamping_loading_speed": [
"29"
],
"filament_unload_time": [
"8.5"
],
"filament_unloading_speed": [
"100"
],
"compatible_printers": [
"MyToolChanger 0.4 nozzle",
"MyToolChanger 0.2 nozzle",
"MyToolChanger 0.6 nozzle",
"MyToolChanger 0.8 nozzle"
]
}
```
## Process Profiles
WIP...
## Printer Profiles
WIP...
## Printer Variant Profiles
WIP...

View file

@ -1,13 +0,0 @@
The 'Precise Wall' is a distinctive feature introduced by OrcaSlicer, aimed at improving the dimensional accuracy of prints and minimizing layer inconsistencies by slightly increasing the spacing between the outer wall and the inner wall.
Below is a technical explanation of how this feature works.
First, it's important to understand some basic concepts like flow, extrusion width, and space. Slic3r has an excellent document that covers these topics in detail. You can refer to this article: [link to article](https://manual.slic3r.org/advanced/flow-math).
Now, let's dive into the specifics. Slic3r and its forks, such as PrusaSlicer, SuperSlicer, and OrcaSlicer, assume that the extrusion path has an oval shape, which accounts for the overlaps. For example, if we set the wall width to 0.4mm and the layer height to 0.2mm, the combined thickness of two walls laid side by side is 0.714mm instead of 0.8mm due to the overlapping.
![image](./images/precise_wall.png)
This approach enhances the strength of 3D-printed parts. However, it does have some side effects. For instance, when the inner-outer wall order is used, the outer wall can be pushed outside, leading to potential size inaccuracy and more layer inconsistency.
It's important to keep in mind that this approach to handling flow is specific to Slic3r and it's forks. Other slicing software, such as Cura, assumes that the extrusion path is rectangular and, therefore, does not include overlapping. Two 0.4 mm walls will result in a 0.8 mm shell thickness in Cura
OrcaSlicer adheres to Slic3r's approach to handling flow. To address the downsides mentioned earlier, OrcaSlicer introduced the 'Precise Wall' feature. When this feature is enabled in OrcaSlicer, the overlap between the outer wall and its adjacent inner wall is set to zero. This ensures that the overall strength of the printed part is unaffected, while the size accuracy and layer consistency are improved.

View file

@ -1,8 +0,0 @@
Print settings:
* [Seam](seam)
* [Axiliary fan](auxiliary-fan)
* [Chamber temperature](chamber-temperature)
* [Air filtration/Exhaust fan](air-filtration)
* [Single Extruder Multimaterial](semm)
* [Precise wall](Precise-wall)

View file

@ -1,20 +0,0 @@
WIP...
### Scarf joint seam
WIP...
### Seam gap
![image](https://user-images.githubusercontent.com/103989404/215331359-236874c9-ca91-4dd4-b969-3cefc70ebe1b.png)
### Role-based wipe speed(auto)
### Wipe speed
### Wipe on loop(inward movement)
![image](https://user-images.githubusercontent.com/103989404/215334479-2687c518-1931-46a9-a363-7ae57a0aecf6.png)
Use outer wall speed and acceleration instead of travel speed and acceleration.
Added an option to disable this feature
### Support Cura style outer wall wipe(100% retract before wipe)
![image](https://user-images.githubusercontent.com/103989404/215334900-97c75010-4752-45f1-a57c-f0b723a8cb3f.png)
![image](https://user-images.githubusercontent.com/103989404/215335212-3253061d-bb7b-4853-a86c-10ff54cc8df5.png)
Extra length on restart

View file

@ -0,0 +1,65 @@
# Calibration Guide
This guide offers a structured and comprehensive overview of the calibration process for Orca Slicer.
It covers key aspects such as flow rate, pressure advance, temperature towers, retraction tests, and advanced calibration techniques. Each section includes step-by-step instructions and visuals to help you better understand and carry out each calibration effectively.
To access the calibration features, you can find them in the **Calibration** section of the Orca Slicer interface.
![Calibration Button](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/calibration.png?raw=true)
> [!IMPORTANT]
> After completing the calibration process, remember to create a new project in order to exit the calibration mode.
The recommended order for calibration is as follows:
1. **[Temperature](temp-calib):** Start by calibrating the temperature of the nozzle and the bed. This is crucial as it affects the viscosity of the filament, which in turn influences how well it flows through the nozzle and adheres to the print bed.
<img src="https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Temp-calib/temp-tower.jpg?raw=true" alt="temp-tower" height="200">
2. **[Flow](flow-rate-calib):** Calibrate the flow rate to ensure that the correct amount of filament is being extruded. This is important for achieving accurate dimensions and good layer adhesion.
<img src="https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Flow-Rate/flowrate-pass1.jpg?raw=true" alt="flowrate-pass1" height="200">
1. **[Pressure Advance](pressure-advance-calib):** Calibrate the pressure advance settings to improve print quality and reduce artifacts caused by pressure fluctuations in the nozzle.
- **[Adaptative Pressure Advance](adaptive-pressure-advance-calib):** This is an advanced calibration technique that can be used to further optimize the pressure advance settings for different print speeds and geometries.
<img src="https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa-tower.jpg?raw=true" alt="pa-tower" height="200">
2. **[Retraction](retraction-calib):** Calibrate the retraction settings to minimize stringing and improve print quality. Doing this after Flow and
<img src="https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/retraction/retraction_test_print.jpg?raw=true" alt="Retraction" height="200">
3. **[Tolerance](tolerance-calib):** Calibrate the tolerances of your printer to ensure that it can accurately reproduce the dimensions of the model being printed. This is important for achieving a good fit between parts and for ensuring that the final print meets the desired specifications.
<img src="https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Tolerance/OrcaToleranceTes_m6.jpg?raw=true" alt="Tolerance" height="200">
4. **[Max Volumetric Speed](volumetric-speed-calib):** Calibrate the maximum volumetric speed of the filament. This is important for ensuring that the printer can handle the flow rate of the filament without causing issues such as under-extrusion or over-extrusion.
<img src="https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/vmf_measurement_point.jpg?raw=true" alt="Max_Volumetric_Speed" height="200">
5. **[Cornering](cornering-calib):** Calibrate the Jerk/Junction Deviation settings to improve print quality and reduce artifacts caused by sharp corners and changes in direction.
<img src="https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/JunctionDeviation/jd_second_print_measure.jpg?raw=true" alt="Cornering" height="200">
6. **[Input Shaping](input-shaping-calib):** This is an advanced calibration technique that can be used to reduce ringing and improve print quality by compensating for mechanical vibrations in the printer.
<img src="https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_damp_marlin_print_measure.jpg?raw=true" alt="Input_Shaping" height="200">
### VFA
Vertical Fine Artifacts (VFA) are small artifacts that can occur on the surface of a 3D print, particularly in areas where there are sharp corners or changes in direction. These artifacts can be caused by a variety of factors, including mechanical vibrations, resonance, and other factors that can affect the quality of the print.
Because of the nature of these artifacts the methods to reduce them can be mechanical such as changing motors, belts and pulleys or with advanced calibrations such as Jerk/[Junction Deviation](junction-deviation) corrections or [Input Shaping](input-shaping).
---
_Credits:_
- _The Flowrate test and retraction test is inspired by [SuperSlicer](https://github.com/supermerill/SuperSlicer)._
- _The PA Line method is inspired by [K-factor Calibration Pattern](https://marlinfw.org/tools/lin_advance/k-factor.html)._
- _The PA Tower method is inspired by [Klipper](https://www.klipper3d.org/Pressure_Advance.html)._
- _The temp tower model is remixed from [Smart compact temperature calibration tower](https://www.thingiverse.com/thing:2729076)._
- _The max flowrate test was inspired by Stefan (CNC Kitchen), and the model used in the test is a remix of his [Extrusion Test Structure](https://www.printables.com/model/342075-extrusion-test-structure)._
- _ZV Input Shaping is inspired by [Marlin Input Shaping](https://marlinfw.org/docs/features/input_shaping.html) and [Ringing Tower 3D STL](https://marlinfw.org/assets/stl/ringing_tower.stl)._
- _ChatGPT_ ;)

View file

@ -13,12 +13,11 @@ This feature introduces the below options under the filament settings:
4. **Adaptive pressure advance measurements:** This field contains the calibration values used to generate the pressure advance profile for the nozzle/printer. Input sets of pressure advance (PA) values and the corresponding volumetric flow speeds and accelerations they were measured at, separated by a comma. Add one set of values per line. More information on how to calibrate the model follows in the sections below.
5. **Pressure advance:** The old field is still needed and is required to be populated with a PA value. A “good enough” median PA value should be entered here, as this will act as a fallback value when performing tool changes, printing a purge/wipe tower for multi-color prints as well as a fallback in case the model fails to identify an appropriate value (unlikely but its the ultimate backstop).
<img width="452" alt="Adaptive PA settings" src="https://github.com/user-attachments/assets/68c46885-54c7-4123-afa0-762d3995185f">
![apa-material-config](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/apa-material-config.png?raw=true)
## Pre-Requisites
This feature has been tested with Klipper-based printers. While it may work with Marlin or Bambu lab printers, it is currently untested with them. It shouldnt adversely affect the machine; however, the quality results from enabling it are not validated.
This feature has been tested with Klipper-based printers. While it may work with Marlin or Bambu lab printers, it is currently untested with them. It shouldnt adversely affect the machine; however, the quality results from enabling it are not validated.
**Older versions of Klipper used to stutter when pressure advance was changed while the toolhead was in motion. This has been fixed with the latest Klipper firmware releases. Therefore, make sure your Klipper installation is updated to the latest version before enabling this feature, in order to avoid any adverse quality impacts.**
@ -32,29 +31,28 @@ Following experimentation, it has been noticed that the optimal pressure advance
2. The larger the layer height (hence the higher the volumetric flow rate requested from the toolhead).
3. The higher the print acceleration is.
What this means is that we never get ideal PA values for each print feature, especially when they vary drastically in speed and acceleration. We can tune PA for a faster print speed (flow) but compromise on corner sharpness for slower speeds or tune PA for corner sharpness and deal with slight corner-perimeter separation in faster speeds. The same goes for accelerations as well as different layer heights.
What this means is that we never get ideal PA values for each print feature, especially when they vary drastically in speed and acceleration. We can tune PA for a faster print speed (flow) but compromise on corner sharpness for slower speeds or tune PA for corner sharpness and deal with slight corner-perimeter separation in faster speeds. The same goes for accelerations as well as different layer heights.
This compromise usually means that we settle for tuning an "in-between" PA value between slower external features and faster internal features so we don't get gaps, but also not get too much bulging in external perimeters.
This compromise usually means that we settle for tuning an "in-between" PA value between slower external features and faster internal features so we don't get gaps, but also not get too much bulging in external perimeters.
**However, what this also means is that if you are printing with a single layer height, single speed, and acceleration, there is no need to enable this feature.**
Adaptive pressure advance aims to address this limitation by implementing a completely different method of setting pressure advance. **Following a set of PA calibration tests done at different flow rates (speeds and layer heights) and accelerations, a pressure advance model is calculated by the slicer.** Then that model is used to emit the best fit PA for any arbitrary feature flow rate (speed) and acceleration used in the print process.
Adaptive pressure advance aims to address this limitation by implementing a completely different method of setting pressure advance. **Following a set of PA calibration tests done at different flow rates (speeds and layer heights) and accelerations, a pressure advance model is calculated by the slicer.** Then that model is used to emit the best fit PA for any arbitrary feature flow rate (speed) and acceleration used in the print process.
In addition, it means that you only need to tune this feature once and print across different layer heights with good PA performance.
In addition, it means that you only need to tune this feature once and print across different layer heights with good PA performance.
Finally, if during calibration you notice that there is little to no variance between the PA tests, this feature is redundant for you. **From experiments, high flow nozzles fitted on high-speed core XY printers appear to benefit the most from this feature as they print with a larger range of flow rates and at a larger range of accelerations.**
### Expected results:
With this feature enabled there should be absolutely no bulge in the corners, just the smooth rounding caused by the square corner velocity of your printer.
![337601149-cbd96b75-a49f-4dde-ab5a-9bbaf96eae9c](https://github.com/user-attachments/assets/01234996-0528-4462-90c6-43828a246e41)
![apa-expected-results](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/apa-expected-results.jpg?raw=true)
In addition, seams should appear smooth with no bulging or under extrusion.
![337601500-95e2350f-cffd-4af5-9c7a-e8f60870db7b](https://github.com/user-attachments/assets/46e16f2a-cf52-4862-ab06-12883b909615)
![apa-expected-seam](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/apa-expected-seam.jpg?raw=true)
Solid infill should have no gaps, pinholes, or separation from the perimeters.
![337616471-9d949a67-c8b3-477e-9f06-c429d4e40be0](https://github.com/user-attachments/assets/3b8ddbff-47e7-48b5-9576-3d9e7fb24a9d)
![apa-expected-solid-infill](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/apa-expected-solid-infill.jpg?raw=true)
Compared to with this feature disabled, where the internal solid infill and external-internal perimeters show signs of separation and under extrusion, when PA is tuned for optimal external perimeter performance as shown below.
![337621601-eacc816d-cff0-42e4-965d-fb5c00d34205](https://github.com/user-attachments/assets/82edfd96-d870-48fe-91c7-012e8c0d9ed0)
![apa-unexpected-solid-infill](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/apa-unexpected-solid-infill.jpg?raw=true)
## How to calibrate the adaptive pressure advance model
@ -65,9 +63,9 @@ Firstly, it is important to understand your printer speed and acceleration limit
1. **Upper acceleration range:** Do not attempt to calibrate adaptive PA for an acceleration that is larger than what the Klipper input shaper calibration tool recommends for your selected shaper. For example, if Klipper recommends an EI shaper with 4k maximum acceleration for your slowest axis (usually the Y axis), dont calibrate adaptive PA beyond that value. This is because after 4k the input shaper smoothing is magnified and the perimeter separations that appear like PA issues are caused by the input shaper smoothing the shape of the corner. Basically, youd be attempting to compensate for an input shaper artefact with PA.
2. **Upper print speed range:** The Ellis PA pattern test has been proven to be the most efficient and effective test to run to calibrate adaptive PA. It is fast and allows for a reasonably accurate and easy-to-read PA value. However, the size of the line segments is quite small, which means that for the faster print speeds and slower accelerations, the toolhead will not be able to reach the full flow rate that we are calibrating against. It is therefore generally not recommended to attempt calibration with a print speed of higher than ~200-250mm/sec and accelerations slower than 1k in the PA pattern test. If your lowest acceleration is higher than 1k, then proportionally higher maximum print speeds can be used.
**Remember:** With the calibration process, we aim to create a PA Flow Rate Acceleration profile for the toolhead. As we cannot directly control flow rate, we use print speed as a proxy (higher speed -> higher flow).
**Remember:** With the calibration process, we aim to create a PA Flow Rate Acceleration profile for the toolhead. As we cannot directly control flow rate, we use print speed as a proxy (higher speed -> higher flow).
With the above in mind, lets create a worked example to identify the optimal number of PA tests to calibrate the adaptive PA model.
With the above in mind, lets create a worked example to identify the optimal number of PA tests to calibrate the adaptive PA model.
**The below starting points are recommended for the majority of Core XY printers:**
@ -95,18 +93,19 @@ For this example, lets assume that the baseline number of tests is adequate f
We, therefore, need to run 12 PA tests as below:
**Speed Acceleration**
1. 50 1k
2. 100 1k
3. 150 1k
4. 200 1k
5. 50 2k
6. 100 2k
7. 150 2k
8. 200 2k
9. 50 4k
10. 100 4k
11. 150 4k
12. 200 4k
1. 50 1k
2. 100 1k
3. 150 1k
4. 200 1k
5. 50 2k
6. 100 2k
7. 150 2k
8. 200 2k
9. 50 4k
10. 100 4k
11. 150 4k
12. 200 4k
### Identifying the flow rates from the print speed
@ -114,91 +113,104 @@ We, therefore, need to run 12 PA tests as below:
Test parameters needed to build adaptive PA table are printed on the test sample:
<img width="452" alt="pa batch mode" src="https://github.com/user-attachments/assets/219c53b5-d53f-4360-963e-0985d9257bd7">
![apa-test](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/apa-test.png?raw=true)
Test sample above was done with acceleration 12000 mm/s² and flow rate 27.13 mm³/s
#### OrcaSlicer 2.1.0 and older.
As mentioned earlier, **the print speed is used as a proxy to vary the extrusion flow rate**. Once your PA test is set up, change the gcode preview to “flow” and move the horizontal slider over one of the herringbone patterns and take note of the flow rate for different speeds.
![337939815-e358b960-cf96-41b5-8c7e-addde927933f](https://github.com/user-attachments/assets/21290435-6f2a-4a21-bcf0-28cd6ae1912a)
![apa-test210](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/apa-test210.jpg?raw=true)
### Running the tests
#### General tips
It is recommended that the PA step is set to a small value, to allow you to make meaningful distinctions between the different tests **therefore a PA step value of 0.001 is recommended. **
It is recommended that the PA step is set to a small value, to allow you to make meaningful distinctions between the different tests **therefore a PA step value of 0.001 is recommended. **
**Set the end PA to a value high enough to start showing perimeter separation for the lowest flow (print speed) and acceleration test.** For example, for a Voron 350 using Revo HF, the maximum value was set to 0.05 as that was sufficient to show perimeter separation even at the slowest flow rates and accelerations.
**Set the end PA to a value high enough to start showing perimeter separation for the lowest flow (print speed) and acceleration test.** For example, for a Voron 350 using Revo HF, the maximum value was set to 0.05 as that was sufficient to show perimeter separation even at the slowest flow rates and accelerations.
**If the test is too big to fit on the build plate, increase your starting PA value or the PA step value accordingly until the test can fit.** If the lowest value becomes too high and there is no ideal PA present in the test, focus on increasing the PA step value to reduce the number of herringbones printed (hence the size of the print).
<img width="402" alt="PA calibration parameters" src="https://github.com/user-attachments/assets/b411dc30-5556-4e7c-8c40-5279d3074eae">
![pa-pattern-general](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/pa-pattern-general.png?raw=true)
#### OrcaSlicer 2.3.0 and newer
PA pattern calibration configuration window have been changed to simplify test setup. Now all is needed is to fill list of accelerations and speeds into relevant fields of the calibration window:
![PA pattern batch mode](./images/pa/pa-pattern-batch.png)
![pa-pattern-batch](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/pa-pattern-batch.png?raw=true?raw=true)
Test patterns generated for each acceleration-speed pair and all parameters are set accordingly. No additional actions needed from user side. Just slice and print all plates generated.
Refer to [Calibration Guide](./Calibration) for more details on batch mode calibration.
Refer to [Calibration Guide](Calibration) for more details on batch mode calibration.
#### OrcaSlicer 2.2.0 and older
Setup your PA test as usual from the calibration menu in Orca slicer. Once setup, your PA test should look like the below:
<img width="437" alt="PA calibration test 1" src="https://github.com/user-attachments/assets/1e6159fe-c3c5-4480-95a1-4383f1fae422">
<img width="437" alt="Pa calibration test 2" src="https://github.com/user-attachments/assets/c360bb18-a97a-4f37-b5a3-bb0c67cac2b6">
![apa-setup-result-speed](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/apa-setup-result-speed.png?raw=true)
Now input your identified print speeds and accelerations in the fields above and run the PA tests.
![alt text](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/apa-setup-result-acceleration-jerk.png?raw=true)
**IMPORTANT:** Make sure your acceleration values are all the same in all text boxes. Same for the print speed values and Jerk (XY) values. Make sure your Jerk value is set to the external perimeter jerk used in your print profiles.
Now input your identified print speeds and accelerations in the fields above and run the PA tests.
> [!IMPORTANT]
> Make sure your acceleration values are all the same in all text boxes. Same for the print speed values and Jerk (XY) values. Make sure your Jerk value is set to the external perimeter jerk used in your print profiles.
#### Test results processing
Now run the tests and note the optimal PA value, the flow, and the acceleration. You should produce a table like this:
<img width="452" alt="calibration table" src="https://github.com/user-attachments/assets/9451e8e4-352f-4cfc-b835-dffa4420d580">
| Speed | Flow | Acceleration | PA | Model values |
|-------|-------|--------------|-------|----------------------|
| 50 | 3.84 | 1000 | 0.036 | 0.036 , 3.84 , 1000 |
| 100 | 7.68 | 1000 | 0.036 | 0.036 , 7.68 , 1000 |
| 150 | 11.51 | 1000 | 0.036 | 0.036 , 11.51 , 1000 |
| 200 | 15.35 | 1000 | 0.036 | 0.036 , 15.35 , 1000 |
| | | | | |
| 50 | 3.84 | 2000 | 0.036 | 0.036 , 3.84 , 2000 |
| 100 | 7.68 | 2000 | 0.03 | 0.03 , 7.68 , 2000 |
| 150 | 11.51 | 2000 | 0.029 | 0.029 , 11.51 , 2000 |
| 200 | 15.35 | 2000 | 0.028 | 0.028 , 15.35 , 2000 |
| | | | | |
| 50 | 3.84 | 4000 | 0.032 | 0.032 , 3.84 , 4000 |
| 100 | 7.68 | 4000 | 0.028 | 0.028 , 7.68 , 4000 |
| 150 | 11.51 | 4000 | 0.026 | 0.026 , 11.51 , 4000 |
| 200 | 15.35 | 4000 | 0.024 | 0.024 , 15.35 , 4000 |
Concatenate the PA value, the flow value, and the acceleration value into the final comma-separated sets to create the values entered in the model as shown above.
Concatenate the PA value, the flow value, and the acceleration value into the final comma-separated sets to create the values entered in the model as shown above.
**Youre now done! The PA profile is created and calibrated!**
Remember to paste the values in the adaptive pressure advance measurements text box as shown below, and save your filament profile.
<img width="452" alt="pa profile" src="https://github.com/user-attachments/assets/e6e61d1b-e422-4a6a-88ff-f55e10f79900">
![apa-profile](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/apa-profile.png?raw=true)
### Tips
#### Model input:
The adaptive PA model built into the slicer is flexible enough to allow for as many or as few increments of flow and acceleration as you want. Ideally, you want at a minimum 3x data points for acceleration and flow in order to create a meaningful model.
The adaptive PA model built into the slicer is flexible enough to allow for as many or as few increments of flow and acceleration as you want. Ideally, you want at a minimum 3x data points for acceleration and flow in order to create a meaningful model.
However, if you dont want to calibrate for flow, just run the acceleration tests and leave flow the same for each test (in which case youll input only 3 rows in the model text box). In this case, flow will be ignored when the model is used.
However, if you dont want to calibrate for flow, just run the acceleration tests and leave flow the same for each test (in which case youll input only 3 rows in the model text box). In this case, flow will be ignored when the model is used.
Similarly for acceleration in the above example youll input only 4 rows in the model text box, in which case acceleration will be ignored when the model is used.
Similarly for acceleration in the above example youll input only 4 rows in the model text box, in which case acceleration will be ignored when the model is used.
**However, make sure a triplet of values is always provided PA value, Flow, Acceleration.**
#### Identifying the right PA:
Higher acceleration and higher flow rate PA tests are easier to identify the optimal PA as the range of “good” values is much narrower. Its evident where the PA is too large, as gaps start to appear in the corner and where PA is too low, as the corner starts bulging.
Higher acceleration and higher flow rate PA tests are easier to identify the optimal PA as the range of “good” values is much narrower. Its evident where the PA is too large, as gaps start to appear in the corner and where PA is too low, as the corner starts bulging.
However, the lower the flow rate and accelerations are, the range of good values is much wider. Having examined the PA tests even under a microscope, what is evident, is that if you cant distinguish a value as being evidently better than another (i.e. sharper corner with no gaps) with the naked eye, then both values are correct. In which case, if you cant find any meaningful difference, simply use the optimal values from the higher flow rates.
- **Too high PA**
- **Too high PA**
![apa-identify-too-high](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/apa-identify-too-high.jpg?raw=true)
![Too high PA](https://github.com/user-attachments/assets/ebc4e2d4-373e-42d5-af72-4d5bc81048ca)
- **Too low PA**
![apa-identify-too-low](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/apa-identify-too-low.jpg?raw=true)
- **Too low PA**
![Too low PA](https://github.com/user-attachments/assets/6a2b6f16-7d1c-46d0-91f3-def5ed560318)
- **Optimal PA**
![Optimal PA](https://github.com/user-attachments/assets/cd47cf2e-dd32-47b4-bbdd-1563de8849be)
- **Optimal PA**
![apa-identify-optimal](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/apa-identify-optimal.jpg?raw=true)

View file

@ -0,0 +1,60 @@
# Cornering
Cornering is a critical aspect of 3D printing that affects the quality and accuracy of prints. It refers to how the printer handles changes in direction during movement, particularly at corners and curves. Proper cornering settings can help reduce artifacts like ringing, ghosting, and overshooting, leading to cleaner and more precise prints.
## Jerk
WIP... TODO: Jerk calibration not implemented yet.
## Junction Deviation
Junction Deviation is the default method for controlling cornering speed in MarlinFW (Marlin2) printers.
Higher values result in more aggressive cornering speeds, while lower values produce smoother, more controlled cornering.
The default value in Marlin is typically set to 0.08mm, which may be too high for some printers, potentially causing ringing. Consider lowering this value to reduce ringing, but avoid setting it too low, as this could lead to excessively slow cornering speeds.
1. Pre-requisites:
1. Check if your printer has Junction Deviation enabled. You can do this by sending the command `M503` to your printer and looking for the line `Junction deviation: 0.25`.
2. In OrcaSlicer, set:
1. Acceleration high enough to trigger ringing (e.g., 2000 mm/s²).
2. Speed high enough to trigger ringing (e.g., 100 mm/s).
3. Use an opaque, high-gloss filament to make the ringing more visible.
2. You need to print the Junction Deviation test.
![jd_first_menu](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/JunctionDeviation/jd_first_menu.png?raw=true)
1. Measure the X and Y heights and read the frequency set at that point in Orca Slicer.
![jd_first_print_measure](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/JunctionDeviation/jd_first_print_measure.jpg?raw=true)
![jd_first_slicer_measure](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/JunctionDeviation/jd_first_slicer_measure.png?raw=true)
2. Its very likely that youll need to set values lower than 0.08 mm, as shown in the previous example. To determine a more accurate maximum JD value, you can print a new calibration tower with a maximum value set at the point where the corners start losing sharpness.
3. Print the second Junction Deviation test with the new maximum value.
![jd_second_menu](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/JunctionDeviation/jd_second_menu.png?raw=true)
4. Measure the X and Y heights and read the frequency set at that point in Orca Slicer.
![jd_second_print_measure](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/JunctionDeviation/jd_second_print_measure.jpg?raw=true)
![jd_second_slicer_measure](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/JunctionDeviation/jd_second_slicer_measure.png?raw=true)
3. Save the settings
1. Set your Maximun Junction Deviation value in [Printer settings/Motion ability/Jerk limitation].
2. Use the following G-code to set the mm:
```gcode
M205 J#JunctionDeviationValue
M500
```
Example
```gcode
M205 J0.012
M500
```
3. Recompile your MarlinFW
1. In Configuration.h uncomment and set:
```cpp
#define JUNCTION_DEVIATION_MM 0.012 // (mm) Distance from real junction edge
```
2. Check Classic Jerk is disabled (commented).
```cpp
//#define CLASSIC_JERK
```

View file

@ -0,0 +1,36 @@
# Flow rate
The Flow Ratio determines how much filament is extruded and plays a key role in achieving high-quality prints. A properly calibrated flow ratio ensures consistent layer adhesion and accurate dimensions. If the flow ratio is too low, under-extrusion may occur, leading to gaps, weak layers, and poor structural integrity. On the other hand, a flow ratio that is too high can cause over-extrusion, resulting in excess material, rough surfaces, and dimensional inaccuracies.
> [!WARNING]
> **Bambulab Printers:** make sure you do not select the 'Flow calibration' option.
> ![flow-rate-Bambulab-uncheck](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Flow-Rate/flowrate-Bambulab-uncheck.png?raw=true)
> [!IMPORTANT]
> PASS 1 and PASS 2 follow the older flow ratio formula `FlowRatio_old*(100 + modifier)/100`.
> YOLO (Recommended) and YOLO (perfectist version) use a new system that is very simple `FlowRatio_old±modifier`.
![flow-calibration](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Flow-Rate/flow-calibration.gif?raw=true)
Calibrating the flow rate involves a two-step process.
1. Select the printer, filament, and process you would like to use for the test.
2. Select `Pass 1` in the `Calibration` menu
3. A new project consisting of nine blocks will be created, each with a different flow rate modifier. Slice and print the project.
4. Examine the blocks and determine which one has the smoothest top surface.
![flowrate-pass1](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Flow-Rate/flowrate-pass1.jpg?raw=true)
![flowrate-0-5](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Flow-Rate/flowrate-0-5.jpg?raw=true)
5. Update the flow ratio in the filament settings using the following equation: `FlowRatio_old*(100 + modifier)/100`. If your previous flow ratio was `0.98` and you selected the block with a flow rate modifier of `+5`, the new value should be calculated as follows: `0.98x(100+5)/100 = 1.029`.** Remember** to save the filament profile.
6. Perform the `Pass 2` calibration. This process is similar to `Pass 1`, but a new project with ten blocks will be generated. The flow rate modifiers for this project will range from `-9 to 0`.
7. Repeat steps 4. and 5. In this case, if your previous flow ratio was 1.029 and you selected the block with a flow rate modifier of -6, the new value should be calculated as follows: `1.029x(100-6)/100 = 0.96726`. **Remember** to save the filament profile.
![flowrate-pass2](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Flow-Rate/flowrate-pass2.jpg?raw=true)
![flowrate-6](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Flow-Rate/flowrate-6.jpg?raw=true)
![flowcalibration_update_flowrate](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Flow-Rate/flowcalibration_update_flowrate.png?raw=true)
> [!TIP]
> @ItsDeidara has made a html to help with the calculation. Check it out if those equations give you a headache [here](https://github.com/ItsDeidara/Orca-Slicer-Assistant).

View file

@ -0,0 +1,129 @@
# Input Shaping
During high-speed movements, vibrations can cause a phenomenon called "ringing," where periodic ripples appear on the print surface. Input Shaping provides an effective solution by counteracting these vibrations, improving print quality and reducing wear on components without needing to significantly lower print speeds.
- [Klipper](#klipper)
- [Marlin](#marlin)
## Klipper
### Resonance Compensation
The Klipper Resonance Compensation is a set of Input Shaping modes that can be used to reduce ringing and improve print quality.
Ussualy the recommended values modes are `MZV` or `EI` for Delta printers.
1. Pre-requisites:
1. In OrcaSlicer, set:
1. Acceleration high enough to trigger ringing (e.g., 2000 mm/s²).
2. Speed high enough to trigger ringing (e.g., 100 mm/s).
> [!NOTE]
> These settings depend on your printer's motion ability and the filament's max volumetric speed. If you can't reach speeds that cause ringing, try increasing the filament's max volumetric speed (avoid materials below 10 mm³/s).
3. Jerk [Klipper Square Corner Velocity](https://www.klipper3d.org/Kinematics.html?h=square+corner+velocity#look-ahead) to 5 or a high value (e.g., 20).
2. In printer settigs:
1. Set the Shaper Type to `MZV` or `EI`.
```gcode
SET_INPUT_SHAPER SHAPER_TYPE=MZV
```
2. Disable [Minimun Cruise Ratio](https://www.klipper3d.org/Kinematics.html#minimum-cruise-ratio) with:
```gcode
SET_VELOCITY_LIMIT MINIMUM_CRUISE_RATIO=0
```
3. Use an opaque, high-gloss filament to make the ringing more visible.
2. Print the Input Shaping Frequency test with a range of frequencies.
![IS_freq_menu](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_freq_menu.png?raw=true)
1. Measure the X and Y heights and read the frequency set at that point in Orca Slicer.
![IS_damp_klipper_print_measure](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_damp_klipper_print_measure.jpg?raw=true)
![IS_freq_klipper_slicer_measure](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_freq_klipper_slicer_measure.png?raw=true)
2. If not a clear result, you can measure a X and Y min and max acceptable heights and repeat the test with that min and max value.
> [!WARNING]
> There is a chance you will need to set higher than 60Hz frequencies. Some printers with very rigid frames and excellent mechanics may exhibit frequencies exceeding 100Hz.
3. Print the Damping test setting your X and Y frequency to the value you found in the previous step.
![IS_damp_menu](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_damp_menu.png?raw=true)
1. Measure the X and Y heights and read the damping set at that point in Orca Slicer.
![IS_damp_klipper_print_measure](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_damp_klipper_print_measure.jpg?raw=true)
![IS_damp_klipper_slicer_measure](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_damp_klipper_slicer_measure.png?raw=true)
> [!IMPORTANT]
> Not all Resonance Compensation modes support damping.
4. Restore your 3D Printer settings to avoid keep using high acceleration and jerk values.
5. Save the settings
1. You need to go to the printer settings and set the X and Y frequency and damp to the value you found in the previous step.
## Marlin
### ZV Input Shaping
ZV Input Shaping introduces an anti-vibration signal into the stepper motion for the X and Y axes. It works by splitting the step count into two halves: the first at half the frequency and the second as an "echo," delayed by half the ringing interval. This simple approach effectively reduces vibrations, improving print quality and allowing for higher speeds.
1. Pre-requisites:
1. In OrcaSlicer, set:
1. Acceleration high enough to trigger ringing (e.g., 2000 mm/s²).
2. Speed high enough to trigger ringing (e.g., 100 mm/s).
> [!NOTE]
> These settings depend on your printer's motion ability and the filament's max volumetric speed. If you can't reach speeds that cause ringing, try increasing the filament's max volumetric speed (avoid materials below 10 mm³/s).
3. Jerk
1. If using [Classic Jerk](https://marlinfw.org/docs/configuration/configuration.html#jerk-) use a high value (e.g., 20).
2. If using [Junction Deviation](https://marlinfw.org/docs/features/junction_deviation.html) (new Marlin default mode) this test will use 0.25 (high enough to most printers).
2. Use an opaque, high-gloss filament to make the ringing more visible.
2. Print the Input Shaping Frequency test with a range of frequencies.
![IS_freq_menu](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_freq_menu.png?raw=true)
1. Measure the X and Y heights and read the frequency set at that point in Orca Slicer.
![IS_freq_marlin_print_measure](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_freq_marlin_print_measure.jpg?raw=true)
![IS_freq_marlin_slicer_measure](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_freq_marlin_slicer_measure.png?raw=true)
2. If not a clear result, you can measure a X and Y min and max acceptable heights and repeat the test with that min and max value.
> [!WARNING]
> There is a chance you will need to set higher than 60Hz frequencies. Some printers with very rigid frames and excellent mechanics may exhibit frequencies exceeding 100Hz.
3. Print the Damping test setting your X and Y frequency to the value you found in the previous step.
![IS_damp_menu](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_damp_menu.png?raw=true)
1. Measure the X and Y heights and read the damping set at that point in Orca Slicer.
![IS_damp_marlin_print_measure](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_damp_marlin_print_measure.jpg?raw=true)
![IS_damp_marlin_slicer_measure](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_damp_marlin_slicer_measure.png?raw=true)
4. Restore your 3D Printer settings to avoid keep using high acceleration and jerk values.
1. Reboot your printer.
2. Use the following G-code to restore your printer settings:
```gcode
M501
```
5. Save the settings
1. You need to go to the printer settings and set the X and Y frequency and damp to the value you found in the previous step.
2. Use the following G-code to set the frequency:
```gcode
M593 X F#Xfrequency D#XDamping
M593 Y F#Yfrequency D#YDamping
M500
```
Example
```gcode
M593 X F37.25 D0.16
M593 Y F37.5 D0.06
M500
```
### Fixed-Time Motion
WIP...
This calibration test is currently under development. See the [Marlin documentation](https://marlinfw.org/docs/gcode/M493.html) for more information.

View file

@ -0,0 +1,78 @@
# Pressure Advance
Pressure Advance is a feature that compensates for the lag in filament pressure within the nozzle during acceleration and deceleration. It helps improve print quality by reducing issues like blobs, oozing, and inconsistent extrusion, especially at corners or during fast movements.
Orca Slicer includes three approaches for calibrating the pressure advance value. Each method has its own advantages and disadvantages. It is important to note that each method has two versions: one for a direct drive extruder and one for a Bowden extruder. Make sure to select the appropriate version for your test.
> [!NOTE]
> [Adaptive Pressure Advance Guide](adaptive-pressure-advance-calib)
> [!WARNING]
> **Marlin Printers:** Linear advance must be enabled in firmware (M900).
> **Not all printers have it enabled by default.**
> [!WARNING]
> **Bambulab Printers:** make sure you do not select the 'Flow calibration' option.
> ![flow-rate-Bambulab-uncheck](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Flow-Rate/flowrate-Bambulab-uncheck.png?raw=true)
## Line method
The line method is quick and straightforward to test. However, its accuracy highly depends on your first layer quality. It is suggested to turn on the bed mesh leveling for this test.
Steps:
1. Select the printer, filament, and process you would like to use for the test.
2. Print the project and check the result. You can select the value of the most even line and update your PA value in the filament settings.
3. In this test, a PA value of `0.016` appears to be optimal.
![pa-line](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/pa-line.gif?raw=true)
![pa-lines](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/pa-lines.png?raw=true)
![pa-line-0-016](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/pa-line-0-016.jpg?raw=true)
![pressure_advance_enable](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/pressure_advance_enable.png?raw=true)
## Pattern method
The pattern method is adapted from [Andrew Ellis' pattern method generator](https://ellis3dp.com/Pressure_Linear_Advance_Tool/), which was itself derived from the [Marlin pattern method](https://marlinfw.org/tools/lin_advance/k-factor.html) developed by [Sineos](https://github.com/Sineos/k-factorjs).
[Instructions for using and reading the pattern method](https://ellis3dp.com/Print-Tuning-Guide/articles/pressure_linear_advance/pattern_method.html) are provided in [Ellis' Print Tuning Guide](https://ellis3dp.com/Print-Tuning-Guide/), with only a few Orca Slicer differences to note.
Test configuration window allow user to generate one or more tests in a single projects. Multiple tests will be placed on each plate with extra plates added if needed.
1. Single test \
![PA pattern single test](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/pa-pattern-single.png?raw=true)
2. Batch mode testing (multiple tests on a sinle plate) \
![PA pattern batch mode](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/pa-pattern-batch.png?raw=true)
Once test generated, one or more small rectangular prisms could be found on the plate, one for each test case. This object serves a few purposes:
1. The test pattern itself is added in as custom G-Code at each layer, same as you could do by hand actually. The rectangular prism gives us the layers in which to insert that G-Code. This also means that **you'll see the full test pattern when you move to the Preview pane:**
![PA pattern batch mode plater](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/pa-pattern-batch-plater.png?raw=true)
1. The prism acts as a handle, enabling you to move the test pattern wherever you'd like on the plate by moving the prism
2. Each test object is pre-configured with target parameters which are reflected in the objects name. However, test parameters may be adjusted for each prism individually by referring to the object list pane:
![PA pattern batch mode object list](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/pa-pattern-batch-objects.png?raw=true)
Next, Ellis' generator provided the ability to adjust specific printer, filament, and print profile settings. You can make these same changes in Orca Slicer by adjusting the settings in the Prepare pane as you would with any other print. When you initiate the calibration test, Ellis' default settings are applied. A few things to note about these settings:
1. Ellis specified line widths as a percent of filament diameter. The Orca pattern method does the same to provide its suggested defaults, making use of Ellis' percentages in combination with your specified nozzle diameter
2. In terms of line width, the pattern only makes use of the `Default` and `First layer` widths
3. In terms of speed, the pattern only uses the `First layer speed -> First layer` and `Other layers speed -> Outer wall` speeds
4. The infill pattern beneath the numbers cannot be changed becuase it's not actually an infill pattern pulled from the settings. All of the pattern G-Code is custom written, so that "infill" is, effectively, hand-drawn and so not processed through the usual channels that would enable Orca to recognize it as infill
## Tower method
The tower method may take a bit more time to complete, but it does not rely on the quality of the first layer.
The PA value for this test will be increased by 0.002 for every 1 mm increase in height. (**NOTE** 0.02 for Bowden)
1. Select the printer, filament, and process you would like to use for the test.
2. Examine each corner of the print and mark the height that yields the best overall result.
3. I selected a height of 8 mm for this case, so the pressure advance value should be calculated as `PressureAdvanceStart+(PressureAdvanceStep x measured)` example: `0+(0.002 x 8) = 0.016`.
![pa-tower](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/pa-tower.jpg?raw=true)
![pa-tower-measure](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/pa/pa-tower-measure.jpg?raw=true)
> [!TIP]
> @ItsDeidara has made a html to help with the calculation. Check it out if those equations give you a headache [here](https://github.com/ItsDeidara/Orca-Slicer-Assistant).

View file

@ -0,0 +1,20 @@
# Retraction test
Retraction is the process of pulling the filament back into the nozzle to prevent oozing and stringing during non-print moves. If the retraction length is too short, it may not effectively prevent oozing, while if it's too long, it can lead to clogs or under-extrusion. Filaments like PETG and TPU are more prone to stringing, so they may require longer retraction lengths compared to PLA or ABS.
This test generates a retraction tower automatically. The retraction tower is a vertical structure with multiple notches, each printed at a different retraction length. After the print is complete, we can examine each section of the tower to determine the optimal retraction length for the filament. The optimal retraction length is the shortest one that produces the cleanest tower.
![retraction_test](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/retraction/retraction_test.gif?raw=true)
![retraction_test_menu](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/retraction/retraction_test_menu.png?raw=true)
In the dialog, you can select the start and end retraction length, as well as the retraction length increment step. The default values are 0mm for the start retraction length, 2mm for the end retraction length, and 0.1mm for the step. These values are suitable for most direct drive extruders. However, for Bowden extruders, you may want to increase the start and end retraction lengths to 1mm and 6mm, respectively, and set the step to 0.2mm.
![retraction_test_print](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/retraction/retraction_test_print.jpg?raw=true)
> [!NOTE]
> When testing filaments such as PLA or ABS that have minimal oozing, the retraction settings can be highly effective. You may find that the retraction tower appears clean right from the start. In such situations, setting the retraction length to 0.2mm - 0.4mm using Orca Slicer should suffice.
> On the other hand, if there is still a lot of stringing at the top of the tower, it is recommended to dry your filament and ensure that your nozzle is properly installed without any leaks.
> [!TIP]
> @ItsDeidara has made a html to help with the calculation. Check it out if those equations give you a headache [here](https://github.com/ItsDeidara/Orca-Slicer-Assistant).

View file

@ -0,0 +1,31 @@
# Temp Calibration
In FDM 3D printing, the temperature is a critical factor that affects the quality of the print.
There is no other calibration that can have such a big impact on the print quality as temperature calibration.
## Nozzle Temp tower
Nozzle temperature is one of the most important settings to calibrate for a successful print. The temperature of the nozzle affects the viscosity of the filament, which in turn affects how well it flows through the nozzle and adheres to the print bed. If the temperature is too low, the filament may not flow properly, leading to under-extrusion, poor layer adhesion and stringing. If the temperature is too high, the filament may degrade, over-extrude and produce stringing.
![temp-tower_test](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Temp-calib/temp-tower_test.gif?raw=true)
![temp-tower_test_menu](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Temp-calib/temp-tower_test_menu.png?raw=true)
Temp tower is a straightforward test. The temp tower is a vertical tower with multiple blocks, each printed at a different temperature. Once the print is complete, we can examine each block of the tower and determine the optimal temperature for the filament. The optimal temperature is the one that produces the highest quality print with the least amount of issues, such as stringing, layer adhesion, warping (overhang), and bridging.
![temp-tower](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Temp-calib/temp-tower.jpg?raw=true)
## Bed temperature
Bed temperature is another important setting to calibrate for a successful print. The bed temperature affects the adhesion of the filament to the print bed, which in turn affects the overall quality of the print. If the bed temperature is too low, the filament may not adhere properly to the print bed, leading to warping and poor layer adhesion. If the bed temperature is too high, the filament may become too soft and lose its shape, leading to over-extrusion and poor layer adhesion.
This setting doesn't have a specific test, but it is recommended to start with the recommended bed temperature for the filament and adjust it based on the filament manufacturer's recommendations.
## Chamber temperature
Chamber temperature can affect the print quality, especially for high-temperature filaments. A heated chamber can help to maintain a consistent temperature throughout the print, reducing the risk of warping and improving layer adhesion. However, it is important to monitor the chamber temperature to ensure that it does not exceed the recommended temperature for the filament being used.
See: [Chamber temperature printer settings](Chamber-temperature)
> [!NOTE]
> Low temperature Filaments like PLA can clog the nozzle if the chamber temperature is too high.

View file

@ -0,0 +1,31 @@
# Filament Tolerance Calibration
Each filament and printer combination can result in different tolerances. This means that even using the same filament and print profile, tolerances may vary from one printer to another.
To correct for these variations, Orca Slicer provides:
- Filament Compensation:
- Shrinkage (XY)
![Shrinkage](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Tolerance/FilamentShrinkageCompensation.png?raw=true)
- Process Compensation:
- X-Y hole compensation
- X-Y contour compensation
- Precise wall
- Precise Z height
![Process_Compensation](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Tolerance/QualityPrecision.png?raw=true)
## Orca Tolerance Test
This calibration test is designed to evaluate the dimensional accuracy of your printer and filament. The model consists of a base with six hexagonal holes, each with a different tolerance: 0.0 mm, 0.05 mm, 0.1 mm, 0.2 mm, 0.3 mm, and 0.4 mm, as well as a hexagon-shaped tester.
![tolerance_hole](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Tolerance/tolerance_hole.svg?raw=true)
You can check the tolerance using either an M6 Allen key or the included printed hexagon tester.
Use calipers to measure both the holes and the inner tester. Based on your results, you can fine-tune the X-Y hole compensation and X-Y contour compensation settings. Repeat the process until you achieve the desired precision.
![OrcaToleranceTes_m6](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Tolerance/OrcaToleranceTes_m6.jpg?raw=true)
![OrcaToleranceTest_print](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/Tolerance/OrcaToleranceTest_print.jpg?raw=true)

View file

@ -0,0 +1,23 @@
# Max Volumetric speed
This is a test designed to calibrate the maximum volumetric speed of the specific filament. The generic or 3rd party filament types may not have the correct volumetric flow rate set in the filament. This test will help you to find the maximum volumetric speed of the filament.
You will be promted to enter the settings for the test: start volumetric speed, end volumentric speed, and step. It is recommended to use the default values (5mm³/s start, 20mm³/s end, with a step of 0.5), unless you already have an idea of the lower or upper limit for your filament. Select "OK", slice the plate, and send it to the printer.
Once printed, take note of where the layers begin to fail and where the quality begins to suffer. Pay attention to changes from matte to shiny as well.
![vmf_measurement_point](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images//vmf_measurement_point.jpg?raw=true)
Using calipers or a ruler, measure the height of the print at that point. Use the following calculation to determine the correct max flow value: `start + (height-measured * step)` . For example in the photo below, and using the default setting values, the print quality began to suffer at 19mm measured, so the calculation would be: `5 + (19 * 0.5)` , or `13mm³/s` using the default values. Enter your number into the "Max volumetric speed" value in the filament settings.
![caliper_sample_mvf](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images//caliper_sample_mvf.jpg?raw=true)
You can also return to OrcaSlicer in the "Preview" tab, make sure the color scheme "flow" is selected. Scroll down to the layer height that you measured, and click on the toolhead slider. This will indicate the max flow level for your filmanet.
![image](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/max_volumetric_flow.jpg?raw=true)
> [!NOTE]
> You may also choose to conservatively reduce the flow by 5-10% to ensure print quality.
> [!TIP]
> @ItsDeidara has made a html to help with the calculation. Check it out if those equations give you a headache [here](https://github.com/ItsDeidara/Orca-Slicer-Assistant).

View file

@ -1,7 +0,0 @@
# For Developers
This is a documentation from someone exploring the code and is by no means complete or even completely accurate. Please edit the parts you might find inaccurate. This is probably going to be helpful nonetheless.
- [Preset, PresetBundle and PresetCollection](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/developer-reference/Preset-and-bundle.md)
- [Plater, Sidebar, Tab, ComboBox](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/developer-reference/plater-sidebar-tab-combobox.md)
- [Slicing Call Hierarchy](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/developer-reference/slicing-hierarchy.md)

View file

@ -0,0 +1,207 @@
# How to Build
## Windows 64-bit
This guide is for building your Visual Studio 2022 solution for OrcaSlicer on Windows 64-bit.
### Tools Required
- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) or Visual Studio 2019
```shell
winget install --id=Microsoft.VisualStudio.2022.Professional -e
```
- [CMake (version 3.31)](https://cmake.org/) — **⚠️ version 3.31.x is mandatory**
```shell
winget install --id=Kitware.CMake -v "3.31.6" -e
```
- [Strawberry Perl](https://strawberryperl.com/)
```shell
winget install --id=StrawberryPerl.StrawberryPerl -e
```
- [Git](https://git-scm.com/)
```shell
winget install --id=Git.Git -e
```
- [git-lfs](https://git-lfs.com/)
```shell
winget install --id=GitHub.GitLFS -e
```
> [!TIP]
> GitHub Desktop (optional): A GUI for Git and Git LFS, which already includes both tools.
> ```shell
> winget install --id=GitHub.GitHubDesktop -e
> ```
### Instructions
1. Clone the repository:
- If using GitHub Desktop clone the repository from the GUI.
- If using the command line:
1. Clone the repository:
```shell
git clone https://github.com/SoftFever/OrcaSlicer
```
2. Run lfs to download tools on Windows:
```shell
git lfs pull
```
2. Open the appropriate command prompt:
- For Visual Studio 2019:
Open **x64 Native Tools Command Prompt for VS 2019** and run:
```shell
build_release.bat
```
- For Visual Studio 2022:
Open **x64 Native Tools Command Prompt for VS 2022** and run:
```shell
build_release_vs2022.bat
```
> [!NOTE]
> If you encounter issues, you can try to uninstall ZLIB from your Vcpkg library.
3. If successful, you will find the VS 2022 solution file in:
```shell
build\OrcaSlicer.sln
```
> [!IMPORTANT]
> Make sure that CMake version 3.31.x is actually being used. Run `cmake --version` and verify it returns a **3.31.x** version.
> If you see an older version (e.g. 3.29), it's likely due to another copy in your system's PATH (e.g. from Strawberry Perl).
> You can run where cmake to check the active paths and rearrange your **System Environment Variables** > PATH, ensuring the correct CMake (e.g. C:\Program Files\CMake\bin) appears before others like C:\Strawberry\c\bin.
> [!NOTE]
> If the build fails, try deleting the `build/` and `deps/build/` directories to clear any cached build data. Rebuilding after a clean-up is usually sufficient to resolve most issues.
## macOS 64-bit
### Tools Required
- Xcode
- CMake (version 3.31.x is mandatory)
- Git
- gettext
- libtool
- automake
- autoconf
- texinfo
> [!TIP]
> You can install most of them by running:
> ```shell
> brew install gettext libtool automake autoconf texinfo
> ```
Homebrew currently only offers the latest version of CMake (e.g. **4.X**), which is not compatible. To install the required version **3.31.X**, follow these steps:
1. Download CMake **3.31.7** from: [https://cmake.org/download/](https://cmake.org/download/)
2. Install the application (drag it to `/Applications`).
3. Add the following line to your shell configuration file (`~/.zshrc` or `~/.bash_profile`):
```sh
export PATH="/Applications/CMake.app/Contents/bin:$PATH"
```
4. Restart the terminal and check the version:
```sh
cmake --version
```
5. Make sure it reports a **3.31.x** version.
> [!IMPORTANT]
> If you've recently upgraded Xcode, be sure to open Xcode at least once and install the required macOS build support.
### Instructions
1. Clone the repository:
```shell
git clone https://github.com/SoftFever/OrcaSlicer
cd OrcaSlicer
```
2. Build the application:
```shell
./build_release_macos.sh
```
3. Open the application:
```shell
open build/arm64/OrcaSlicer/OrcaSlicer.app
```
### Debugging in Xcode
To build and debug directly in Xcode:
1. Open the Xcode project:
```shell
open build/arm64/OrcaSlicer.xcodeproj
```
2. In the menu bar:
- **Product > Scheme > OrcaSlicer**
- **Product > Scheme > Edit Scheme...**
- Under **Run > Info**, set **Build Configuration** to `RelWithDebInfo`
- Under **Run > Options**, uncheck **Allow debugging when browsing versions**
- **Product > Run**
## Linux
### Using Docker (Recommended)
#### Dependencies
- Docker
- Git
#### Instructions
```shell
git clone https://github.com/SoftFever/OrcaSlicer && cd OrcaSlicer && ./DockerBuild.sh && ./DockerRun.sh
```
### Troubleshooting
The `DockerRun.sh` script includes several commented-out options that can help resolve common issues. Here's a breakdown of what they do:
- `xhost +local:docker`: If you encounter an "Authorization required, but no authorization protocol specified" error, run this command in your terminal before executing DockerRun.sh. This grants Docker containers permission to interact with your X display server.
- `-h $HOSTNAME`: Forces the container's hostname to match your workstation's hostname. This can be useful in certain network configurations.
- `-v /tmp/.X11-unix:/tmp/.X11-unix`: Helps resolve problems with the X display by mounting the X11 Unix socket into the container.
- `--net=host`: Uses the host's network stack, which is beneficial for printer Wi-Fi connectivity and D-Bus communication.
- `--ipc host`: Addresses potential permission issues with X installations that prevent communication with shared memory sockets.
- `-u $USER`: Runs the container as your workstation's username, helping to maintain consistent file permissions.
- `-v $HOME`:/home/$USER: Mounts your home directory into the container, allowing you to easily load and save files.
- `-e DISPLAY=$DISPLAY`: Passes your X display number to the container, enabling the graphical interface.
- `--privileged=true`: Grants the container elevated privileges, which may be necessary for libGL and D-Bus functionalities.
- `-ti`: Attaches a TTY to the container, enabling command-line interaction with OrcaSlicer.
- `--rm`: Automatically removes the container once it exits, keeping your system clean.
- `orcaslicer $*`: Passes any additional parameters from the `DockerRun.sh` script directly to the OrcaSlicer executable within the container.
By uncommenting and using these options as needed, you can often resolve issues related to display authorization, networking, and file permissions.
## Ubuntu
### Dependencies
All required dependencies will be installed automatically by the provided shell script, including:
- libmspack-dev
- libgstreamerd-3-dev
- libsecret-1-dev
- libwebkit2gtk-4.0-dev
- libssl-dev
- libcurl4-openssl-dev
- eglexternalplatform-dev
- libudev-dev
- libdbus-1-dev
- extra-cmake-modules
- libgtk2.0-dev
- libglew-dev
- cmake
- git
- texinfo
### Instructions
```shell
`./build_linux.sh -u` # install dependencies
`./build_linux.sh -disr` # build OrcaSlicer
```

View file

@ -0,0 +1,420 @@
# Guide: Develop Profiles for OrcaSlicer
## Introduction
This guide will help you develop profiles for OrcaSlicer.
## High-level Overview
OrcaSlicer uses JSON files to store profiles. There are four types of profiles:
1. Printer model (type `machine_model`). Example: `Orca 3D Fuse1.json`
2. Printer variant (type `machine`). Example: `Orca 3D Fuse1 0.2 nozzle.json`
3. Filament (type `filament`). Example: `Generic PLA @Orca 3D Fuse1@.json`
4. Process (type `process`). Example: `0.10mm Standard @Orca 3D Fuse1 0.2.json`
Additionally, there is an overall meta file for each vendor (`Orca 3D.json`).
For easier understanding, let's consider a scenario with a printer manufacturer called `Orca 3D`. The manufacturer offers one printer model called `Fuse 1`, which supports 0.2/0.4/0.6/0.8mm nozzles and common market filaments.
In this case:
- Vendor profile: `Orca 3D`
- Printer profile: `Orca 3D Fuse1`
- Printer variant profile: `Orca 3D Fuse1 0.4 nozzle`
- Filament profile: `Generic PLA @Orca 3D Fuse1@`
- Process profile: `0.20mm Standard @Orca 3D Fuse1 0.4`
The profile name should be same as the filename without the `.json` extension in principal.
Naming conventions:
1. Vendor profile: `vendor_name.json`
2. Printer profile: `vendor_name` + `printer_name` + `.json`
3. Printer variant profile: `vendor_name` + `printer_variant_name` + `.json` (where `printer_variant_name` typically includes `printer_name` + `nozzle_diameter`)
4. Filament profile: `filament_vendor_name` + `filament_name` + " @" + `vendor_name` + `printer_name`/`printer_variant_name` + `.json`
5. Process profile: `layer_height` + `preset_name` + " @" + `vendor_name` + `printer_name`/`printer_variant_name` + `.json` (`preset_name` typically includes "standard," "fine," "fast," "draft," etc.)
## File Structure and Templates
Profiles should be structured in the following way under the OrcaSlicer installation directory:
```plaintext
resources\profiles\
├── Orca 3D.json
└── Orca 3D\
├── machine\
│ ├── Orca 3D Fuse1.json
│ ├── Orca 3D Fuse1 0.2 nozzle.json
│ └── Orca 3D Fuse1 0.4 nozzle.json
├── process\
│ ├── 0.10mm Standard @Orca 3D Fuse1 0.2.json
│ └── 0.20mm Standard @Orca 3D Fuse1 0.4.json
└── filament\
└── Generic PLA @Orca 3D Fuse1@.json
```
> [!TIP]
> Use short vendor names in filenames to avoid excessive length.
> [!NOTE]
> Filament profiles are **optional**. Create them only if the vendor has specifically tuned profiles for the given printer. See [Filament profiles](#filament-profiles) for details.
Template files for profiles are available in:
```shell
OrcaSlicer\resources\profiles_template\Template
```
These templates can be used as a starting point for new printer, filament, and process profiles.
## Filament Profiles
OrcaSlicer features a global filament library called `OrcaFilamentLibrary`, which is automatically available for all printers. It includes generic filaments like `Generic PLA @System` and `Generic ABS @System` etc.
Printer vendors can override specific filaments in the global library for certain printer models by creating new filament profiles.
Relationship diagram:
```mermaid
graph TD;
OrcaFilamentLibrary-->Orca_3D_filament;
OrcaFilamentLibrary-->Vendor_A_filament;
OrcaFilamentLibrary-->Vendor_B_filament;
```
> [!IMPORTANT]
> Create new filament profiles only if you have truly specifically tuned the filament for the given printer. Otherwise, use the global library. The global library has a better chance to receive optimizations and updates from OrcaSlicer contributors, which will benefit users of all printers.
### Adding Filament Profiles to the Global Library
In this section, we will discuss how to add a new filament profile into the global library.
If you want to add a new generic profile into the global library, you need to create a new file in the `resources\profiles\OrcaFilamentLibrary\filament` folder. If a base type already exists in the global library, you can use this file as a base profile by inheriting it.
The following sample JSON file shows how to create a new generic filament profile `Generic PLA-GF @System` in the global library.
1. The first step is to create a new file in the `resources\profiles\OrcaFilamentLibrary\filament` folder. The file name should be `Generic PLA-GF @System.json`. Please note that we leave the `compatible_printers` field empty so that it is available for all printers.
```json
{
"type": "filament",
"filament_id": "GFL99",
"setting_id": "GFSA05",
"name": "Generic PLA-GF @System",
"from": "system",
"instantiation": "true",
"inherits": "fdm_filament_pla",
"filament_type": ["PLA-GF"],
"filament_flow_ratio": [
"0.96"
],
"compatible_printers": []
}
```
2. Register the profile in `resources\profiles\OrcaFilamentLibrary.json`:
```json
{
"name": "OrcaFilamentLibrary",
"version": "02.02.00.04",
"force_update": "0",
"description": "Orca Filament Library",
"filament_list": [
// ...
{
"name": "Generic PLA-GF @System",
"sub_path": "filament/Generic PLA-GF @System.json"
}
]
}
```
3. The last step is to validate the newly added filament profiles see [Validate Profiles](#validate-profiles).
> [!NOTE]
> If the filament is compatible with AMS, ensure that the `filament_id` value **does not exceed 8 characters** to maintain AMS compatibility.
### Adding Filament Profiles to Printer Vendor Library
In this section, we will discuss how to add a new filament profile for a certain vendor.
If you want to add a new filament profile, whether it's a brand new profile or a specialized version of a global filament profile for a given printer, you need to create a new file in the `resources\profiles\vendor_name\filament` folder. If a base type already exists in the global library, you can use this file as a base profile by inheriting it.
Below is a sample JSON file showing how to create a specialized `Generic ABS` filament profile for the ToolChanger printer.
Please note that here we must leave the compatible_printers field non-empty, unlike in the global library.
```json
{
"type": "filament",
"setting_id": "GFB99_MTC_0",
"name": "Generic ABS @MyToolChanger",
"from": "system",
"instantiation": "true",
"inherits": "Generic ABS @System",
"filament_cooling_final_speed": [
"3.5"
],
"filament_cooling_initial_speed": [
"10"
],
"filament_cooling_moves": [
"2"
],
"filament_load_time": [
"10.5"
],
"filament_loading_speed": [
"10"
],
"filament_loading_speed_start": [
"50"
],
"filament_multitool_ramming": [
"1"
],
"filament_multitool_ramming_flow": [
"40"
],
"filament_stamping_distance": [
"45"
],
"filament_stamping_loading_speed": [
"29"
],
"filament_unload_time": [
"8.5"
],
"filament_unloading_speed": [
"100"
],
"compatible_printers": [
"MyToolChanger 0.4 nozzle",
"MyToolChanger 0.2 nozzle",
"MyToolChanger 0.6 nozzle",
"MyToolChanger 0.8 nozzle"
]
}
```
> [!NOTE]
> If the filament is compatible with AMS, ensure that the `filament_id` value **does not exceed 8 characters** to maintain AMS compatibility.
## Process Profiles
Process profiles define print quality and behavior. They follow a structure similar to filament profiles:
- A common base file, e.g., `fdm_process_common.json`, acts as the parent.
- Vendor-specific process profiles should inherit from the base using the `inherits` field.
- Profiles are stored under:
```shell
resources\profiles\vendor_name\process\
```
- **There are no global process profiles**.
- Each process profile includes a `"compatible_printers"` field with an array of compatible printer variant names.
Example:
```json
{
"type": "process",
"name": "0.10mm Standard @ExampleVendor Printer 0.2",
"inherits": "fdm_process_common",
"from": "system",
"instantiation": "true",
"compatible_printers": [
"ExampleVendor Printer 0.2 nozzle"
]
}
```
## Printer Model Profiles
- Printer model profiles (type `machine_model`) describe the general printer information.
- Example fields: `nozzle_diameter`, `bed_model`, `bed_texture`, `model_id`, etc.
- Stored in:
```shell
resources\profiles\vendor_name\machine\
```
- Each vendor's folder may contain an image named:
```shell
[machine_model_list.name]_cover.png
```
This image will be used in the UI.
Example model profile:
```json
{
"type": "machine_model",
"name": "Example M5",
"nozzle_diameter": "0.2;0.25;0.4;0.6",
"bed_model": "M5-Example-bed.stl",
"bed_texture": "M5-Example-texture.svg",
"model_id": "V1234",
"family": "Example",
"machine_tech": "FFF",
"default_materials": "Example Generic PLA;Example Generic PETG"
}
```
## Printer Variant Profiles
- Printer variants (type `machine`) define specific nozzle configurations and mechanical details.
- Each variant must inherit from a common base like `fdm_machine_common.json`.
- Must list the compatible nozzle diameter in the `nozzle_diameter` array.
- Example fields include `printer_model`, `printer_variant`, `default_print_profile`, `printable_area`, etc.
Example variant profile:
```json
{
"type": "machine",
"name": "Example M5 0.2 nozzle",
"inherits": "fdm_machine_common",
"from": "system",
"setting_id": "GM001",
"instantiation": "true",
"nozzle_diameter": ["0.2"],
"printer_model": "Example M5",
"printer_variant": "0.2",
"default_filament_profile": ["Example Generic PLA"],
"default_print_profile": "0.10mm Standard 0.2mm nozzle @Example",
"printable_area": ["0x0", "235x0", "235x235", "0x235"],
"nozzle_type": "brass"
}
```
## Models
- The `model` directory under the vendor folder is intended to behave similarly to `machine` profiles.
- Used for additional printer-related 3D models or definitions, stored at:
```
resources\profiles\vendor_name\model\
```
## Vendor Meta File
Each vendor must include a JSON file in the `resources\profiles` directory, named `vendor_name.json`. This file lists all available models, variants, processes, and filaments:
Example:
```json
{
"name": "ExampleVendor",
"version": "01.00.00.00",
"force_update": "1",
"description": "Example configuration",
"machine_model_list": [
{
"name": "Example M5",
"sub_path": "machine/Example M5.json"
}
],
"machine_list": [
{
"name": "fdm_machine_common",
"sub_path": "machine/fdm_machine_common.json"
}
],
"process_list": [
{
"name": "fdm_process_common",
"sub_path": "process/fdm_process_common.json"
}
],
"filament_list": [
{
"name": "fdm_filament_common",
"sub_path": "filament/fdm_filament_common.json"
}
]
}
```
## Validate Profiles
You can validate your profiles using both the **OrcaSlicer profile validator** and the **Python validation script**. These tools are designed to check different aspects of the profiles, so both should be executed and pass without errors to ensure full compatibility.
> [!NOTE]
> **✅ Recommendation:** Always run **both** the OrcaSlicer validator and the Python script to ensure all aspects of the profiles are valid.
### 1. OrcaSlicer Profile Validator
You can run OrcaSlicer to verify if the filament you just added is available and usable. You can also use the [Orca profile validator](https://github.com/SoftFever/Orca_tools/releases/tag/1) tool to help debug any errors.
> [!IMPORTANT]
> You need to delete the `%appdata%/OrcaSlicer/system` folder to force OrcaSlicer to reload your lastest changes.
The process is the same if you want to add a new brand filament profile into the global library. You need to create a new file in the `resources\profiles\OrcaFilamentLibrary\filament\brand_name` folder. The only difference is that you should put the file into the brand's own subfolder.
#### Usage
```shell
-h [ --help ] help
-p [ --path ] arg profile folder
-v [ --vendor ] arg Vendor name. Optional, all profiles present in the folder will be validated if not specified
-l [ --log_level ] arg (=2) Log level. Optional, default is 2 (warning). Higher values produce more detailed logs.
```
#### Example
```shell
./OrcaSlicer_profile_validator -p ~/codes/OrcaSlicer/resources/profiles -l 2 -v Custom
```
#### Sample result with errors
```shell
PS D:\codes\OrcaSlicer> ."D:/codes/OrcaSlicer/build/src/Release/OrcaSlicer_profile_validator.exe" --path d:\codes\OrcaSlicer\resources\profiles -l 2 -v Custom
[2024-02-28 21:23:06.102138] [0x0000a4e8] [error] Slic3r::ConfigBase::load_from_json: parse d:\codes\OrcaSlicer\resources\profiles/Custom/machine/fdm_klipper_common.json got a nlohmann::detail::parse_error, reason = [json.exception.parse_error.101] parse error at line 9, column 38: syntax error while parsing object - unexpected string literal; expected '}'
...
Validation failed
```
#### Sample result with success
```shell
PS D:\codes\OrcaSlicer\build\src\RelWithDebInfo> ."D:/codes/OrcaSlicer/build/src/Release/OrcaSlicer_profile_validator.exe" --path d:\codes\OrcaSlicer\resources\profiles -l 2 -v Custom
Validation completed successfully
```
> [!WARNING]
> Use `OrcaSlicer_profile_validator` on Ubuntu and `OrcaSlicer_profile_validator.exe` on Windows.
---
### 2. Python Profile Validation Script
In addition to the Orca validator, you should run the `orca_extra_profile_check.py` script. This script performs additional checks like:
- Validation of `compatible_printers` in filament profiles
- Consistency of filament names
- Validation of default materials in machine profiles (optional)
#### Example command
```shell
python ./orca_extra_profile_check.py
```
You can also enable or disable specific checks:
- `--help`: displays help information
- `--vendor` (optional): checks only the specified vendor. If omitted, all vendors are checked.
- `--check-filaments` (enabled by default): checks `compatible_printers` fields in filament profiles
- `--check-materials`: checks default material names in machine profiles
- `--check-obsolete-keys`: checks for obsolete keys in profiles
#### Sample usage with all checks enabled
```shell
python ./orca_extra_profile_check.py --vendor="vendor_name" --check-filaments --check-materials
```
The script will output the number of errors found and exit with a non-zero status code if any issues are detected.

View file

@ -0,0 +1,246 @@
# How to Contribute to the Wiki
This guide explains how to contribute to the Orca Slicer wiki.
Orca Slicer uses GitHub's wiki feature, which allows users and developers to create and edit documentation collaboratively.
We encourage all developers and users to contribute to the wiki by updating existing pages and adding new content. This helps keep the documentation up-to-date and useful for everyone.
When developing new features, please consider updating the wiki to reflect these changes. This ensures that users have access to the latest information and can make the most of the features.
- [Wiki Structure](#wiki-structure)
- [Home](#home)
- [Index and Navigation](#index-and-navigation)
- [File Naming and Organization](#file-naming-and-organization)
- [Formatting and Style](#formatting-and-style)
- [Markdown Formatting](#markdown-formatting)
- [Alerts and Callouts](#alerts-and-callouts)
- [Images](#images)
- [Image Naming](#image-naming)
- [Image Placement](#image-placement)
- [Linking Images](#linking-images)
- [Examples](#examples)
- [Avoid the Following](#avoid-the-following)
- [Resize Images](#resize-images)
- [Image Cropping and Highlighting](#image-cropping-and-highlighting)
- [Recommended Formats](#recommended-formats)
- [Structuring Content](#structuring-content)
- [Commands and Code Blocks](#commands-and-code-blocks)
- [External Links](#external-links)
## Wiki Structure
Each wiki page is a Markdown file located in the `doc` directory of the repository. The wiki is organized into various sections, each covering different areas of the project.
### Home
The starting point of the Orca Slicer wiki is the **Home** page. From there, you can navigate to different sections and topics related to the project.
When creating a new page or section, be sure to link it from the Home page under the appropriate category.
- **Print Settings:** Detailed explanations of print settings, tips, and tricks for optimizing print quality.
- **Printer Calibration:** Step-by-step calibration tests in Orca Slicer, including how to interpret the results.
- **Developer Section:** Information for developers and contributors on building Orca Slicer, localization, and developer resources.
#### Index and Navigation
Github Wiki uses the name of the files as identifiers for the pages. To link to a page, use the file name without the `.md` extension.
If the file is inside a subdirectory, dont include the subdirectory in the link. Instead, link directly to the file from the Home page.
For example, if you create a new page `doc/calibration/flow-rate-calib.md`, link it as follows:
```markdown
[Calibration Guide](Calibration)
```
For pages with extensive content, it's helpful to include a table of contents at the beginning. This allows users to quickly find and access different sections of the page.
```markdown
- [Wiki Structure](#wiki-structure)
- [Home](#home)
- [Index and Navigation](#index-and-navigation)
- [File Naming and Organization](#file-naming-and-organization)
- [Formatting and Style](#formatting-and-style)
```
> [!NOTE]
> If you're adding a new section, follow the existing structure and ensure it doesn't already fit within an existing category. Link it from the Home page accordingly.
### File Naming and Organization
When creating new pages, follow these file naming conventions:
- Use unique file names to avoid conflicts.
- Use descriptive names that reflect the page's content.
- Use kebab-case for filenames (e.g., `How-to-wiki.md`).
- If the page belongs to a specific section, include the section name in the file name. For example, calibration pages should end with `-calib.md` (e.g., `flow-rate-calib.md`, `pressure-advance-calib.md`).
- Place files in the appropriate subdirectory when applicable (e.g., `doc/calibration/` for calibration-related content).
## Formatting and Style
Please adhere to the following style and formatting conventions when contributing to the wiki.
### Markdown Formatting
The wiki uses standard Markdown syntax for formatting and aims to maintain a consistent style across all pages. Avoid using raw HTML tags and prefer Markdown formatting instead.
Ensure your indentation is consistent, especially for code blocks and lists.
Refer to the [GitHub Markdown Guide](https://guides.github.com/features/mastering-markdown/) for more information on Markdown syntax.
### Alerts and Callouts
To add alerts or notes, use GitHubs Markdown alert syntax:
```markdown
> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.
> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.
```
> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.
> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.
Refer to the [GitHub Alert Guide](https://docs.github.com/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts) for more details.
## Images
Images are encouraged to enhance the clarity and quality of the wiki content. They help illustrate concepts, provide examples, and improve readability.
> [!CAUTION]
> Do not use images from third-party sources unless you have the proper permissions.
### Image Naming
- Use clear, descriptive filenames that reflect the image content.
- For section-specific images, include the section name or initials. For example, images related to Pressure Advance could be named `pa-[description].png`.
### Image Placement
- General images should be placed in the `doc/images/` directory.
- Section-specific images should be stored in their corresponding subdirectories (e.g., `doc/images/calibration/` for calibration content).
### Linking Images
Always use raw GitHub URLs for image links to ensure correct display:
Format = `![[filename]](` + Base URL + filename.extension + Raw tag + `)`
- Base URL:
```markdown
https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/
```
- Raw tag:
```markdown
?raw=true
```
#### Examples
- For an image in `doc/images/` named `example.png`:
```markdown
![example](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/example.png?raw=true)
```
- For an image in a subdirectory like `doc/images/calibration/pa-example.svg`:
```markdown
![pa-example](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/calibration/pa-example.svg?raw=true)
```
> [!IMPORTANT]
> New or Moved Images will not appear in the preview until the Pull Request is merged. Double-check your paths.
> If you are changing an image path, ensure all links to that image are updated accordingly.
#### Avoid the Following
- Relative paths
- GitHub Assets, user content, or user-images URLs
- External image links from unreliable or temporary platforms
- Images containing personal or sensitive information
- Using images for content that can be expressed in text, such as equations or code—use Markdown syntax or Mermaid/Math formatting instead.
> [!NOTE]
> When contributing section-specific images, follow the naming conventions and directory structure.
#### Resize Images
Avoid the resize of images and let the Wiki handle it automatically.
If resizing is necessary (e.g., for thumbnails), use the following syntax:
HTML Format = `<img src="` + Base URL + filename.extension + Raw tag + `" alt="` + filename + `"` + size limit.
Example:
```html
<img src="https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/InputShaping/IS_damp_marlin_print_measure.jpg?raw=true" alt="Input_Shaping" height="200">
```
### Image Cropping and Highlighting
To ensure clarity:
- Crop images to focus on relevant areas.
- Use annotations like arrows or shapes (circles, rectangles) to highlight key parts—but avoid overloading the image.
### Recommended Formats
- **JPG:** Suitable for photographs. Avoid for images with text or fine detail due to compression artifacts.
- **PNG:** Ideal for screenshots or images with transparency. Ensure sufficient contrast for light and dark modes.
- **SVG:** Preferred when possible. SVGs support theme adaptation (light/dark mode), making them ideal for icons and diagrams.
## Structuring Content
Each wiki page should have a clear objective, which helps determine the structure of the content. After a brief introduction, use one of the following formats:
- **Step-by-Step Guide:** Organize content into sections and subsections for tasks requiring sequential actions (e.g., calibration procedures).
- **GUI-Based Reference:** If sequence isnt crucial, structure the content following Orca Slicers GUI. This format works well for configurable settings or feature overviews.
- Example: Explain **Layer Height** before **Initial Layer Height**, as the former applies globally while the latter is specific to the first layer.
## Commands and Code Blocks
When adding commands or code blocks please use the [Code Block with Syntax Highlighting feature of Markdown](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting).
- Use triple backticks (```) to enclose code blocks.
- Specify the language for proper highlighting and readability.
````markdown
```json
{
"key": "value"
}
```
````
```json
{
"key": "value"
}
```
## External Links
Be careful when linking to external resources. Ensure that the links are relevant and reliable.
Papers, articles, and other resources should be cited properly.

View file

@ -2,26 +2,28 @@
The purpose of this guide is to describe how to contribute to the Orca Slicer translations. We use GNUgettext for extracting string resources from the project and PoEdit for editing translations.
Those can be downloaded here:
- https://sourceforge.net/directory/os:windows/?q=gnu+gettext GNUgettext package contains a set of tools to extract strings from the source code and to create the translation Catalog.
- https://poedit.net PoEdit provides good interface for the translators.
Those can be downloaded here:
- https://sourceforge.net/directory/os:windows/?q=gnu+gettext GNUgettext package contains a set of tools to extract strings from the source code and to create the translation Catalog.
- https://poedit.net PoEdit provides good interface for the translators.
After GNUgettext is installed, it is recommended to add the path to gettext/bin to PATH variable.
Full manual for GNUgettext can be seen here: http://www.gnu.org/software/gettext/manual/gettext.html
### Scenario 1. How do I add a translation or fix an existing translation
1. Get PO-file 'OrcaSlicer_xx.pot' from corresponding sub-folder here:
https://github.com/softfever/OrcaSlicer/tree/master/localization/i18n
https://github.com/softfever/OrcaSlicer/tree/master/localization/i18n
2. Open this file in PoEdit as "Edit a translation"
3. Apply your corrections to the translation
4. Push changed OrcaSlicer_xx.po into the original folder
5. copy OrcaSlicer_xx.mo into resources/i18n/xx and rename it to OrcaSlicer.mo, then push the changed file.
### Scenario 2. How do I add a new language support
1. Get file OrcaSlicer.pot here :
https://github.com/softfever/OrcaSlicer/tree/master/localization/i18n
https://github.com/softfever/OrcaSlicer/tree/master/localization/i18n
2. Open it in PoEdit for "Create new translation"
3. Select Translation Language (for example French).
4. As a result you will have fr.po - the file containing translation to French.
@ -30,24 +32,28 @@ Notice. When the translation is complete you need to:
- Click "Save file" button. OrcaSlicer_fr.mo will be created immediately
- Bambu_Studio_fr.po needs to be copied into the sub-folder fr of https://github.com/softfever/OrcaSlicer/tree/master/localization/i18n, and be pushed
- copy OrcaSlicer_xx.mo into resources/i18n/xx and rename it to OrcaSlicer.mo, then push the changed file.
( name of folder "fr" means "French" - the translation language).
( name of folder "fr" means "French" - the translation language).
### Scenario 3. How do I add a new text resource when implementing a feature to Orca Slicer
Each string resource in Orca Slicer available for translation needs to be explicitly marked using L() macro like this:
```C++
auto msg = L("This message to be localized")
```
To get translated text use one of needed macro/function (`_(s)` or `_CHB(s)` ).
If you add new file resource, add it to the list of files containing macro `L()`
### Scenario 4. How do I use GNUgettext to localize my own application taking Orca Slicer as an example
1. For convenience create a list of files with this macro `L(s)`. We have
https://github.com/softfever/OrcaSlicer/blob/master/localization/i18n/list.txt.
1. For convenience create a list of files with this macro `L(s)`. We have
https://github.com/softfever/OrcaSlicer/blob/master/localization/i18n/list.txt.
2. Create template file(*.POT) with GNUgettext command:
```
xgettext --keyword=L --add-comments=TRN --from-code=UTF-8 --debug -o OrcaSlicer.pot -f list.txt
```shell
xgettext --keyword=L --add-comments=TRN --from-code=UTF-8 --debug -o OrcaSlicer.pot -f list.txt
```
Use flag `--from-code=UTF-8` to specify that the source strings are in UTF-8 encoding
@ -56,38 +62,37 @@ https://github.com/softfever/OrcaSlicer/blob/master/localization/i18n/list.txt.
3. Create PO- and MO-files for your project as described above.
4. To merge old PO-file with strings from created new POT-file use command:
```shell
msgmerge -N -o new.po old.po new.pot
```
msgmerge -N -o new.po old.po new.pot
```
Use option `-N` to not using fuzzy matching when an exact match is not found.
5. To concatenate old PO-file with strings from new PO-file use command:
```
msgcat -o new.po old.po
```shell
msgcat -o new.po old.po
```
6. Create an English translation catalog with command:
```
msgen -o new.po old.po
```shell
msgen -o new.po old.po
```
Notice, in this Catalog it will be totally same strings for initial text and translated.
When you have Catalog to translation open POT or PO file in PoEdit and start translating.
## General guidelines for Orca Slicer translators
- We recommend using _PoEdit_ application for translation (as described above). It will help you eliminate most punctuation errors and will show you strings with "random" translations (if the fuzzy parameter was used).
- We recommend using *PoEdit* application for translation (as described above). It will help you eliminate most punctuation errors and will show you strings with "random" translations (if the fuzzy parameter was used).
- To check how the translated text looks on the UI elements, test it :) If you use *PoEdit*, all you need to do is save the file. At this point, a MO file will be created. Rename it Orca Slicer.mo, and you can run Orca Slicer (see above).
- To check how the translated text looks on the UI elements, test it :) If you use _PoEdit_, all you need to do is save the file. At this point, a MO file will be created. Rename it Orca Slicer.mo, and you can run Orca Slicer (see above).
- If you see an encoding error (garbage characters instead of Unicode) somewhere in Orca Slicer, report it. It is likely not a problem of your translation, but a bug in the software.
- See on which UI elements the translated phrase will be used. Especially if it's a button, it is very important to decide on the translation and not write alternative translations in parentheses, as this will significantly increase the width of the button, which is sometimes highly undesirable:
![Long text on button](images/long_text_on_button.png)
- If you decide to use autocorrect or any batch processing tool, the output requires very careful proofreading. It is very easy to make it do changes that break things big time.
- **Any formatting parts of the phrases must remain unchanged.** For example, you should not change `%1%` to `%1 %`, you should not change `%%` to `%` (for percent sign) and similar. This will lead to application crashes.
@ -101,4 +106,3 @@ When you have Catalog to translation open POT or PO file in PoEdit and start tra
- If the phrase doesn't have a dot at the end, don't add it. And if it does, then don't forget to :)
- It is useful to stick to the same terminology in the application (especially with basic terms such as "filament" and similar). Stay consistent. Otherwise it will confuse users.

View file

@ -1,26 +1,27 @@
This page deals with the explanation for 3 classes in the code.
## [`Preset`](../../src/libslic3r/Preset.hpp)
## [`Preset`](https://github.com/SoftFever/OrcaSlicer/blob/main/src/libslic3r/Preset.hpp)
As the name might suggest this class deals with presets for various things. It defines an enum `Type` which basically tells you what kind of data the present contains. Below are a few explained and there corresponding UI elements
#### Note: There is a lot of outdated and legacy code in the code base.
> [!WARNING]
> There is a lot of outdated and legacy code in the code base.
- `TYPE_PRINT`: Refers to a process preset. It's called 'Print' probably due to some legacy code.
<img src="../images/process-preset.png" alt="Example Image" width="320">
![process-preset](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/process-preset.png?raw=true)
- `TYPE_FILAMENT`: As the name suggests this preset is for filaments
<img src="../images/filament-preset.png" alt="Example Image" width="320">
![filament-preset](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/filament-preset.png?raw=true)
- `TYPE_PRINTER`: Preset for printers.
<img src="../images/printer-preset.png" alt="Example Image" width="320">
![printer-preset](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/printer-preset.png?raw=true)
There are other preset types but some of them are for SLA. Which is legacy code, since SLA printers are no longer supported. Above 3 are the important types.
## [`PresetBundle`](../../src/libslic3r/PresetBundle.hpp)
## [`PresetBundle`](https://github.com/SoftFever/OrcaSlicer/blob/main/src/libslic3r/PresetBundle.hpp)
This is a bundle containing a few types of `PresetCollection`. One bundle has presets for some printers, filaments and some processes (TYPE_PRINT).
@ -30,9 +31,10 @@ This is a bundle containing a few types of `PresetCollection`. One bundle has pr
each one of these contains a collection of processes, filaments and printers respectively.\
#### Note: Printers, filaments and processes in the bundle don't all have to be compatible with each other. In fact all the saved presets are stored in one `PresetBundle`. The `PresetBundle` is loaded on start up. The list of filaments and processes shown for a particular printer is a subset of `filaments` and `prints` `PresetCollection`s.
> [!IMPORTANT]
> Printers, filaments and processes in the bundle don't all have to be compatible with each other. In fact all the saved presets are stored in one `PresetBundle`. The `PresetBundle` is loaded on start up. The list of filaments and processes shown for a particular printer is a subset of `filaments` and `prints` `PresetCollection`s.
## [`PresetCollection`](../../src/libslic3r/Preset.hpp)
## [`PresetCollection`](https://github.com/SoftFever/OrcaSlicer/blob/main/src/libslic3r/Preset.hpp)
`PrinterPresetCollection` is a class derived from `PresetCollection`.

View file

@ -1,23 +1,28 @@
### !! incomplete, possibly inaccurate, being updated with new info !!
# Application Structure Overview
## [`Plater`](../../src/slic3r/GUI/Plater.hpp)
WIP...
> [!WARNING]
> !! incomplete, possibly inaccurate, being updated with new info !!
## [`Plater`](https://github.com/SoftFever/OrcaSlicer/blob/main/src/slic3r/GUI/Plater.hpp)
Refers to the entire application. The whole view, file loading, project saving and loading is all managed by this class. This class contains members for the model viewer, the sidebar, gcode viewer and everything else.
## [`Sidebar`](../../src/slic3r/GUI/Plater.hpp)
## [`Sidebar`](https://github.com/SoftFever/OrcaSlicer/blob/main/src/slic3r/GUI/Plater.hpp)
This is relating the the sidebar in the application window
<img src="../images/full-sidebar.png" alt="Example Image" width="320">
![full-sidebar](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/full-sidebar.png?raw=true)
## [`ComboBox`](../../src/slic3r/GUI/Widgets/ComboBox.hpp)
## [`ComboBox`](https://github.com/SoftFever/OrcaSlicer/blob/main/src/slic3r/GUI/Widgets/ComboBox.hpp)
The drop down menus where you can see and select presets
<img src="../images/combobox.png" alt="Example Image" width="320">
![combobox](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/combobox.png?raw=true)
## [`Tab`](../../src/slic3r/GUI/Tab.hpp)
## [`Tab`](https://github.com/SoftFever/OrcaSlicer/blob/main/src/slic3r/GUI/Tab.hpp)
Refers to the various windows with settings. e.g. the Popup to edit printer or filament preset. Also the section to edit process preset and the object list. These 4 are managed by `TabPrinter`, `TabFilament`, `TabPrint` and `TabPrintModel` respectively.
<img src="../images/tab-popup.png" alt="Example Image" width="320">
![tab-popup](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/tab-popup.png?raw=true)

View file

@ -2,4 +2,43 @@
The Slicing logic is not the easiest to locate in the code base. Below is a flow diagram of function calls that are made after clicking the `Slice Plate` button in the UI. Most of the processing happens in different threads. Note the calls after `BackgroundSlicingProcess::start()`, but this is how you can find the slicing logic.
<img src="../images/slicing_call_heirarchy.svg" alt="Example Image" width="320">
```mermaid
flowchart TD
A["Slice plate"] --> B["void Plater::priv::on_action_slice_plate(SimpleEvent&)"]
B --> C["void Plater::reslice()"]
C --> D["bool Plater::priv::restart_background_process(unsigned int state)"]
D --> E["bool BackgroundSlicingProcess::start()"]
E --> F["void BackgroundSlicingProcess::thread_proc_safe_seh_throw()"]
F --> G["unsigned long BackgroundSlicingProcess::thread_proc_safe_seh()"]
G --> H["void BackgroundSlicingProcess::thread_proc_safe()"]
H --> I["void BackgroundSlicingProcess::thread_proc()"]
I --> J["void BackgroundSlicingProcess::call_process_seh_throw(std::exception_ptr &ex)"]
J --> K["unsigned long BackgroundSlicingProcess::call_process_seh(std::exception_ptr &ex)"]
K --> L["void BackgroundSlicingProcess::call_process(std::exception_ptr &ex)"]
L --> M["void BackgroundSlicingProcess::process_fff()"]
M --> N["void Print::process(long long *time_cost_with_cache, bool use_cache)"]
N --> O["void PrintObject::make_perimeters()"]
O --> P["void PrintObject::slice()"]
%% Labels for libraries
subgraph G1 [libSlic3r_gui]
B
C
D
E
F
G
H
I
J
K
L
M
end
subgraph G2 [libSlic3r]
N
O
P
end
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 773 KiB

After

Width:  |  Height:  |  Size: 773 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 783 KiB

After

Width:  |  Height:  |  Size: 783 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.4 MiB

After

Width:  |  Height:  |  Size: 4.4 MiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

View file

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" style="background: transparent; background-color: transparent; color-scheme: light dark;" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="401px" height="71px" viewBox="-0.5 -0.5 401 71"><defs/><g><g data-cell-id="0"><g data-cell-id="1"><g data-cell-id="fhMGX1kBES0GxHB0cy2X-14"><g><rect x="130" y="0" width="140" height="70" rx="25.9" ry="25.9" fill-opacity="0.75" fill="#e3c800" style="fill: light-dark(rgb(227, 200, 0), rgb(103, 80, 0)); stroke: light-dark(rgb(176, 149, 0), rgb(141, 118, 0));" stroke="#b09500" stroke-opacity="0.75" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 35px; margin-left: 131px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #000000; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#000000, #ededed); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Inner wall</div></div></div></foreignObject><text x="200" y="39" fill="#000000" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Inner wall</text></switch></g></g></g><g data-cell-id="fhMGX1kBES0GxHB0cy2X-15"><g><rect x="260" y="0" width="140" height="70" rx="25.9" ry="25.9" fill-opacity="0.75" fill="#e3c800" style="fill: light-dark(rgb(227, 200, 0), rgb(103, 80, 0)); stroke: light-dark(rgb(176, 149, 0), rgb(141, 118, 0));" stroke="#b09500" stroke-opacity="0.75" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 35px; margin-left: 261px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #000000; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#000000, #ededed); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Inner wall</div></div></div></foreignObject><text x="330" y="39" fill="#000000" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Inner wall</text></switch></g></g></g><g data-cell-id="fhMGX1kBES0GxHB0cy2X-9"><g><rect x="0" y="0" width="140" height="70" rx="25.9" ry="25.9" fill-opacity="0.75" fill="#fa6800" style="fill: light-dark(rgb(250, 104, 0), rgb(233, 107, 18)); stroke: light-dark(rgb(199, 53, 0), rgb(255, 145, 100));" stroke="#c73500" stroke-opacity="0.75" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 35px; margin-left: 1px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #000000; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#000000, #ededed); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Outer wall</div></div></div></foreignObject><text x="70" y="39" fill="#000000" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Outer wall</text></switch></g></g></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" style="background: transparent; background-color: transparent; color-scheme: light dark;" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="411px" height="71px" viewBox="-0.5 -0.5 411 71"><defs/><g><g data-cell-id="0"><g data-cell-id="1"><g data-cell-id="fhMGX1kBES0GxHB0cy2X-14"><g><rect x="140" y="0" width="140" height="70" rx="25.9" ry="25.9" fill-opacity="0.75" fill="#e3c800" style="fill: light-dark(rgb(227, 200, 0), rgb(103, 80, 0)); stroke: light-dark(rgb(176, 149, 0), rgb(141, 118, 0));" stroke="#b09500" stroke-opacity="0.75" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 35px; margin-left: 141px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #000000; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#000000, #ededed); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Inner wall</div></div></div></foreignObject><text x="210" y="39" fill="#000000" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Inner wall</text></switch></g></g></g><g data-cell-id="fhMGX1kBES0GxHB0cy2X-15"><g><rect x="270" y="0" width="140" height="70" rx="25.9" ry="25.9" fill-opacity="0.75" fill="#e3c800" style="fill: light-dark(rgb(227, 200, 0), rgb(103, 80, 0)); stroke: light-dark(rgb(176, 149, 0), rgb(141, 118, 0));" stroke="#b09500" stroke-opacity="0.75" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 35px; margin-left: 271px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #000000; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#000000, #ededed); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Inner wall</div></div></div></foreignObject><text x="340" y="39" fill="#000000" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Inner wall</text></switch></g></g></g><g data-cell-id="fhMGX1kBES0GxHB0cy2X-9"><g><rect x="0" y="0" width="140" height="70" rx="25.9" ry="25.9" fill-opacity="0.75" fill="#fa6800" style="fill: light-dark(rgb(250, 104, 0), rgb(233, 107, 18)); stroke: light-dark(rgb(199, 53, 0), rgb(255, 145, 100));" stroke="#c73500" stroke-opacity="0.75" pointer-events="all"/></g><g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 35px; margin-left: 1px;"><div style="box-sizing: border-box; font-size: 0; text-align: center; color: #000000; "><div style="display: inline-block; font-size: 12px; font-family: &quot;Helvetica&quot;; color: light-dark(#000000, #ededed); line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">Outer wall</div></div></div></foreignObject><text x="70" y="39" fill="#000000" font-family="&quot;Helvetica&quot;" font-size="12px" text-anchor="middle">Outer wall</text></switch></g></g></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" style="background: transparent; background-color: transparent; color-scheme: light dark;" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1202px" height="402px" viewBox="-0.5 -0.5 1202 402"><defs/><g><g data-cell-id="8ElPFWQneQNdZ3zXist4-0"><g data-cell-id="8ElPFWQneQNdZ3zXist4-1"><g data-cell-id="8ElPFWQneQNdZ3zXist4-2"><g><rect x="300" y="280" width="300" height="120" rx="44.4" ry="44.4" fill-opacity="0.75" fill="#e3c800" style="fill: light-dark(rgb(227, 200, 0), rgb(103, 80, 0)); stroke: light-dark(rgb(176, 149, 0), rgb(141, 118, 0));" stroke="#b09500" stroke-opacity="0.75" stroke-width="2" pointer-events="all"/></g></g><g data-cell-id="8ElPFWQneQNdZ3zXist4-3"><g><rect x="600" y="280" width="300" height="120" rx="44.4" ry="44.4" fill-opacity="0.75" fill="#e3c800" style="fill: light-dark(rgb(227, 200, 0), rgb(103, 80, 0)); stroke: light-dark(rgb(176, 149, 0), rgb(141, 118, 0));" stroke="#b09500" stroke-opacity="0.75" stroke-width="2" pointer-events="all"/></g></g><g data-cell-id="8ElPFWQneQNdZ3zXist4-4"><g><rect x="0" y="280" width="300" height="120" rx="44.4" ry="44.4" fill-opacity="0.75" fill="#fa6800" style="fill: light-dark(rgb(250, 104, 0), rgb(233, 107, 18)); stroke: light-dark(rgb(199, 53, 0), rgb(255, 145, 100));" stroke="#c73500" stroke-opacity="0.75" stroke-width="2" pointer-events="all"/></g></g><g data-cell-id="TlwVYZd-n_Lwme7Xjjv9-0"><g><rect x="900" y="280" width="300" height="120" rx="44.4" ry="44.4" fill-opacity="0.75" fill="#fa6800" style="fill: light-dark(rgb(250, 104, 0), rgb(233, 107, 18)); stroke: light-dark(rgb(199, 53, 0), rgb(255, 145, 100));" stroke="#c73500" stroke-opacity="0.75" stroke-width="2" pointer-events="all"/></g></g><g data-cell-id="TlwVYZd-n_Lwme7Xjjv9-1"><g><rect x="320" y="140" width="280" height="140" rx="51.8" ry="51.8" fill-opacity="0.75" fill="#e3c800" style="fill: light-dark(rgb(227, 200, 0), rgb(103, 80, 0)); stroke: light-dark(rgb(176, 149, 0), rgb(141, 118, 0));" stroke="#b09500" stroke-opacity="0.75" stroke-width="2" pointer-events="all"/></g></g><g data-cell-id="TlwVYZd-n_Lwme7Xjjv9-2"><g><rect x="600" y="140" width="280" height="140" rx="51.8" ry="51.8" fill-opacity="0.75" fill="#e3c800" style="fill: light-dark(rgb(227, 200, 0), rgb(103, 80, 0)); stroke: light-dark(rgb(176, 149, 0), rgb(141, 118, 0));" stroke="#b09500" stroke-opacity="0.75" stroke-width="2" pointer-events="all"/></g></g><g data-cell-id="TlwVYZd-n_Lwme7Xjjv9-3"><g><rect x="40" y="140" width="280" height="140" rx="51.8" ry="51.8" fill-opacity="0.75" fill="#fa6800" style="fill: light-dark(rgb(250, 104, 0), rgb(233, 107, 18)); stroke: light-dark(rgb(199, 53, 0), rgb(255, 145, 100));" stroke="#c73500" stroke-opacity="0.75" stroke-width="2" pointer-events="all"/></g></g><g data-cell-id="TlwVYZd-n_Lwme7Xjjv9-4"><g><rect x="880" y="140" width="280" height="140" rx="51.8" ry="51.8" fill-opacity="0.75" fill="#fa6800" style="fill: light-dark(rgb(250, 104, 0), rgb(233, 107, 18)); stroke: light-dark(rgb(199, 53, 0), rgb(255, 145, 100));" stroke="#c73500" stroke-opacity="0.75" stroke-width="2" pointer-events="all"/></g></g><g data-cell-id="TlwVYZd-n_Lwme7Xjjv9-5"><g><rect x="320" y="0" width="280" height="140" rx="51.8" ry="51.8" fill-opacity="0.75" fill="#e3c800" style="fill: light-dark(rgb(227, 200, 0), rgb(103, 80, 0)); stroke: light-dark(rgb(176, 149, 0), rgb(141, 118, 0));" stroke="#b09500" stroke-opacity="0.75" stroke-width="2" pointer-events="all"/></g></g><g data-cell-id="TlwVYZd-n_Lwme7Xjjv9-6"><g><rect x="600" y="0" width="280" height="140" rx="51.8" ry="51.8" fill-opacity="0.75" fill="#e3c800" style="fill: light-dark(rgb(227, 200, 0), rgb(103, 80, 0)); stroke: light-dark(rgb(176, 149, 0), rgb(141, 118, 0));" stroke="#b09500" stroke-opacity="0.75" stroke-width="2" pointer-events="all"/></g></g><g data-cell-id="TlwVYZd-n_Lwme7Xjjv9-7"><g><rect x="40" y="0" width="280" height="140" rx="51.8" ry="51.8" fill-opacity="0.75" fill="#fa6800" style="fill: light-dark(rgb(250, 104, 0), rgb(233, 107, 18)); stroke: light-dark(rgb(199, 53, 0), rgb(255, 145, 100));" stroke="#c73500" stroke-opacity="0.75" stroke-width="2" pointer-events="all"/></g></g><g data-cell-id="TlwVYZd-n_Lwme7Xjjv9-8"><g><rect x="880" y="0" width="280" height="140" rx="51.8" ry="51.8" fill-opacity="0.75" fill="#fa6800" style="fill: light-dark(rgb(250, 104, 0), rgb(233, 107, 18)); stroke: light-dark(rgb(199, 53, 0), rgb(255, 145, 100));" stroke="#c73500" stroke-opacity="0.75" stroke-width="2" pointer-events="all"/></g></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

Some files were not shown because too many files have changed in this diff Show more