From d842832b2563c991fecfcd45454ad2d73e2bcd95 Mon Sep 17 00:00:00 2001
From: QIDI TECH <893239786@qq.com>
Date: Mon, 16 Sep 2024 16:07:29 +0800
Subject: [PATCH] Updated to 1.9.5, and optimize calibration and device
---
BuildLinux.sh | 288 ++++------
DockerRun.sh | 2 +
linux.d/debian | 59 +++
linux.d/fedora | 61 +++
resources/printers/version.txt | 2 +-
resources/web/data/text.js | 327 +++++++++++-
resources/web/guide/11/index.html | 2 +-
resources/web/guide/21/21.css | 9 +-
resources/web/guide/24/24.css | 27 +-
resources/web/homepage3/js/left.js | 12 +-
resources/web/homepage3/left.html | 15 +-
resources/web/qidi/js/home.js | 10 +
src/QIDIStudio.cpp | 495 ++++++++++++++++--
src/clipper2/CMakeLists.txt | 4 +-
src/libslic3r/AppConfig.cpp | 11 +
src/libslic3r/Arachne/utils/ExtrusionLine.cpp | 19 +-
src/libslic3r/Arachne/utils/ExtrusionLine.hpp | 7 +-
src/libslic3r/CMakeLists.txt | 1 +
src/libslic3r/ExtrusionEntity.hpp | 7 +
src/libslic3r/Flow.cpp | 5 +-
src/libslic3r/Format/qds_3mf.cpp | 20 +-
src/libslic3r/GCode.cpp | 390 ++++++++++++--
src/libslic3r/GCode.hpp | 10 +
src/libslic3r/GCode/GCodeProcessor.cpp | 3 +-
src/libslic3r/ObjColorUtils.cpp | 16 +
src/libslic3r/ObjColorUtils.hpp | 7 +
src/libslic3r/PerimeterGenerator.cpp | 132 +++--
src/libslic3r/Preset.cpp | 18 +-
src/libslic3r/PresetBundle.cpp | 3 +-
src/libslic3r/Print.cpp | 74 ++-
src/libslic3r/Print.hpp | 11 +-
src/libslic3r/PrintBase.hpp | 4 +-
src/libslic3r/PrintConfig.cpp | 36 +-
src/libslic3r/PrintConfig.hpp | 4 +-
src/libslic3r/PrintObject.cpp | 6 +-
src/libslic3r/SLAPrint.cpp | 3 +-
src/libslic3r/SLAPrint.hpp | 3 +-
src/libslic3r/Support/TreeSupport.cpp | 71 ++-
src/libslic3r/Support/TreeSupport.hpp | 3 +-
src/libslic3r/Support/TreeSupport3D.cpp | 4 -
src/libslic3r/Time.cpp | 10 +
src/libslic3r/Time.hpp | 2 +
src/libslic3r/VariableWidth.cpp | 24 +-
src/libslic3r/VariableWidth.hpp | 3 +-
src/slic3r/CMakeLists.txt | 2 +
src/slic3r/GUI/BitmapCache.cpp | 60 +++
src/slic3r/GUI/BitmapCache.hpp | 2 +
src/slic3r/GUI/CaliHistoryDialog.cpp | 15 +
src/slic3r/GUI/CalibrationPanel.cpp | 4 +-
src/slic3r/GUI/CalibrationWizard.cpp | 9 +-
.../GUI/CalibrationWizardPresetPage.cpp | 161 ++----
src/slic3r/GUI/CalibrationWizardStartPage.cpp | 94 ++--
src/slic3r/GUI/ConfigManipulation.cpp | 9 +-
src/slic3r/GUI/DeviceManager.cpp | 24 +-
src/slic3r/GUI/GLCanvas3D.cpp | 26 +-
src/slic3r/GUI/GUI_App.cpp | 57 +-
src/slic3r/GUI/GUI_App.hpp | 5 +
src/slic3r/GUI/GUI_Factories.cpp | 8 +-
src/slic3r/GUI/Gizmos/GLGizmoAssembly.cpp | 4 +
src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp | 4 +
src/slic3r/GUI/Gizmos/GLGizmosManager.cpp | 11 +-
src/slic3r/GUI/Gizmos/GLGizmosManager.hpp | 1 +
src/slic3r/GUI/GuiColor.cpp | 43 ++
src/slic3r/GUI/GuiColor.hpp | 22 +
src/slic3r/GUI/MainFrame.hpp | 2 +
src/slic3r/GUI/MediaPlayCtrl.cpp | 28 +-
src/slic3r/GUI/OG_CustomCtrl.cpp | 36 +-
src/slic3r/GUI/ObjColorDialog.cpp | 32 +-
src/slic3r/GUI/ObjColorDialog.hpp | 8 +-
src/slic3r/GUI/OptionsGroup.cpp | 2 +-
src/slic3r/GUI/PhysicalPrinterDialog.cpp | 24 +-
src/slic3r/GUI/Plater.cpp | 134 +++--
src/slic3r/GUI/Preferences.cpp | 2 +-
src/slic3r/GUI/PrinterWebView.cpp | 238 +++++----
src/slic3r/GUI/PrinterWebView.hpp | 5 +
src/slic3r/GUI/SelectMachine.cpp | 24 +-
src/slic3r/GUI/SelectMachine.hpp | 3 +-
src/slic3r/GUI/Tab.cpp | 252 +++++----
src/slic3r/GUI/WebGuideDialog.cpp | 5 +-
src/slic3r/GUI/WebViewDialog.cpp | 27 +-
src/slic3r/GUI/Widgets/ComboBox.cpp | 4 +-
src/slic3r/GUI/Widgets/DropDown.cpp | 4 +-
src/slic3r/GUI/wxExtensions.cpp | 49 ++
src/slic3r/GUI/wxExtensions.hpp | 8 +
src/slic3r/Utils/Http.cpp | 5 +
src/slic3r/Utils/NetworkAgent.cpp | 58 +-
src/slic3r/Utils/NetworkAgent.hpp | 1 +
src/slic3r/Utils/PresetUpdater.cpp | 4 +-
src/slic3r/Utils/PrintHost.cpp | 11 +-
src/slic3r/Utils/PrintHost.hpp | 4 +
90 files changed, 2753 insertions(+), 998 deletions(-)
create mode 100644 linux.d/debian
create mode 100644 linux.d/fedora
create mode 100644 resources/web/qidi/js/home.js
create mode 100644 src/libslic3r/ObjColorUtils.cpp
create mode 100644 src/slic3r/GUI/GuiColor.cpp
create mode 100644 src/slic3r/GUI/GuiColor.hpp
diff --git a/BuildLinux.sh b/BuildLinux.sh
index e4df808..9cf48cf 100644
--- a/BuildLinux.sh
+++ b/BuildLinux.sh
@@ -1,11 +1,8 @@
#!/bin/bash
-set -e # exit on first error
-export ROOT=`pwd`
-export NCORES=`nproc --all`
-export CMAKE_BUILD_PARALLEL_LEVEL=${NCORES}
-FOUND_GTK2=$(dpkg -l libgtk* | grep gtk2)
-FOUND_GTK3=$(dpkg -l libgtk* | grep gtk-3)
+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)
@@ -27,243 +24,176 @@ function check_available_memory_and_disk() {
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 " -f: disable safe parallel number limit(By default, the maximum number of parallels is set to free memory/2.5)"
+ 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 qidi-studio (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 ":dsiuhgbr" opt; do
+while getopts ":1fbcdghirsu" opt; do
case ${opt} in
- u )
- UPDATE_LIB="1"
+ 1 )
+ export CMAKE_BUILD_PARALLEL_LEVEL=1
;;
- i )
- BUILD_IMAGE="1"
- ;;
- d )
- BUILD_DEPS="1"
- ;;
- s )
- BUILD_QIDI_STUDIO="1"
+ f )
+ DISABLE_PARALLEL_LIMIT=1
;;
b )
BUILD_DEBUG="1"
;;
- g )
- FOUND_GTK3=""
+ c )
+ CLEAN_BUILD=1
+ ;;
+ d )
+ BUILD_DEPS="1"
+ ;;
+ h ) usage
+ exit 0
+ ;;
+ i )
+ BUILD_IMAGE="1"
;;
r )
- SKIP_RAM_CHECK="1"
+ SKIP_RAM_CHECK="1"
;;
- h ) echo "Usage: ./BuildLinux.sh [-i][-u][-d][-s][-b][-g]"
- echo " -i: Generate appimage (optional)"
- echo " -g: force gtk2 build"
- echo " -b: build in debug mode"
- echo " -d: build deps (optional)"
- echo " -s: build qidi-studio (optional)"
- echo " -u: only update clock & dependency packets (optional and need sudo)"
- echo " -r: skip free ram check (low ram compiling)"
- echo "For a first use, you want to 'sudo ./BuildLinux.sh -u'"
- echo " and then './BuildLinux.sh -dsi'"
- exit 0
+ s )
+ BUILD_QIDI_STUDIO="1"
+ ;;
+ u )
+ UPDATE_LIB="1"
;;
esac
done
-if [ $OPTIND -eq 1 ]
+if [ ${OPTIND} -eq 1 ]
then
- echo "Usage: ./BuildLinux.sh [-i][-u][-d][-s][-b][-g]"
- echo " -i: Generate appimage (optional)"
- echo " -g: force gtk2 build"
- echo " -b: build in debug mode"
- echo " -d: build deps (optional)"
- echo " -s: build qidi-studio (optional)"
- echo " -u: only update clock & dependency packets (optional and need sudo)"
- echo " -r: skip free ram check (low ram compiling)"
- echo "For a first use, you want to 'sudo ./BuildLinux.sh -u'"
- echo " and then './BuildLinux.sh -dsi'"
+ usage
exit 0
fi
-# mkdir build
-if [ ! -d "build" ]
+DISTRIBUTION=$(awk -F= '/^ID=/ {print $2}' /etc/os-release)
+VERSION=$(awk -F= '/^VERSION_ID=/ {print $2}' /etc/os-release)
+# treat ubuntu as debian
+if [ "${DISTRIBUTION}" == "ubuntu" ]
then
- mkdir build
+ DISTRIBUTION="debian"
fi
-
-#FIXME: require root for -u option
-if [[ -n "$UPDATE_LIB" ]]
+if [ ! -f ./linux.d/${DISTRIBUTION} ]
then
- echo -n -e "Updating linux ...\n"
- # hwclock -s # DeftDawg: Why does SuperSlicer want to do this?
- apt update
- if [[ -z "$FOUND_GTK3" ]]
- then
- echo -e "\nInstalling: libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev cmake git\n"
- apt install -y libgtk2.0-dev libglew-dev libudev-dev libdbus-1-dev cmake git
- else
- echo -e "\nFind libgtk-3, installing: libgtk-3-dev libglew-dev libudev-dev libdbus-1-dev cmake git\n"
- apt install -y libgtk-3-dev libglew-dev libudev-dev libdbus-1-dev cmake git
- fi
- # for ubuntu 22.04:
- ubu_version="$(cat /etc/issue)"
- if [[ $ubu_version == "Ubuntu 22.04"* ]]
- then
- apt install -y curl libssl-dev libcurl4-openssl-dev m4
- elif [[ $ubu_version == "Ubuntu 24.04"* ]]
- then
- NEW_SOURCE="deb http://gb.archive.ubuntu.com/ubuntu jammy main"
- if grep -qF -- "$NEW_SOURCE" /etc/apt/sources.list; then
- echo "source exist: $NEW_SOURCE"
- else
- echo "$NEW_SOURCE" | sudo tee -a /etc/apt/sources.list > /dev/null
- fi
- apt update
- fi
- if [[ -n "$BUILD_DEBUG" ]]
- then
- echo -e "\nInstalling: libssl-dev libcurl4-openssl-dev\n"
- apt install -y libssl-dev libcurl4-openssl-dev
- fi
-
- # Addtional Dev packages for QIDI Studio
- export REQUIRED_DEV_PACKAGES="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"
- # libwebkit2gtk-4.1-dev ??
- export DEV_PACKAGES_COUNT=$(echo ${REQUIRED_DEV_PACKAGES} | wc -w)
- if [ $(dpkg --get-selections | grep -E "$(echo ${REQUIRED_DEV_PACKAGES} | tr ' ' '|')" | wc -l) -lt ${DEV_PACKAGES_COUNT} ]; then
- sudo apt install -y ${REQUIRED_DEV_PACKAGES} git cmake wget file
- fi
- echo -e "done\n"
- exit 0
+ echo "Your distribution does not appear to be currently supported by these build scripts"
+ exit 1
fi
+source ./linux.d/${DISTRIBUTION}
-FOUND_GTK2_DEV=$(dpkg -l libgtk* | grep gtk2.0-dev || echo '')
-FOUND_GTK3_DEV=$(dpkg -l libgtk* | grep gtk-3-dev || echo '')
-echo "FOUND_GTK2=$FOUND_GTK2)"
-if [[ -z "$FOUND_GTK2_DEV" ]]
-then
-if [[ -z "$FOUND_GTK3_DEV" ]]
+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 0
-fi
+ exit 1
fi
-echo "[1/9] Updating submodules..."
-{
- # update submodule profiles
- pushd resources/profiles
- git submodule update --init
- popd
-}
-
-echo "[2/9] Changing date in version..."
+echo "Changing date in version..."
{
# change date in version
sed -i "s/+UNKNOWN/_$(date '+%F')/" version.inc
}
echo "done"
-# mkdir in deps
-if [ ! -d "deps/build" ]
+if ! [[ -n "${SKIP_RAM_CHECK}" ]]
then
- mkdir deps/build
+ check_available_memory_and_disk
fi
-if ! [[ -n "$SKIP_RAM_CHECK" ]]
+if ! [[ -n "${DISABLE_PARALLEL_LIMIT}" ]]
then
-check_available_memory_and_disk
-fi
-
-if [[ -n "$BUILD_DEPS" ]]
-then
- echo "[3/9] Configuring dependencies..."
- BUILD_ARGS=""
- if [[ -n "$FOUND_GTK3_DEV" ]]
- then
- BUILD_ARGS="-DDEP_WX_GTK3=ON"
+ FREE_MEM_GB=$(free -g -t | grep 'Mem' | rev | cut -d" " -f1 | rev)
+ MAX_THREADS=$(echo "scale=0; $FREE_MEM_GB / 2.5" | bc)
+ if [ "$MAX_THREADS" -lt 1 ]; then
+ export CMAKE_BUILD_PARALLEL_LEVEL=1
+ else
+ export CMAKE_BUILD_PARALLEL_LEVEL=${MAX_THREADS}
fi
- if [[ -n "$BUILD_DEBUG" ]]
+ echo "System free memory: ${FREE_MEM_GB} GB"
+ echo "Setting CMAKE_BUILD_PARALLEL_LEVEL: ${CMAKE_BUILD_PARALLEL_LEVEL}"
+fi
+
+if [[ -n "${BUILD_DEPS}" ]]
+then
+ echo "Configuring dependencies..."
+ BUILD_ARGS="-DDEP_WX_GTK3=ON"
+ if [[ -n "${CLEAN_BUILD}" ]]
then
- # have to build deps with debug & release or the cmake won't find evrything it needs
+ 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
mkdir deps/build/release
- pushd deps/build/release
- cmake ../.. -DDESTDIR="../destdir" $BUILD_ARGS
- make -j$NCORES
- popd
+ cmake -S deps -B deps/build/release -G Ninja -DDESTDIR="../destdir" ${BUILD_ARGS}
+ cmake --build deps/build/release
BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug"
fi
-
- # cmake deps
- pushd deps/build
- cmake .. $BUILD_ARGS
- echo "done"
-
- # make deps
- echo "[4/9] Building dependencies..."
- make -j$NCORES
- echo "done"
- # rename wxscintilla # TODO: DeftDawg: Does QIDIStudio need this?
- # echo "[5/9] Renaming wxscintilla library..."
- # pushd destdir/usr/local/lib
- # if [[ -z "$FOUND_GTK3_DEV" ]]
- # then
- # cp libwxscintilla-3.1.a libwx_gtk2u_scintilla-3.1.a
- # else
- # cp libwxscintilla-3.1.a libwx_gtk3u_scintilla-3.1.a
- # fi
- # popd
- # echo "done"
-
- # FIXME: only clean deps if compiling succeeds; otherwise reruns waste tonnes of time!
- # clean deps
- # echo "[6/9] Cleaning dependencies..."
- # rm -rf dep_*
- popd
- echo "done"
+ 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_QIDI_STUDIO" ]]
+if [[ -n "${BUILD_QIDI_STUDIO}" ]]
then
- echo "[7/9] Configuring Slic3r..."
+ echo "Configuring QIDIStudio..."
+ if [[ -n "${CLEAN_BUILD}" ]]
+ then
+ rm -fr build
+ fi
BUILD_ARGS=""
- if [[ -n "$FOUND_GTK3_DEV" ]]
+ if [[ -n "${FOUND_GTK3_DEV}" ]]
then
BUILD_ARGS="-DSLIC3R_GTK=3"
fi
- if [[ -n "$BUILD_DEBUG" ]]
+ if [[ -n "${BUILD_DEBUG}" ]]
then
BUILD_ARGS="${BUILD_ARGS} -DCMAKE_BUILD_TYPE=Debug -DQDT_INTERNAL_TESTING=1"
else
BUILD_ARGS="${BUILD_ARGS} -DQDT_RELEASE_TO_PUBLIC=1 -DQDT_INTERNAL_TESTING=0"
fi
-
- # cmake
- pushd build
- cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local" -DSLIC3R_STATIC=1 ${BUILD_ARGS}
- echo "done"
-
- # make Slic3r
- echo "[8/9] Building Slic3r..."
- make -j$NCORES QIDIStudio # Slic3r
-
- # make .mo
- # make gettext_po_to_mo # FIXME: DeftDawg: complains about msgfmt not existing even in SuperSlicer, did this ever work?
-
- popd
+ 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 \
+ ${BUILD_ARGS}
+ echo "done"
+ echo "Building QIDIStudio ..."
+ cmake --build build --target QIDIStudio
echo "done"
fi
-if [[ -e $ROOT/build/src/BuildLinuxImage.sh ]]; then
+if [[ -e ${ROOT}/build/src/BuildLinuxImage.sh ]]; then
# Give proper permissions to script
-chmod 755 $ROOT/build/src/BuildLinuxImage.sh
+chmod 755 ${ROOT}/build/src/BuildLinuxImage.sh
echo "[9/9] Generating Linux app..."
pushd build
- if [[ -n "$BUILD_IMAGE" ]]
+ if [[ -n "${BUILD_IMAGE}" ]]
then
- $ROOT/build/src/BuildLinuxImage.sh -i
- else
- $ROOT/build/src/BuildLinuxImage.sh
+ ${ROOT}/build/src/BuildLinuxImage.sh -i
fi
popd
echo "done"
-fi
+fi
\ No newline at end of file
diff --git a/DockerRun.sh b/DockerRun.sh
index 569b635..aa10e6d 100644
--- a/DockerRun.sh
+++ b/DockerRun.sh
@@ -20,6 +20,8 @@ docker run \
--privileged=true \
`# Attach tty for running qidi with command line things` \
-ti \
+ `# Remove container when it is finished` \
+ --rm \
`# Pass all parameters from this script to the qidi ENTRYPOINT binary` \
qidistudio $*
diff --git a/linux.d/debian b/linux.d/debian
new file mode 100644
index 0000000..b519d2e
--- /dev/null
+++ b/linux.d/debian
@@ -0,0 +1,59 @@
+FOUND_GTK3=$(dpkg -l libgtk* | grep gtk-3)
+
+REQUIRED_DEV_PACKAGES=(
+ autoconf
+ build-essential
+ ninja-build
+ cmake
+ extra-cmake-modules
+ file
+ gettext
+ git
+ wget
+ libgstreamerd-3-dev
+ libsecret-1-dev
+ libosmesa6-dev
+ libssl-dev
+ eglexternalplatform-dev
+ libcurl4-openssl-dev
+ libdbus-1-dev
+ libglew-dev
+ libudev-dev
+ libmspack-dev
+ libgl1-mesa-dev
+ libgtk-3-dev
+ libxkbcommon-dev
+ libtool
+ libunwind-dev
+ libfuse2
+ texinfo
+)
+
+if [[ -n "$UPDATE_LIB" ]]
+then
+ # for ubuntu 22+ and 23+:
+ ubu_major_version="$(grep VERSION_ID /etc/os-release | cut -d "=" -f 2 | cut -d "." -f 1 | tr -d /\"/)"
+ if [ $ubu_major_version == "22" ] || [ $ubu_major_version == "23" ]
+ then
+ REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.0-dev curl libfuse-dev libssl-dev libcurl4-openssl-dev m4)
+ elif [ $ubu_major_version == "24" ]
+ then
+ REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.1-dev)
+ else
+ REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.0-dev)
+ fi
+ if [[ -n "$BUILD_DEBUG" ]]
+ then
+ REQUIRED_DEV_PACKAGES+=(libssl-dev libcurl4-openssl-dev)
+ fi
+ # TODO: optimize this by checking which, if any, packages are already installed
+
+ # install them all at once
+ sudo apt update
+ sudo apt install -y ${REQUIRED_DEV_PACKAGES[@]}
+
+ echo -e "done\n"
+ exit 0
+fi
+
+FOUND_GTK3_DEV=$(dpkg -l libgtk* | grep gtk-3-dev || echo '')
\ No newline at end of file
diff --git a/linux.d/fedora b/linux.d/fedora
new file mode 100644
index 0000000..dd48349
--- /dev/null
+++ b/linux.d/fedora
@@ -0,0 +1,61 @@
+FOUND_GTK3=$(rpm -qa | grep -P '^gtk3' || true)
+
+REQUIRED_DEV_PACKAGES=(
+ autoconf
+ automake
+ cmake
+ dbus-devel
+ eglexternalplatform-devel
+ extra-cmake-modules
+ file
+ gcc
+ gcc-c++
+ gettext
+ git
+ perl
+ gstreamer1-devel
+ gstreamer1-plugins-base-devel
+ gstreamer1-plugin-openh264
+ gstreamermm-devel
+ gtk3-devel
+ libmspack-devel
+ libsecret-devel
+ libtool
+ m4
+ mesa-libGLU-devel
+ mesa-libOSMesa-devel
+ mesa-libGL-devel
+ ninja-build
+ openssl-devel
+ perl-FindBin
+ texinfo
+ wayland-devel
+ wayland-protocols-devel
+ libxkbcommon-devel
+ wget
+ libcurl-devel
+ libquadmath-devel
+)
+
+if [[ -n "$UPDATE_LIB" ]]
+then
+ NEEDED_PKGS=""
+ fedora_version=$(awk -F= '/^VERSION_ID=/ {print $2}' /etc/os-release)
+ if [ $fedora_version == "40" ]
+ then
+ REQUIRED_DEV_PACKAGES+=(webkit2gtk4.1-devel)
+ else
+ REQUIRED_DEV_PACKAGES+=(webkit2gtk4.0-devel)
+ fi
+ for PKG in ${REQUIRED_DEV_PACKAGES[@]}; do
+ rpm -q ${PKG} > /dev/null || NEEDED_PKGS+=" ${PKG}"
+ done
+
+ if [ -n "${NEEDED_PKGS}" ]; then
+ sudo dnf install -y ${NEEDED_PKGS}
+ fi
+ echo -e "done\n"
+ exit 0
+fi
+
+FOUND_GTK3_DEV=$(rpm -qa | grep -P '^gtk3-devel' || true)
\ No newline at end of file
diff --git a/resources/printers/version.txt b/resources/printers/version.txt
index 0ba3162..9bc43a9 100644
--- a/resources/printers/version.txt
+++ b/resources/printers/version.txt
@@ -1 +1 @@
-01.08.03.01
\ No newline at end of file
+01.09.03.01
\ No newline at end of file
diff --git a/resources/web/data/text.js b/resources/web/data/text.js
index c9c6339..a18128a 100644
--- a/resources/web/data/text.js
+++ b/resources/web/data/text.js
@@ -42,7 +42,7 @@ var LangText={
"t40": "Network disconnect, please check and try again later.",
"t47": "Please select your login region",
"t48": "Asia-Pacific",
- "t49": "China",
+ "t49": "Chinese Mainland",
"t50": "Log out",
"t52": "Skip",
"t53": "Join",
@@ -107,7 +107,10 @@ var LangText={
"t113":"You may change your choice in preference anytime.",
"t114":"Home",
"t115":"Batch",
- "t116":"Retry"
+ "t116":"Retry",
+ "t117":"Connect Device",
+ "t118":"Please set up your printer connection to view the device.",
+ "t119":"Please use the QIDI Link APP to connect to your printer. Once the link is completed, the online device will be synced to the \"Link\" page."
},
"zh_CN": {
"t1": "欢迎使用QIDI Studio",
@@ -152,7 +155,7 @@ var LangText={
"t40": "网络不通,请检查并稍后重试。",
"t47": "请选择登录区域",
"t48": "亚太",
- "t49": "中国",
+ "t49": "中国内地(大陆)",
"t50": "退出登录",
"t52": "忽略",
"t53": "同意",
@@ -218,6 +221,9 @@ var LangText={
"t114":"首页",
"t115":"批量处理",
"t116": "重试",
+ "t117": "设备连接",
+ "t118":"请设置您的打印机连接以查看设备。",
+ "t119":"请使用 QIDI Link APP 连接您的打印机。链接完成后,在线设备将同步到 “Link” 页面。",
"wk1": "快速入门指南",
"wk2": "本文介绍了QIDI Studio的最基本用法。它指导用户配置软件,创建项目,并逐步完成第一个打印任务。",
"wk3": "基于项目的工作流",
@@ -278,7 +284,7 @@ var LangText={
"t40": "ネットワークが切断されたのようです、もう一度も試しください",
"t47": "地域を選択してください",
"t48": "アジア-太平洋",
- "t49": "中国",
+ "t49": "中国本土",
"t50": "サインアウト",
"t52": "スキップ",
"t53": "参加する",
@@ -343,7 +349,10 @@ var LangText={
"t113":"好みはいつでも変更できます.",
"t114":"トップページ",
"t115":"バッチ",
- "t116": "[再試行]"
+ "t116": "[再試行]",
+ "t117": "デバイスを接続",
+ "t118": "デバイスを表示するには、プリンター接続を設定してください。",
+ "t119": "プリンターに接続するには、QIDI Linkアプリを使用してください。リンクが完了すると、オンラインデバイスが「リンク」ページに同期されます。"
},
"it_IT": {
"t1": "Benvenuti allo Studio QIDI",
@@ -388,7 +397,7 @@ var LangText={
"t40": "Disconnessione di rete, controlla e riprova più tardi.",
"t47": "Seleziona la tua regione di accesso",
"t48": "Asia-Pacifico",
- "t49": "Cina",
+ "t49": "Cina continentale",
"t50": "Esci",
"t52": "Salta",
"t53": "Unisciti",
@@ -453,7 +462,10 @@ var LangText={
"t113":"Puoi cambiare la tua scelta in qualsiasi momento.",
"t114":"Home",
"t115":"Lotto",
- "t116":"Riprova"
+ "t116":"Riprova",
+ "t117": "Collega dispositivo",
+ "t118": "Si prega di configurare la connessione della stampante per visualizzare il dispositivo.",
+ "t119": "Si prega di utilizzare l'app QIDI Link per connettersi alla stampante. Una volta completato il collegamento, il dispositivo online verrà sincronizzato nella pagina \"Link\"."
},
"fr_FR": {
"t1": "Bienvenue chez QIDI Studio",
@@ -498,7 +510,7 @@ var LangText={
"t40": "Déconnexion du réseau, veuillez vérifier et réessayer ultérieurement.",
"t47": "Veuillez sélectionner votre région de connexion",
"t48": "Asie-Pacifique",
- "t49": "Chine",
+ "t49": "Chine continentale",
"t50": "Se déconnecter",
"t52": "Passer",
"t53": "Rejoindre",
@@ -563,7 +575,10 @@ var LangText={
"t113":"Vous pouvez modifier vos préférences à tout moment.",
"t114":"Accueil",
"t115":"Un lot de",
- "t116":"Retenter"
+ "t116":"Retenter",
+ "t117": "Connecter l'appareil",
+ "t118": "Veuillez configurer la connexion de votre imprimante pour voir l'appareil.",
+ "t119": "Veuillez utiliser l'application QIDI Link pour vous connecter à votre imprimante. Une fois le lien terminé, l'appareil en ligne sera synchronisé sur la page \"Lien\"."
},
"de_DE": {
"t1": "Willkommen im QIDI Studio",
@@ -608,7 +623,7 @@ var LangText={
"t40": "Netzwerkfehler, bitte überprüfen und später erneut versuchen.",
"t47": "Bitte wählen Sie Ihre Anmelde-Region",
"t48": "Asien-Pazifik",
- "t49": "China",
+ "t49": "Chinesisches Festland",
"t50": "Abmelden",
"t52": "Überspringen",
"t53": "Beitreten",
@@ -673,7 +688,10 @@ var LangText={
"t113":"Sie können Ihre Wahl jederzeit ändern.",
"t114":"Startseite",
"t115":"Charge",
- "t116":"Erneut versuchen"
+ "t116":"Erneut versuchen",
+ "t117": "Gerät verbinden",
+ "t118": "Bitte richten Sie die Druckerverbindung ein, um das Gerät anzuzeigen.",
+ "t119": "Bitte verwenden Sie die QIDI Link App, um sich mit Ihrem Drucker zu verbinden. Sobald die Verbindung hergestellt ist, wird das Online-Gerät auf der Seite \"Link\" synchronisiert."
},
"hu_HU": {
"t1": "Üdvözöljük a QIDI Stúdióban",
@@ -718,7 +736,7 @@ var LangText={
"t40": "Hálózati kapcsolat megszakadt, kérjük ellenőrizze és próbálja meg később.",
"t47": "Kérem, válassza ki a bejelentkezési régióját",
"t48": "Ázsiai-csendes-óceáni térség",
- "t49": "Kína",
+ "t49": "Kínai szárazföld",
"t50": "Kijelentkezés",
"t52": "Kihagy",
"t53": "Csatlakozás",
@@ -783,7 +801,10 @@ var LangText={
"t113":"Bármikor megváltoztathatja a preferenciáját.",
"t114":"honlap",
"t115":"Tétel",
- "t116":"Újrapróbálkozás"
+ "t116":"Újrapróbálkozás",
+ "t117": "Eszköz csatlakoztatása",
+ "t118": "Kérjük, állítsa be a nyomtató kapcsolatát az eszköz megtekintéséhez.",
+ "t119": "Kérjük, használja a QIDI Link alkalmazást a nyomtatóhoz való csatlakozáshoz. Miután a kapcsolat létrejött, az online eszköz szinkronizálódik a „Link” oldalon."
},
"es_ES": {
"t1": "Bienvenido a QIDI Studio",
@@ -828,7 +849,7 @@ var LangText={
"t40": "Desconexión de red, por favor verifique e intente nuevamente más tarde.",
"t47": "Seleccione su región de inicio de sesión",
"t48": "Asia-Pacífico",
- "t49": "China",
+ "t49": "China continental",
"t50": "Cerrar sesión",
"t52": "Saltar",
"t53": "Unirse",
@@ -893,7 +914,10 @@ var LangText={
"t113":"Puede cambiar sus preferencias en cualquier momento.",
"t114":"Página de inicio",
"t115":"Un lote",
- "t116":"Reintentar"
+ "t116":"Reintentar",
+ "t117": "Conectar dispositivo",
+ "t118": "Por favor, configure la conexión de su impresora para ver el dispositivo.",
+ "t119": "Por favor, use la aplicación QIDI Link para conectarse a su impresora. Una vez completado el enlace, el dispositivo en línea se sincronizará en la página \"Enlace\"."
},
"sv_SE": {
"t1": "Välkommen till QIDI Studio",
@@ -938,7 +962,7 @@ var LangText={
"t40": "Nätverket är frånkopplat, vänligen kontrollera och försök igen senare.",
"t47": "Vänligen välj din inloggningsregion",
"t48": "Asien och Stillahavsområdet",
- "t49": "Kina",
+ "t49": "Kinesiska fastlandet",
"t50": "Logga ut",
"t52": "Hoppa över",
"t53": "Gå med",
@@ -1003,7 +1027,10 @@ var LangText={
"t113":"Du kan ändra ditt val när som helst.",
"t114":"startsida",
"t115":"Batch",
- "t116":"Försök igen"
+ "t116":"Försök igen",
+ "t117": "Anslut enhet",
+ "t118": "Vänligen ställ in din skrivarkoppling för att se enheten.",
+ "t119": "Använd QIDI Link-appen för att ansluta till din skrivare. När länken är klar kommer den online-enheten att synkroniseras till \"Länk\"-sidan."
},
"cs_CZ": {
"t1": "Vítejte v QIDI Studio",
@@ -1048,7 +1075,7 @@ var LangText={
"t40": "Odpojení od sítě, prosím zkontrolujte a zkuste to později znovu.",
"t47": "Vyberte prosím svou přihlašovací oblast",
"t48": "Asie-Pacifik",
- "t49": "Čína",
+ "t49": "Čínská pevninská",
"t50": "Odhlásit se",
"t52": "Přeskočit",
"t53": "Připojit",
@@ -1113,7 +1140,10 @@ var LangText={
"t113":"Své preference můžete kdykoliv změnit.",
"t114":"domovská stránka",
"t115":"Šarže",
- "t116":"Zkuste to znovu"
+ "t116":"Zkuste to znovu",
+ "t117": "Připojit zařízení",
+ "t118": "Nastavte prosím připojení tiskárny, abyste mohli zobrazit zařízení.",
+ "t119": "Použijte prosím aplikaci QIDI Link k připojení k tiskárně. Jakmile bude spojení dokončeno, online zařízení bude synchronizováno na stránce \"Odkaz\"."
},
"nl_NL": {
"t1": "Welkom bij QIDI Studio",
@@ -1158,7 +1188,7 @@ var LangText={
"t40": "Netwerkverbinding verbroken, controleer en probeer het later opnieuw.",
"t47": "Selecteer uw login-regio",
"t48": "Azië-Pacific",
- "t49": "China",
+ "t49": "Chinees vasteland",
"t50": "Uitloggen",
"t52": "Overslaan",
"t53": "Deelnemen",
@@ -1223,7 +1253,10 @@ var LangText={
"t113":"U kunt uw keuze op elk gewenst moment wijzigen.",
"t114":"startpagina",
"t115":"Batch",
- "t116":"Probeer het opnieuw"
+ "t116":"Probeer het opnieuw",
+ "t117": "Apparaat verbinden",
+ "t118": "Stel de printerverbinding in om het apparaat te bekijken.",
+ "t119": "Gebruik de QIDI Link-app om verbinding te maken met uw printer. Zodra de koppeling is voltooid, wordt het online apparaat gesynchroniseerd op de pagina \"Link\"."
},
"uk_UA": {
"t1": "Вітаємо в QIDI Studio!",
@@ -1268,7 +1301,7 @@ var LangText={
"t40": "Мережа відключена. Будь ласка, перевірте з'єднання та спробуйте знову.",
"t47": "Будь ласка, виберіть регіон входу",
"t48": "Азійсько-Тихоокеанський регіон",
- "t49": "Китай",
+ "t49": "Материковый Китай",
"t50": "Вийти",
"t52": "Пропустити",
"t53": "Увійти",
@@ -1333,7 +1366,10 @@ var LangText={
"t113": "Ви можете змінити свої переваги в будь-який час.",
"t114": "Головна сторінка",
"t115": "Одна партія",
- "t116": "Спробувати знову"
+ "t116": "Спробувати знову",
+ "t117": "Підключити пристрій",
+ "t118": "Будь ласка, налаштуйте підключення принтера, щоб переглянути пристрій.",
+ "t119": "Будь ласка, використовуйте додаток QIDI Link для підключення до вашого принтера. Після завершення підключення онлайн-пристрій буде синхронізовано на сторінці \"Посилання\"."
},
"ru_RU": {
"t1": "Приветствуем в QIDI Studio!",
@@ -1378,7 +1414,7 @@ var LangText={
"t40": "Сеть отключена. Пожалуйста, проверьте подключение и попробуйте снова.",
"t47": "Пожалуйста, выберите регион входа",
"t48": "Азиатско-Тихоокеанский регион",
- "t49": "Китай",
+ "t49": "Материковый Китай",
"t50": "Выйти",
"t52": "Пропустить",
"t53": "Войти",
@@ -1443,7 +1479,10 @@ var LangText={
"t113":"Вы можете изменить свои предпочтения в любое время.",
"t114":"Главная страница",
"t115":"Одна партия",
- "t116":"Повторить попытку"
+ "t116":"Повторить попытку",
+ "t117": "Подключить устройство",
+ "t118": "Пожалуйста, настройте подключение принтера, чтобы просмотреть устройство.",
+ "t119": "Пожалуйста, используйте приложение QIDI Link для подключения к вашему принтеру. После завершения подключения онлайн-устройство будет синхронизировано на странице \"Ссылка\"."
},
"tr_TR": {
"t1": "QIDI Stüdyo'ya Hoş Geldiniz",
@@ -1488,7 +1527,7 @@ var LangText={
"t40": "Ağ bağlantısı kesildi, lütfen kontrol edin ve daha sonra tekrar deneyin.",
"t47": "Lütfen giriş bölgenizi seçin",
"t48": "Asya-Pasifik",
- "t49": "Çin",
+ "t49": "Çin Mainland",
"t50": "Çıkış Yap",
"t52": "Atla",
"t53": "Katıl",
@@ -1553,7 +1592,10 @@ var LangText={
"t113":"ercihlerinizde istediğiniz zaman seçiminizi değiştirebilirsiniz.",
"t114":"Ana Sayfa",
"t115":"Toplu",
- "t116":"Yeniden Dene"
+ "t116":"Yeniden Dene",
+ "t117": "Cihazı Bağla",
+ "t118": "Cihazı görüntülemek için lütfen yazıcı bağlantınızı ayarlayın.",
+ "t119": "Yazıcınıza bağlanmak için lütfen QIDI Link uygulamasını kullanın. Bağlantı tamamlandığında, çevrimiçi cihaz \"Bağlantı\" sayfasına senkronize edilecektir."
},
"pt_BR": {
"t1": "Bem-vindo ao QIDI Studio",
@@ -1598,7 +1640,7 @@ var LangText={
"t40": "Conexão desconectada, por favor cheque e tente novamente.",
"t47": "Por favor, selecione sua região de login",
"t48": "Asia-Pacifico",
- "t49": "China",
+ "t49": "China Continental",
"t50": "Desconectar",
"t52": "Pular",
"t53": "Juntar-se",
@@ -1663,7 +1705,234 @@ var LangText={
"t113":"Você pode alterar sua escolha nas Preferências a qualquer momento",
"t114":"Inicio",
"t115":"Lote",
- "t116":"Retentar"
+ "t116":"Retentar",
+ "t117": "Conectar Dispositivo",
+ "t118": "Por favor, configure a conexão da sua impressora para visualizar o dispositivo.",
+ "t119": "Por favor, use o aplicativo QIDI Link para se conectar à sua impressora. Uma vez concluída a conexão, o dispositivo online será sincronizado na página \"Link\"."
+ },
+ "ko_KR": {
+ "t1": "QIDI Studio에 오신 것을 환영합니다",
+ "t2": "QIDI Studio는 몇 단계로 설정됩니다. 시작하겠습니다!",
+ "t3": "사용자 계약",
+ "t4": "동의하지 않음",
+ "t5": "동의",
+ "t6": "모든 사람의 프린팅을 개선하기 위해 귀하의 도움을 부탁드립니다.
고객 경험 개선 프로그램에 참여하십시오",
+ "t7": "고객 경험 개선 프로그램에 참여하세요",
+ "t8": "뒤로",
+ "t9": "다음",
+ "t10": "프린터 선택",
+ "t11": "모두",
+ "t12": "모두 지우기",
+ "t13": "mm 노즐",
+ "t14": "필라멘트 선택",
+ "t15": "프린터",
+ "t16": "필라멘트 종류",
+ "t17": "공급업체",
+ "t18": "오류",
+ "t19": "최소한 하나의 필라멘트를 선택해야 합니다.",
+ "t20": "기본 필라멘트를 사용하시겠습니까?",
+ "t21": "예",
+ "t22": "아니오",
+ "t23": "릴리즈 노트",
+ "t24": "시작하기",
+ "t25": "마침",
+ "t26": "로그인",
+ "t27": "등록",
+ "t28": "모델",
+ "t29": "쇼핑몰",
+ "t30": "매뉴얼",
+ "t31": "새 프로젝트",
+ "t32": "새 프로젝트 생성",
+ "t33": "핫스팟",
+ "t34": "최근 열었습니다",
+ "t35": "확인",
+ "t36": "최소한 하나의 프린터를 선택해야 합니다.",
+ "t37": "취소",
+ "t38": "확인",
+ "t39": "네트워크가 연결되지 않았습니다. 확인 후 나중에 다시 시도하십시오.",
+ "t47": "로그인 지역을 선택해 주십시오",
+ "t48": "아시아 태평양",
+ "t49": "중국 본토",
+ "t50": "로그아웃",
+ "t52": "건너뛰기",
+ "t53": "가입",
+ "t54": "3D 프린팅 커뮤니티에서는 서로의 성공과 실패를 배우고 자신의 슬라이싱 매개변수와 설정을 조정합니다. QIDI Studio는 동일한 원칙을 따르고 기계 학습을 사용하여 우리 사용자들의 방대한 인쇄의 성공과 실패로 그 성능을 개선합니다. 우리는 실제 데이터를 공급하여 QIDI Studio를 더 똑똑하게 훈련시키고 있습니다. 귀하가 원한다면 이 서비스는 오류 로그 및 사용 로그의 정보에 액세스할 것입니다. 여기에는 다음에 설명된 정보가 포함될 수 있습니다.",
+ "t55": "개인 정보 정책",
+ "t56": ". 우리는 개인이 직접 또는 간접적으로 식별할 수 있는 개인 정보를 수집하지 않습니다. 여기에는 이름, 주소, 결제 정보 또는 전화 번호를 포함하지 않습니다. 이 서비스를 활성화하면 이러한 약관과 개인 정보 정책에 관한 설명에 동의하는 것입니다.",
+ "t57": "",
+ "t58": "",
+ "t59": ".",
+ "t60": "유럽",
+ "t61": "북미",
+ "t62": "기타",
+ "t63": "지역을 변경한 후 귀하의 계정은 로그아웃됩니다. 나중에 다시 로그인하십시오.",
+ "t64": "QIDI 네트워크 플러그인",
+ "t65": "WLAN을 통한 인쇄 작업 보내기",
+ "t66": "완전한 원격 제어",
+ "t67": "라이브뷰 스트리밍",
+ "t68": "사용자 데이터 동기화",
+ "t69": "QIDI 네트워크 플러그인 설치",
+ "t70": "",
+ "t71": "다운로드 중",
+ "t72": "다운로드 실패",
+ "t73": "설치 성공.",
+ "t74": "다시 시작",
+ "t75": "QIDI 네트워크 플러그인은 다음 기능을 제공합니다:",
+ "t76": "QIDI 네트워크 플러그인이 감지되지 않았습니다. 클릭 ",
+ "t77": "여기에",
+ "t78": " 설치하려면.",
+ "t79": "플러그인 설치 실패. ",
+ "t80": "다음 단계를 시도하십시오:",
+ "t81": "1, 클릭 ",
+ "t82": " 플러그인 디렉토리 열기",
+ "t83": "2, 모든 QIDI Studio 닫기",
+ "t84": "3, 플러그인 디렉토리의 모든 파일 삭제",
+ "t85": "4, QIDI Studio를 다시 열고 플러그인을 다시 설치하십시오",
+ "t86": "닫기",
+ "t87": "사용자 매뉴얼",
+ "t88": "제거",
+ "t89": "포함 폴더 열기",
+ "t90": "3D 모델",
+ "t91": "3D 모델 다운로드",
+ "t92": "만든이",
+ "t93": "리믹스한 사람",
+ "t94": "공유한 사람",
+ "t95": "모델 정보",
+ "t96": "액세서리",
+ "t97": "프로필 정보",
+ "t98": "모델 이름",
+ "t100": "모델 설명",
+ "t101": "BOM",
+ "t102": "조립 가이드",
+ "t103": "기타",
+ "t104": "프로필 이름",
+ "t105": "프로필 작가",
+ "t106": "프로필 설명",
+ "t107": "온라인 모델",
+ "t108": "더보기",
+ "t109": "시스템 필라멘트",
+ "t110": "사용자 정의 필라멘트",
+ "t111": "새로 만들기",
+ "t112": "프로그램에 가입하세요",
+ "t113": "언제든지 환경 설정에서 선택을 변경할 수 있습니다.",
+ "t114": "홈",
+ "t115": "일괄",
+ "t116": "재시도",
+ "t117": "장치 연결",
+ "t118": "장치를 보려면 프린터 연결을 설정하십시오.",
+ "t119": "프린터에 연결하려면 QIDI Link 앱을 사용하십시오. 연결이 완료되면 온라인 장치가 '링크' 페이지에 동기화됩니다."
+ },
+ "pl_PL": {
+ "t1": "Witamy w QIDI Studio",
+ "t2": "Konfiguracja QIDI Studio odbywa się w kilka kroków. Zacznijmy!",
+ "t3": "Umowa Użytkownika",
+ "t4": "Nie zgadzam się",
+ "t5": "Zgadzam się",
+ "t6": "Prosimy o Twoją pomoc w usprawnieniu drukowania dla wszystkich.
Dołącz do naszego Programu Poprawy Doświadczenia Klienta",
+ "t7": "Dołącz do naszego Programu Poprawy Doświadczenia Klienta",
+ "t8": "Wstecz",
+ "t9": "Dalej",
+ "t10": "Wybór drukarki",
+ "t11": "Wszystko",
+ "t12": "Wyczyść wszystko",
+ "t13": "dysza mm",
+ "t14": "Wybór filamentu",
+ "t15": "Drukarka",
+ "t16": "Typ filamentu",
+ "t17": "Dostawca",
+ "t18": "błąd",
+ "t19": "Musisz wybrać przynajmniej jeden filament.",
+ "t20": "Czy chcesz użyć domyślnego filamentu?",
+ "t21": "tak",
+ "t22": "nie",
+ "t23": "Informacje o wydaniu",
+ "t24": "Rozpocznij",
+ "t25": "Zakończ",
+ "t26": "Zaloguj się",
+ "t27": "Zarejestruj się",
+ "t28": "Modele",
+ "t29": "Sklep",
+ "t30": "Instrukcja",
+ "t31": "Nowy projekt",
+ "t32": "Utwórz nowy projekt",
+ "t33": "Punkt aktywacji",
+ "t34": "Ostatnio otwarte",
+ "t35": "ok",
+ "t36": "Przynajmniej jedna drukarka musi zostać wybrana.",
+ "t37": "Anuluj",
+ "t38": "Potwierdź",
+ "t39": "Rozłączenie sieci, proszę sprawdzić i spróbować ponownie później.",
+ "t47": "Prosimy wybrać region logowania",
+ "t48": "Azja i Pacyfik",
+ "t49": "Chiński kontynent",
+ "t50": "Wyloguj się",
+ "t52": "Pomiń",
+ "t53": "Dołącz",
+ "t54": "W społeczności drukowania 3D uczymy się od sukcesów i porażek innych, aby dostosować nasze parametry cięcia i ustawienia. QIDI Studio działa na tej samej zasadzie i wykorzystuje uczenie maszynowe, aby poprawiać swoją wydajność na podstawie sukcesów i niepowodzeń licznych wydruków naszych użytkowników. Trenujemy QIDI Studio, aby stać się mądrzejszą, dostarczając rzeczywiste dane z życia. Jeśli jesteś zainteresowany, ta usługa będzie mieć dostęp do informacji z Twoich dzienników błędów i dzienników użytkowania, które mogą zawierać informacje opisane w",
+ "t55": "Polityka Prywatności",
+ "t56": ". Nie zbieramy żadnych danych osobowych, które pozwolą na bezpośrednie lub pośrednie zidentyfikowanie osoby, w tym, ale nie ograniczając się do imion, adresów, informacji o płatności lub numerów telefonów. Włączając tę usługę, akceptujesz te warunki oraz oświadczenie dotyczące Polityki Prywatności.",
+ "t57": "",
+ "t58": "",
+ "t59": ".",
+ "t60": "Europa",
+ "t61": "Ameryka Północna",
+ "t62": "Inne",
+ "t63": "Po zmianie regionu Twoje konto zostanie wylogowane. Zaloguj się ponownie później.",
+ "t64": "Wtyczka QIDI Network",
+ "t65": "Wysyłanie zadania drukowania przez WLAN",
+ "t66": "Pełne zdalne sterowanie",
+ "t67": "Transmisja na żywo",
+ "t68": "Synchronizacja danych użytkownika",
+ "t69": "Zainstaluj wtyczkę QIDI Network",
+ "t70": "",
+ "t71": "Pobieranie",
+ "t72": "Pobieranie nie powiodło się",
+ "t73": "Instalacja powiodła się.",
+ "t74": "Uruchom ponownie",
+ "t75": "Wtyczka QIDI Network zapewnia następujące funkcje:",
+ "t76": "Nie wykryto wtyczki QIDI Network. Kliknij ",
+ "t77": "tutaj",
+ "t78": ", aby zainstalować.",
+ "t79": "Nie udało się zainstalować wtyczki. ",
+ "t80": "Spróbuj następujących kroków:",
+ "t81": "1, Kliknij ",
+ "t82": ", aby otworzyć katalog wtyczki",
+ "t83": "2, Zamknij wszystkie otwarte QIDI Studio",
+ "t84": "3, Usuń wszystkie pliki w katalogu wtyczki",
+ "t85": "4, Otwórz ponownie QIDI Studio i zainstaluj wtyczkę ponownie",
+ "t86": "Zamknij",
+ "t87": "Instrukcja obsługi",
+ "t88": "Usuń",
+ "t89": "Otwórz folder zawierający",
+ "t90": "Model 3D",
+ "t91": "Pobierz modele 3D",
+ "t92": "Utworzone przez",
+ "t93": "Remixowane przez",
+ "t94": "Udostępnione przez",
+ "t95": "Informacje o modelu",
+ "t96": "Akcesoria",
+ "t97": "Informacje o profilu",
+ "t98": "Nazwa modelu",
+ "t100": "Opis modelu",
+ "t101": "BOM",
+ "t102": "Instrukcja montażu",
+ "t103": "Inne",
+ "t104": "Nazwa profilu",
+ "t105": "Autor profilu",
+ "t106": "Opis profilu",
+ "t107": "Modele online",
+ "t108": "Więcej",
+ "t109": "Filamenty systemowe",
+ "t110": "Filamenty niestandardowe",
+ "t111": "Utwórz nowy",
+ "t112": "Dołącz do programu",
+ "t113": "Możesz zmienić swoją odpowiedź w preferencjach w dowolnym momencie.",
+ "t114": "Strona główna",
+ "t115": "Partia",
+ "t116": "Ponów",
+ "t117": "Podłącz urządzenie",
+ "t118": "Proszę skonfigurować połączenie drukarki, aby wyświetlić urządzenie.",
+ "t119": "Proszę użyć aplikacji QIDI Link, aby połączyć się z drukarką. Po zakończeniu połączenia, urządzenie online zostanie zsynchronizowane na stronie \"Link\"."
}
};
diff --git a/resources/web/guide/11/index.html b/resources/web/guide/11/index.html
index 329464c..3e71098 100644
--- a/resources/web/guide/11/index.html
+++ b/resources/web/guide/11/index.html
@@ -22,7 +22,7 @@

+
(option))->getInt();
+ else
+ obj_extruder_id = 1;
+ for (int volume_idx = 0; volume_idx < (int)model_object.volumes.size(); ++ volume_idx) {
+ const ModelVolume &model_volume = *model_object.volumes[volume_idx];
+ option = model_volume.config.option("extruder");
+ if (option)
+ volume_extruder_id = (dynamic_cast(option))->getInt();
+ else
+ volume_extruder_id = obj_extruder_id;
+
+ BOOST_LOG_TRIVIAL(debug) << boost::format("volume %1%'s extruder_id %2%")%volume_idx %volume_extruder_id;
+ //if (!model_volume.is_model_part())
+ // continue;
+ for (int instance_idx = 0; instance_idx < (int)model_object.instances.size(); ++ instance_idx) {
+ const ModelInstance &model_instance = *model_object.instances[instance_idx];
+ glvolume_collection.load_object_volume(&model_object, obj_idx, volume_idx, instance_idx, "volume", true, false, true);
+ //glvolume_collection.volumes.back()->geometry_id = key.geometry_id;
+ std::string color = filament_color?filament_color->get_at(volume_extruder_id - 1):"#00FF00FF";
+
+ BOOST_LOG_TRIVIAL(debug) << boost::format("volume %1%'s color %2%")%volume_idx %color;
+
+ unsigned char rgb_color[4] = {};
+ Slic3r::GUI::BitmapCache::parse_color4(color, rgb_color);
+
+ std::array new_color;
+ new_color[0] = float(rgb_color[0]) / 255.f;
+ new_color[1] = float(rgb_color[1]) / 255.f;
+ new_color[2] = float(rgb_color[2]) / 255.f;
+ new_color[3] = float(rgb_color[3]) / 255.f;
+
+ glvolume_collection.volumes.back()->set_render_color( new_color[0], new_color[1], new_color[2], new_color[3]);
+ glvolume_collection.volumes.back()->set_color(new_color);
+ glvolume_collection.volumes.back()->printable = model_instance.printable;
+ }
+ }
+ }
+ }
+ }
+ BOOST_LOG_TRIVIAL(info) << boost::format("init_opengl_and_colors finished, gl_valid=%1%")%gl_valid;
+ return gl_valid;
+ };
+
for (auto const &opt_key : m_actions) {
if (opt_key == "help") {
this->print_help();
@@ -4783,8 +5125,16 @@ int CLI::run(int argc, char **argv)
model.curr_plate_index = index;
BOOST_LOG_TRIVIAL(info) << boost::format("Plate %1%: pre_check %2%, start")%(index+1)%pre_check;
- long long start_time = 0, end_time = 0, temp_time = 0, time_using_cache = 0;
- start_time = (long long)Slic3r::Utils::get_current_time_utc();
+ //1.9.5
+ long long start_time = 0, end_time = 0, temp_time = 0;
+
+ std::unordered_map slice_time;
+ slice_time[TIME_USING_CACHE] = 0;
+ slice_time[TIME_MAKE_PERIMETERS] = 0;
+ slice_time[TIME_INFILL] = 0;
+ slice_time[TIME_GENERATE_SUPPORT] = 0;
+
+ start_time = (long long)Slic3r::Utils::get_current_milliseconds_time_utc();
//get the current partplate
Slic3r::GUI::PartPlate* part_plate = partplate_list.get_plate(index);
part_plate->get_print(&print, &gcode_result, &print_index);
@@ -5019,8 +5369,9 @@ int CLI::run(int argc, char **argv)
}
}
else {
- print->process(&time_using_cache);
- BOOST_LOG_TRIVIAL(info) << "print::process: first time_using_cache is " << time_using_cache << " secs.";
+ //1.9.5
+ print->process(&slice_time);
+ BOOST_LOG_TRIVIAL(info) << "print::process: first time_using_cache is " << slice_time[TIME_USING_CACHE] << " secs.";
}
if (printer_technology == ptFFF) {
std::string conflict_result = print_fff->get_conflict_string();
@@ -5061,6 +5412,40 @@ int CLI::run(int argc, char **argv)
g_slicing_warnings.clear();
}
sliced_plate_info.triangle_count = plate_triangle_counts[index];
+ //1.9.5
+ auto cli_generate_thumbnails = [&partplate_list, &model, &glvolume_collection, &colors_out, &shader](const ThumbnailsParams& params) -> ThumbnailsList{
+ ThumbnailsList thumbnails;
+ for (const Vec2d& size : params.sizes) {
+ thumbnails.push_back(ThumbnailData());
+ Point isize(size); // round to ints
+ ThumbnailData& thumbnail_data = thumbnails.back();
+ switch (Slic3r::GUI::OpenGLManager::get_framebuffers_type())
+ {
+ case Slic3r::GUI::OpenGLManager::EFramebufferType::Arb:
+ {
+ BOOST_LOG_TRIVIAL(info) << boost::format("framebuffer_type: ARB");
+ Slic3r::GUI::GLCanvas3D::render_thumbnail_framebuffer(thumbnail_data,
+ isize.x(), isize.y(), params,
+ partplate_list, model.objects, glvolume_collection, colors_out, shader, Slic3r::GUI::Camera::EType::Ortho);
+ break;
+ }
+ case Slic3r::GUI::OpenGLManager::EFramebufferType::Ext:
+ {
+ BOOST_LOG_TRIVIAL(info) << boost::format("framebuffer_type: EXT");
+ Slic3r::GUI::GLCanvas3D::render_thumbnail_framebuffer_ext(thumbnail_data,
+ isize.x(), isize.y(), params,
+ partplate_list, model.objects, glvolume_collection, colors_out, shader, Slic3r::GUI::Camera::EType::Ortho);
+ break;
+ }
+ default:
+ BOOST_LOG_TRIVIAL(info) << boost::format("framebuffer_type: unknown");
+ break;
+ }
+ if (!thumbnails.back().is_valid())
+ thumbnails.pop_back();
+ }
+ return thumbnails;
+ };
// The outfile is processed by a PlaceholderParser.
//outfile = part_plate->get_tmp_gcode_path();
@@ -5072,10 +5457,18 @@ int CLI::run(int argc, char **argv)
part_plate->set_tmp_gcode_path(outfile);
}
BOOST_LOG_TRIVIAL(info) << "process finished, will export gcode temporily to " << outfile << std::endl;
- temp_time = (long long)Slic3r::Utils::get_current_time_utc();
- outfile = print_fff->export_gcode(outfile, gcode_result, nullptr);
- time_using_cache = time_using_cache + ((long long)Slic3r::Utils::get_current_time_utc() - temp_time);
- BOOST_LOG_TRIVIAL(info) << "export_gcode finished: time_using_cache update to " << time_using_cache << " secs.";
+ //1.9.5
+ temp_time = (long long)Slic3r::Utils::get_current_milliseconds_time_utc();
+ if (is_qdt_vendor_preset) {
+ outfile = print_fff->export_gcode(outfile, gcode_result, nullptr);
+ }
+ else {
+ if (!opengl_valid)
+ opengl_valid = init_opengl_and_colors(model, colors);
+ outfile = print_fff->export_gcode(outfile, gcode_result, cli_generate_thumbnails);
+ }
+ slice_time[TIME_USING_CACHE] = slice_time[TIME_USING_CACHE] + ((long long)Slic3r::Utils::get_current_milliseconds_time_utc() - temp_time);
+ BOOST_LOG_TRIVIAL(info) << "export_gcode finished: time_using_cache update to " << slice_time[TIME_USING_CACHE] << " secs.";
//outfile_final = (dynamic_cast(print))->print_statistics().finalize_output_path(outfile);
//m_fff_print->export_gcode(m_temp_output_path, m_gcode_result, [this](const ThumbnailsParams& params) { return this->render_thumbnails(params); });
@@ -5117,14 +5510,20 @@ int CLI::run(int argc, char **argv)
flush_and_exit(ret);
}
}
- end_time = (long long)Slic3r::Utils::get_current_time_utc();
+ //1.9.5
+ end_time = (long long)Slic3r::Utils::get_current_milliseconds_time_utc();
sliced_plate_info.sliced_time = end_time - start_time;
- sliced_plate_info.sliced_time_with_cache = time_using_cache;
+ //1.9.5
+ sliced_plate_info.sliced_time_with_cache = slice_time[TIME_USING_CACHE];
+ sliced_plate_info.make_perimeters_time = slice_time[TIME_MAKE_PERIMETERS];
+ sliced_plate_info.infill_time = slice_time[TIME_INFILL];
+ sliced_plate_info.generate_support_material_time = slice_time[TIME_GENERATE_SUPPORT];
if (max_slicing_time_per_plate != 0) {
long long time_cost = end_time - start_time;
- if (time_cost > max_slicing_time_per_plate) {
- sliced_plate_info.warning_message = (boost::format("plate %1%'s slice time %2% exceeds the limit %3%, return error.")%(index+1) %time_cost %max_slicing_time_per_plate).str();
+ //1.9.5
+ if (time_cost > max_slicing_time_per_plate * 1000) {
+ sliced_plate_info.warning_message = (boost::format("plate %1%'s slice time %2% exceeds the limit %3%, return error.")%(index+1) %time_cost %(max_slicing_time_per_plate * 1000)).str();
BOOST_LOG_TRIVIAL(error) << sliced_plate_info.warning_message;
sliced_info.sliced_plates.push_back(sliced_plate_info);
record_exit_reson(outfile_dir, CLI_SLICING_TIME_EXCEEDS_LIMIT, index+1, cli_errors[CLI_SLICING_TIME_EXCEEDS_LIMIT], sliced_info);
@@ -5190,8 +5589,8 @@ int CLI::run(int argc, char **argv)
flush_and_exit(CLI_UNSUPPORTED_OPERATION);
}
}
-
- global_begin_time = (long long)Slic3r::Utils::get_current_time_utc();
+ //1.9.5
+ global_begin_time = (long long)Slic3r::Utils::get_current_milliseconds_time_utc();
if (export_to_3mf) {
//QDS: export as qdt 3mf
std::vector thumbnails, no_light_thumbnails, top_thumbnails, pick_thumbnails;
@@ -5238,8 +5637,9 @@ int CLI::run(int argc, char **argv)
bool need_create_thumbnail_group = false, need_create_no_light_group = false, need_create_top_group = false;
// get type and color for platedata
- auto* filament_types = dynamic_cast(m_print_config.option("filament_type"));
- const ConfigOptionStrings* filament_color = dynamic_cast(m_print_config.option("filament_colour"));
+ //1.9.5
+ //auto* filament_types = dynamic_cast(m_print_config.option("filament_type"));
+ //const ConfigOptionStrings* filament_color = dynamic_cast(m_print_config.option("filament_colour"));
auto* filament_id = dynamic_cast(m_print_config.option("filament_ids"));
const ConfigOptionFloats* nozzle_diameter_option = dynamic_cast(m_print_config.option("nozzle_diameter"));
std::string nozzle_diameter_str;
@@ -5339,7 +5739,10 @@ int CLI::run(int argc, char **argv)
}
if (need_regenerate_thumbnail || need_regenerate_no_light_thumbnail || need_regenerate_top_thumbnail) {
- std::vector colors;
+ //1.9.5
+ if (!opengl_valid)
+ opengl_valid = init_opengl_and_colors(m_models[0], colors);
+ /*std::vector colors;
if (filament_color) {
colors= filament_color->vserialize();
}
@@ -5393,11 +5796,11 @@ int CLI::run(int argc, char **argv)
}
else
glfwMakeContextCurrent(window);
- }
+ }*/
//opengl manager related logic
{
- Slic3r::GUI::OpenGLManager opengl_mgr;
+ /*Slic3r::GUI::OpenGLManager opengl_mgr;
bool opengl_valid = opengl_mgr.init_gl(false);
if (!opengl_valid) {
BOOST_LOG_TRIVIAL(error) << "init opengl failed! skip thumbnail generating" << std::endl;
@@ -5454,7 +5857,10 @@ int CLI::run(int argc, char **argv)
if (!shader) {
BOOST_LOG_TRIVIAL(error) << boost::format("can not get shader for rendering thumbnail");
}
- else {
+ else {*/
+ //1.9.5
+ if (opengl_valid) {
+ Model &model = m_models[0];
for (int i = 0; i < partplate_list.get_plate_count(); i++) {
Slic3r::GUI::PartPlate *part_plate = partplate_list.get_plate(i);
PlateData *plate_data = plate_data_list[i];
@@ -5674,7 +6080,6 @@ int CLI::run(int argc, char **argv)
}
}
}
- }
}
//QDS: release glfw
glfwTerminate();
@@ -5929,7 +6334,8 @@ int CLI::run(int argc, char **argv)
}
//QDS: flush logs
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ", Finished" << std::endl;
- global_current_time = (long long)Slic3r::Utils::get_current_time_utc();
+ //1.9.5
+ global_current_time = (long long)Slic3r::Utils::get_current_milliseconds_time_utc();
sliced_info.export_time = (size_t) (global_current_time - global_begin_time);
//record the duplicate here
@@ -6220,7 +6626,6 @@ std::string CLI::output_filepath(const ModelObject &object, unsigned int index,
return output_path;
}
-
//QDS: dump stack debug codes, don't delete currently
//#include
//#pragma comment(lib, "version.lib")
diff --git a/src/clipper2/CMakeLists.txt b/src/clipper2/CMakeLists.txt
index 275f927..a9570bf 100644
--- a/src/clipper2/CMakeLists.txt
+++ b/src/clipper2/CMakeLists.txt
@@ -39,7 +39,9 @@ if (WIN32)
else()
target_compile_options(Clipper2 PRIVATE -Wall -Wextra -Wpedantic -Werror)
target_link_libraries(Clipper2 PUBLIC -lm)
-
+ if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 14.1)
+ target_compile_options(Clipper2 PRIVATE -Wno-error=template-id-cdtor)
+ endif()
endif()
set_target_properties(Clipper2 PROPERTIES FOLDER Libraries
diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp
index 137bfc7..771148b 100644
--- a/src/libslic3r/AppConfig.cpp
+++ b/src/libslic3r/AppConfig.cpp
@@ -181,6 +181,10 @@ void AppConfig::set_defaults()
if (get("enable_multi_machine").empty())
set_bool("enable_multi_machine", false);
+ //w13
+ if (get("enable_seal").empty())
+ set_bool("enable_seal", true);
+
#ifdef _WIN32
@@ -336,6 +340,13 @@ void AppConfig::set_defaults()
if (get("user_token").empty())
set("user_token", "");
+ //y33
+ if(get("user_head_url").empty())
+ set("user_head_url", "");
+
+ if(get("user_head_name").empty())
+ set("user_head_name", "");
+
if (get("sending_interval").empty()) {
set("sending_interval", "5");
}
diff --git a/src/libslic3r/Arachne/utils/ExtrusionLine.cpp b/src/libslic3r/Arachne/utils/ExtrusionLine.cpp
index 30f06f2..afb35a4 100644
--- a/src/libslic3r/Arachne/utils/ExtrusionLine.cpp
+++ b/src/libslic3r/Arachne/utils/ExtrusionLine.cpp
@@ -264,17 +264,28 @@ double ExtrusionLine::area() const
} // namespace Slic3r::Arachne
namespace Slic3r {
-void extrusion_paths_append(ExtrusionPaths &dst, const ClipperLib_Z::Paths &extrusion_paths, const ExtrusionRole role, const Flow &flow)
+// 1.9.5
+void extrusion_paths_append(ExtrusionPaths &dst, const ClipperLib_Z::Paths &extrusion_paths, const ExtrusionRole role, const Flow &flow, int overhang)
{
for (const ClipperLib_Z::Path &extrusion_path : extrusion_paths) {
ThickPolyline thick_polyline = Arachne::to_thick_polyline(extrusion_path);
- Slic3r::append(dst, thick_polyline_to_multi_path(thick_polyline, role, flow, scaled(0.05), float(SCALED_EPSILON)).paths);
+ //1.9.5
+ Slic3r::append(dst, thick_polyline_to_multi_path(thick_polyline, role, flow, scaled(0.05), float(SCALED_EPSILON), overhang).paths);
}
}
-void extrusion_paths_append(ExtrusionPaths &dst, const Arachne::ExtrusionLine &extrusion, const ExtrusionRole role, const Flow &flow)
+//1.9.5
+void extrusion_paths_append(ExtrusionPaths &dst, const Arachne::ExtrusionLine &extrusion, const ExtrusionRole role, const Flow &flow, int overhang)
{
ThickPolyline thick_polyline = Arachne::to_thick_polyline(extrusion);
- Slic3r::append(dst, thick_polyline_to_multi_path(thick_polyline, role, flow, scaled(0.05), float(SCALED_EPSILON)).paths);
+ //1.9.5
+ Slic3r::append(dst, thick_polyline_to_multi_path(thick_polyline, role, flow, scaled(0.05), float(SCALED_EPSILON), overhang).paths);
}
+
+//1.9.5
+void extrusion_path_append(ExtrusionPaths &dst, const ThickPolyline &thick_polyline, const ExtrusionRole role, const Flow &flow, int overhang)
+{
+ Slic3r::append(dst, thick_polyline_to_multi_path(thick_polyline, role, flow, scaled(0.05), float(SCALED_EPSILON), overhang).paths);
+}
+
} // namespace Slic3r
\ No newline at end of file
diff --git a/src/libslic3r/Arachne/utils/ExtrusionLine.hpp b/src/libslic3r/Arachne/utils/ExtrusionLine.hpp
index 7ac1a3c..83b0984 100644
--- a/src/libslic3r/Arachne/utils/ExtrusionLine.hpp
+++ b/src/libslic3r/Arachne/utils/ExtrusionLine.hpp
@@ -299,9 +299,10 @@ using VariableWidthLines = std::vector; //mm3_per_mm = rhs.mm3_per_mm;
this->width = rhs.width;
this->height = rhs.height;
+ this->smooth_speed = rhs.smooth_speed; //1.9.5
this->overhang_degree = rhs.overhang_degree;
this->curve_degree = rhs.curve_degree;
this->polyline = rhs.polyline;
@@ -210,6 +216,7 @@ public:
this->mm3_per_mm = rhs.mm3_per_mm;
this->width = rhs.width;
this->height = rhs.height;
+ this->smooth_speed = rhs.smooth_speed; //1.9.5
this->overhang_degree = rhs.overhang_degree;
this->curve_degree = rhs.curve_degree;
this->polyline = std::move(rhs.polyline);
diff --git a/src/libslic3r/Flow.cpp b/src/libslic3r/Flow.cpp
index a086458..907e1fb 100644
--- a/src/libslic3r/Flow.cpp
+++ b/src/libslic3r/Flow.cpp
@@ -190,8 +190,11 @@ Flow Flow::with_cross_section(float area_new) const
float Flow::rounded_rectangle_extrusion_spacing(float width, float height)
{
auto out = width - height * float(1. - 0.25 * PI);
- if (out <= 0.f)
+ //1.9.5
+ if (out <= 0.f){
+ BOOST_LOG_TRIVIAL(error)<< __FUNCTION__ << boost::format("negative extrusion : width %1% height %2%") % width % height;
throw FlowErrorNegativeSpacing();
+ }
return out;
}
diff --git a/src/libslic3r/Format/qds_3mf.cpp b/src/libslic3r/Format/qds_3mf.cpp
index dc6e8b3..09ff042 100644
--- a/src/libslic3r/Format/qds_3mf.cpp
+++ b/src/libslic3r/Format/qds_3mf.cpp
@@ -1681,7 +1681,8 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
/*if (m_qidislicer_generator_version) {
Semver app_version = *(Semver::parse(SLIC3R_VERSION));
Semver file_version = *m_qidislicer_generator_version;
- if (file_version.maj() != app_version.maj())
+ //1.9.5
+ if (file_version.maj() > app_version.maj())
dont_load_config = true;
}
else {
@@ -7326,7 +7327,14 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
else if (obj){
inst = obj->instances[inst_id];
if (use_loaded_id && (inst->loaded_id > 0))
+ {
+ //1.9.5
identify_id = inst->loaded_id;
+ if (identify_id & 0xFF000000) {
+ BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ":" << __LINE__ << boost::format(", identify_id %1%, too big, limit the high bits to 0\n") % identify_id;
+ identify_id = identify_id & 0x00FFFFFF;
+ }
+ }
else
identify_id = inst->id().id;
}
@@ -7515,8 +7523,18 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
continue;
}
inst = obj->instances[inst_id];
+ //1.9.5
+ if (!inst->printable)
+ continue;
if (m_use_loaded_id && (inst->loaded_id > 0))
+ {
identify_id = inst->loaded_id;
+ if (identify_id & 0xFF000000) {
+ BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ":" << __LINE__ << boost::format(", identify_id %1%, too big, limit the high bits to 0\n") % identify_id;
+ identify_id = identify_id & 0x00FFFFFF;
+ }
+ }
+
else
identify_id = inst->id().id;
bool skipped = std::find(plate_data->skipped_objects.begin(), plate_data->skipped_objects.end(), identify_id) !=
diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp
index d0f2df0..4c5676e 100644
--- a/src/libslic3r/GCode.cpp
+++ b/src/libslic3r/GCode.cpp
@@ -81,6 +81,9 @@ static const float g_min_purge_volume = 100.f;
static const float g_purge_volume_one_time = 135.f;
static const int g_max_flush_count = 4;
static const size_t g_max_label_object = 64;
+//1.9.5
+static const double smooth_speed_step = 10;
+static const double not_split_length = scale_(1.0);
Vec2d travel_point_1;
Vec2d travel_point_2;
@@ -588,7 +591,8 @@ static std::vector get_path_of_change_filament(const Print& print)
check_add_eol(toolchange_gcode_str);
//OrcaSlicer: set new PA for new filament. QDS: never use for QIDI Printer
- if (!gcodegen.is_QDT_Printer() && gcodegen.config().enable_pressure_advance.get_at(new_extruder_id))
+ //w30
+ if ( gcodegen.config().enable_pressure_advance.get_at(new_extruder_id))
gcode += gcodegen.writer().set_pressure_advance(gcodegen.config().pressure_advance.get_at(new_extruder_id));
// A phony move to the end position at the wipe tower.
@@ -2178,7 +2182,8 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
{
// QDS: open spaghetti detector
// if (print.config().spaghetti_detector.value)
- if (print.is_QDT_Printer()) file.write("M981 S1 P20000 ;open spaghetti detector\n");
+ //w30
+ //if (print.is_QDT_Printer()) file.write("M981 S1 P20000 ;open spaghetti detector\n");
// Do all objects for each layer.
if (print.config().print_sequence == PrintSequence::ByObject && !has_wipe_tower) {
@@ -2240,12 +2245,13 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
this->process_layers(print, tool_ordering, collect_layers_to_print(object), *print_object_instance_sequential_active - object.instances().data(), file,
prime_extruder);
// QDS: close powerlost recovery
- {
- if (m_second_layer_things_done && print.is_QDT_Printer()) {
- file.write("; close powerlost recovery\n");
- file.write("M1003 S0\n");
- }
- }
+ //w30
+ //{
+ // if (m_second_layer_things_done && print.is_QDT_Printer()) {
+ // file.write("; close powerlost recovery\n");
+ // file.write("M1003 S0\n");
+ // }
+ //}
#ifdef HAS_PRESSURE_EQUALIZER
if (m_pressure_equalizer) file.write(m_pressure_equalizer->process("", true));
#endif /* HAS_PRESSURE_EQUALIZER */
@@ -2311,12 +2317,13 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
// and export G-code into file.
this->process_layers(print, tool_ordering, print_object_instances_ordering, layers_to_print, file);
// QDS: close powerlost recovery
- {
- if (m_second_layer_things_done && print.is_QDT_Printer()) {
- file.write("; close powerlost recovery\n");
- file.write("M1003 S0\n");
- }
- }
+ //w30
+ //{
+ // if (m_second_layer_things_done && print.is_QDT_Printer()) {
+ // file.write("; close powerlost recovery\n");
+ // file.write("M1003 S0\n");
+ // }
+ //}
#ifdef HAS_PRESSURE_EQUALIZER
if (m_pressure_equalizer) file.write(m_pressure_equalizer->process("", true));
#endif /* HAS_PRESSURE_EQUALIZER */
@@ -2343,8 +2350,9 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
//QDS: close spaghetti detector
//Note: M981 is also used to tell xcam the last layer is finished, so we need always send it even if spaghetti option is disabled.
//if (print.config().spaghetti_detector.value)
- if (print.is_QDT_Printer())
- file.write("M981 S0 P20000 ; close spaghetti detector\n");
+ //w30
+ //if (print.is_QDT_Printer())
+ // file.write("M981 S0 P20000 ; close spaghetti detector\n");
// adds tag for processor
file.write_format(";%s%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role).c_str(), ExtrusionEntity::role_to_string(erCustom).c_str());
@@ -3209,18 +3217,19 @@ GCode::LayerResult GCode::process_layer(
double acceleration = m_config.initial_layer_acceleration.value;
gcode += m_writer.set_acceleration((unsigned int)floor(acceleration + 0.5));
}
-
- if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0 && !this->is_QDT_Printer())
+ //w30
+ if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0 && this->is_QDT_Printer())
gcode += m_writer.set_jerk_xy(m_config.initial_layer_jerk.value);
}
if (! first_layer && ! m_second_layer_things_done) {
//QDS: open powerlost recovery
{
- if (print.is_QDT_Printer()) {
- gcode += "; open powerlost recovery\n";
- gcode += "M1003 S1\n";
- }
+ //w30
+ //if (print.is_QDT_Printer()) {
+ // gcode += "; open powerlost recovery\n";
+ // gcode += "M1003 S1\n";
+ //}
}
// QDS: open first layer inspection at second layer
if (print.config().scan_first_layer.value) {
@@ -3236,8 +3245,8 @@ GCode::LayerResult GCode::process_layer(
double acceleration = m_config.default_acceleration.value;
gcode += m_writer.set_acceleration((unsigned int)floor(acceleration + 0.5));
}
-
- if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0 && !this->is_QDT_Printer())
+ //w30
+ if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0 && this->is_QDT_Printer())
gcode += m_writer.set_jerk_xy(m_config.default_jerk.value);
// Transition from 1st to 2nd layer. Adjust nozzle temperatures as prescribed by the nozzle dependent
@@ -3623,7 +3632,8 @@ GCode::LayerResult GCode::process_layer(
std::string temp_start_str;
if (m_enable_label_object) {
std::string start_str = std::string("; start printing object, unique label id: ") + std::to_string(instance_to_print.label_object_id) + "\n";
- if (print.is_QDT_Printer()) {
+ //w30
+ if (!print.is_QDT_Printer()) {
start_str += ("M624 " + _encode_label_ids_to_base64({ instance_to_print.label_object_id }));
start_str += "\n";
} else {
@@ -3731,8 +3741,9 @@ GCode::LayerResult GCode::process_layer(
gcode += this->retract(false, false, LiftType::NormalLift);
if (!temp_start_str.empty() && m_writer.empty_object_start_str()) {
std::string end_str = std::string("; stop printing object, unique label id: ") + std::to_string(instance_to_print.label_object_id) + "\n";
- if (print.is_QDT_Printer())
- end_str += "M625\n";
+ //w30
+ //if (print.is_QDT_Printer())
+ // end_str += "M625\n";
gcode += end_str;
}
@@ -3760,8 +3771,9 @@ GCode::LayerResult GCode::process_layer(
gcode += this->retract(false, false, LiftType::NormalLift);
if (!temp_start_str.empty() && m_writer.empty_object_start_str()) {
std::string end_str = std::string("; stop printing object, unique label id: ") + std::to_string(instance_to_print.label_object_id) + "\n";
- if (print.is_QDT_Printer())
- end_str += "M625\n";
+ //w30
+ //if (print.is_QDT_Printer())
+ // end_str += "M625\n";
gcode += end_str;
}
@@ -3791,8 +3803,9 @@ GCode::LayerResult GCode::process_layer(
m_writer.set_object_start_str("");
} else if (m_enable_label_object) {
std::string end_str = std::string("; stop printing object, unique label id: ") + std::to_string(instance_to_print.label_object_id) + "\n";
- if (print.is_QDT_Printer())
- end_str += "M625\n";
+ //w30
+ //if (print.is_QDT_Printer())
+ // end_str += "M625\n";
m_writer.set_object_end_str(end_str);
}
//Orca's implementation for skipping object, for klipper firmware printer only
@@ -4014,6 +4027,17 @@ static bool has_overhang_path_on_slope(const ExtrusionLoop &loop, double slope_l
return false;
}
+//1.9.5
+static std::map overhang_speed_key_map =
+{
+ {1, "overhang_1_4_speed"},
+ {2, "overhang_2_4_speed"},
+ {3, "overhang_3_4_speed"},
+ {4, "overhang_4_4_speed"},
+ {5, "overhang_totally_speed"},
+ {6, "bridge_speed"},
+};
+
double GCode::get_path_speed(const ExtrusionPath &path)
{
double min_speed = double(m_config.slow_down_min_speed.get_at(m_writer.extruder()->id()));
@@ -4033,7 +4057,10 @@ double GCode::get_path_speed(const ExtrusionPath &path)
new_speed = get_overhang_degree_corr_speed(speed, path.overhang_degree);
speed = new_speed == 0.0 ? speed : new_speed;
}
- } else if (path.role() == erOverhangPerimeter || path.role() == erBridgeInfill || path.role() == erSupportTransition) {
+ // 1.9.5
+ } else if (path.role() == erOverhangPerimeter && path.overhang_degree == 5)
+ speed = m_config.get_abs_value("overhang_totally_speed");
+ else if (path.role() == erOverhangPerimeter || path.role() == erBridgeInfill || path.role() == erSupportTransition) {
speed = m_config.get_abs_value("bridge_speed");
}
auto _mm3_per_mm = path.mm3_per_mm * double(m_curr_print->calib_mode() == CalibMode::Calib_Flow_Rate ? this->config().print_flow_ratio.value : 1);
@@ -4156,6 +4183,10 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
// QDS: slowdown speed to improve seam, to be fix, cooling need to be apply correctly
//new_loop.target_speed = get_path_speed(new_loop.starts.back());
//new_loop.slowdown_slope_speed();
+ //1.9.5
+ // QDS: smooth speed of discontinuity areas
+ if (m_config.detect_overhang_wall && m_config.smooth_speed_discontinuity_area && (loop.role() == erExternalPerimeter || loop.role() == erPerimeter))
+ smooth_speed_discontinuity_area(new_loop.paths);
// Then extrude it
for (const auto &p : new_loop.get_all_paths()) {
//w16
@@ -4179,6 +4210,10 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
}
if (!enable_seam_slope || slope_has_overhang) {
+ //1.9.5
+ // QDS: smooth speed of discontinuity areas
+ if (m_config.detect_overhang_wall && m_config.smooth_speed_discontinuity_area && (loop.role() == erExternalPerimeter || loop.role() == erPerimeter))
+ smooth_speed_discontinuity_area(paths);
for (ExtrusionPaths::iterator path = paths.begin(); path != paths.end(); ++path) {
//w16
m_resonance_avoidance = m_config.resonance_avoidance;
@@ -4190,7 +4225,8 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
if (!this->on_first_layer()) {
// reset acceleration
gcode += m_writer.set_acceleration((unsigned int) (m_config.default_acceleration.value + 0.5));
- if (!this->is_QDT_Printer())
+ //w30
+ if (this->is_QDT_Printer())
gcode += m_writer.set_jerk_xy(m_config.default_jerk.value);
}
@@ -4275,7 +4311,8 @@ std::string GCode::extrude_multi_path(ExtrusionMultiPath multipath, std::string
if (!this->on_first_layer()) {
// reset acceleration
gcode += m_writer.set_acceleration((unsigned int) floor(m_config.default_acceleration.value + 0.5));
- if (!this->is_QDT_Printer())
+ //w30
+ if (this->is_QDT_Printer())
gcode += m_writer.set_jerk_xy(m_config.default_jerk.value);
}
return gcode;
@@ -4306,7 +4343,8 @@ std::string GCode::extrude_path(ExtrusionPath path, std::string description, dou
if (!this->on_first_layer()) {
// reset acceleration
gcode += m_writer.set_acceleration((unsigned int) floor(m_config.default_acceleration.value + 0.5));
- if (!this->is_QDT_Printer())
+ //w30
+ if (this->is_QDT_Printer())
gcode += m_writer.set_jerk_xy(m_config.default_jerk.value);
}
return gcode;
@@ -4463,14 +4501,20 @@ void GCode::GCodeOutputStream::write_format(const char* format, ...)
va_end(args);
}
-static std::map overhang_speed_key_map =
+//1.9.5
+// QDS: f(x)=2x^2
+double GCode::mapping_speed(double dist)
{
- {1, "overhang_1_4_speed"},
- {2, "overhang_2_4_speed"},
- {3, "overhang_3_4_speed"},
- {4, "overhang_4_4_speed"},
- {5, "bridge_speed"},
-};
+ if (dist <= 0)
+ return 0;
+ return this->config().smooth_coefficient * pow(dist, 2);
+}
+
+double GCode::get_speed_coor_x(double speed){
+
+ double temp = speed / this->config().smooth_coefficient;
+ return sqrt(temp);
+}
double GCode::get_overhang_degree_corr_speed(float normal_speed, double path_degree) {
@@ -4495,6 +4539,238 @@ double GCode::get_overhang_degree_corr_speed(float normal_speed, double path_deg
return speed_out;
}
+//1.9.5
+static bool need_smooth_speed(const ExtrusionPath &other_path, const ExtrusionPath &this_path)
+{
+ if (this_path.smooth_speed - other_path.smooth_speed > smooth_speed_step)
+ return true;
+
+ return false;
+}
+
+static void append_split_line(bool split_from_left, Polyline &polyline, Point p1, Point p2)
+{
+ if (split_from_left) {
+ polyline.append(p1);
+ polyline.append(p2);
+ } else {
+ polyline.append(p2);
+ polyline.append(p1);
+ }
+}
+
+ExtrusionPaths GCode::split_and_mapping_speed(double &other_path_v, double &final_v, ExtrusionPath &this_path, double max_smooth_length, bool split_from_left)
+{
+ ExtrusionPaths splited_path;
+ if (this_path.length() <= 0 || this_path.polyline.points.size() < 2) {
+ return splited_path;
+ }
+
+ // reverse if this slowdown the speed
+ Polyline input_polyline = this_path.polyline;
+ if (!split_from_left)
+ std::reverse(input_polyline.begin(), input_polyline.end());
+
+ double this_path_x = scale_(get_speed_coor_x(final_v));
+ double x_base = scale_(get_speed_coor_x(other_path_v));
+
+ double smooth_length = this_path_x - x_base;
+
+ // this length not support to get final v, adjust final v
+ if (smooth_length > max_smooth_length)
+ final_v = mapping_speed(unscale_(x_base + max_smooth_length));
+
+ double max_step_length = scale_(1.0); // cut path if the path too long
+ double min_step_length = scale_(0.4); // cut step
+
+ double smooth_length_count = 0;
+ double split_line_speed = 0;
+ Point line_start_pt = input_polyline.points.front();
+ Point line_end_pt = input_polyline.points[1];
+ bool get_next_line = false;
+ size_t end_pt_idx = 1;
+
+ auto insert_speed = [this](double line_lenght, double &pos_x, double &smooth_length_count, double target_v) {
+ pos_x += line_lenght;
+ double pos_x_speed = mapping_speed(unscale_(pos_x));
+ smooth_length_count += line_lenght;
+
+ if (pos_x_speed > target_v)
+ pos_x_speed = target_v;
+
+ return pos_x_speed;
+ };
+
+ while (end_pt_idx < input_polyline.points.size()) {
+ // move to next line
+ if (get_next_line) {
+ line_start_pt = input_polyline.points[end_pt_idx - 1];
+ line_end_pt = input_polyline.points[end_pt_idx];
+ }
+
+ Polyline polyline;
+ Line line(line_start_pt, line_end_pt);
+
+ // split polyline and set speed
+ if (line.length() < max_step_length || line.length() - min_step_length < min_step_length / 2) {
+ split_line_speed = insert_speed(line.length(), x_base, smooth_length_count, final_v);
+ append_split_line(split_from_left, polyline, line_start_pt, line_end_pt);
+ end_pt_idx++;
+ get_next_line = true;
+ } else {
+ // path is too long, split it
+ double rate = min_step_length / line.length();
+ Point insert_p = line.a + (line.b - line.a) * rate;
+
+ split_line_speed = insert_speed(min_step_length, x_base, smooth_length_count, final_v);
+ append_split_line(split_from_left, polyline, line_start_pt, insert_p);
+
+ line_start_pt = insert_p;
+ get_next_line = false;
+ }
+
+ ExtrusionPath path_step(polyline, this_path);
+ path_step.smooth_speed = split_line_speed;
+ splited_path.push_back(std::move(path_step));
+
+ // stop condition
+ if (split_line_speed >= final_v) break;
+ }
+
+ if (!split_from_left)
+ std::reverse(input_polyline.points.begin(), input_polyline.points.end());
+ // get_remain_path
+ if (end_pt_idx < input_polyline.points.size()) {
+ // split at index or split at corr length
+ Polyline p1, p2;
+ if( !split_from_left ) {
+ input_polyline.split_at_length(input_polyline.length() - smooth_length_count, &p1, &p2);
+ this_path.polyline = p1;
+ } else {
+ input_polyline.split_at_length(smooth_length_count, &p1, &p2);
+ this_path.polyline = p2;
+ }
+
+ } else {
+ this_path.polyline.clear();
+ }
+
+ // reverse paths if this start from right
+ if (!split_from_left)
+ std::reverse(splited_path.begin(), splited_path.end());
+
+ return splited_path;
+}
+
+ExtrusionPaths GCode::merge_same_speed_paths(const ExtrusionPaths &paths)
+{
+ ExtrusionPaths output_paths;
+
+ size_t path_idx = 0;
+ int merge_start = 0;
+ ExtrusionPath merge_path;
+ for (; path_idx < paths.size(); path_idx++) {
+ ExtrusionPath path = paths[path_idx];
+ path.smooth_speed = get_path_speed(path);
+
+ // 100% overhang speed will not to set smooth speed
+ if (path.role() == erOverhangPerimeter) {
+ if (!merge_path.empty()) {
+ output_paths.push_back(std::move(merge_path));
+ merge_path.polyline.clear();
+ }
+ output_paths.push_back(std::move(path));
+ merge_start = path_idx + 1;
+ continue;
+ }
+
+ if (merge_start == path_idx) {
+ merge_path = path;
+ continue;
+ }
+
+ // merge path with same speed
+ if (merge_path.smooth_speed == path.smooth_speed) {
+ merge_path.polyline.append(path.polyline);
+ } else {
+ output_paths.push_back(std::move(merge_path));
+ merge_path = path;
+ }
+ }
+
+ if (!merge_path.empty() && merge_start < paths.size())
+ output_paths.push_back(std::move(merge_path));
+
+ return output_paths;
+}
+
+ExtrusionPaths GCode::set_speed_transition(ExtrusionPaths &paths)
+{
+ ExtrusionPaths interpolated_paths;
+ for (int path_idx = 0; path_idx < paths.size(); path_idx++) {
+ // update path
+ ExtrusionPath &path = paths[path_idx];
+
+ double this_path_speed = 0;
+ // 100% overhang speed will not to set smooth speed
+ if (path.role() == erOverhangPerimeter) {
+ interpolated_paths.push_back(path);
+ continue;
+ }
+
+ bool smooth_left_path = false;
+ bool smooth_right_path = false;
+ // first line do not need to smooth speed on left
+ // prev line speed may change
+ if (path_idx > 0)
+ smooth_left_path = need_smooth_speed(paths[path_idx - 1], path);
+
+ // first line do not need to smooth speed on right
+ if (path_idx < paths.size() - 1)
+ smooth_right_path = need_smooth_speed(paths[path_idx + 1], path);
+
+ // get smooth length
+ double max_smooth_path_length = path.length();
+ if (smooth_right_path && smooth_left_path) max_smooth_path_length /= 2;
+
+ // smooth left
+ ExtrusionPaths left_split_paths;
+ if (smooth_left_path) {
+ left_split_paths = split_and_mapping_speed(paths[path_idx - 1].smooth_speed, path.smooth_speed, path, max_smooth_path_length);
+ if (!left_split_paths.empty()) interpolated_paths.insert(interpolated_paths.end(), left_split_paths.begin(), left_split_paths.end());
+ max_smooth_path_length = path.length();
+ }
+
+ // smooth right
+ ExtrusionPaths right_split_paths;
+ if (smooth_right_path) {
+ right_split_paths = split_and_mapping_speed(paths[path_idx + 1].smooth_speed, path.smooth_speed, path, max_smooth_path_length, false); }
+
+ if (!path.empty())
+ interpolated_paths.push_back(path);
+
+ if (!right_split_paths.empty())
+ interpolated_paths.insert(interpolated_paths.end(), right_split_paths.begin(), right_split_paths.end());
+ }
+
+ return interpolated_paths;
+}
+
+void GCode::smooth_speed_discontinuity_area(ExtrusionPaths &paths) {
+
+ if (paths.size() <= 1)
+ return;
+
+ //step 1 merge same speed path
+ size_t path_tail_pos = 0;
+ ExtrusionPaths prepare_paths = merge_same_speed_paths(paths);
+
+ //step 2 split path
+ ExtrusionPaths inter_paths;
+ inter_paths =set_speed_transition(prepare_paths);
+ paths = std::move(inter_paths);
+}
+
std::string GCode::_extrude(const ExtrusionPath &path, std::string description, double speed, bool is_first_slope)
{
std::string gcode;
@@ -4557,7 +4833,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
gcode += m_writer.set_acceleration((unsigned int)floor(acceleration + 0.5));
}
- if (m_config.default_jerk.value > 0 && !this->is_QDT_Printer()) {
+ //w30
+ if (m_config.default_jerk.value > 0 && this->is_QDT_Printer()) {
double jerk = m_config.default_jerk.value;
if (this->on_first_layer() && m_config.initial_layer_jerk.value > 0)
jerk = m_config.initial_layer_jerk.value;
@@ -4588,14 +4865,20 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
if (speed == -1) {
if (path.role() == erPerimeter) {
speed = m_config.get_abs_value("inner_wall_speed");
- if (m_config.enable_overhang_speed.value) {
+ //1.9.5
+ if (m_config.detect_overhang_wall && m_config.smooth_speed_discontinuity_area && path.smooth_speed != 0)
+ speed = path.smooth_speed;
+ else if (m_config.enable_overhang_speed.value) {
double new_speed = 0;
new_speed = get_overhang_degree_corr_speed(speed, path.overhang_degree);
speed = new_speed == 0.0 ? speed : new_speed;
}
} else if (path.role() == erExternalPerimeter) {
speed = m_config.get_abs_value("outer_wall_speed");
- if (m_config.enable_overhang_speed.value ) {
+ //1.9.5
+ if (m_config.detect_overhang_wall && m_config.smooth_speed_discontinuity_area && path.smooth_speed != 0)
+ speed = path.smooth_speed;
+ else if (m_config.enable_overhang_speed.value ) {
double new_speed = 0;
new_speed = get_overhang_degree_corr_speed(speed, path.overhang_degree);
//w16
@@ -4607,6 +4890,9 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
}
speed = new_speed == 0.0 ? speed : new_speed;
}
+ //1.9.5
+ } else if (path.role() == erOverhangPerimeter && path.overhang_degree == 5) {
+ speed = m_config.get_abs_value("overhang_totally_speed");
} else if (path.role() == erOverhangPerimeter || path.role() == erBridgeInfill || path.role() == erSupportTransition) {
speed = m_config.get_abs_value("bridge_speed");
} else if (path.role() == erInternalInfill) {
@@ -4768,7 +5054,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
gcode += m_writer.extrude_to_xy(
this->point_to_gcode(line.b),
e_per_mm * line_length,
- comment);
+ //w31
+ comment, path.is_force_no_extrusion());
} else {
// Sloped extrusion
auto dE = e_per_mm * line_length;
@@ -4947,9 +5234,10 @@ std::string GCode::travel_to(const Point &point, ExtrusionRole role, std::string
if (travel.size() >= 2) {
// OrcaSlicer
if (this->on_first_layer()) {
- if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0 && !this->is_QDT_Printer())
+ //w30
+ if (m_config.default_jerk.value > 0 && m_config.initial_layer_jerk.value > 0 && this->is_QDT_Printer())
gcode += m_writer.set_jerk_xy(m_config.initial_layer_jerk.value);
- } else if (m_config.default_jerk.value > 0 && m_config.travel_jerk.value > 0 && !this->is_QDT_Printer())
+ } else if (m_config.default_jerk.value > 0 && m_config.travel_jerk.value > 0 && this->is_QDT_Printer())
gcode += m_writer.set_jerk_xy(m_config.travel_jerk.value);
if (m_spiral_vase) {
@@ -5178,7 +5466,8 @@ std::string GCode::set_extruder(unsigned int extruder_id, double print_z, bool b
check_add_eol(gcode);
}
//QDS: never use for QIDI Printer
- if (!this->is_QDT_Printer() && m_config.enable_pressure_advance.get_at(extruder_id))
+ //w30
+ if (m_config.enable_pressure_advance.get_at(extruder_id))
gcode += m_writer.set_pressure_advance(m_config.pressure_advance.get_at(extruder_id));
gcode += m_writer.toolchange(extruder_id);
@@ -5368,7 +5657,8 @@ std::string GCode::set_extruder(unsigned int extruder_id, double print_z, bool b
if (m_ooze_prevention.enable)
gcode += m_ooze_prevention.post_toolchange(*this);
//QDS: never use for QIDI Printer
- if (!this->is_QDT_Printer() && m_config.enable_pressure_advance.get_at(extruder_id))
+ //w30
+ if (m_config.enable_pressure_advance.get_at(extruder_id))
gcode += m_writer.set_pressure_advance(m_config.pressure_advance.get_at(extruder_id));
return gcode;
diff --git a/src/libslic3r/GCode.hpp b/src/libslic3r/GCode.hpp
index c86600c..9b3662c 100644
--- a/src/libslic3r/GCode.hpp
+++ b/src/libslic3r/GCode.hpp
@@ -344,6 +344,10 @@ private:
std::string extrude_multi_path(ExtrusionMultiPath multipath, std::string description = "", double speed = -1.);
std::string extrude_path(ExtrusionPath path, std::string description = "", double speed = -1.);
+ //1.9.5
+ //smooth speed function
+ void smooth_speed_discontinuity_area(ExtrusionPaths &paths);
+ ExtrusionPaths merge_same_speed_paths(const ExtrusionPaths &paths);
// Extruding multiple objects with soluble / non-soluble / combined supports
// on a multi-material printer, trying to minimize tool switches.
// Following structures sort extrusions by the extruder ID, by an order of objects and object islands.
@@ -519,8 +523,14 @@ private:
int get_bed_temperature(const int extruder_id, const bool is_first_layer, const BedType bed_type) const;
std::string _extrude(const ExtrusionPath &path, std::string description = "", double speed = -1, bool is_first_slope = false);
+ //1.9.5
+ ExtrusionPaths set_speed_transition(ExtrusionPaths &paths);
+ ExtrusionPaths split_and_mapping_speed(double &other_path_v, double &final_v, ExtrusionPath &this_path, double max_smooth_length, bool split_from_left = true);
double get_path_speed(const ExtrusionPath &path);
double get_overhang_degree_corr_speed(float speed, double path_degree);
+ //1.9.5
+ double mapping_speed(double dist);
+ double get_speed_coor_x(double speed);
void print_machine_envelope(GCodeOutputStream &file, Print &print);
void _print_first_layer_bed_temperature(GCodeOutputStream &file, Print &print, const std::string &gcode, unsigned int first_printing_extruder_id, bool wait);
void _print_first_layer_extruder_temperatures(GCodeOutputStream &file, Print &print, const std::string &gcode, unsigned int first_printing_extruder_id, bool wait);
diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp
index d5eae35..8a64dcb 100644
--- a/src/libslic3r/GCode/GCodeProcessor.cpp
+++ b/src/libslic3r/GCode/GCodeProcessor.cpp
@@ -480,7 +480,8 @@ void GCodeProcessor::TimeProcessor::post_process(const std::string& filename, st
PrintEstimatedStatistics::ETimeMode mode = static_cast(i);
if (mode == PrintEstimatedStatistics::ETimeMode::Normal || machine.enabled) {
char buf[128];
- if (!s_IsQDTPrinter) {
+ //w30
+ if (s_IsQDTPrinter) {
// Klipper estimator
sprintf(buf, "; estimated printing time (normal mode) = %s\n",
get_time_dhms(machine.time).c_str());
diff --git a/src/libslic3r/ObjColorUtils.cpp b/src/libslic3r/ObjColorUtils.cpp
new file mode 100644
index 0000000..fbe39c4
--- /dev/null
+++ b/src/libslic3r/ObjColorUtils.cpp
@@ -0,0 +1,16 @@
+#include "ObjColorUtils.hpp"
+
+
+//1.9.5
+bool obj_color_deal_algo(std::vector & input_colors,
+ std::vector & cluster_colors_from_algo,
+ std::vector & cluster_labels_from_algo,
+ char & cluster_number)
+{
+ QuantKMeans quant(10);
+ quant.apply(input_colors, cluster_colors_from_algo, cluster_labels_from_algo, (int) cluster_number);
+ if (cluster_number == -1) {
+ return false;
+ }
+ return true;
+}
\ No newline at end of file
diff --git a/src/libslic3r/ObjColorUtils.hpp b/src/libslic3r/ObjColorUtils.hpp
index ea4418a..e654fac 100644
--- a/src/libslic3r/ObjColorUtils.hpp
+++ b/src/libslic3r/ObjColorUtils.hpp
@@ -3,6 +3,7 @@
#include
#include "opencv2/opencv.hpp"
+#include "libslic3r/Color.hpp"
class QuantKMeans
{
@@ -260,3 +261,9 @@ public:
return image8UC3;
}
};
+
+//1.9.5
+bool obj_color_deal_algo(std::vector &input_colors,
+ std::vector& cluster_colors_from_algo,
+ std::vector& cluster_labels_from_algo,
+ char & cluster_number);
\ No newline at end of file
diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp
index f0ae4b5..30ad920 100644
--- a/src/libslic3r/PerimeterGenerator.cpp
+++ b/src/libslic3r/PerimeterGenerator.cpp
@@ -9,6 +9,8 @@
#include "Line.hpp"
#include
#include
+#include
+#include
#include "libslic3r/AABBTreeLines.hpp"
static const int overhang_sampling_number = 6;
static const double narrow_loop_length_threshold = 10;
@@ -22,6 +24,16 @@ static constexpr double SMALLER_EXT_INSET_OVERLAP_TOLERANCE = 0.22;
namespace Slic3r {
+//1.9.5
+// Produces a random value between 0 and 1. Thread-safe.
+static double random_value() {
+ thread_local std::random_device rd;
+ // Hash thread ID for random number seed if no hardware rng seed is available
+ thread_local std::mt19937 gen(rd.entropy() > 0 ? rd() : std::hash()(std::this_thread::get_id()));
+ thread_local std::uniform_real_distribution dist(0.0, 1.0);
+ return dist(gen);
+}
+
// Hierarchy of perimeters.
class PerimeterGeneratorLoop {
public:
@@ -52,7 +64,8 @@ static void fuzzy_polygon(Polygon &poly, double fuzzy_skin_thickness, double fuz
{
const double min_dist_between_points = fuzzy_skin_point_distance * 3. / 4.; // hardcoded: the point distance may vary between 3/4 and 5/4 the supplied value
const double range_random_point_dist = fuzzy_skin_point_distance / 2.;
- double dist_left_over = double(rand()) * (min_dist_between_points / 2) / double(RAND_MAX); // the distance to be traversed on the line before making the first new point
+ //1.9.5
+ double dist_left_over = random_value() * (min_dist_between_points / 2.); // the distance to be traversed on the line before making the first new point
Point* p0 = &poly.points.back();
Points out;
out.reserve(poly.points.size());
@@ -60,16 +73,15 @@ static void fuzzy_polygon(Polygon &poly, double fuzzy_skin_thickness, double fuz
{ // 'a' is the (next) new point between p0 and p1
Vec2d p0p1 = (p1 - *p0).cast();
double p0p1_size = p0p1.norm();
- // so that p0p1_size - dist_last_point evaulates to dist_left_over - p0p1_size
- double dist_last_point = dist_left_over + p0p1_size * 2.;
- for (double p0pa_dist = dist_left_over; p0pa_dist < p0p1_size;
- p0pa_dist += min_dist_between_points + double(rand()) * range_random_point_dist / double(RAND_MAX))
+ //1.9.5
+ double p0pa_dist = dist_left_over;
+ for (; p0pa_dist < p0p1_size;
+ p0pa_dist += min_dist_between_points + random_value() * range_random_point_dist)
{
- double r = double(rand()) * (fuzzy_skin_thickness * 2.) / double(RAND_MAX) - fuzzy_skin_thickness;
+ double r = random_value() * (fuzzy_skin_thickness * 2.) - fuzzy_skin_thickness;
out.emplace_back(*p0 + (p0p1 * (p0pa_dist / p0p1_size) + perp(p0p1).cast().normalized() * r).cast());
- dist_last_point = p0pa_dist;
}
- dist_left_over = p0p1_size - dist_last_point;
+ dist_left_over = p0p1_size - p0pa_dist;
p0 = &p1;
}
while (out.size() < 3) {
@@ -408,6 +420,34 @@ std::pair PerimeterGenerator::dist_boundary(double width)
return out;
}
+//1.9.5
+static void detect_bridge_wall(const PerimeterGenerator &perimeter_generator, ExtrusionPaths &paths, const Polylines &remain_polines, ExtrusionRole role, double mm3_per_mm, float width, float height)
+{
+ for (Polyline poly : remain_polines) {
+ // check if the line is straight line, which mean if the wall is bridge
+ Line line(poly.first_point(), poly.last_point());
+ if (line.length() < poly.length()) {
+ extrusion_paths_append(paths,
+ std::move(poly),
+ overhang_sampling_number - 1,
+ int(0),
+ role,
+ mm3_per_mm,
+ width,
+ height);
+ continue;
+ }
+ // bridge wall
+ extrusion_paths_append(paths,
+ std::move(poly),
+ overhang_sampling_number,
+ int(0),
+ role,
+ mm3_per_mm,
+ width,
+ height);
+ }
+}
static ExtrusionEntityCollection traverse_loops(const PerimeterGenerator &perimeter_generator, const PerimeterGeneratorLoops &loops, ThickPolylines &thin_walls)
{
@@ -548,25 +588,24 @@ static ExtrusionEntityCollection traverse_loops(const PerimeterGenerator &perime
if (remain_polines.size() != 0) {
if (!((perimeter_generator.object_config->enable_support || perimeter_generator.object_config->enforce_support_layers > 0)
&& perimeter_generator.object_config->support_top_z_distance.value == 0)) {
- extrusion_paths_append(
- paths,
- std::move(remain_polines),
- overhang_sampling_number - 1,
- int(0),
- erOverhangPerimeter,
- perimeter_generator.mm3_per_mm_overhang(),
- perimeter_generator.overhang_flow.width(),
- perimeter_generator.overhang_flow.height());
+ //1.9.5
+ //detect if the overhang perimeter is bridge
+ detect_bridge_wall(perimeter_generator,
+ paths,
+ remain_polines,
+ erOverhangPerimeter,
+ perimeter_generator.mm3_per_mm_overhang(),
+ perimeter_generator.overhang_flow.width(),
+ perimeter_generator.overhang_flow.height());
} else {
- extrusion_paths_append(
- paths,
- std::move(remain_polines),
- overhang_sampling_number - 1,
- int(0),
- role,
- extrusion_mm3_per_mm,
- extrusion_width,
- (float)perimeter_generator.layer_height);
+ //1.9.5
+ detect_bridge_wall( perimeter_generator,
+ paths,
+ remain_polines,
+ role,
+ extrusion_mm3_per_mm,
+ extrusion_width,
+ (float)perimeter_generator.layer_height);
}
}
@@ -816,6 +855,31 @@ static void smooth_overhang_level(ExtrusionPaths &paths)
}
}
+//1.9.5
+static void detect_brigde_wall_arachne(const PerimeterGenerator &perimeter_generator, ExtrusionPaths &paths, const ClipperLib_Z::Paths &path_overhang, const ExtrusionRole role, const Flow &flow)
+{
+ for (ClipperLib_Z::Path path : path_overhang) {
+ // check if the line is straight line, which mean if the wall is bridge
+ ThickPolyline thick_polyline = Arachne::to_thick_polyline(path);
+
+ Line line(thick_polyline.front(), thick_polyline.back());
+ if (line.length() < thick_polyline.length()) {
+ extrusion_path_append(paths,
+ std::move(thick_polyline),
+ role,
+ flow,
+ overhang_sampling_number - 1);
+ continue;
+ }
+
+ extrusion_path_append(paths,
+ std::move(thick_polyline),
+ role,
+ flow,
+ overhang_sampling_number);
+ }
+}
+
static ExtrusionEntityCollection traverse_extrusions(const PerimeterGenerator& perimeter_generator, std::vector& pg_extrusions)
{
ExtrusionEntityCollection extrusion_coll;
@@ -832,9 +896,8 @@ static ExtrusionEntityCollection traverse_extrusions(const PerimeterGenerator& p
ExtrusionPaths paths;
// detect overhanging/bridging perimeters
- if (perimeter_generator.config->detect_overhang_wall && perimeter_generator.layer_id > perimeter_generator.object_config->raft_layers
- && !((perimeter_generator.object_config->enable_support || perimeter_generator.object_config->enforce_support_layers > 0) &&
- perimeter_generator.object_config->support_top_z_distance.value == 0)) {
+ //1.9.5
+ if (perimeter_generator.config->detect_overhang_wall && perimeter_generator.layer_id > perimeter_generator.object_config->raft_layers) {
ClipperLib_Z::Path extrusion_path;
extrusion_path.reserve(extrusion->size());
BoundingBox extrusion_path_bbox;
@@ -919,9 +982,14 @@ static ExtrusionEntityCollection traverse_extrusions(const PerimeterGenerator& p
// get overhang paths by checking what parts of this loop fall
// outside the grown lower slices (thus where the distance between
// the loop centerline and original lower slices is >= half nozzle diameter
- extrusion_paths_append(paths, clip_extrusion(extrusion_path, lower_slices_paths, ClipperLib_Z::ctDifference), erOverhangPerimeter,
- perimeter_generator.overhang_flow);
-
+ //1.9.5
+ // detect if the overhang perimeter is bridge
+ ClipperLib_Z::Paths path_overhang = clip_extrusion(extrusion_path, lower_slices_paths, ClipperLib_Z::ctDifference);
+ bool zero_z_support = (perimeter_generator.object_config->enable_support || perimeter_generator.object_config->enforce_support_layers > 0) && perimeter_generator.object_config->support_top_z_distance.value == 0;
+ if(zero_z_support)
+ detect_brigde_wall_arachne(perimeter_generator, paths, path_overhang, role, is_external ? perimeter_generator.ext_perimeter_flow : perimeter_generator.perimeter_flow);
+ else
+ detect_brigde_wall_arachne(perimeter_generator, paths, path_overhang, erOverhangPerimeter, perimeter_generator.overhang_flow);
// Reapply the nearest point search for starting point.
// We allow polyline reversal because Clipper may have randomly reversed polylines during clipping.
// Arachne sometimes creates extrusion with zero-length (just two same endpoints);
diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp
index 9377248..38105d1 100644
--- a/src/libslic3r/Preset.cpp
+++ b/src/libslic3r/Preset.cpp
@@ -795,8 +795,10 @@ bool Preset::has_cali_lines(PresetBundle* preset_bundle)
static std::vector s_Preset_print_options {
"layer_height", "initial_layer_print_height", "wall_loops", "slice_closing_radius", "spiral_mode", "spiral_mode_smooth", "spiral_mode_max_xy_smoothing", "slicing_mode",
- "top_shell_layers", "top_shell_thickness", "bottom_shell_layers", "bottom_shell_thickness",
- "ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall",
+ //1.9.5
+ "top_shell_layers", "top_shell_thickness", "bottom_shell_layers", "bottom_shell_thickness", "ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall",
+ "detect_overhang_wall",
+ "smooth_speed_discontinuity_area","smooth_coefficient",
"seam_position", "wall_sequence", "is_infill_first", "sparse_infill_density", "sparse_infill_pattern", "sparse_infill_anchor", "sparse_infill_anchor_max",
"top_surface_pattern", "bottom_surface_pattern", "internal_solid_infill_pattern", "infill_direction", "bridge_angle",
"minimum_sparse_infill_area", "reduce_infill_retraction", "ironing_pattern", "ironing_type",
@@ -832,10 +834,12 @@ static std::vector s_Preset_print_options {
"flush_into_infill", "flush_into_objects", "flush_into_support","process_notes",
// QDS
"tree_support_branch_angle", "tree_support_wall_count", "tree_support_branch_distance",
- "tree_support_branch_diameter","tree_support_brim_width",
+ //1.9.5
+ "tree_support_branch_diameter",
"detect_narrow_internal_solid_infill",
"gcode_add_line_number", "enable_arc_fitting", "precise_z_height", "infill_combination", /*"adaptive_layer_height",*/
- "support_bottom_interface_spacing", "enable_overhang_speed", "overhang_1_4_speed", "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed",
+ //1.9.5
+ "support_bottom_interface_spacing", "enable_overhang_speed", "overhang_1_4_speed", "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed", "overhang_totally_speed",
"initial_layer_infill_speed", "top_one_wall_type", "top_area_threshold", "only_one_wall_first_layer",
"timelapse_type", "internal_bridge_support_thickness",
"wall_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle",
@@ -1162,7 +1166,8 @@ void PresetCollection::load_presets(
boost::optional version = Semver::parse(version_str);
if (!version) continue;
Semver app_version = *(Semver::parse(SLIC3R_VERSION));
- if ( version->maj() != app_version.maj()) {
+ //1.9.5
+ if ( version->maj() > app_version.maj()) {
BOOST_LOG_TRIVIAL(warning) << "Preset incompatibla, not loading: " << name;
continue;
}
@@ -1618,7 +1623,8 @@ bool PresetCollection::load_user_preset(std::string name, std::mapmaj() != app_version.maj()) {
+ //1.9.5
+ if ( cloud_version->maj() > app_version.maj()) {
BOOST_LOG_TRIVIAL(warning)<< __FUNCTION__ << boost::format("version %1% mismatch with app version %2%, not loading for user preset %3%")%version_str %SLIC3R_VERSION %name;
return false;
}
diff --git a/src/libslic3r/PresetBundle.cpp b/src/libslic3r/PresetBundle.cpp
index e7ccb34..96d6243 100644
--- a/src/libslic3r/PresetBundle.cpp
+++ b/src/libslic3r/PresetBundle.cpp
@@ -756,7 +756,8 @@ bool PresetBundle::import_json_presets(PresetsConfigSubstitutions & s
boost::optional version = Semver::parse(version_str);
if (!version) return false;
Semver app_version = *(Semver::parse(SLIC3R_VERSION));
- if (version->maj() != app_version.maj()) {
+ //1.9.5
+ if (version->maj() > app_version.maj()) {
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << " Preset incompatibla, not loading: " << name;
return false;
}
diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp
index e228842..05278cc 100644
--- a/src/libslic3r/Print.cpp
+++ b/src/libslic3r/Print.cpp
@@ -1068,13 +1068,20 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
// Custom layering is not allowed for tree supports as of now.
- for (size_t print_object_idx = 0; print_object_idx < m_objects.size(); ++ print_object_idx)
- if (const PrintObject &print_object = *m_objects[print_object_idx];
- print_object.has_support_material() && is_tree(print_object.config().support_type.value) && print_object.config().support_style.value == smsTreeOrganic &&
+ //1.9.5
+ for (size_t print_object_idx = 0; print_object_idx < m_objects.size(); ++print_object_idx) {
+ PrintObject &print_object = *m_objects[print_object_idx];
+ print_object.has_variable_layer_heights = false;
+ if (print_object.has_support_material() && is_tree(print_object.config().support_type.value) &&
print_object.model_object()->has_custom_layering()) {
- if (const std::vector &layers = layer_height_profile(print_object_idx); ! layers.empty())
- if (! check_object_layers_fixed(print_object.slicing_parameters(), layers))
- return { L("Variable layer height is not supported with Organic supports.") };
+ if (const std::vector &layers = layer_height_profile(print_object_idx); !layers.empty())
+ if (!check_object_layers_fixed(print_object.slicing_parameters(), layers)) {
+ print_object.has_variable_layer_heights = true;
+ BOOST_LOG_TRIVIAL(warning) << "print_object: " << print_object.model_object()->name
+ << " has_variable_layer_heights: " << print_object.has_variable_layer_heights;
+ if (print_object.config().support_style.value == smsTreeOrganic) return {L("Variable layer height is not supported with Organic supports.")};
+ }
+ }
}
if (this->has_wipe_tower() && ! m_objects.empty()) {
@@ -1556,11 +1563,16 @@ std::map getObjectExtruderMap(const Print& print) {
}
// Slicing process, running at a background thread.
-void Print::process(long long *time_cost_with_cache, bool use_cache)
+//1.9.5
+void Print::process(std::unordered_map* slice_time, bool use_cache)
{
long long start_time = 0, end_time = 0;
- if (time_cost_with_cache)
- *time_cost_with_cache = 0;
+ if (slice_time) {
+ (*slice_time)[TIME_USING_CACHE] = 0;
+ (*slice_time)[TIME_MAKE_PERIMETERS] = 0;
+ (*slice_time)[TIME_INFILL] = 0;
+ (*slice_time)[TIME_GENERATE_SUPPORT] = 0;
+ }
name_tbb_thread_pool_threads_set_locale();
@@ -1667,7 +1679,12 @@ void Print::process(long long *time_cost_with_cache, bool use_cache)
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": total object counts %1% in current print, need to slice %2%")%m_objects.size()%need_slicing_objects.size();
BOOST_LOG_TRIVIAL(info) << "Starting the slicing process." << log_memory_info();
if (!use_cache) {
- for (PrintObject *obj : m_objects) {
+ //1.9.5
+ if (slice_time) {
+ start_time = (long long)Slic3r::Utils::get_current_milliseconds_time_utc();
+ }
+
+ for (PrintObject* obj : m_objects) {
if (need_slicing_objects.count(obj) != 0) {
obj->make_perimeters();
}
@@ -1678,6 +1695,13 @@ void Print::process(long long *time_cost_with_cache, bool use_cache)
obj->set_done(posPerimeters);
}
}
+ //1.9.5
+ if (slice_time) {
+ end_time = (long long)Slic3r::Utils::get_current_milliseconds_time_utc();
+ (*slice_time)[TIME_MAKE_PERIMETERS] = (*slice_time)[TIME_MAKE_PERIMETERS] + end_time - start_time;
+ start_time = (long long)Slic3r::Utils::get_current_milliseconds_time_utc();
+ }
+
for (PrintObject *obj : m_objects) {
if (need_slicing_objects.count(obj) != 0) {
obj->infill();
@@ -1689,6 +1713,12 @@ void Print::process(long long *time_cost_with_cache, bool use_cache)
obj->set_done(posInfill);
}
}
+ //1.9.5
+ if (slice_time) {
+ end_time = (long long)Slic3r::Utils::get_current_milliseconds_time_utc();
+ (*slice_time)[TIME_INFILL] = (*slice_time)[TIME_INFILL] + end_time - start_time;
+ }
+
for (PrintObject *obj : m_objects) {
if (need_slicing_objects.count(obj) != 0) {
obj->ironing();
@@ -1698,6 +1728,10 @@ void Print::process(long long *time_cost_with_cache, bool use_cache)
obj->set_done(posIroning);
}
}
+ //1.9.5
+ if (slice_time) {
+ start_time = (long long)Slic3r::Utils::get_current_milliseconds_time_utc();
+ }
tbb::parallel_for(tbb::blocked_range(0, int(m_objects.size())),
[this, need_slicing_objects](const tbb::blocked_range& range) {
@@ -1713,6 +1747,11 @@ void Print::process(long long *time_cost_with_cache, bool use_cache)
}
}
);
+ //1.9.5
+ if (slice_time) {
+ end_time = (long long)Slic3r::Utils::get_current_milliseconds_time_utc();
+ (*slice_time)[TIME_GENERATE_SUPPORT] = (*slice_time)[TIME_GENERATE_SUPPORT] + end_time - start_time;
+ }
for (PrintObject* obj : m_objects) {
if (need_slicing_objects.count(obj) != 0) {
@@ -1775,9 +1814,10 @@ void Print::process(long long *time_cost_with_cache, bool use_cache)
}
if (this->set_started(psSkirtBrim)) {
this->set_status(70, L("Generating skirt & brim"));
-
- if (time_cost_with_cache)
- start_time = (long long)Slic3r::Utils::get_current_time_utc();
+ //1.9.5
+ if (slice_time) {
+ start_time = (long long)Slic3r::Utils::get_current_milliseconds_time_utc();
+ }
m_skirt.clear();
m_skirt_convex_hull.clear();
@@ -1863,10 +1903,10 @@ void Print::process(long long *time_cost_with_cache, bool use_cache)
this->finalize_first_layer_convex_hull();
this->set_done(psSkirtBrim);
-
- if (time_cost_with_cache) {
- end_time = (long long)Slic3r::Utils::get_current_time_utc();
- *time_cost_with_cache = *time_cost_with_cache + end_time - start_time;
+ //1.9.5
+ if (slice_time) {
+ end_time = (long long)Slic3r::Utils::get_current_milliseconds_time_utc();
+ (*slice_time)[TIME_USING_CACHE] = (*slice_time)[TIME_USING_CACHE] + end_time - start_time;
}
}
//QDS
diff --git a/src/libslic3r/Print.hpp b/src/libslic3r/Print.hpp
index ed478c7..e584610 100644
--- a/src/libslic3r/Print.hpp
+++ b/src/libslic3r/Print.hpp
@@ -39,6 +39,12 @@ class TreeSupport;
#define MARGIN_HEIGHT 1.5
#define MAX_OUTER_NOZZLE_RADIUS 4
+//1.9.5
+#define TIME_USING_CACHE "time_using_cache"
+#define TIME_MAKE_PERIMETERS "make_perimeters_time"
+#define TIME_INFILL "infill_time"
+#define TIME_GENERATE_SUPPORT "generate_support_material_time"
+
// QDS: move from PrintObjectSlice.cpp
struct VolumeSlices
{
@@ -441,6 +447,8 @@ public:
// QDS: returns 1-based indices of extruders used to print the first layer wall of objects
std::vector object_first_layer_wall_extruders;
+ //1.9.5
+ bool has_variable_layer_heights = false;
// OrcaSlicer
size_t get_klipper_object_id() const { return m_klipper_object_id; }
@@ -717,7 +725,8 @@ public:
ApplyStatus apply(const Model &model, DynamicPrintConfig config) override;
- void process(long long *time_cost_with_cache = nullptr, bool use_cache = false) override;
+ //1.9.5
+ void process(std::unordered_map* slice_time = nullptr, bool use_cache = false) override;
// Exports G-code into a file name based on the path_template, returns the file path of the generated G-code file.
// If preview_data is not null, the preview_data is filled in for the G-code visualization (not used by the command line Slic3r).
std::string export_gcode(const std::string& path_template, GCodeProcessorResult* result, ThumbnailsGeneratorCallback thumbnail_cb = nullptr);
diff --git a/src/libslic3r/PrintBase.hpp b/src/libslic3r/PrintBase.hpp
index 7bca430..150a823 100644
--- a/src/libslic3r/PrintBase.hpp
+++ b/src/libslic3r/PrintBase.hpp
@@ -423,7 +423,9 @@ public:
// After calling the apply() function, call set_task() to limit the task to be processed by process().
virtual void set_task(const TaskParams ¶ms) {}
// Perform the calculation. This is the only method that is to be called at a worker thread.
- virtual void process(long long *time_cost_with_cache = nullptr, bool use_cache = false) = 0;
+
+ //1.9.5
+ virtual void process(std::unordered_map* slice_time = nullptr, bool use_cache = false) = 0;
virtual int export_cached_data(const std::string& dir_path, bool with_space=false) { return 0;}
virtual int load_cached_data(const std::string& directory) { return 0;}
// Clean up after process() finished, either with success, error or if canceled.
diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp
index 9592b2e..03f6a44 100644
--- a/src/libslic3r/PrintConfig.cpp
+++ b/src/libslic3r/PrintConfig.cpp
@@ -898,6 +898,16 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0));
+ //1.9.5
+ def = this->add("overhang_totally_speed", coFloat);
+ def->label = L("over 100% wall (not bridge)");
+ def->category = L("Speed");
+ def->tooltip = L("Speed for line of wall which has degree of overhang over 100% line width, but the wall is not a bridge wall.");
+ def->sidetext = L("mm/s");
+ def->min = 0;
+ def->mode = comAdvanced;
+ def->set_default_value(new ConfigOptionFloat{24});
+
def = this->add("bridge_speed", coFloat);
def->label = L("Bridge");
def->category = L("Speed");
@@ -1141,6 +1151,21 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(true));
+ //1.9.5
+ def = this->add("smooth_speed_discontinuity_area", coBool);
+ def->label = L("Smooth speed discontinuity area");
+ def->category = L("Quality");
+ def->tooltip = L("Add the speed transition between discontinuity area.");
+ def->mode = comAdvanced;
+ def->set_default_value(new ConfigOptionBool(true));
+
+ def = this->add("smooth_coefficient", coFloat);
+ def->label = L("Smooth coefficient");
+ def->category = L("Quality");
+ def->tooltip = L("The smaller the number, the longer the speed transition path.");
+ def->mode = comAdvanced;
+ def->set_default_value(new ConfigOptionFloat(80));
+
def = this->add("internal_bridge_support_thickness", coFloat);
def->label = L("Internal bridge support thickness");
def->category = L("Strength");
@@ -3565,16 +3590,6 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionInt(0));
- def = this->add("tree_support_brim_width", coFloat);
- def->label = L("Tree support brim width");
- def->category = L("Support");
- def->tooltip = L("The brim width around tree support. 0 means auto.");
- def->sidetext = L("mm");
- def->min = 0;
- def->max = 100;
- def->mode = comAdvanced;
- def->set_default_value(new ConfigOptionFloat(0));
-
//w24
def = this->add("chamber_temperatures", coInts);
def->label = L("Chamber temperature");
@@ -4802,6 +4817,7 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
// QDS
, "support_sharp_tails","support_remove_small_overhangs", "support_with_sheath",
"tree_support_branch_diameter_angle", "tree_support_collision_resolution", "tree_support_with_infill",
+ "tree_support_brim_width", //1.9.5
"max_volumetric_speed", "max_print_speed",
"support_closing_radius",
"remove_freq_sweep", "remove_bed_leveling", "remove_extrusion_calibration",
diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp
index 960f536..2321ba8 100644
--- a/src/libslic3r/PrintConfig.hpp
+++ b/src/libslic3r/PrintConfig.hpp
@@ -762,7 +762,6 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloat, tree_support_branch_diameter))
((ConfigOptionFloat, tree_support_branch_angle))
((ConfigOptionInt, tree_support_wall_count))
- ((ConfigOptionFloat, tree_support_brim_width))
((ConfigOptionBool, detect_narrow_internal_solid_infill))
// ((ConfigOptionBool, adaptive_layer_height))
((ConfigOptionFloat, support_bottom_interface_spacing))
@@ -791,6 +790,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloat, bottom_shell_thickness))
((ConfigOptionFloat, bridge_angle))
((ConfigOptionFloat, bridge_flow))
+ ((ConfigOptionFloat, overhang_totally_speed)) //1.9.5
((ConfigOptionFloat, bridge_speed))
((ConfigOptionBool, ensure_vertical_shell_thickness))
((ConfigOptionEnum, top_surface_pattern))
@@ -820,6 +820,8 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloat, ironing_speed))
// Detect bridging perimeters
((ConfigOptionBool, detect_overhang_wall))
+ ((ConfigOptionBool, smooth_speed_discontinuity_area)) //1.9.5
+ ((ConfigOptionFloat, smooth_coefficient)) //1.9.5
((ConfigOptionInt, wall_filament))
((ConfigOptionFloat, inner_wall_line_width))
((ConfigOptionFloat, inner_wall_speed))
diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp
index cc3ed02..373f72e 100644
--- a/src/libslic3r/PrintObject.cpp
+++ b/src/libslic3r/PrintObject.cpp
@@ -798,7 +798,6 @@ bool PrintObject::invalidate_state_by_config_options(
|| opt_key == "tree_support_branch_distance"
|| opt_key == "tree_support_branch_diameter"
|| opt_key == "tree_support_branch_angle"
- || opt_key == "tree_support_brim_width"
|| opt_key == "tree_support_wall_count") {
steps.emplace_back(posSupportMaterial);
} else if (
@@ -908,10 +907,15 @@ bool PrintObject::invalidate_state_by_config_options(
|| opt_key == "wipe_speed"
|| opt_key == "support_speed"
|| opt_key == "support_interface_speed"
+ //1.9.5
+ || opt_key == "smooth_speed_discontinuity_area"
+ || opt_key == "smooth_coefficient"
|| opt_key == "overhang_1_4_speed"
|| opt_key == "overhang_2_4_speed"
|| opt_key == "overhang_3_4_speed"
|| opt_key == "overhang_4_4_speed"
+ //1.9.5
+ || opt_key == "overhang_totally_speed"
|| opt_key == "bridge_speed"
|| opt_key == "outer_wall_speed"
|| opt_key == "small_perimeter_speed"
diff --git a/src/libslic3r/SLAPrint.cpp b/src/libslic3r/SLAPrint.cpp
index 569d225..4c58c13 100644
--- a/src/libslic3r/SLAPrint.cpp
+++ b/src/libslic3r/SLAPrint.cpp
@@ -686,7 +686,8 @@ bool SLAPrint::invalidate_step(SLAPrintStep step)
return invalidated;
}
-void SLAPrint::process(long long *time_cost_with_cache, bool use_cache)
+//1.9.5
+void SLAPrint::process(std::unordered_map* slice_time, bool use_cache)
{
if (m_objects.empty())
return;
diff --git a/src/libslic3r/SLAPrint.hpp b/src/libslic3r/SLAPrint.hpp
index 3fa6757..9114544 100644
--- a/src/libslic3r/SLAPrint.hpp
+++ b/src/libslic3r/SLAPrint.hpp
@@ -451,7 +451,8 @@ public:
std::vector print_object_ids() const override;
ApplyStatus apply(const Model &model, DynamicPrintConfig config) override;
void set_task(const TaskParams ¶ms) override;
- void process(long long *time_cost_with_cache = nullptr, bool use_cache = false) override;
+ //1.9.5
+ void process(std::unordered_map* slice_time = nullptr, bool use_cache = false) override;
void finalize() override;
// Returns true if an object step is done on all objects and there's at least one object.
bool is_step_done(SLAPrintObjectStep step) const;
diff --git a/src/libslic3r/Support/TreeSupport.cpp b/src/libslic3r/Support/TreeSupport.cpp
index 4047bfe..a499f47 100644
--- a/src/libslic3r/Support/TreeSupport.cpp
+++ b/src/libslic3r/Support/TreeSupport.cpp
@@ -605,9 +605,10 @@ TreeSupport::TreeSupport(PrintObject& object, const SlicingParameters &slicing_p
support_type = m_object_config->support_type;
support_style = m_object_config->support_style;
if (support_style == smsDefault) {
- // organic support doesn't work with adaptive layer height
- if (object.model_object()->layer_height_profile.empty()) {
- BOOST_LOG_TRIVIAL(warning) << "tree support default to organic support";
+ //1.9.5
+ // organic support doesn't work with variable layer heights (including adaptive layer height and height range modifier, see #4313)
+ if (!m_object->has_variable_layer_heights) {
+ BOOST_LOG_TRIVIAL(warning) << "tree support default to hybrid tree due to adaptive layer height";
support_style = smsTreeOrganic;
}
else {
@@ -1080,9 +1081,9 @@ void TreeSupport::detect_overhangs(bool check_support_necessity/* = false*/)
}
if (max_bridge_length > 0 && layer->loverhangs.size() > 0 && lower_layer) {
- // do not break bridge for normal part in TreeHybrid, nor Tree Strong
- bool break_bridge = !(support_style == smsTreeHybrid && area(layer->loverhangs) > m_support_params.thresh_big_overhang)
- && !(support_style==smsTreeStrong);
+ //1.9.5
+ // do not break bridge as the interface will be poor
+ bool break_bridge = false;
m_object->remove_bridges_from_contacts(lower_layer, layer, extrusion_width_scaled, &layer->loverhangs, max_bridge_length, break_bridge);
}
@@ -1176,6 +1177,17 @@ void TreeSupport::create_tree_support_layers()
raft_slice_z = raft_print_z - height / 2;
m_object->add_tree_support_layer(layer_id++, height, raft_print_z, raft_slice_z);
}
+ //1.9.5
+ // Layers between the raft contacts and bottom of the object.
+ double dist_to_go = m_slicing_params.object_print_z_min - raft_print_z;
+ auto nsteps = int(ceil(dist_to_go / m_slicing_params.max_suport_layer_height));
+ double height = dist_to_go / nsteps;
+ for (int i = 0; i < nsteps; ++i) {
+ raft_print_z += height;
+ raft_slice_z = raft_print_z - height / 2;
+ m_object->add_tree_support_layer(layer_id++, height, raft_print_z, raft_slice_z);
+ }
+ m_raft_layers = layer_id;
}
for (Layer *layer : m_object->layers()) {
@@ -1275,7 +1287,8 @@ static void make_perimeter_and_inner_brim(ExtrusionEntitiesPtr &dst, const ExPol
_make_loops(dst, support_area_new, role, wall_count, flow);
}
-static void make_perimeter_and_infill(ExtrusionEntitiesPtr& dst, const Print& print, const ExPolygon& support_area, size_t wall_count, const Flow& flow, ExtrusionRole role, Fill* filler_support, double support_density, bool infill_first=true)
+//1.9.5
+static void make_perimeter_and_infill(ExtrusionEntitiesPtr& dst, const ExPolygon& support_area, size_t wall_count, const Flow& flow, ExtrusionRole role, Fill* filler_support, double support_density, bool infill_first=true)
{
Polygons loops;
ExPolygons support_area_new = offset_ex(support_area, -0.5f * float(flow.scaled_spacing()), jtSquare);
@@ -1377,8 +1390,9 @@ void TreeSupport::generate_toolpaths()
}
raft_areas = std::move(offset_ex(raft_areas, scale_(3.)));
-
- for (size_t layer_nr = 0; layer_nr < m_slicing_params.base_raft_layers; layer_nr++) {
+ //1.9.5
+ size_t layer_nr = 0;
+ for (; layer_nr < m_slicing_params.base_raft_layers; layer_nr++) {
SupportLayer *ts_layer = m_object->get_support_layer(layer_nr);
coordf_t expand_offset = (layer_nr == 0 ? m_object_config->raft_first_layer_expansion.value : 0.);
auto raft_areas1 = offset_ex(raft_areas, scale_(expand_offset));
@@ -1413,9 +1427,11 @@ void TreeSupport::generate_toolpaths()
first_non_raft_base.emplace_back(*area_group.area);
}
}
+ first_non_raft_base = offset_ex(first_non_raft_base, support_extrusion_width); //1.9.5
ExPolygons raft_base_areas = intersection_ex(raft_areas, first_non_raft_base);
ExPolygons raft_interface_areas = diff_ex(raft_areas, raft_base_areas);
+ // raft interfaces
for (size_t layer_nr = m_slicing_params.base_raft_layers;
layer_nr < m_slicing_params.base_raft_layers + m_slicing_params.interface_raft_layers;
layer_nr++)
@@ -1439,6 +1455,18 @@ void TreeSupport::generate_toolpaths()
filler_interface, fill_params, erSupportMaterial, support_flow);
}
+ //1.9.5
+ // layers between raft and object
+ for (; layer_nr < m_raft_layers; layer_nr++) {
+ SupportLayer *ts_layer = m_object->get_support_layer(layer_nr);
+ Flow support_flow(support_extrusion_width, ts_layer->height, nozzle_diameter);
+ Fill* filler_raft = Fill::new_from_type(ipRectilinear);
+ filler_raft->angle = PI / 2;
+ filler_raft->spacing = support_flow.spacing();
+ for (auto& poly : first_non_raft_base)
+ make_perimeter_and_infill(ts_layer->support_fills.entities, poly, std::min(size_t(1), wall_count), support_flow, erSupportMaterial, filler_raft, interface_density, false);
+ }
+
if (m_object->support_layer_count() <= m_raft_layers)
return;
@@ -1464,7 +1492,8 @@ void TreeSupport::generate_toolpaths()
SupportLayer* ts_layer = m_object->get_support_layer(layer_id);
Flow support_flow(support_extrusion_width, ts_layer->height, nozzle_diameter);
- m_support_material_interface_flow = support_material_interface_flow(m_object, ts_layer->height); // update flow using real support layer height
+ //1.9.5
+ Flow interface_flow = support_material_interface_flow(m_object, ts_layer->height); // update flow using real support layer height
coordf_t support_spacing = object_config.support_base_pattern_spacing.value + support_flow.spacing();
coordf_t support_density = std::min(1., support_flow.spacing() / support_spacing);
ts_layer->support_fills.no_sort = false;
@@ -1493,10 +1522,12 @@ void TreeSupport::generate_toolpaths()
// roof_1st_layer
fill_params.density = interface_density;
// Note: spacing means the separation between two lines as if they are tightly extruded
- filler_Roof1stLayer->spacing = m_support_material_interface_flow.spacing();
+ //1.9.5
+ filler_Roof1stLayer->spacing = interface_flow.spacing();
// generate a perimeter first to support interface better
ExtrusionEntityCollection* temp_support_fills = new ExtrusionEntityCollection();
- make_perimeter_and_infill(temp_support_fills->entities, *m_object->print(), poly, 1, m_support_material_interface_flow, erSupportMaterial,
+ //1.9.5
+ make_perimeter_and_infill(temp_support_fills->entities, poly, 1, interface_flow, erSupportMaterial,
filler_Roof1stLayer.get(), interface_density, false);
temp_support_fills->no_sort = true; // make sure loops are first
if (!temp_support_fills->entities.empty())
@@ -1506,13 +1537,15 @@ void TreeSupport::generate_toolpaths()
} else if (area_group.type == SupportLayer::FloorType) {
// floor_areas
fill_params.density = bottom_interface_density;
- filler_interface->spacing = m_support_material_interface_flow.spacing();
+ //1.9.5
+ filler_interface->spacing = interface_flow.spacing();
fill_expolygons_generate_paths(ts_layer->support_fills.entities, polys,
- filler_interface.get(), fill_params, erSupportMaterialInterface, m_support_material_interface_flow);
+ filler_interface.get(), fill_params, erSupportMaterialInterface, interface_flow);
} else if (area_group.type == SupportLayer::RoofType) {
// roof_areas
fill_params.density = interface_density;
- filler_interface->spacing = m_support_material_interface_flow.spacing();
+ //1.9.5
+ filler_interface->spacing = interface_flow.spacing();
if (m_object_config->support_interface_pattern == smipGrid) {
filler_interface->angle = Geometry::deg2rad(object_config.support_angle.value);
fill_params.dont_sort = true;
@@ -1521,7 +1554,7 @@ void TreeSupport::generate_toolpaths()
filler_interface->layer_id = area_group.interface_id;
fill_expolygons_generate_paths(ts_layer->support_fills.entities, polys, filler_interface.get(), fill_params, erSupportMaterialInterface,
- m_support_material_interface_flow);
+ interface_flow);
}
else {
// base_areas
@@ -1546,7 +1579,8 @@ void TreeSupport::generate_toolpaths()
// otherwise must draw 1 wall
// Don't need extra walls if we have infill. Extra walls may overlap with the infills.
size_t min_wall_count = offset(poly, -scale_(support_spacing * 1.5)).empty() ? 1 : 0;
- make_perimeter_and_infill(ts_layer->support_fills.entities, *m_object->print(), poly, std::max(min_wall_count, wall_count), flow,
+ //1.9.5
+ make_perimeter_and_infill(ts_layer->support_fills.entities, poly, std::max(min_wall_count, wall_count), flow,
erSupportMaterial, filler_support.get(), support_density);
}
else {
@@ -1962,7 +1996,8 @@ void TreeSupport::draw_circles(const std::vector>& con
const bool with_lightning_infill = m_support_params.base_fill_pattern == ipLightning;
coordf_t support_extrusion_width = m_support_params.support_extrusion_width;
const coordf_t line_width_scaled = scale_(support_extrusion_width);
- const float tree_brim_width = config.tree_support_brim_width.value;
+ //1.9.5
+ const float tree_brim_width = config.raft_first_layer_expansion.value;
if (m_object->support_layer_count() <= m_raft_layers)
return;
diff --git a/src/libslic3r/Support/TreeSupport.hpp b/src/libslic3r/Support/TreeSupport.hpp
index ec84edf..c8ea31f 100644
--- a/src/libslic3r/Support/TreeSupport.hpp
+++ b/src/libslic3r/Support/TreeSupport.hpp
@@ -412,7 +412,8 @@ private:
SlicingParameters m_slicing_params;
// Various precomputed support parameters to be shared with external functions.
SupportParameters m_support_params;
- size_t m_raft_layers = 0;
+ //1.9.5
+ size_t m_raft_layers = 0; // number of raft layers, including raft base, raft interface, raft gap
size_t m_highest_overhang_layer = 0;
std::vector> m_spanning_trees;
std::vector< std::unordered_map> m_mst_line_x_layer_contour_caches;
diff --git a/src/libslic3r/Support/TreeSupport3D.cpp b/src/libslic3r/Support/TreeSupport3D.cpp
index 68df99f..6e1714c 100644
--- a/src/libslic3r/Support/TreeSupport3D.cpp
+++ b/src/libslic3r/Support/TreeSupport3D.cpp
@@ -4240,10 +4240,6 @@ static void generate_support_areas(Print &print, TreeSupport* tree_support, cons
move_bounds, interface_placer, throw_on_cancel);
auto t_gen = std::chrono::high_resolution_clock::now();
- // save num of points to log
- for (size_t i = 0; i < move_bounds.size(); i++)
- BOOST_LOG_TRIVIAL(trace) << "Number of points in move_bound: " << move_bounds[i].size() << " in layer " << i;
-
#ifdef TREESUPPORT_DEBUG_SVG
for (size_t layer_idx = 0; layer_idx < move_bounds.size(); ++layer_idx) {
Polygons polys;
diff --git a/src/libslic3r/Time.cpp b/src/libslic3r/Time.cpp
index 8faa14a..7c65691 100644
--- a/src/libslic3r/Time.cpp
+++ b/src/libslic3r/Time.cpp
@@ -178,6 +178,16 @@ time_t get_current_time_utc()
return clk::to_time_t(clk::now());
}
+//1.9.5
+time_t get_current_milliseconds_time_utc()
+{
+ using clk = std::chrono::system_clock;
+ auto now = clk::now();
+ auto duration = now.time_since_epoch();
+ auto milliseconds = std::chrono::duration_cast(duration).count();
+ return static_cast(milliseconds);
+}
+
static std::string tm2str(const std::tm *tms, const char *fmt)
{
std::stringstream ss;
diff --git a/src/libslic3r/Time.hpp b/src/libslic3r/Time.hpp
index c032519..3e98c50 100644
--- a/src/libslic3r/Time.hpp
+++ b/src/libslic3r/Time.hpp
@@ -9,6 +9,8 @@ namespace Utils {
// Should be thread safe.
time_t get_current_time_utc();
+//1.9.5
+time_t get_current_milliseconds_time_utc();
enum class TimeZone { local, utc };
enum class TimeFormat { gcode, iso8601Z };
diff --git a/src/libslic3r/VariableWidth.cpp b/src/libslic3r/VariableWidth.cpp
index a1ed3d7..8837cd2 100644
--- a/src/libslic3r/VariableWidth.cpp
+++ b/src/libslic3r/VariableWidth.cpp
@@ -2,7 +2,8 @@
namespace Slic3r {
-ExtrusionMultiPath thick_polyline_to_multi_path(const ThickPolyline& thick_polyline, ExtrusionRole role, const Flow& flow, const float tolerance, const float merge_tolerance)
+//1.9.5
+ExtrusionMultiPath thick_polyline_to_multi_path(const ThickPolyline& thick_polyline, ExtrusionRole role, const Flow& flow, const float tolerance, const float merge_tolerance, int overhang)
{
ExtrusionMultiPath multi_path;
ExtrusionPath path(role);
@@ -90,8 +91,11 @@ ExtrusionMultiPath thick_polyline_to_multi_path(const ThickPolyline& thick_polyl
}
}
}
- if (path.polyline.is_valid())
+ //1.9.5
+ if( path.polyline.is_valid() ) {
+ path.overhang_degree = overhang;
multi_path.paths.emplace_back(std::move(path));
+ }
return multi_path;
}
@@ -122,10 +126,9 @@ static ExtrusionPaths thick_polyline_to_extrusion_paths_2(const ThickPolyline& t
//QDS: 1 generate path from start_index to i(not included)
if (start_index != i){
path = ExtrusionPath(role);
- double length = lines[start_index].length();
- double sum = lines[start_index].length() * 0.5 * (lines[start_index].a_width + lines[start_index].b_width);
- path.polyline.append(lines[start_index].a);
- for (int idx = start_index + 1; idx < i; idx++) {
+ //1.9.5
+ double length = 0, sum = 0;
+ for (int idx = start_index; idx < i; idx++) {
length += lines[idx].length();
sum += lines[idx].length() * 0.5 * (lines[idx].a_width + lines[idx].b_width);
path.polyline.append(lines[idx].a);
@@ -191,12 +194,11 @@ static ExtrusionPaths thick_polyline_to_extrusion_paths_2(const ThickPolyline& t
size_t final_size = lines.size();
if (start_index < final_size) {
path = ExtrusionPath(role);
- double length = lines[start_index].length();
- double sum = lines[start_index].length() * lines[start_index].a_width;
- path.polyline.append(lines[start_index].a);
- for (int idx = start_index + 1; idx < final_size; idx++) {
+ //1.9.5
+ double length = 0, sum = 0;
+ for (int idx = start_index; idx < final_size; idx++) {
length += lines[idx].length();
- sum += lines[idx].length() * lines[idx].a_width;
+ sum += lines[idx].length() * (lines[idx].a_width + lines[idx].b_width) * 0.5;
path.polyline.append(lines[idx].a);
}
path.polyline.append(lines[final_size - 1].b);
diff --git a/src/libslic3r/VariableWidth.hpp b/src/libslic3r/VariableWidth.hpp
index f6eca97..8b81421 100644
--- a/src/libslic3r/VariableWidth.hpp
+++ b/src/libslic3r/VariableWidth.hpp
@@ -6,7 +6,8 @@
#include "Flow.hpp"
namespace Slic3r {
- ExtrusionMultiPath thick_polyline_to_multi_path(const ThickPolyline& thick_polyline, ExtrusionRole role, const Flow& flow, const float tolerance, const float merge_tolerance);
+ //1.9.5
+ ExtrusionMultiPath thick_polyline_to_multi_path(const ThickPolyline& thick_polyline, ExtrusionRole role, const Flow& flow, const float tolerance, const float merge_tolerance, int overhang);
void variable_width(const ThickPolylines& polylines, ExtrusionRole role, const Flow& flow, std::vector& out);
}
diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt
index 282e4f7..ae1432c 100644
--- a/src/slic3r/CMakeLists.txt
+++ b/src/slic3r/CMakeLists.txt
@@ -159,6 +159,8 @@ set(SLIC3R_GUI_SOURCES
GUI/GLTexture.cpp
GUI/GLToolbar.hpp
GUI/GLToolbar.cpp
+ GUI/GuiColor.cpp
+ GUI/GuiColor.hpp
GUI/IMToolbar.hpp
GUI/IMToolbar.cpp
GUI/GCodeViewer.hpp
diff --git a/src/slic3r/GUI/BitmapCache.cpp b/src/slic3r/GUI/BitmapCache.cpp
index 33b17cd..e4b1f15 100644
--- a/src/slic3r/GUI/BitmapCache.cpp
+++ b/src/slic3r/GUI/BitmapCache.cpp
@@ -268,6 +268,66 @@ wxBitmap* BitmapCache::load_png(const std::string &bitmap_name, unsigned width,
return this->insert(bitmap_key, wxImage_to_wxBitmap_with_alpha(std::move(image)));
}
+//y33
+wxBitmap* BitmapCache::load_login_png(const std::string& bitmap_name, unsigned width, unsigned height,
+ const bool grayscale/* = false*/, const float scale_in_center/* = 0*/) // QDS: support resize by fill border
+{
+ std::string bitmap_key = bitmap_name + (height != 0 ?
+ "-h" + std::to_string(height) :
+ "-w" + std::to_string(width))
+ + (grayscale ? "-gs" : "");
+
+ auto it = m_map.find(bitmap_key);
+ if (it != m_map.end())
+ return it->second;
+
+ wxImage image;
+ std::string imgge_path = (boost::filesystem::path(Slic3r::data_dir()) / "user" / bitmap_name).make_preferred().string();
+ if (!image.LoadFile(imgge_path, wxBITMAP_TYPE_ANY) ||
+ image.GetWidth() == 0 || image.GetHeight() == 0)
+ return nullptr;
+
+ if (height == 0 && width == 0)
+ height = image.GetHeight();
+
+ if (height != 0 && unsigned(image.GetHeight()) != height)
+ width = unsigned(0.5f + float(image.GetWidth()) * height / image.GetHeight());
+ else if (width != 0 && unsigned(image.GetWidth()) != width)
+ height = unsigned(0.5f + float(image.GetHeight()) * width / image.GetWidth());
+
+ if (height != 0 && width != 0) {
+ // QDS: support resize by fill border
+ if (scale_in_center > 0)
+ image.Resize({ (int)width, (int)height }, { (int)(width - image.GetWidth()) / 2, (int)(height - image.GetHeight()) / 2 });
+ else
+ image.Rescale(width, height, wxIMAGE_QUALITY_BILINEAR);
+ }
+
+ if (grayscale)
+ image = image.ConvertToGreyscale(m_gs, m_gs, m_gs);
+
+ int radius = height / 2;
+ int cx = image.GetWidth() / 2;
+ int cy = image.GetHeight() / 2;
+ for (int y = 0; y < height; ++y) {
+ for (int x = 0; x < height; ++x) {
+ int dx = x - radius;
+ int dy = y - radius;
+ if (dx * dx + dy * dy <= radius * radius) {
+ image.SetRGB(x, y, image.GetRed(cx + dx, cy + dy), image.GetGreen(cx + dx, cy + dy), image.GetBlue(cx + dx, cy + dy));
+ image.SetAlpha(x, y, 255);
+ }
+ else {
+ image.SetRGB(x, y, 38, 38, 41);
+ image.SetAlpha(x, y, 0);
+ }
+ }
+ }
+
+ return this->insert(bitmap_key, wxImage_to_wxBitmap_with_alpha(std::move(image)));
+}
+
+
NSVGimage* BitmapCache::nsvgParseFromFileWithReplace(const char* filename, const char* units, float dpi, const std::map& replaces)
{
std::string str;
diff --git a/src/slic3r/GUI/BitmapCache.hpp b/src/slic3r/GUI/BitmapCache.hpp
index 221b83e..97bf263 100644
--- a/src/slic3r/GUI/BitmapCache.hpp
+++ b/src/slic3r/GUI/BitmapCache.hpp
@@ -35,6 +35,8 @@ public:
// QDS: support resize by fill border (scale_in_center)
// Load png from resources/icons. bitmap_key is given without the .png suffix. Bitmap will be rescaled to provided height/width if nonzero.
wxBitmap* load_png(const std::string &bitmap_key, unsigned width = 0, unsigned height = 0, const bool grayscale = false, const float scale_in_center = 0.f);
+ //y33
+ wxBitmap* load_login_png(const std::string& bitmap_key, unsigned width = 0, unsigned height = 0, const bool grayscale = false, const float scale_in_center = 0.f);
// Parses SVG file from a file, returns SVG image as paths.
// And makes replases befor parsing
diff --git a/src/slic3r/GUI/CaliHistoryDialog.cpp b/src/slic3r/GUI/CaliHistoryDialog.cpp
index ee4f0a6..4a4c60b 100644
--- a/src/slic3r/GUI/CaliHistoryDialog.cpp
+++ b/src/slic3r/GUI/CaliHistoryDialog.cpp
@@ -280,6 +280,21 @@ void HistoryWindow::sync_history_data() {
title_action->SetFont(Label::Head_14);
gbSizer->Add(title_action, { 0, 3 }, { 1, 1 });
+ //1.9.5
+ auto to_lower_case = [](const std::string &str) {
+ std::string lowerStr = str;
+ std::transform(lowerStr.begin(), lowerStr.end(), lowerStr.begin(), [](unsigned char c) {
+ return std::tolower(c);
+ });
+ return lowerStr;
+ };
+
+ std::sort(m_calib_results_history.begin(), m_calib_results_history.end(), [&to_lower_case](const PACalibResult &left, const PACalibResult &right) {
+ std::string left_str = to_lower_case(left.name);
+ std::string right_str = to_lower_case(right.name);
+ return left_str < right_str ? true : left_str > right_str ? false : (left_str < right_str);
+ });
+
int i = 1;
for (auto& result : m_calib_results_history) {
auto name_value = new Label(m_history_data_panel, from_u8(result.name));
diff --git a/src/slic3r/GUI/CalibrationPanel.cpp b/src/slic3r/GUI/CalibrationPanel.cpp
index 252e4ed..19e98d0 100644
--- a/src/slic3r/GUI/CalibrationPanel.cpp
+++ b/src/slic3r/GUI/CalibrationPanel.cpp
@@ -81,6 +81,9 @@ void CalibrationPanel::create_preset_box(wxWindow* parent, wxBoxSizer* sizer_sid
if (!m_filament_choice->is_selected_physical_printer())
wxGetApp().preset_bundle->physical_printers.unselect_printer();
std::string preset_name = m_filament_choice->GetString(selection).ToUTF8().data();
+ if (preset_name.find("PETG") != std::string::npos && m_tabpanel->GetSelection() == 1) {
+ wxMessageBox("PETG filaments are not suitable for pressure advance calibration", "Warning", wxOK | wxICON_ERROR);
+ }
Slic3r::GUI::Tab* filament_tab = Slic3r::GUI::wxGetApp().get_tab(Preset::Type::TYPE_FILAMENT);
filament_tab->select_preset(preset_name);
@@ -194,7 +197,6 @@ void CalibrationPanel::init_tabpanel() {
m_cali_panels[1] = new PressureAdvanceWizard(m_tabpanel);
//w29
m_cali_panels[2] = new MaxVolumetricSpeedWizard(m_tabpanel);
-
for (int i = 0; i < (int)CALI_MODE_COUNT; i++) {
bool selected = false;
if (i == 0)
diff --git a/src/slic3r/GUI/CalibrationWizard.cpp b/src/slic3r/GUI/CalibrationWizard.cpp
index 443dd2d..e8bdd92 100644
--- a/src/slic3r/GUI/CalibrationWizard.cpp
+++ b/src/slic3r/GUI/CalibrationWizard.cpp
@@ -268,7 +268,7 @@ void PressureAdvanceWizard::on_cali_start()
calib_info.params.print_numbers = true;
if (calib_info.params.start < 0 || calib_info.params.step < 0.001 || calib_info.params.end < calib_info.params.start + calib_info.params.step) {
- MessageDialog msg_dlg(nullptr, _L("Please input valid values:\nStart PA: >= 0.0\nEnd PA: > Start PA\nPA step: >= 0.001)"), wxEmptyString, wxICON_WARNING | wxOK);
+ MessageDialog msg_dlg(nullptr, _L("Please input valid values:\nStart PA: >= 0.0\nEnd PA: > Start PA\nPA step: >= 0.001"), wxEmptyString, wxICON_WARNING | wxOK);
msg_dlg.ShowModal();
return;
}
@@ -383,6 +383,11 @@ void FlowRateWizard::cali_start_pass(int road) {
else {
values[0].ToDouble(&input_value);
}
+ if (input_value <= 0 || input_value >= 2) {
+ MessageDialog msg_dlg(nullptr, _L("Please input valid values:\n0.0< Flow Ratio < 2"), wxEmptyString, wxICON_WARNING | wxOK);
+ msg_dlg.ShowModal();
+ return;
+ }
wxGetApp().plater_->calib_flowrate(road, input_value);
}
//w29
@@ -476,7 +481,7 @@ void MaxVolumetricSpeedWizard::on_cali_start()
m_paramas.step = calib_info.params.step;
if (m_paramas.start <= 0 || m_paramas.step < 0.01 || m_paramas.end < (m_paramas.start + m_paramas.step)) {
- MessageDialog msg_dlg(nullptr, _L("Please input valid values:\nstart > 0 \nstep >= 0\nend > start + step)"), wxEmptyString, wxICON_WARNING | wxOK);
+ MessageDialog msg_dlg(nullptr, _L("Please input valid values:\nstart > 0 \nstep >= 0.01\nend >= start + step"), wxEmptyString, wxICON_WARNING | wxOK);
msg_dlg.ShowModal();
return;
}
diff --git a/src/slic3r/GUI/CalibrationWizardPresetPage.cpp b/src/slic3r/GUI/CalibrationWizardPresetPage.cpp
index b38175c..04039ef 100644
--- a/src/slic3r/GUI/CalibrationWizardPresetPage.cpp
+++ b/src/slic3r/GUI/CalibrationWizardPresetPage.cpp
@@ -362,25 +362,42 @@ void CalibrationPresetPage::msw_rescale()
float nozzle_diameter_list[NOZZLE_LIST_COUNT] = {0.2, 0.4, 0.6, 0.8 };
void CalibrationPresetPage::create_paragraph(wxWindow* parent, Label* title, std::string title_txt, Label* content, std::string content_txt) {
+
title = new Label(this, _L(title_txt));
title->SetFont(Label::Head_14);
title->Wrap(FromDIP(1100));
title->SetMinSize({ FromDIP(1100), -1 });
- content = new Label(this, _L(content_txt));;
+ content = new Label(this, _L(content_txt));
content->SetFont(Label::Body_14);
content->Wrap(FromDIP(1100));
content->SetMinSize({ FromDIP(1100), -1 });
m_top_sizer->Add(title);
m_top_sizer->Add(content);
+#ifdef __linux__
+ wxGetApp().CallAfter([this, content, title]() {
+ content->SetMinSize(content->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
+ title->SetMinSize(title->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
+ Layout();
+ Fit();
+});
+#endif
m_top_sizer->AddSpacer(PRESET_GAP);
}
void CalibrationPresetPage::create_txt(wxWindow* parent, Label* label, std::string label_txt) {
+
label = new Label(parent, _L(label_txt));
label->SetFont(Label::Body_14);
label->Wrap(FromDIP(1100));
label->SetMinSize({ FromDIP(1100), -1 });
m_top_sizer->Add(label);
+#ifdef __linux__
+ wxGetApp().CallAfter([this, label]() {
+ label->SetMinSize(label->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
+ Layout();
+ Fit();
+});
+#endif
m_top_sizer->AddSpacer(PRESET_GAP);
}
@@ -423,11 +440,11 @@ void CalibrationPresetPage::create_page_flow_coarse(wxWindow* parent, wxBoxSizer
std::string title_text_1 = "Step 1";
Label* content_1{ nullptr };
std::string content_text_1 = "You only need to click the \"Calibrate\" button below and wait for a short time.After successful slicing, you have three ways to print:\
- \n1. Directly send the sliced file and print it;\
- \n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;.\
- \n3. Send the sliced file to a storage medium and print it through the storage medium.\
- \nAfter successful printing, you will receive the model as shown in the picture. Choose the number with the smoothest surface. \
- \nThe value of the number \"0\" in the figure has the smoothest surface, so the value obtained from coarse calibration is \"1 + 0.00 = 1\", which can be used as the intermediate value for fine calibration.";
+\n1. Directly send the sliced file and print it;\
+\n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;\
+\n3. Send the sliced file to a storage medium and print it through the storage medium;\
+\nAfter successful printing, you will receive the model as shown in the picture. Choose the number with the smoothest surface; \
+\nThe value of the number \"0\" in the figure has the smoothest surface, so the value obtained from coarse calibration is \"1 + 0.00 = 1\", which can be used as the intermediate value for fine calibration.";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
add_bitmap(parent, m_top_sizer, "flowcoarseresult", true, 400);
@@ -442,18 +459,7 @@ void CalibrationPresetPage::create_page_flow_coarse(wxWindow* parent, wxBoxSizer
std::string content_text_2 = "You can also directly apply this value to your printing configuration, return to the \"Prepare\" interface, enter the filaments parameters to make modifications, and then click the save button to save your configuration.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
- create_gif_images(parent, m_top_sizer, "flowratiocoarseset");
-//#ifdef __linux__
-// wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2]() {
-// title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// Layout();
-// Fit();
-// });
-//#endif
-
+ create_gif_images(parent, m_top_sizer, "flowratiocoarseset");
}
//w29
@@ -485,18 +491,6 @@ void CalibrationPresetPage::create_page_flow_fine(wxWindow* parent, wxBoxSizer*
create_paragraph(parent, title_3, title_text_3, content_3, content_text_3);
create_gif_images(parent, m_top_sizer, "flowratioset");
-//#ifdef __linux__
-// wxGetApp().CallAfter([this, title_1, title_2, title_3, content_1, content_2, content_3]() {
-// title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// title_3->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_3->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// Layout();
-// Fit();
-// });
-//#endif
}
//w29
@@ -505,7 +499,7 @@ void CalibrationPresetPage::create_page_pa_line(wxWindow* parent, wxBoxSizer* m_
Label* title_1{ nullptr };
std::string title_text_1 = "Step 1";
Label* content_1{ nullptr };
- std::string content_text_1 = "Enter the minimum pressure advance value, maximum pressure advance value, and step size at the bottom of the current page, click the \"Calibrate\" button at the bottom of the page, and wait for a little time.The software will automatically set the calibration configuration.";
+ std::string content_text_1 = "Enter the minimum pressure advance value, maximum pressure advance value, and step size at the bottom of the current page, click the \"Calibrate\" button at the bottom of the page, and wait for a little time. The software will automatically set the calibration configuration.";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
m_custom_range_panel = new CaliPresetCustomRangePanel(parent);
@@ -514,10 +508,10 @@ void CalibrationPresetPage::create_page_pa_line(wxWindow* parent, wxBoxSizer* m_
Label* introduce_1{ nullptr };
std::string introduce_text_1 = "After successful slicing, you have three methods to perform the operation:\
- \n1. Directly send the sliced file and print it;\
- \n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;\
- \n3. Send the sliced file to a storage medium and print it through the storage medium.\
- \nReferring to the process in the \"PA Line\", you will print the calibration model as shown in the following figure.";
+\n1. Directly send the sliced file and print it;\
+\n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;\
+\n3. Send the sliced file to a storage medium and print it through the storage medium.\
+\nReferring to this process, you will print the calibration model as shown in the following figure.";
create_txt(parent, introduce_1, introduce_text_1);
add_bitmap(parent, m_top_sizer, "PressureAdvanceLine", true, 400);
@@ -530,17 +524,6 @@ void CalibrationPresetPage::create_page_pa_line(wxWindow* parent, wxBoxSizer* m_
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
create_gif_images(parent, m_top_sizer, "pavalue03");
-//#ifdef __linux__
-// wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2, introduce_1]() {
-// title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// introduce_1->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// Layout();
-// Fit();
-// });
-//#endif
}
//w29
@@ -549,7 +532,7 @@ void CalibrationPresetPage::create_page_pa_pattern(wxWindow* parent, wxBoxSizer*
Label* title_1{ nullptr };
std::string title_text_1 = "Step 1";
Label* content_1{ nullptr };
- std::string content_text_1 = "Enter the minimum pressure advance value, maximum pressure advance value, and step size at the bottom of the current page, click the \"Calibrate\" button at the bottom of the page, and wait for a little time.The software will automatically set the calibration configuration.";
+ std::string content_text_1 = "Enter the minimum pressure advance value, maximum pressure advance value, and step size at the bottom of the current page, click the \"Calibrate\" button at the bottom of the page, and wait for a little time. The software will automatically set the calibration configuration.";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
m_custom_range_panel = new CaliPresetCustomRangePanel(parent);
@@ -558,10 +541,10 @@ void CalibrationPresetPage::create_page_pa_pattern(wxWindow* parent, wxBoxSizer*
Label* introduce_1{ nullptr };
std::string introduce_text_1 = "After successful slicing, you have three methods to perform the operation:\
- \n1. Directly send the sliced file and print it;\
- \n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;\
- \n3. Send the sliced file to a storage medium and print it through the storage medium.\
- \nReferring to the process in the \"PA Pattern\", you will print the calibration model as shown in the following figure.";
+\n1. Directly send the sliced file and print it;\
+\n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;\
+\n3. Send the sliced file to a storage medium and print it through the storage medium.\
+\nReferring to this process, you will print the calibration model as shown in the following figure.";
create_txt(parent, introduce_1, introduce_text_1);
add_bitmap(parent, m_top_sizer, "PressureAdvancePattern", true, 350);
@@ -571,23 +554,12 @@ void CalibrationPresetPage::create_page_pa_pattern(wxWindow* parent, wxBoxSizer*
std::string title_text_2 = "Step 2";
Label* content_2{ nullptr };
std::string content_text_2 = "There are three feature regions in this model that need to be observed:\
- \n1. In regions 1 and 3 of the figure, when the pressure advance value is too small, material stacking will occur and the endpoints will exceed the bounding box. When the pressure advance value is too high, there may be a shortage of wire and the endpoint has not reached the bounding box.\
- \n2. In region 2 of the figure, when the pressure advance value is too small, material stacking may occur, which can cause excessive overflow at corners during actual printing. When the pressure value is too high, there may be missing threads. In actual printing, it can cause corners to become rounded and lead to missing threads.\
- \nFinally, save the value with the best surface effect.";
+\n1. In regions 1 and 3 of the figure, when the pressure advance value is too small, material stacking will occur and the endpoints will exceed the bounding box. When the pressure advance value is too high, there may be a shortage of wire and the endpoint has not reached the bounding box.\
+\n2. In region 2 of the figure, when the pressure advance value is too small, material stacking may occur, which can cause excessive overflow at corners during actual printing. When the pressure value is too high, there may be missing threads. In actual printing, it can cause corners to become rounded and lead to missing threads.\
+\nFinally, save the value with the best surface effect.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
create_gif_images(parent, m_top_sizer, "pavalue03");
-//#ifdef __linux__
-// wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2, introduce_1]() {
-// title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// introduce_1->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// Layout();
-// Fit();
-// });
-//#endif
}
//w29
@@ -605,10 +577,10 @@ void CalibrationPresetPage::create_page_pa_tower(wxWindow* parent, wxBoxSizer* m
Label* introduce_1{ nullptr };
std::string introduce_text_1 = "After successful slicing, you have three methods to perform the operation:\
- \n1. Directly send the sliced file and print it;\
- \n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;\
- \n3. Send the sliced file to a storage medium and print it through the storage medium.\
- \nReferring to the process in the \"PA Tower\", you will print the calibration model as shown in the following figure.";
+\n1. Directly send the sliced file and print it;\
+\n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;\
+\n3. Send the sliced file to a storage medium and print it through the storage medium.\
+\nReferring to this process, you will print the calibration model as shown in the following figure.";
create_txt(parent, introduce_1, introduce_text_1);
add_bitmap(parent, m_top_sizer, "patowermodel", true, 350);
@@ -624,26 +596,13 @@ void CalibrationPresetPage::create_page_pa_tower(wxWindow* parent, wxBoxSizer* m
std::string title_text_3 = "Step 3";
Label* content_3{ nullptr };
std::string content_text_3 = "Calculate the optimal pressure advance value using the given formula:\
- \nPressure Advance = k_Start + floor(height ÷ 5) × k_Step\
- \nNOTICE: floor() represents rounding downwards\
- \nAccording to the measured values, the pressure advance value in the figure is : 0.00 + floor(22.7 ÷ 5) × 0.005 = 0.02\
- \nFinally, save the value with the best surface effect.";
+\nPressure Advance = k_Start + floor(height ÷ 5) × k_Step\
+\nNOTICE: floor() represents rounding downwards\
+\nAccording to the measured values, the pressure advance value in the figure is : 0.00 + floor(22.7 ÷ 5) × 0.005 = 0.02\
+\nFinally, save the value with the best surface effect.";
create_paragraph(parent, title_3, title_text_3, content_3, content_text_3);
create_gif_images(parent, m_top_sizer, "pavalue02");
-//#ifdef __linux__
-// wxGetApp().CallAfter([this, title_1, title_2, title_3, content_1, content_2, content_3, introduce_1]() {
-// title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// title_3->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_3->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// introduce_1->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// Layout();
-// Fit();
-// });
-//#endif
}
void CalibrationPresetPage::create_page_max_volumetric_speed(wxWindow* parent, wxBoxSizer* m_top_sizer) {
@@ -660,42 +619,24 @@ void CalibrationPresetPage::create_page_max_volumetric_speed(wxWindow* parent, w
Label* introduce_1{ nullptr };
std::string introduce_text_1 = "After successful slicing, you have three methods to perform the operation:\
- \n1. Directly send the sliced file and print it;\
- \n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;\
- \n3. Send the sliced file to a storage medium and print it through the storage medium.\
- \nReferring to the process in the \"Max Volumetric Speed Calibration\", you will print the calibration model as shown in the following figure.";
+\n1. Directly send the sliced file and print it;\
+\n2. Send the sliced file to the printer via the network and manually select the sliced file for printing;\
+\n3. Send the sliced file to a storage medium and print it through the storage medium.\
+\nReferring to this process, you will print the calibration model as shown in the following figure.";
create_txt(parent, introduce_1, introduce_text_1);
add_bitmap(parent, m_top_sizer, "Volumetricspeedmodel", true, 350);
m_top_sizer->AddSpacer(PRESET_GAP);
-
- create_paph(parent, _L("Step 2"), _L("It can be observed that at a certain height, the model begins to show missing fibers. There are two methods to measure the maximum volumetric velocity:\
- \n1. Observing the number of notches nums on the right side, you can use StartV + (step * 2) = Max Volumetric Speed.\
- \n2. In the \"Preview\" interface, view the Gcode of the model, find the \"Flow\" value corresponding to the missing part, and save it."));
- m_top_sizer->Add(m_txt_title);
- m_top_sizer->Add(m_txt_content);
- m_top_sizer->AddSpacer(PRESET_GAP);
Label* title_2{ nullptr };
std::string title_text_2 = "Step 2";
Label* content_2{ nullptr };
std::string content_text_2 = "It can be observed that at a certain height, the model begins to show missing fibers. There are two methods to measure the maximum volumetric velocity:\
- \n1. Observing the number of notches nums on the right side, you can use StartV + (step * 2) = Max Volumetric Speed.\
- \n2. In the \"Preview\" interface, view the Gcode of the model, find the \"Flow\" value corresponding to the missing part, and save it.";
+\n1. Observing the number of notches nums on the right side, you can use StartV + (step * 2) = Max Volumetric Speed.\
+\n2. In the \"Preview\" interface, view the Gcode of the model, find the \"Flow\" value corresponding to the missing part, and save it.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
create_gif_images(parent, m_top_sizer, "Volumetricspeedset");
-//#ifdef __linux__
-// wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2, introduce_1]() {
-// title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// introduce_1->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// Layout();
-// Fit();
-// });
-//#endif
}
diff --git a/src/slic3r/GUI/CalibrationWizardStartPage.cpp b/src/slic3r/GUI/CalibrationWizardStartPage.cpp
index 4cf05a6..867c997 100644
--- a/src/slic3r/GUI/CalibrationWizardStartPage.cpp
+++ b/src/slic3r/GUI/CalibrationWizardStartPage.cpp
@@ -96,25 +96,42 @@ void CalibrationStartPage::add_bitmap(wxWindow* parent, wxBoxSizer* m_top_sizer,
m_images_sizer_temp = { nullptr };
}
void CalibrationStartPage::create_paragraph(wxWindow* parent, Label* title, std::string title_txt, Label* content, std::string content_txt) {
+
title = new Label(this, _L(title_txt));
title->SetFont(Label::Head_14);
title->Wrap(FromDIP(1100));
title->SetMinSize({ FromDIP(1100), -1 });
- content = new Label(this, _L(content_txt));;
+ content = new Label(this, _L(content_txt));
content->SetFont(Label::Body_14);
content->Wrap(FromDIP(1100));
content->SetMinSize({ FromDIP(1100), -1 });
m_top_sizer->Add(title);
m_top_sizer->Add(content);
+#ifdef __linux__
+ wxGetApp().CallAfter([this, content, title]() {
+ content->SetMinSize(content->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
+ title->SetMinSize(title->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
+ Layout();
+ Fit();
+ });
+#endif
m_top_sizer->AddSpacer(PRESET_GAP);
}
void CalibrationStartPage::create_txt(wxWindow* parent, Label* label, std::string label_txt) {
+
label = new Label(parent, _L(label_txt));
label->SetFont(Label::Body_14);
label->Wrap(FromDIP(1100));
label->SetMinSize({ FromDIP(1100), -1 });
m_top_sizer->Add(label);
+#ifdef __linux__
+ wxGetApp().CallAfter([this, label]() {
+ label->SetMinSize(label->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
+ Layout();
+ Fit();
+ });
+#endif
m_top_sizer->AddSpacer(PRESET_GAP);
}
@@ -182,7 +199,7 @@ void CalibrationPAStartPage::create_page(wxWindow* parent)
std::string title_text_1 = "What is Pressure Advance Calibration ?";
Label* content_1{ nullptr };
std::string content_text_1 = "From fluid mechanics, when a newtonian fluid flow through a hole, it needs pressure, and the pressure is proportional to the flow rate.\
- \nAs the filament is not rigid body, when the extruder starts to extrude, the filament will be compressed to generate the pressure. The compression process will delay the response of the real flow, as the extruder only provides the amount of the filament that needs to extrude, no extra.";
+\nAs the filament is not rigid body, when the extruder starts to extrude, the filament will be compressed to generate the pressure. The compression process will delay the response of the real flow, as the extruder only provides the amount of the filament that needs to extrude, no extra.";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
add_bitmap(parent, m_top_sizer, "PressureAdvanceCompare",true, 346);
@@ -192,14 +209,14 @@ void CalibrationPAStartPage::create_page(wxWindow* parent)
std::string title_text_2 = "When to Calibrate Pressure in Advance";
Label* content_2{ nullptr };
std::string content_text_2 = "1.Use different brands of filaments, or the filaments are damp;\
- \n2.The nozzle is worn or replaced with a different size nozzle;\
- \n3.Use different printing parameters such as temperature and line width;\
- \n4.PA calibration does not work with PETG.";
+\n2.The nozzle is worn or replaced with a different size nozzle;\
+\n3.Use different printing parameters such as temperature and line width;\
+\n4.PA calibration does not work with PETG.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
Label* introduce{ nullptr };
std::string introduce_text = "We have provided 3 calibration modes. Click the button below to enter the corresponding calibration page.\
- \nBefore calibration, you need to select the printer you are using, the consumables that need to be calibrated, and the process. You can directly select them in the upper left corner of the current page.";
+\nBefore calibration, you need to select the printer you are using, the consumables that need to be calibrated, and the process. You can directly select them in the upper left corner of the current page.";
create_txt(parent, introduce, introduce_text);
//w29
@@ -209,18 +226,6 @@ void CalibrationPAStartPage::create_page(wxWindow* parent)
CaliPresetTipsstartPanel* m_tips_panel = new CaliPresetTipsstartPanel(parent);
m_top_sizer->Add(m_tips_panel, 0);
m_top_sizer->AddSpacer(PRESET_GAP);
-
-//#ifdef __linux__
-// wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2, introduce]() {
-// title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// introduce->SetMinSize(introduce_text->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
-// Layout();
-// Fit();
-// });
-//#endif
}
//w29
@@ -262,38 +267,28 @@ void CalibrationFlowRateStartPage::create_page(wxWindow* parent)
std::string title_text_1 = "When do you need Flowrate Calibration";
Label* content_1{ nullptr };
std::string content_text_1 = "If you notice the following signs and other uncertain reasons during printing, you may consider performing flowrate calibration:\
- \n1. Over-Extrusion: If you see excess material on your printed object, forming blobs or zits, or the layers seem too thick, it could be a sign of over-extrusion;\
- \n2. Under-Extrusion: This is the opposite of over - extrusion.Signs include missing layers, weak infill, or gaps in the print.This could mean that your printer isn't extruding enough filament;\
- \n3. Poor Surface Quality : If the surface of your prints seems rough or uneven, this could be a result of an incorrect flow rate;\
- \n4. Weak Structural Integrity : If your prints break easily or don't seem as sturdy as they should be, this might be due to under-extrusion or poor layer adhesion, which can be improved by flow rate calibration;\
- \n5. When using third-party filaments";
+\n1.Over-Extrusion: If you see excess material on your printed object, blotches form, or layers that look too thick, it could be a sign of over-extrusion;\
+\n2.Under-Extrusion: This is the opposite of over - extrusion.Signs include missing layers, weak infill, or gaps in the print.This could mean that your printer isn't extruding enough filament;\
+\n3.Poor Surface Quality : If the surface of your prints seems rough or uneven, this could be a result of an incorrect flow rate;\
+\n4.Weak Structural Integrity : If your prints break easily or don't seem as sturdy as they should be, this might be due to under-extrusion or poor layer adhesion, which can be improved by flow rate calibration;\
+\n5.When using third-party filaments";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
add_bitmap(parent, m_top_sizer, "FlowrateCompare",true,290);
+ m_top_sizer->AddSpacer(PRESET_GAP);
Label* title_2{ nullptr };
std::string title_text_2 = "Calibration process";
Label* content_2{ nullptr };
std::string content_text_2 = "The calibration process includes two types: coarse calibration and fine calibration.\
- \nUsually, we first use coarse calibration to obtain a range, and then perform fine calibration to obtain precise values. You can also directly use the values of coarse calibration.\
- \nBefore calibration, you need to select the printer you are using, the consumables that need to be calibrated, and the process. You can directly select them in the upper left corner of the current page.";
+\nUsually, we first use coarse calibration to obtain a range, and then perform fine calibration to obtain precise values. You can also directly use the values of coarse calibration.\
+\nBefore calibration, you need to select the printer you are using, the consumables that need to be calibrated, and the process. You can directly select them in the upper left corner of the current page.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
m_action_panel = new CaliPageActionPanel(parent, CalibMode::Calib_Flow_Rate, CaliPageType::CALI_PAGE_START);
m_top_sizer->Add(m_action_panel, 0, wxEXPAND, 0);
-#ifdef __linux__
- wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2, introduce]() {
- title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
- title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
- content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
- content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
- introduce->SetMinSize(introduce_text->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
- Layout();
- Fit();
- });
-#endif
}
//w29
@@ -330,20 +325,20 @@ void CalibrationMaxVolumetricSpeedStartPage::create_page(wxWindow* parent)
std::string title_text_1 = "What is Max Volumetric Speed Calibration ?";
Label* content_1{ nullptr };
std::string content_text_1 = "Different filaments have different maximum volume speed.\
- \nNozzle material, caliber, printing temperature, etc., will affect the maximum volume speed.\
- \nWhen the maximum volume velocity is set too high and does not match the filament properties, there may be missing threads during the printing process, resulting in a deterioration of the surface texture of the model.\
- \nThis 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.";
+\nNozzle material, caliber, printing temperature, etc., will affect the maximum volume speed.\
+\nWhen the maximum volume velocity is set too high and does not match the filament properties, there may be missing threads during the printing process, resulting in a deterioration of the surface texture of the model.\
+\nThis 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.";
create_paragraph(parent, title_1, title_text_1, content_1, content_text_1);
Label* title_2{ nullptr };
std::string title_text_2 = "When to Calibrate Max Volumetric Speed ?";
Label* content_2{ nullptr };
std::string content_text_2 = "We have configured corresponding values for our official consumables in the software. When you have the following situations, you need to calibrate the Max Volumetric Speed:\
- \n1.Use different brands of filaments;\
- \n2.Replaced nozzles with different materials and diameters;\
- \n3.You have changed the printing temperature;\
- \n4.During the printing process, it was found that there were missing threads, insufficient extrusion, or broken filling.\
- \nBefore calibration, you need to select the printer you are using, the consumables that need to be calibrated, and the process. You can directly select them in the upper left corner of the current page.";
+\n1.Use different brands of filaments;\
+\n2.Replaced nozzles with different materials and diameters;\
+\n3.You have changed the printing temperature;\
+\n4.During the printing process, it was found that there were missing threads, insufficient extrusion, or broken filling;\
+\nBefore calibration, you need to select the printer you are using, the consumables that need to be calibrated, and the process. You can directly select them in the upper left corner of the current page.";
create_paragraph(parent, title_2, title_text_2, content_2, content_text_2);
add_bitmap(parent, m_top_sizer, "maxvolumetricspeedmodel", true, 300);
@@ -355,16 +350,7 @@ void CalibrationMaxVolumetricSpeedStartPage::create_page(wxWindow* parent)
CaliPresetTipsstartPanel* m_tips_panel = new CaliPresetTipsstartPanel(parent);
m_top_sizer->Add(m_tips_panel, 0);
m_top_sizer->AddSpacer(PRESET_GAP);
-#ifdef __linux__
- wxGetApp().CallAfter([this, title_1, title_2, content_1, content_2]() {
- title_1->SetMinSize(title_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
- title_2->SetMinSize(title_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
- content_1->SetMinSize(content_1->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
- content_2->SetMinSize(content_2->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
- Layout();
- Fit();
- });
-#endif
+
}
void CalibrationMaxVolumetricSpeedStartPage::msw_rescale()
diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp
index 768125d..d4b9686 100644
--- a/src/slic3r/GUI/ConfigManipulation.cpp
+++ b/src/slic3r/GUI/ConfigManipulation.cpp
@@ -657,11 +657,13 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
//toggle_field("support_closing_radius", have_support_material && support_style == smsSnug);
bool support_is_tree = config->opt_bool("enable_support") && is_tree(support_type);
- for (auto el : {"tree_support_branch_angle", "tree_support_branch_distance", "tree_support_branch_diameter","tree_support_brim_width"})
+ //1.9.5
+ for (auto el : {"tree_support_branch_angle", "tree_support_branch_distance", "tree_support_branch_diameter"})
toggle_field(el, support_is_tree);
// hide tree support settings when normal is selected
- for (auto el : {"tree_support_branch_angle", "tree_support_branch_distance", "tree_support_branch_diameter", "max_bridge_length","tree_support_brim_width" })
+ //1.9.5
+ for (auto el : {"tree_support_branch_angle", "tree_support_branch_distance", "tree_support_branch_diameter", "max_bridge_length"})
toggle_line(el, support_is_tree);
toggle_line("support_critical_regions_only", is_auto(support_type) && support_is_tree);
@@ -685,7 +687,8 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
toggle_field("support_filament", have_support_material || have_skirt);
toggle_line("raft_contact_distance", have_raft && !have_support_soluble);
- for (auto el : { "raft_first_layer_expansion", "raft_first_layer_density"})
+ //1.9.5
+ for (auto el : { "raft_first_layer_density"})
toggle_line(el, have_raft);
bool has_ironing = (config->opt_enum("ironing_type") != IroningType::NoIroning);
diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp
index 2cee420..a804588 100644
--- a/src/slic3r/GUI/DeviceManager.cpp
+++ b/src/slic3r/GUI/DeviceManager.cpp
@@ -2,7 +2,7 @@
#include "DeviceManager.hpp"
#include "libslic3r/Time.hpp"
#include "libslic3r/Thread.hpp"
-#include "slic3r/Utils/ColorSpaceConvert.hpp"
+#include "GuiColor.hpp"
#include "GUI_App.hpp"
#include "MsgDialog.hpp"
@@ -790,15 +790,6 @@ bool MachineObject::is_support_ams_mapping()
return true;
}
-static float calc_color_distance(wxColour c1, wxColour c2)
-{
- float lab[2][3];
- RGB2Lab(c1.Red(), c1.Green(), c1.Blue(), &lab[0][0], &lab[0][1], &lab[0][2]);
- RGB2Lab(c2.Red(), c2.Green(), c2.Blue(), &lab[1][0], &lab[1][1], &lab[1][2]);
-
- return DeltaE76(lab[0][0], lab[0][1], lab[0][2], lab[1][0], lab[1][1], lab[1][2]);
-}
-
void MachineObject::get_ams_colors(std::vector &ams_colors) {
ams_colors.clear();
ams_colors.reserve(amsList.size());
@@ -925,7 +916,8 @@ int MachineObject::ams_filament_mapping(std::vector filaments, std
val.tray_id = tray->second.id;
wxColour c = wxColour(filaments[i].color);
wxColour tray_c = AmsTray::decode_color(tray->second.color);
- val.distance = calc_color_distance(c, tray_c);
+ //1.9.5
+ val.distance = GUI::calc_color_distance(c, tray_c);
if (filaments[i].type != tray->second.type) {
val.distance = 999999;
val.is_type_match = false;
@@ -1442,8 +1434,6 @@ void MachineObject::parse_status(int flag)
}
sdcard_state = MachineObject::SdcardState((flag >> 8) & 0x11);
-
- network_wired = ((flag >> 18) & 0x1) != 0;
}
PrintingSpeedLevel MachineObject::_parse_printing_speed_lvl(int lvl)
@@ -3230,6 +3220,14 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
mc_print_line_number = atoi(jj["mc_print_line_number"].get().c_str());
}
}
+ //1.9.5
+ if (!key_field_only) {
+ if (jj.contains("net")) {
+ if (jj["net"].contains("conf")) {
+ network_wired = (jj["net"]["conf"].get() & (0x1)) != 0;
+ }
+ }
+ }
#pragma endregion
#pragma region online
diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp
index 2d2f076..f1e79f1 100644
--- a/src/slic3r/GUI/GLCanvas3D.cpp
+++ b/src/slic3r/GUI/GLCanvas3D.cpp
@@ -3532,19 +3532,21 @@ void GLCanvas3D::on_key(wxKeyEvent& evt)
{
case WXK_NUMPAD_PAGEUP: case WXK_PAGEUP:
case WXK_NUMPAD_PAGEDOWN: case WXK_PAGEDOWN:
- {
- do_rotate(L("Tool Rotate"));
- m_gizmos.update_data();
-
- // QDS
- //wxGetApp().obj_manipul()->set_dirty();
- // Let the plater know that the dragging finished, so a delayed refresh
- // of the scene with the background processing data should be performed.
- post_event(SimpleEvent(EVT_GLCANVAS_MOUSE_DRAGGING_FINISHED));
- // updates camera target constraints
- refresh_camera_scene_box();
- m_dirty = true;
+ {
+ //1.9.5
+ if (m_gizmos.get_gizmo_active_condition(GLGizmosManager::EType::Rotate)) {
+ do_rotate(L("Tool Rotate"));
+ m_gizmos.update_data();
+ // QDS
+ //wxGetApp().obj_manipul()->set_dirty();
+ // Let the plater know that the dragging finished, so a delayed refresh
+ // of the scene with the background processing data should be performed.
+ post_event(SimpleEvent(EVT_GLCANVAS_MOUSE_DRAGGING_FINISHED));
+ // updates camera target constraints
+ refresh_camera_scene_box();
+ m_dirty = true;
+ }
break;
}
default: { break; }
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
index 786925f..0626021 100644
--- a/src/slic3r/GUI/GUI_App.cpp
+++ b/src/slic3r/GUI/GUI_App.cpp
@@ -96,6 +96,8 @@
#include "Notebook.hpp"
#include "Widgets/Label.hpp"
#include "Widgets/ProgressDialog.hpp"
+#include
+#include
//QDS: DailyTip and UserGuide Dialog
#include "WebDownPluginDlg.hpp"
@@ -780,6 +782,8 @@ static const FileWildcards file_wildcards_by_type[FT_SIZE] = {
/* FT_OBJ */ { "OBJ files"sv, { ".obj"sv } },
/* FT_AMF */ { "AMF files"sv, { ".amf"sv, ".zip.amf"sv, ".xml"sv } },
/* FT_3MF */ { "3MF files"sv, { ".3mf"sv } },
+ //1.9.5
+ /* FT_GCODE_3MF */ {"Gcode 3MF files"sv, {".gcode.3mf"sv}},
/* FT_GCODE */ { "G-code files"sv, { ".gcode"sv } },
#ifdef __APPLE__
/* FT_MODEL */
@@ -2435,7 +2439,9 @@ bool GUI_App::OnInit()
{
try {
return on_init_inner();
- } catch (const std::exception&) {
+ //1.9.5
+ } catch (const std::exception& e) {
+ BOOST_LOG_TRIVIAL(fatal) << "OnInit Got Fatal error: " << e.what();
generic_exception_handle();
return false;
}
@@ -3943,33 +3949,76 @@ void GUI_App::get_login_info()
wxString msg;
QIDINetwork m_qidinetwork;
m_user_name = m_qidinetwork.user_info(msg);
+ //y33
+ std::string head_name = wxGetApp().app_config->get("user_head_name");
// y21
if (m_user_name.empty())
{
m_user_name = "";
wxGetApp().app_config->set("user_token", "");
+ wxGetApp().app_config->set("user_head_url", "");
+ wxGetApp().app_config->set("user_head_name", "");
+ wxString user_head_path = (boost::filesystem::path(Slic3r::data_dir()) / "user" / head_name).make_preferred().string();
wxString strJS = wxString::Format("SetUserOffline()");
GUI::wxGetApp().run_script_left(strJS);
+ //y34
+ std::ifstream file(user_head_path);
+ if (file.good())
+ {
+ file.close();
+ remove(user_head_path.c_str());
+ }
m_qidi_login = false;
}
else
{
- wxString strJS = wxString::Format("SetLoginInfo('%s', '%s');", "", from_u8(m_user_name));
+ //y34
+ wxString user_head_path = (boost::filesystem::path(Slic3r::data_dir()) / "user" / head_name).make_preferred().string();
+ if (!wxGetApp().app_config->get("user_head_name").empty()) {
+ user_head_path = (boost::filesystem::path(Slic3r::data_dir()) / "user" / head_name).make_preferred().string();
+ std::replace(user_head_path.begin(), user_head_path.end(), '\\', '/');
+ }
+ else
+ user_head_path = "";
+ wxString strJS = wxString::Format("SetLoginInfo('%s', '%s');", user_head_path, from_u8(m_user_name));
GUI::wxGetApp().run_script_left(strJS);
m_qidi_login = true;
}
}
else
{
- wxString strJS = wxString::Format("SetLoginInfo('%s', '%s');", "", from_u8(m_user_name));
+ std::string head_name = wxGetApp().app_config->get("user_head_name");
+ //y34
+ wxString user_head_path;
+ if (!head_name.empty()) {
+ user_head_path = (boost::filesystem::path(Slic3r::data_dir()) / "user" / head_name).make_preferred().string();
+ std::replace(user_head_path.begin(), user_head_path.end(), '\\', '/');
+ }
+ else
+ user_head_path = "";
+ wxString strJS = wxString::Format("SetLoginInfo('%s', '%s');", user_head_path, from_u8(m_user_name));
GUI::wxGetApp().run_script_left(strJS);
m_qidi_login = true;
}
}
else
{
+ std::string head_name = wxGetApp().app_config->get("user_head_name");
+ //y34
+ if (!head_name.empty())
+ {
+ wxString user_head_path = (boost::filesystem::path(Slic3r::data_dir()) / "user" / head_name).make_preferred().string();
+ std::ifstream file(user_head_path);
+ if (file.good())
+ {
+ file.close();
+ remove(user_head_path.c_str());
+ }
+ }
m_user_name = "";
wxGetApp().app_config->set("user_token", "");
+ wxGetApp().app_config->set("user_head_url", "");
+ wxGetApp().app_config->set("user_head_name", "");
wxString strJS = wxString::Format("SetUserOffline()");
GUI::wxGetApp().run_script_left(strJS);
m_qidi_login = false;
@@ -6530,6 +6579,8 @@ wxString GUI_App::current_language_code_safe() const
{ "ru", "ru_RU", },
{ "tr", "tr_TR", },
{ "pt", "pt_BR", },
+ //1.9.5
+ { "hu", "hu_HU", },
};
wxString language_code = this->current_language_code().BeforeFirst('_');
auto it = mapping.find(language_code);
diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp
index 636343c..0247e24 100644
--- a/src/slic3r/GUI/GUI_App.hpp
+++ b/src/slic3r/GUI/GUI_App.hpp
@@ -93,6 +93,7 @@ enum FileType
FT_OBJ,
FT_AMF,
FT_3MF,
+ FT_GCODE_3MF,
FT_GCODE,
FT_MODEL,
FT_PROJECT,
@@ -325,6 +326,10 @@ public:
bool initialized() const { return m_initialized; }
inline bool is_enable_multi_machine() { return this->app_config&& this->app_config->get("enable_multi_machine") == "true"; }
+ //w13
+ void set_seal_an(bool val) { this->app_config->set_bool("enable_seal", val); }
+ bool enable_seal() { return this->app_config && this->app_config->get("enable_seal") == "true"; }
+
std::map test_url_state;
//QDS: remove GCodeViewer as seperate APP logic
diff --git a/src/slic3r/GUI/GUI_Factories.cpp b/src/slic3r/GUI/GUI_Factories.cpp
index 62e9938..4a069c6 100644
--- a/src/slic3r/GUI/GUI_Factories.cpp
+++ b/src/slic3r/GUI/GUI_Factories.cpp
@@ -84,7 +84,8 @@ std::map> SettingsFactory::OBJECT_C
{ L("Support"), {{"brim_type", "",1},{"brim_width", "",2},{"brim_object_gap", "",3},
{"enable_support", "",4},{"support_type", "",5},{"support_threshold_angle", "",6},{"support_on_build_plate_only", "",7},
{"support_filament", "",8},{"support_interface_filament", "",9},{"support_expansion", "",24},{"support_style", "",25},
- {"tree_support_brim_width", "",26}, {"tree_support_branch_angle", "",10}, {"tree_support_wall_count", "",11},//tree support
+ //1.9.5
+ {"tree_support_branch_angle", "",10}, {"tree_support_wall_count", "",11},//tree support
{"support_top_z_distance", "",13},{"support_bottom_z_distance", "",12},{"support_base_pattern", "",14},{"support_base_pattern_spacing", "",15},
{"support_interface_top_layers", "",16},{"support_interface_bottom_layers", "",17},{"support_interface_spacing", "",18},{"support_bottom_interface_spacing", "",19},
{"support_object_xy_distance", "",20}, {"bridge_no_support", "",21},{"max_bridge_length", "",22},{"support_critical_regions_only", "",23},{"support_remove_small_overhang","",27},
@@ -103,8 +104,9 @@ std::map> SettingsFactory::PART_CAT
{"infill_combination", "",1}, {"infill_wall_overlap", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1},{"minimum_sparse_infill_area", "",1}
}},
{ L("Speed"), {{"outer_wall_speed", "",1},{"inner_wall_speed", "",2},{"sparse_infill_speed", "",3},{"top_surface_speed", "",4}, {"internal_solid_infill_speed", "",5},
- {"enable_overhang_speed", "",6}, {"overhang_1_4_speed", "",7}, {"overhang_2_4_speed", "",8}, {"overhang_3_4_speed", "",9}, {"overhang_4_4_speed", "",10},
- {"bridge_speed", "",11}, {"gap_infill_speed", "",12}
+ //1.9.5
+ {"enable_overhang_speed", "",6}, {"overhang_1_4_speed", "",7}, {"overhang_2_4_speed", "",8}, {"overhang_3_4_speed", "",9}, {"overhang_4_4_speed", "",10}, {"overhang_totally_speed", "",11},
+ {"bridge_speed", "",12}, {"gap_infill_speed", "",13}
}}
};
diff --git a/src/slic3r/GUI/Gizmos/GLGizmoAssembly.cpp b/src/slic3r/GUI/Gizmos/GLGizmoAssembly.cpp
index 924ab29..38449b4 100644
--- a/src/slic3r/GUI/Gizmos/GLGizmoAssembly.cpp
+++ b/src/slic3r/GUI/Gizmos/GLGizmoAssembly.cpp
@@ -44,6 +44,10 @@ std::string GLGizmoAssembly::on_get_name() const
bool GLGizmoAssembly::on_is_activable() const
{
const Selection& selection = m_parent.get_selection();
+ //1.9.5
+ if (selection.is_wipe_tower()) {
+ return false;
+ }
const int selection_volumes_count = 2;
if (wxGetApp().plater()->canvas3D()->get_canvas_type() == GLCanvas3D::ECanvasType::CanvasAssembleView) {
if (abs(m_parent.get_explosion_ratio() - 1.0f) < 1e-2 && selection.volumes_count() >= selection_volumes_count) {
diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp
index 2dd6838..8d62c7d 100644
--- a/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp
+++ b/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp
@@ -493,6 +493,10 @@ std::string GLGizmoMeasure::on_get_name() const
bool GLGizmoMeasure::on_is_activable() const
{
const Selection& selection = m_parent.get_selection();
+ //1.9.5
+ if (selection.is_wipe_tower()) {
+ return false;
+ }
if (wxGetApp().plater()->canvas3D()->get_canvas_type() == GLCanvas3D::ECanvasType::CanvasAssembleView) {
if (abs(m_parent.get_explosion_ratio() - 1.0f) < 1e-2 && selection.volumes_count() > 0) {
return true;
diff --git a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp
index 410c1f2..b415965 100644
--- a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp
+++ b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp
@@ -684,6 +684,14 @@ bool GLGizmosManager::is_show_only_active_plate()
return false;
}
+//1.9.5
+bool GLGizmosManager::get_gizmo_active_condition(GLGizmosManager::EType type) {
+ if (auto cur_gizmo = get_gizmo(type)) {
+ return cur_gizmo->is_activable();
+ }
+ return false;
+}
+
void GLGizmosManager::check_object_located_outside_plate() {
PartPlateList &plate_list = wxGetApp().plater()->get_partplate_list();
auto curr_plate_index = plate_list.get_curr_plate_index();
@@ -1065,7 +1073,8 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
&& (m_current == SlaSupports || m_current == Hollow || m_current == FdmSupports || m_current == Seam || m_current == MmuSegmentation))
// don't allow dragging objects with the Sla gizmo on
processed = true;
- else if (evt.Dragging() && !control_down
+ //1.9.5
+ else if (evt.Dragging() && !control_down
&& (m_current == SlaSupports || m_current == Hollow || m_current == FdmSupports || m_current == Seam || m_current == MmuSegmentation || m_current == Cut)
&& gizmo_event(SLAGizmoEventType::Dragging, mouse_pos, evt.ShiftDown(), evt.AltDown())) {
// the gizmo got the event and took some action, no need to do anything more here
diff --git a/src/slic3r/GUI/Gizmos/GLGizmosManager.hpp b/src/slic3r/GUI/Gizmos/GLGizmosManager.hpp
index ea48b01..0a7c121 100644
--- a/src/slic3r/GUI/Gizmos/GLGizmosManager.hpp
+++ b/src/slic3r/GUI/Gizmos/GLGizmosManager.hpp
@@ -287,6 +287,7 @@ public:
bool is_gizmo_activable_when_single_full_instance();
bool is_gizmo_click_empty_not_exit();
bool is_show_only_active_plate();
+ bool get_gizmo_active_condition(GLGizmosManager::EType type); //1.9.5
void check_object_located_outside_plate();
bool get_object_located_outside_plate() { return m_object_located_outside_plate; }
bool gizmo_event(SLAGizmoEventType action, const Vec2d& mouse_position = Vec2d::Zero(), bool shift_down = false, bool alt_down = false, bool control_down = false);
diff --git a/src/slic3r/GUI/GuiColor.cpp b/src/slic3r/GUI/GuiColor.cpp
new file mode 100644
index 0000000..ff94816
--- /dev/null
+++ b/src/slic3r/GUI/GuiColor.cpp
@@ -0,0 +1,43 @@
+#include "GuiColor.hpp"
+
+//1.9.5
+namespace Slic3r { namespace GUI {
+wxColour convert_to_wxColour(const RGBA &color)
+{
+ auto r = std::clamp((int) (color[0] * 255.f), 0, 255);
+ auto g = std::clamp((int) (color[1] * 255.f), 0, 255);
+ auto b = std::clamp((int) (color[2] * 255.f), 0, 255);
+ auto a = std::clamp((int) (color[3] * 255.f), 0, 255);
+ wxColour wx_color(r, g, b, a);
+ return wx_color;
+}
+
+RGBA convert_to_rgba(const wxColour &color)
+{
+ RGBA rgba;
+ rgba[0] = std::clamp(color.Red() / 255.f, 0.f, 1.f);
+ rgba[1] = std::clamp(color.Green() / 255.f, 0.f, 1.f);
+ rgba[2] = std::clamp(color.Blue() / 255.f, 0.f, 1.f);
+ rgba[3] = std::clamp(color.Alpha() / 255.f, 0.f, 1.f);
+ return rgba;
+}
+
+float calc_color_distance(wxColour c1, wxColour c2)
+{
+ float lab[2][3];
+ RGB2Lab(c1.Red(), c1.Green(), c1.Blue(), &lab[0][0], &lab[0][1], &lab[0][2]);
+ RGB2Lab(c2.Red(), c2.Green(), c2.Blue(), &lab[1][0], &lab[1][1], &lab[1][2]);
+
+ return DeltaE76(lab[0][0], lab[0][1], lab[0][2], lab[1][0], lab[1][1], lab[1][2]);
+}
+
+float calc_color_distance(RGBA c1, RGBA c2)
+{
+ float lab[2][3];
+ RGB2Lab(c1[0], c1[1], c1[2], &lab[0][0], &lab[0][1], &lab[0][2]);
+ RGB2Lab(c2[0], c2[1], c2[2], &lab[1][0], &lab[1][1], &lab[1][2]);
+
+ return DeltaE76(lab[0][0], lab[0][1], lab[0][2], lab[1][0], lab[1][1], lab[1][2]);
+}
+
+} }
diff --git a/src/slic3r/GUI/GuiColor.hpp b/src/slic3r/GUI/GuiColor.hpp
new file mode 100644
index 0000000..22b08db
--- /dev/null
+++ b/src/slic3r/GUI/GuiColor.hpp
@@ -0,0 +1,22 @@
+#ifndef slic3r_GUI_Color_hpp_
+#define slic3r_GUI_Color_hpp_
+#include
+#include "libslic3r/Color.hpp"
+#include "slic3r/Utils/ColorSpaceConvert.hpp"
+
+//1.9.5
+struct ColorDistValue
+{
+ int id;
+ float distance;
+};
+
+namespace Slic3r { namespace GUI {
+wxColour convert_to_wxColour(const RGBA &color);
+RGBA convert_to_rgba(const wxColour &color);
+float calc_color_distance(wxColour c1, wxColour c2);
+float calc_color_distance(RGBA c1, RGBA c2);
+} // namespace GUI
+} // namespace Slic3r
+
+#endif /* slic3r_GUI_Color_hpp_ */
diff --git a/src/slic3r/GUI/MainFrame.hpp b/src/slic3r/GUI/MainFrame.hpp
index 9d4f367..6aea8cf 100644
--- a/src/slic3r/GUI/MainFrame.hpp
+++ b/src/slic3r/GUI/MainFrame.hpp
@@ -100,6 +100,8 @@ class MainFrame : public DPIFrame
//wxMenu* publishMenu{ nullptr };
wxMenu * m_calib_menu{nullptr};
bool enable_multi_machine{ false };
+ //w13
+ bool enable_seal{ true };
#if 0
wxMenuItem* m_menu_item_repeat { nullptr }; // doesn't used now
diff --git a/src/slic3r/GUI/MediaPlayCtrl.cpp b/src/slic3r/GUI/MediaPlayCtrl.cpp
index 59dbd7f..3591320 100644
--- a/src/slic3r/GUI/MediaPlayCtrl.cpp
+++ b/src/slic3r/GUI/MediaPlayCtrl.cpp
@@ -21,6 +21,9 @@
#include
#include
#endif
+#ifdef __APPLE__
+#include
+#endif
#include
#include "wx/evtloop.h"
@@ -36,7 +39,8 @@ static std::map error_messages = {
namespace Slic3r {
namespace GUI {
-
+//1.9.5
+static int SecondsSinceLastInput();
MediaPlayCtrl::MediaPlayCtrl(wxWindow *parent, wxMediaCtrl2 *media_ctrl, const wxPoint &pos, const wxSize &size)
: wxPanel(parent, wxID_ANY, pos, size)
, m_media_ctrl(media_ctrl)
@@ -178,6 +182,11 @@ void MediaPlayCtrl::SetMachineObject(MachineObject* obj)
agent->get_camera_url(machine, [](auto) {});
m_last_user_play = wxDateTime::Now();
}
+ //1.9.5
+ if (m_last_state == wxMediaState::wxMEDIASTATE_PLAYING && SecondsSinceLastInput() > 900) { // 15 minutes
+ m_next_retry = wxDateTime();
+ Stop(_L("Temporarily closed because there is no operating for a long time."));
+ }
return;
}
m_machine = machine;
@@ -303,6 +312,8 @@ void MediaPlayCtrl::Play()
m_disable_lan = false;
m_failed_code = 0;
m_last_state = MEDIASTATE_IDLE;
+ //1.9.5
+ m_button_play->SetIcon("media_stop");
if (!m_remote_support) { // not support tutk
m_failed_code = -1;
@@ -849,6 +860,21 @@ bool MediaPlayCtrl::get_stream_url(std::string *url)
return url == nullptr;
}
+//1.9.5
+static int SecondsSinceLastInput()
+{
+#ifdef _WIN32
+ LASTINPUTINFO lii;
+ lii.cbSize = sizeof(lii);
+ ::GetLastInputInfo(&lii);
+ return (::GetTickCount() - lii.dwTime) / 1000;
+#elif defined(__APPLE__)
+ return (int)CGEventSourceSecondsSinceLastEventType(kCGEventSourceStateHIDSystemState, kCGAnyInputEventType);
+#else
+ return 0;
+#endif
+}
+
}}
void wxMediaCtrl2::DoSetSize(int x, int y, int width, int height, int sizeFlags)
diff --git a/src/slic3r/GUI/OG_CustomCtrl.cpp b/src/slic3r/GUI/OG_CustomCtrl.cpp
index 259cab1..0838a7d 100644
--- a/src/slic3r/GUI/OG_CustomCtrl.cpp
+++ b/src/slic3r/GUI/OG_CustomCtrl.cpp
@@ -361,11 +361,11 @@ void OG_CustomCtrl::OnMotion(wxMouseEvent& event)
if (!line.is_visible) continue;
line.is_focused = is_point_in_rect(pos, line.rect_label);
if (line.is_focused) {
- // y8
- // if (!suppress_hyperlinks && !line.og_line.label_path.empty())
- // tooltip = OptionsGroup::get_url(line.og_line.label_path) + "\n\n";
- // tooltip += line.og_line.label_tooltip;
- tooltip = line.og_line.label_tooltip;
+ // y8 //y32
+ if (!suppress_hyperlinks && !line.og_line.label_path.empty())
+ tooltip = OptionsGroup::get_url(line.og_line.label_path) + "\n\n";
+ tooltip += line.og_line.label_tooltip;
+
// QDS: markdown tip
focusedLine = &line;
@@ -425,9 +425,9 @@ void OG_CustomCtrl::OnLeftDown(wxMouseEvent& event)
for (const CtrlLine& line : ctrl_lines) {
if (!line.is_visible) continue;
- // y8
- // if (line.launch_browser())
- // return;
+ // y8 //y32
+ if (line.launch_browser())
+ return;
for (size_t opt_idx = 0; opt_idx < line.rects_undo_icon.size(); opt_idx++)
if (is_point_in_rect(pos, line.rects_undo_icon[opt_idx])) {
@@ -910,16 +910,16 @@ wxCoord OG_CustomCtrl::CtrlLine::draw_text(wxDC &dc, wxPoint pos, const wxString
wxColour old_clr = dc.GetTextForeground();
wxFont old_font = dc.GetFont();
wxColor clr_url = StateColor::darkModeColorFor("#4479FB");
- // y8
-// if (is_focused && is_url) {
-// // temporary workaround for the OSX because of strange Bold font behavior on BigSerf
-// #ifdef __APPLE__
-// dc.SetFont(old_font.Underlined());
-// #else
-// dc.SetFont(old_font.Bold().Underlined());
-// #endif
-// color = &clr_url;
-// }
+ // y8 //y32
+ if (is_focused && is_url) {
+ // temporary workaround for the OSX because of strange Bold font behavior on BigSerf
+#ifdef __APPLE__
+ dc.SetFont(old_font.Underlined());
+#else
+ dc.SetFont(old_font.Bold().Underlined());
+#endif
+ color = &clr_url;
+ }
dc.SetTextForeground(color ? *color :
#ifdef _WIN32
wxGetApp().get_label_clr_default());
diff --git a/src/slic3r/GUI/ObjColorDialog.cpp b/src/slic3r/GUI/ObjColorDialog.cpp
index c4a5d72..7ec42f8 100644
--- a/src/slic3r/GUI/ObjColorDialog.cpp
+++ b/src/slic3r/GUI/ObjColorDialog.cpp
@@ -8,7 +8,6 @@
#include "GUI_App.hpp"
#include "MsgDialog.hpp"
#include "Widgets/Button.hpp"
-#include "slic3r/Utils/ColorSpaceConvert.hpp"
#include "MainFrame.hpp"
#include "libslic3r/Config.hpp"
#include "BitmapComboBox.hpp"
@@ -189,24 +188,7 @@ ObjColorDialog::ObjColorDialog(wxWindow * parent,
wxGetApp().UpdateDlgDarkUI(this);
}
-RGBA convert_to_rgba(const wxColour &color)
-{
- RGBA rgba;
- rgba[0] = std::clamp(color.Red() / 255.f, 0.f, 1.f);
- rgba[1] = std::clamp(color.Green() / 255.f, 0.f, 1.f);
- rgba[2] = std::clamp(color.Blue() / 255.f, 0.f, 1.f);
- rgba[3] = std::clamp(color.Alpha() / 255.f, 0.f, 1.f);
- return rgba;
-}
-wxColour convert_to_wxColour(const RGBA &color)
-{
- auto r = std::clamp((int) (color[0] * 255.f), 0, 255);
- auto g = std::clamp((int) (color[1] * 255.f), 0, 255);
- auto b = std::clamp((int) (color[2] * 255.f), 0, 255);
- auto a = std::clamp((int) (color[3] * 255.f), 0, 255);
- wxColour wx_color(r,g,b,a);
- return wx_color;
-}
+
// This panel contains all control widgets for both simple and advanced mode (these reside in separate sizers)
ObjColorPanel::ObjColorPanel(wxWindow * parent,
std::vector& input_colors,
@@ -547,13 +529,6 @@ ComboBox *ObjColorPanel::CreateEditorCtrl(wxWindow *parent, int id) // wxRect la
void ObjColorPanel::deal_approximate_match_btn()
{
- auto calc_color_distance = [](wxColour c1, wxColour c2) {
- float lab[2][3];
- RGB2Lab(c1.Red(), c1.Green(), c1.Blue(), &lab[0][0], &lab[0][1], &lab[0][2]);
- RGB2Lab(c2.Red(), c2.Green(), c2.Blue(), &lab[1][0], &lab[1][1], &lab[1][2]);
-
- return DeltaE76(lab[0][0], lab[0][1], lab[0][2], lab[1][0], lab[1][1], lab[1][2]);
- };
m_warning_text->SetLabelText("");
if (m_result_icon_list.size() == 0) { return; }
auto map_count = m_result_icon_list[0]->bitmap_combox->GetCount() -1;
@@ -694,8 +669,9 @@ void ObjColorPanel::deal_algo(char cluster_number, bool redraw_ui)
return;
}
m_last_cluster_number = cluster_number;
- QuantKMeans quant(10);
- quant.apply(m_input_colors, m_cluster_colors_from_algo, m_cluster_labels_from_algo, (int)cluster_number);
+ //1.9.5
+ obj_color_deal_algo(m_input_colors, m_cluster_colors_from_algo, m_cluster_labels_from_algo, cluster_number);
+
m_cluster_colours.clear();
m_cluster_colours.reserve(m_cluster_colors_from_algo.size());
for (size_t i = 0; i < m_cluster_colors_from_algo.size(); i++) {
diff --git a/src/slic3r/GUI/ObjColorDialog.hpp b/src/slic3r/GUI/ObjColorDialog.hpp
index f18ca02..bc1909b 100644
--- a/src/slic3r/GUI/ObjColorDialog.hpp
+++ b/src/slic3r/GUI/ObjColorDialog.hpp
@@ -2,7 +2,7 @@
#define _OBJ_COLOR_DIALOG_H_
#include "GUI_Utils.hpp"
-#include "libslic3r/Color.hpp"
+#include "GuiColor.hpp"
#include
#include
#include
@@ -12,11 +12,7 @@
class Button;
class Label;
class ComboBox;
-struct ColorDistValue
-{
- int id;
- float distance;
-};
+
class ObjColorPanel : public wxPanel
{
public:
diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp
index edcf438..6569cc0 100644
--- a/src/slic3r/GUI/OptionsGroup.cpp
+++ b/src/slic3r/GUI/OptionsGroup.cpp
@@ -1284,7 +1284,7 @@ wxString OptionsGroup::get_url(const std::string& path_end)
wxString region = L"en";
if (language.find("zh") == 0)
region = L"zh";
- return wxString::Format(L"https://wiki.qidilab.com/%s/software/qidi-studio/%s", region, str);
+ return wxString::Format(L"https://wiki.qidi3d.com/%s/software/qidi-studio/%s", region, str); //y32
}
bool OptionsGroup::launch_browser(const std::string& path_end)
diff --git a/src/slic3r/GUI/PhysicalPrinterDialog.cpp b/src/slic3r/GUI/PhysicalPrinterDialog.cpp
index 328a2b6..a1cf5f8 100644
--- a/src/slic3r/GUI/PhysicalPrinterDialog.cpp
+++ b/src/slic3r/GUI/PhysicalPrinterDialog.cpp
@@ -200,7 +200,10 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr
m_printhost_browse_btn->Bind(wxEVT_BUTTON, [=](wxCommandEvent& e) {
BonjourDialog dialog(this, Preset::printer_technology(*m_config));
if (dialog.show_and_lookup()) {
- m_optgroup->set_value("print_host", dialog.get_selected(), true);
+ //y32
+ std::string get_host = into_u8(dialog.get_selected());
+ boost::trim(get_host);
+ m_optgroup->set_value("print_host", from_u8(get_host), true);
m_optgroup->get_field("print_host")->field_changed();
}
});
@@ -465,12 +468,23 @@ void PhysicalPrinterDialog::OnOK(wxMouseEvent& event)
msg_wingow.ShowModal();
return;
}
- if (m_exit_host.find(now_host) != m_exit_host.end())
+ //31
+ std::string ip = now_host;
+ if (now_host.find(":") != std::string::npos)
{
- MessageDialog msg_wingow(nullptr, _L("A device with the same host (IP or URL) already exists, please re-enter."), "", wxICON_WARNING | wxOK);
- msg_wingow.ShowModal();
- return;
+ size_t pos = now_host.find(":");
+ ip = now_host.substr(0, pos);
}
+ for (auto exit_host : m_exit_host)
+ {
+ if (exit_host.find(ip) != std::string::npos)
+ {
+ MessageDialog msg_wingow(nullptr, _L("A device with the same host (IP or URL) already exists, please re-enter."), "", wxICON_WARNING | wxOK);
+ msg_wingow.ShowModal();
+ return;
+ }
+ }
+
// y3
m_printer_name = into_u8(m_input_ctrl->GetValue());
m_printer_host = boost::any_cast(m_optgroup->get_field("print_host")->get_value());
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index d3c99a0..1116c4d 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -57,6 +57,7 @@
#include "libslic3r/Utils.hpp"
#include "libslic3r/PresetBundle.hpp"
#include "libslic3r/ClipperUtils.hpp"
+#include "libslic3r/ObjColorUtils.hpp"
// For stl export
#include "libslic3r/CSGMesh/ModelToCSGMesh.hpp"
@@ -64,6 +65,7 @@
#include "GUI.hpp"
#include "GUI_App.hpp"
+#include "GuiColor.hpp"
#include "GUI_ObjectList.hpp"
#include "GUI_Utils.hpp"
#include "GUI_Factories.hpp"
@@ -736,24 +738,24 @@ Sidebar::Sidebar(Plater *parent)
m_bed_type_list->AppendString(_L(item));
}
}
-
- bed_type_title->Bind(wxEVT_ENTER_WINDOW, [bed_type_title, this](wxMouseEvent &e) {
- e.Skip();
- auto font = bed_type_title->GetFont();
- font.SetUnderlined(true);
- bed_type_title->SetFont(font);
- SetCursor(wxCURSOR_HAND);
- });
- bed_type_title->Bind(wxEVT_LEAVE_WINDOW, [bed_type_title, this](wxMouseEvent &e) {
- e.Skip();
- auto font = bed_type_title->GetFont();
- font.SetUnderlined(false);
- bed_type_title->SetFont(font);
- SetCursor(wxCURSOR_ARROW);
- });
- bed_type_title->Bind(wxEVT_LEFT_UP, [bed_type_title, this](wxMouseEvent &e) {
- wxLaunchDefaultBrowser("https://wiki.qidilab.com/en/x1/manual/compatibility-and-parameter-settings-of-filaments");
- });
+ //y32
+ // bed_type_title->Bind(wxEVT_ENTER_WINDOW, [bed_type_title, this](wxMouseEvent &e) {
+ // e.Skip();
+ // auto font = bed_type_title->GetFont();
+ // font.SetUnderlined(true);
+ // bed_type_title->SetFont(font);
+ // SetCursor(wxCURSOR_HAND);
+ // });
+ // bed_type_title->Bind(wxEVT_LEAVE_WINDOW, [bed_type_title, this](wxMouseEvent &e) {
+ // e.Skip();
+ // auto font = bed_type_title->GetFont();
+ // font.SetUnderlined(false);
+ // bed_type_title->SetFont(font);
+ // SetCursor(wxCURSOR_ARROW);
+ // });
+ // bed_type_title->Bind(wxEVT_LEFT_UP, [bed_type_title, this](wxMouseEvent &e) {
+ // wxLaunchDefaultBrowser("https://wiki.qidilab.com/en/x1/manual/compatibility-and-parameter-settings-of-filaments");
+ // });
AppConfig *app_config = wxGetApp().app_config;
std::string str_bed_type = app_config->get("curr_bed_type");
@@ -886,7 +888,24 @@ Sidebar::Sidebar(Plater *parent)
wxBoxSizer* hbox = new wxBoxSizer(wxHORIZONTAL);
wxStaticText* label = new Label(p->m_panel_filament_title, _L("Seal"));
SwitchButton* checkbox = new SwitchButton(p->m_panel_filament_title, wxID_ANY);
- checkbox->SetValue(true);
+
+ bool init_val = wxGetApp().enable_seal();
+ {
+ checkbox->SetValue(init_val);
+ auto filament_config = &wxGetApp().preset_bundle->filaments.get_edited_preset().config;
+ auto print_config = &wxGetApp().preset_bundle->printers.get_edited_preset().config;
+ AppConfig* config = wxGetApp().app_config;
+ if (init_val) {
+ print_config->set_key_value("seal", new ConfigOptionBool(true));
+ config->set_seal(true);
+ wxGetApp().set_seal_an(true);
+ }
+ else {
+ print_config->set_key_value("seal", new ConfigOptionBool(false));
+ config->set_seal(false);
+ wxGetApp().set_seal_an(false);
+ }
+ }
hbox->Add(label, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(5));
hbox->Add(checkbox, 0, wxALIGN_CENTER);
bSizer39->Add(hbox, 0, wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(10));
@@ -899,10 +918,12 @@ Sidebar::Sidebar(Plater *parent)
if (is_checked) {
print_config->set_key_value("seal", new ConfigOptionBool(true));
config->set_seal(true);
+ wxGetApp().set_seal_an(true);
}
else {
print_config->set_key_value("seal", new ConfigOptionBool(false));
config->set_seal(false);
+ wxGetApp().set_seal_an(false);
}
});
@@ -3730,7 +3751,7 @@ std::vector Plater::priv::load_files(const std::vector& input_
//// q->select_plate(0);
//// if (load_type != LoadType::LoadGeometry) {
//// if (en_3mf_file_type == En3mfType::From_QDS)
- //// show_info(q, _L("The 3mf is generated by old QIDI Studio, load geometry data only."), _L("Load 3mf"));
+ //// show_info(q, _L("Due to the lower version of QIDI Studio, this 3mf file cannot be fully loaded. Please update QIDI Studio to the latest version"), _L("Load 3mf"));
//// else
//// show_info(q, _L("The 3mf is not from QIDI Lab, load geometry data only."), _L("Load 3mf"));
//// }
@@ -4684,7 +4705,8 @@ wxString Plater::priv::get_export_file(GUI::FileType file_type)
wxString out_path = dlg.GetPath();
fs::path path(into_path(out_path));
#ifdef __WXMSW__
- if (path.extension() != output_file.extension()) {
+ //1.9.5
+ if (boost::iequals(path.extension().string(), output_file.extension().string()) == false) {
out_path += output_file.extension().string();
boost::system::error_code ec;
if (boost::filesystem::exists(into_u8(out_path), ec)) {
@@ -7073,7 +7095,9 @@ void Plater::priv::on_action_print_plate(SimpleEvent&)
}
//QDS
- SelectMachineDialog* dlg = new SelectMachineDialog(q);
+ //y30
+ wxString title = "Send print job to";
+ SelectMachineDialog* dlg = new SelectMachineDialog(q, title);
if (dlg->ShowModal() == wxID_YES)
{
std::string send_ip = dlg->get_machine_url();
@@ -7149,7 +7173,9 @@ void Plater::priv::on_action_print_plate_from_sdcard(SimpleEvent&)
}
//QDS
- if (!m_select_machine_dlg) m_select_machine_dlg = new SelectMachineDialog(q);
+ //y30
+ wxString title = "";
+ if (!m_select_machine_dlg) m_select_machine_dlg = new SelectMachineDialog(q, title);
m_select_machine_dlg->set_print_type(PrintFromType::FROM_SDCARD_VIEW);
m_select_machine_dlg->prepare(0);
m_select_machine_dlg->ShowModal();
@@ -7157,7 +7183,9 @@ void Plater::priv::on_action_print_plate_from_sdcard(SimpleEvent&)
int Plater::priv::update_print_required_data(Slic3r::DynamicPrintConfig config, Slic3r::Model model, Slic3r::PlateDataPtrs plate_data_list, std::string file_name, std::string file_path)
{
- if (!m_select_machine_dlg) m_select_machine_dlg = new SelectMachineDialog(q);
+ //y30
+ wxString title = "";
+ if (!m_select_machine_dlg) m_select_machine_dlg = new SelectMachineDialog(q, title);
return m_select_machine_dlg->update_print_required_data(config, model, plate_data_list, file_name, file_path);
}
@@ -7190,7 +7218,9 @@ void Plater::priv::on_action_print_all(SimpleEvent&)
}
//QDS
- if (!m_select_machine_dlg) m_select_machine_dlg = new SelectMachineDialog(q);
+ //y30
+ wxString title = "";
+ if (!m_select_machine_dlg) m_select_machine_dlg = new SelectMachineDialog(q, title);
m_select_machine_dlg->set_print_type(PrintFromType::FROM_NORMAL);
m_select_machine_dlg->prepare(PLATE_ALL_IDX);
m_select_machine_dlg->ShowModal();
@@ -7247,7 +7277,9 @@ void Plater::priv::on_action_export_to_sdcard(SimpleEvent&)
// BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ":received export sliced file event\n";
// q->send_to_printer();
// }
- SelectMachineDialog* dlg = new SelectMachineDialog(q);
+ //y30
+ wxString title = "Send to Printer SD card";
+ SelectMachineDialog* dlg = new SelectMachineDialog(q, title);
if (dlg->ShowModal() == wxID_YES)
{
std::string send_ip = dlg->get_machine_url();
@@ -10508,6 +10540,9 @@ void Plater::load_gcode(const wxString& filename)
//QDS: zoom to bed 0 for gcode preview
//p->preview->get_canvas3d()->zoom_to_gcode();
p->preview->get_canvas3d()->zoom_to_plate(0);
+ //1.9.5
+ p->partplate_list.get_curr_plate()->update_slice_result_valid_state(true);
+ current_print.apply(this->model(), wxGetApp().preset_bundle->full_config());
if (p->preview->get_canvas3d()->get_gcode_layers_zs().empty()) {
MessageDialog(this, _L("The selected file") + ":\n" + filename + "\n" + _L("does not contain valid gcode."),
@@ -11053,7 +11088,8 @@ bool Plater::load_files(const wxArrayString& filenames)
case LoadFilesType::Multiple3MFOther:
for (const auto &path : normal_paths) {
- if (wxString(encode_path(path.filename().string().c_str())).EndsWith("3mf")) {
+ //1.9.5
+ if (boost::iends_with(path.filename().string(), ".3mf")){
if (first_file.size() <= 0)
first_file.push_back(path);
else
@@ -11130,7 +11166,10 @@ int Plater::get_3mf_file_count(std::vector paths)
{
auto count = 0;
for (const auto &path : paths) {
- if (wxString(encode_path(path.filename().string().c_str())).EndsWith("3mf")) count++;
+ //1.9.5
+ if (boost::iends_with(path.filename().string(), ".3mf")) {
+ count++;
+ }
}
return count;
}
@@ -11209,7 +11248,8 @@ void Plater::add_file()
}
case LoadFilesType::Multiple3MFOther:
for (const auto &path : paths) {
- if (wxString(encode_path(path.filename().string().c_str())).EndsWith("3mf")) {
+ //1.9.5
+ if (boost::iends_with(path.filename().string(), ".3mf")) {
if (first_file.size() <= 0)
first_file.push_back(path);
else
@@ -11771,21 +11811,20 @@ void Plater::export_gcode_3mf(bool export_all)
fs::path default_output_file;
AppConfig& appconfig = *wxGetApp().app_config;
std::string start_dir;
- default_output_file = into_path(get_export_gcode_filename(".3mf", false, export_all));
+ //1.9.5
+ default_output_file = into_path(get_export_gcode_filename(".gcode.3mf", false, export_all));
if (default_output_file.empty()) {
try {
start_dir = appconfig.get_last_output_dir("", false);
- wxString filename = get_export_gcode_filename(".3mf", true, export_all);
+ wxString filename = get_export_gcode_filename(".gcode.3mf", true, export_all);
std::string full_filename = start_dir + "/" + filename.utf8_string();
default_output_file = boost::filesystem::path(full_filename);
- } catch(...) {
+ }
+ catch (...) {
;
}
}
- //QDS replace gcode extension to .gcode.3mf
- default_output_file = default_output_file.replace_extension(".gcode.3mf");
-
//Get a last save path
start_dir = appconfig.get_last_output_dir(default_output_file.parent_path().string(), false);
@@ -11793,25 +11832,19 @@ void Plater::export_gcode_3mf(bool export_all)
{
std::string ext = default_output_file.extension().string();
wxFileDialog dlg(this, _L("Save Sliced file as:"),
- start_dir,
- from_path(default_output_file.filename()),
- GUI::file_wildcards(FT_3MF, ext),
+ start_dir, from_path(default_output_file.filename()), GUI::file_wildcards(FT_GCODE_3MF, ""), //1.9.5
wxFD_SAVE | wxFD_OVERWRITE_PROMPT
);
if (dlg.ShowModal() == wxID_OK) {
output_path = into_path(dlg.GetPath());
- ext = output_path.extension().string();
- if (ext != ".3mf")
- output_path = output_path.string() + ".gcode.3mf";
- else {
+ if (boost::iends_with(output_path.string(), ".gcode")) { //1.9.5
std::string path = output_path.string();
- path = path.substr(0, path.size() - 4);
- if (path.size() < 6)
- output_path = output_path.replace_extension(".gcode.3mf");
- else {
- std::string extension = path.substr(path.size() - 6);
- if (extension != ".gcode") output_path = output_path.replace_extension(".gcode.3mf");
- }
+ //1.9.5
+ path = path.substr(0, path.size() - 6);
+ output_path = path + ".gcode.3mf";
+ }
+ else if (!boost::iends_with(output_path.string(), ".gcode.3mf")) {
+ output_path = output_path.replace_extension(".gcode.3mf");
}
}
}
@@ -14891,4 +14924,5 @@ static void alert_when_exporting_binary_gcode(bool binary_output, const std::str
}
-}} // namespace Slic3r::GUI
+}
+} // namespace Slic3r::GUI
diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp
index dc5f9a8..1795668 100644
--- a/src/slic3r/GUI/Preferences.cpp
+++ b/src/slic3r/GUI/Preferences.cpp
@@ -1022,7 +1022,7 @@ wxWindow* PreferencesDialog::create_general_page()
std::sort(language_infos.begin(), language_infos.end(), [](const wxLanguageInfo *l, const wxLanguageInfo *r) { return l->Description < r->Description; });
auto item_language = create_item_language_combobox(_L("Language"), page, _L("Language"), 50, "language", language_infos);
- std::vector Regions = {_L("Asia-Pacific"), _L("China"), _L("Europe"), _L("North America"), _L("Others")};
+ std::vector Regions = {_L("Asia-Pacific"), _L("Chinese Mainland"), _L("Europe"), _L("North America"), _L("Others")}; //1.9.5
auto item_region= create_item_region_combobox(_L("Login Region"), page, _L("Login Region"), Regions);
std::vector Units = {_L("Metric") + " (mm, g)", _L("Imperial") + " (in, oz)"};
diff --git a/src/slic3r/GUI/PrinterWebView.cpp b/src/slic3r/GUI/PrinterWebView.cpp
index 8d4d4ec..124b229 100644
--- a/src/slic3r/GUI/PrinterWebView.cpp
+++ b/src/slic3r/GUI/PrinterWebView.cpp
@@ -32,6 +32,9 @@ PrinterWebView::PrinterWebView(wxWindow *parent) : wxPanel(parent, wxID_ANY, wxD
// y21
wxGetApp().get_login_info();
m_isloginin = wxGetApp().is_QIDILogin();
+ //y33
+ if (m_isloginin)
+ m_user_head_name = wxGetApp().app_config->get("user_head_name");
m_select_type = "null";
@@ -84,7 +87,11 @@ PrinterWebView::PrinterWebView(wxWindow *parent) : wxPanel(parent, wxID_ANY, wxD
//y23 //y24
if (into_u8(m_web).find("missing_connection") != std::string::npos)
{
+ //y30
wxString url = wxString::Format("file://%s/web/qidi/missing_connection.html", from_u8(resources_dir()));
+ wxString strlang = wxGetApp().current_language_code_safe();
+ if (strlang != "")
+ url = wxString::Format("file://%s/web/qidi/missing_connection.html?lang=%s", from_u8(resources_dir()), strlang);
load_disconnect_url(url);
}
} else {
@@ -93,7 +100,11 @@ PrinterWebView::PrinterWebView(wxWindow *parent) : wxPanel(parent, wxID_ANY, wxD
//y23 //y24
if (into_u8(m_web).find("missing_connection") != std::string::npos)
{
+ //y30
wxString url = wxString::Format("file://%s/web/qidi/link_missing_connection.html", from_u8(resources_dir()));
+ wxString strlang = wxGetApp().current_language_code_safe();
+ if (strlang != "")
+ url = wxString::Format("file://%s/web/qidi/link_missing_connection.html?lang=%s", from_u8(resources_dir()), strlang);
load_disconnect_url(url);
}
}
@@ -158,11 +169,12 @@ PrinterWebView::PrinterWebView(wxWindow *parent) : wxPanel(parent, wxID_ANY, wxD
wxBoxSizer *PrinterWebView::init_login_bar(wxPanel *Panel)
{
wxBoxSizer *buttonsizer = new wxBoxSizer(wxHORIZONTAL);
-
+ //y33
if (m_isSimpleMode)
- staticBitmap = new wxStaticBitmap(Panel, wxID_ANY, ScalableBitmap(this, "user_dark_tiny", 40).bmp());
- else
- staticBitmap = new wxStaticBitmap(Panel, wxID_ANY, ScalableBitmap(this, "user_dark", 60).bmp());
+ staticBitmap = new wxStaticBitmap(Panel, wxID_ANY, create_scaled_bitmap_of_login(m_user_head_name, this, 40));
+ else
+ staticBitmap = new wxStaticBitmap(Panel, wxID_ANY, create_scaled_bitmap_of_login(m_user_head_name, this, 60));
+
StateColor text_color(std::pair(wxColour(57, 57, 61), StateColor::Disabled),
std::pair(wxColour(68, 121, 251), StateColor::Pressed),
@@ -323,6 +335,7 @@ wxBoxSizer *PrinterWebView::init_menu_bar(wxPanel *Panel)
wxString msg;
std::string state = "standby";
float progress = 0;
+ //y34
state = printhost->get_status(msg, device.device_name, device.url);
BOOST_LOG_TRIVIAL(error) << ("State:", state);
if ((m_net_buttons[count]->GetStateText()).ToStdString() != state)
@@ -353,100 +366,108 @@ wxBoxSizer *PrinterWebView::init_menu_bar(wxPanel *Panel)
m_machine.clear();
m_exit_host.clear();
//ShowLocalPrinterButton();
- PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
- PhysicalPrinterCollection &ph_printers = preset_bundle.physical_printers;
+ PresetBundle& preset_bundle = *wxGetApp().preset_bundle;
+ PhysicalPrinterCollection& ph_printers = preset_bundle.physical_printers;
std::set qidi_printers = preset_bundle.get_vendors();
std::string actice_url = "";
for (PhysicalPrinterCollection::ConstIterator it = ph_printers.begin(); it != ph_printers.end(); ++it) {
- std::string host = (it->config.opt_string("print_host"));
- std::string preset_name = (it->config.opt_string("preset_name"));
- bool isQIDI_printer = false;
- if(qidi_printers.find(preset_name) != qidi_printers.end())
- isQIDI_printer = true;
-
- std::string full_name = it->get_full_name(preset_name);
- std::string model_id;
- if (isQIDI_printer)
- model_id = preset_name;
- else
- model_id = "my_printer";
- const DynamicPrintConfig *cfg_t = &(it->config);
+ std::string host = (it->config.opt_string("print_host"));
+ std::string preset_name = (it->config.opt_string("preset_name"));
+ bool isQIDI_printer = false;
+ if (qidi_printers.find(preset_name) != qidi_printers.end())
+ isQIDI_printer = true;
- const auto opt = cfg_t->option>("host_type");
- auto host_type = opt != nullptr ? opt->value : htOctoPrint;
-
- // y13
- bool is_selected = false;
- if (!select_machine_name.empty())
- if (select_machine_name == it->get_short_name(full_name))
- {
- is_selected = true;
- select_machine_name = "";
- }
-
+ std::string full_name = it->get_full_name(preset_name);
+ std::string model_id;
+ if (isQIDI_printer)
+ model_id = preset_name;
+ else
+ model_id = "my_printer";
+ const DynamicPrintConfig* cfg_t = &(it->config);
- //BOOST_LOG_TRIVIAL(error) << preset_name;
- //BOOST_LOG_TRIVIAL(error) << full_name;
- //BOOST_LOG_TRIVIAL(error) << (it->get_short_name(full_name));
- //BOOST_LOG_TRIVIAL(error) << (it->get_preset_name(full_name));
- //BOOST_LOG_TRIVIAL(error) << model_id;
- AddButton((it->get_short_name(full_name)), host, model_id, full_name, is_selected,
- (host_type == htOctoPrint));
- m_machine.insert(std::make_pair((it->get_short_name(full_name)), *cfg_t));
- //y25
- m_exit_host.insert(host);
+ const auto opt = cfg_t->option>("host_type");
+ auto host_type = opt != nullptr ? opt->value : htOctoPrint;
+
+ // y13
+ bool is_selected = false;
+ if (!select_machine_name.empty())
+ if (select_machine_name == it->get_short_name(full_name))
+ {
+ is_selected = true;
+ select_machine_name = "";
+ }
+
+
+ //BOOST_LOG_TRIVIAL(error) << preset_name;
+ //BOOST_LOG_TRIVIAL(error) << full_name;
+ //BOOST_LOG_TRIVIAL(error) << (it->get_short_name(full_name));
+ //BOOST_LOG_TRIVIAL(error) << (it->get_preset_name(full_name));
+ //BOOST_LOG_TRIVIAL(error) << model_id;
+ AddButton((it->get_short_name(full_name)), host, model_id, full_name, is_selected,
+ (host_type == htOctoPrint));
+ m_machine.insert(std::make_pair((it->get_short_name(full_name)), *cfg_t));
+ //y25
+ m_exit_host.insert(host);
}
- #if QDT_RELEASE_TO_PUBLIC
+#if QDT_RELEASE_TO_PUBLIC
auto m_devices = wxGetApp().get_devices();
- for (const auto &device : m_devices) {
+ for (const auto& device : m_devices) {
AddNetButton(device);
}
- #endif
-
- //y23 //y28
- if (webisNetMode == isNetWeb) {
- ShowNetPrinterButton();
- for (DeviceButton* button : m_net_buttons) {
- if (m_ip == (button->getIPLabel())) {
- button->SetIsSelected(true);
- wxCommandEvent event(wxEVT_BUTTON, button->GetId());
- wxPostEvent(button, event);
- break;
- }
- }
- toggleBar->SetValue(true);
- m_isNetMode = true;
- } else if (webisNetMode == isLocalWeb) {
- ShowLocalPrinterButton();
- for (DeviceButton* button : m_buttons) {
- if (m_ip == (button->getIPLabel())) {
- button->SetIsSelected(true);
- break;
- }
- }
- toggleBar->SetValue(false);
- m_isNetMode = false;
- }
- else
- {
- if (m_isNetMode)
- {
- ShowNetPrinterButton();
- wxString host = wxString::Format("file://%s/web/qidi/link_missing_connection.html", from_u8(resources_dir()));
- load_disconnect_url(host);
- }
- else
- {
- ShowLocalPrinterButton();
- wxString host = wxString::Format("file://%s/web/qidi/missing_connection.html", from_u8(resources_dir()));
- load_disconnect_url(host);
- }
- }
+#endif
CreatThread();
- UpdateState();
- UpdateLayout();
}
+ //y23 //y28 //y31
+ if (webisNetMode == isNetWeb) {
+ ShowNetPrinterButton();
+ for (DeviceButton* button : m_net_buttons) {
+ if (button->getIPLabel().find(m_ip) != std::string::npos) {
+ button->SetIsSelected(true);
+ wxCommandEvent event(wxEVT_BUTTON, button->GetId());
+ wxPostEvent(button, event);
+ break;
+ }
+ }
+ toggleBar->SetValue(true);
+ m_isNetMode = true;
+ wxGetApp().app_config->set("machine_list_net", "1");
+ } else if (webisNetMode == isLocalWeb) {
+ ShowLocalPrinterButton();
+ for (DeviceButton* button : m_buttons) {
+ if (button->getIPLabel().find(m_ip) != std::string::npos) {
+ button->SetIsSelected(true);
+ break;
+ }
+ }
+ toggleBar->SetValue(false);
+ m_isNetMode = false;
+ wxGetApp().app_config->set("machine_list_net", "0");
+ }
+ else
+ {
+ wxString strlang = wxGetApp().current_language_code_safe();
+ if (m_isNetMode)
+ {
+ //y30
+ ShowNetPrinterButton();
+ wxString url = wxString::Format("file://%s/web/qidi/link_missing_connection.html", from_u8(resources_dir()));
+ if(strlang != "")
+ url = wxString::Format("file://%s/web/qidi/link_missing_connection.html?lang=%s", from_u8(resources_dir()), strlang);
+ load_disconnect_url(url);
+ }
+ else
+ {
+ ShowLocalPrinterButton();
+ //y30
+ wxString url = wxString::Format("file://%s/web/qidi/missing_connection.html", from_u8(resources_dir()));
+ if (strlang != "")
+ url = wxString::Format("file://%s/web/qidi/missing_connection.html?lang=%s", from_u8(resources_dir()), strlang);
+ load_disconnect_url(url);
+ }
+ }
+ UpdateState();
+ UpdateLayout();
}
void PrinterWebView::SetLoginStatus(bool status) {
m_isloginin = status;
@@ -460,6 +481,8 @@ wxBoxSizer *PrinterWebView::init_menu_bar(wxPanel *Panel)
wxString wxname = from_u8(name);
login_button->SetLabel(wxname);
std::vector m_devices = m_qidinetwork.get_device_list(msg);
+ //y33
+ m_user_head_name = wxGetApp().app_config->get("user_head_name");
SetPresetChanged(true);
#endif
m_isloginin = true;
@@ -473,8 +496,10 @@ wxBoxSizer *PrinterWebView::init_menu_bar(wxPanel *Panel)
// y28
if (webisNetMode == isNetWeb)
webisNetMode = isDisconnect;
+ m_user_head_name = "";
SetPresetChanged(true);
UpdateState();
+ wxGetApp().get_login_info();
}
}
@@ -596,7 +621,28 @@ wxBoxSizer *PrinterWebView::init_menu_bar(wxPanel *Panel)
machine_button->SetIsSimpleMode(m_isSimpleMode);
machine_button->Bind(wxEVT_BUTTON, [this, device](wxCommandEvent &event) {
- std::string formattedHost = "http://" + device.url;
+ //y34 //y35
+ std::string formattedHost;
+ if(wxGetApp().app_config->get("dark_color_mode") == "1")
+ formattedHost = device.link_url + "&theme=dark";
+ else
+ formattedHost = device.link_url + "&theme=light";
+
+ std::string formattedHost1 = "http://fluidd_" + formattedHost;
+ std::string formattedHost2 = "http://fluidd2_" + formattedHost;
+ if (formattedHost1 == m_web || formattedHost2 == m_web)
+ return;
+
+ if (m_isfluidd_1)
+ {
+ formattedHost = "http://fluidd_" + formattedHost;
+ m_isfluidd_1 = false;
+ }
+ else
+ {
+ formattedHost = "http://fluidd2_" + formattedHost;
+ m_isfluidd_1 = true;
+ }
load_net_url(formattedHost, device.local_ip);
});
@@ -700,7 +746,8 @@ wxBoxSizer *PrinterWebView::init_menu_bar(wxPanel *Panel)
m_isSimpleMode = !m_isSimpleMode;
if (!m_isSimpleMode) {
text_static->Show();
- staticBitmap->SetBitmap(create_scaled_bitmap("user_dark", this, 60));
+ //y33
+ staticBitmap->SetBitmap(create_scaled_bitmap_of_login(m_user_head_name, this, 60));
login_button->SetIsSimpleMode(m_isSimpleMode);
wxGetApp().app_config->set("machine_list_minification", "0");
toggleBar->SetSize(327);
@@ -715,7 +762,8 @@ wxBoxSizer *PrinterWebView::init_menu_bar(wxPanel *Panel)
}
} else {
text_static->Hide();
- staticBitmap->SetBitmap(create_scaled_bitmap("user_dark_tiny", this, 40));
+ //y33
+ staticBitmap->SetBitmap(create_scaled_bitmap_of_login(m_user_head_name, this, 40));
login_button->SetIsSimpleMode(m_isSimpleMode);
wxGetApp().app_config->set("machine_list_minification", "1");
@@ -952,6 +1000,11 @@ wxBoxSizer *PrinterWebView::init_menu_bar(wxPanel *Panel)
button->Refresh();
}
}
+ //y33
+ if (!m_isSimpleMode)
+ staticBitmap->SetBitmap(create_scaled_bitmap_of_login(m_user_head_name, this, 60));
+ else
+ staticBitmap->SetBitmap(create_scaled_bitmap_of_login(m_user_head_name, this, 40));
}
void PrinterWebView::OnScrollup(wxScrollWinEvent &event)
{
@@ -1002,7 +1055,8 @@ wxBoxSizer *PrinterWebView::init_menu_bar(wxPanel *Panel)
}
for (DeviceButton *button : m_buttons) {
- if (url == (button->getIPLabel()))
+ //y31
+ if ((button->getIPLabel()).find(m_ip) != std::string::npos)
button->SetIsSelected(true);
else
button->SetIsSelected(false);
@@ -1011,12 +1065,12 @@ wxBoxSizer *PrinterWebView::init_menu_bar(wxPanel *Panel)
}
void PrinterWebView::load_net_url(std::string url, std::string ip)
{
- if (m_browser == nullptr || m_web == url)
+ if (m_browser == nullptr || m_web == url)
return;
-
// y13
m_web = url;
m_ip = ip;
+ //y34
m_browser->LoadURL(m_web);
//y28
webisNetMode = isNetWeb;
diff --git a/src/slic3r/GUI/PrinterWebView.hpp b/src/slic3r/GUI/PrinterWebView.hpp
index dccfb75..6cb9d4f 100644
--- a/src/slic3r/GUI/PrinterWebView.hpp
+++ b/src/slic3r/GUI/PrinterWebView.hpp
@@ -105,9 +105,12 @@ public:
void StopStatusThread()
{
m_stopThread = true;
+ //y36
+ PrintHost::SetStop(true);
if (m_statusThread.joinable()) {
m_statusThread.join();
}
+ PrintHost::SetStop(false);
};
void SetPauseThread(bool status) { m_pauseThread = status; };
void SetPresetChanged(bool status);
@@ -164,6 +167,8 @@ private:
std::string select_machine_name;
WebState webisNetMode = isDisconnect;
std::set m_exit_host;
+ std::string m_user_head_name; //y33
+ bool m_isfluidd_1; //y35
};
// y13
diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp
index fbd82b4..1e56c8b 100644
--- a/src/slic3r/GUI/SelectMachine.cpp
+++ b/src/slic3r/GUI/SelectMachine.cpp
@@ -636,8 +636,8 @@ void SelectMachinePopup::update_other_devices()
m_placeholder_panel = new wxWindow(m_scrolledWindow, wxID_ANY, wxDefaultPosition, wxSize(-1,FromDIP(26)));
wxBoxSizer* placeholder_sizer = new wxBoxSizer(wxVERTICAL);
-
- m_hyperlink = new wxHyperlinkCtrl(m_placeholder_panel, wxID_ANY, _L("Can't find my devices?"), wxT("https://wiki.qidilab.com/en/software/qidi-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+ //y36
+ m_hyperlink = new wxHyperlinkCtrl(m_placeholder_panel, wxID_ANY, _L("Can't find my devices?"), wxT("https://wiki.qidi3d.com/en/software/qidi-studio/fluidd"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
placeholder_sizer->Add(m_hyperlink, 0, wxALIGN_CENTER | wxALL, 5);
@@ -888,7 +888,8 @@ void SelectMachinePopup::OnLeftUp(wxMouseEvent &event)
//hyper link
auto h_rect = m_hyperlink->ClientToScreen(wxPoint(0, 0));
if (mouse_pos.x > h_rect.x && mouse_pos.y > h_rect.y && mouse_pos.x < (h_rect.x + m_hyperlink->GetSize().x) && mouse_pos.y < (h_rect.y + m_hyperlink->GetSize().y)) {
- wxLaunchDefaultBrowser(wxT("https://wiki.qidilab.com/en/software/qidi-studio/failed-to-connect-printer"));
+ //y36
+ wxLaunchDefaultBrowser(wxT("https://wiki.qidi3d.com/en/software/qidi-studio/fluidd"));
}
}
}
@@ -946,8 +947,9 @@ wxString SelectMachineDialog::format_text(wxString &m_msg)
return out_txt;
}
-SelectMachineDialog::SelectMachineDialog(Plater *plater)
- : DPIDialog(static_cast(wxGetApp().mainframe), wxID_ANY, _L("Send print job to"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
+//y30
+SelectMachineDialog::SelectMachineDialog(Plater *plater, wxString title)
+ : DPIDialog(static_cast(wxGetApp().mainframe), wxID_ANY, _L(title), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
, m_plater(plater), m_export_3mf_cancel(false)
, m_mapping_popup(AmsMapingPopup(this))
, m_mapping_tip_popup(AmsMapingTipPopup(this))
@@ -1306,8 +1308,16 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_sizer_prepare->Add(0, 0, 1, wxTOP, FromDIP(12));
- auto hyperlink_sizer = new wxBoxSizer( wxHORIZONTAL );
- m_hyperlink = new wxHyperlinkCtrl(m_panel_prepare, wxID_ANY, _L("Click here if you can't connect to the printer"), wxT("https://wiki.qidilab.com/en/software/qidi-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+ auto hyperlink_sizer = new wxBoxSizer(wxHORIZONTAL);
+ //y36
+ std::string language = wxGetApp().app_config->get("language");
+ wxString region = L"en";
+ if (language.find("zh") == 0)
+ region = L"zh";
+ // wxString hyperlink_1 = wxString::Format(L"https://wiki.qidi3d.com/%s/software/qidi-studio/fluidd", region);
+ // m_hyperlink = new wxHyperlinkCtrl(m_panel_prepare, wxID_ANY, _L("Click here if you can't connect to the printer"), hyperlink_1, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+ wxString hyperlink_2 = wxString::Format(L"https://wiki.qidi3d.com/%s/software/qidi-studio/troubleshooting/connect-send-problem", region);
+ m_hyperlink = new wxHyperlinkCtrl(m_panel_prepare, wxID_ANY, _L("Click here if you failed to send the task"), hyperlink_2, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
hyperlink_sizer->Add(m_hyperlink, 0, wxALIGN_CENTER | wxALL, 5);
m_sizer_prepare->Add(hyperlink_sizer, 0, wxALIGN_CENTER | wxALL, 5);
diff --git a/src/slic3r/GUI/SelectMachine.hpp b/src/slic3r/GUI/SelectMachine.hpp
index 70d71ba..5833adc 100644
--- a/src/slic3r/GUI/SelectMachine.hpp
+++ b/src/slic3r/GUI/SelectMachine.hpp
@@ -471,7 +471,8 @@ protected:
std::string preset_typename;
public:
- SelectMachineDialog(Plater *plater = nullptr);
+ //y30
+ SelectMachineDialog(Plater *plater, wxString title);
~SelectMachineDialog();
void init_bind();
diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp
index 33a0f77..e111a78 100644
--- a/src/slic3r/GUI/Tab.cpp
+++ b/src/slic3r/GUI/Tab.cpp
@@ -1925,21 +1925,23 @@ void TabPrint::build()
auto page = add_options_page(L("Quality"), "empty");
auto optgroup = page->new_optgroup(L("Layer height"), L"param_layer_height");
- optgroup->append_single_option_line("layer_height", "layer-height");
- optgroup->append_single_option_line("initial_layer_print_height", "layer-height");
+ //y32
+ optgroup->append_single_option_line("layer_height", "print-settings/layer-height");
+ optgroup->append_single_option_line("initial_layer_print_height", "print-settings/layer-height");
optgroup = page->new_optgroup(L("Line width"), L"param_line_width");
- optgroup->append_single_option_line("line_width","parameter/line-width");
- optgroup->append_single_option_line("initial_layer_line_width","parameter/line-width");
- optgroup->append_single_option_line("outer_wall_line_width","parameter/line-width");
- optgroup->append_single_option_line("inner_wall_line_width","parameter/line-width");
- optgroup->append_single_option_line("top_surface_line_width","parameter/line-width");
- optgroup->append_single_option_line("sparse_infill_line_width","parameter/line-width");
- optgroup->append_single_option_line("internal_solid_infill_line_width","parameter/line-width");
- optgroup->append_single_option_line("support_line_width","parameter/line-width");
+ optgroup->append_single_option_line("line_width","print-settings/line-width");
+ optgroup->append_single_option_line("initial_layer_line_width","print-settings/line-width");
+ optgroup->append_single_option_line("outer_wall_line_width","print-settings/line-width");
+ optgroup->append_single_option_line("inner_wall_line_width","print-settings/line-width");
+ optgroup->append_single_option_line("top_surface_line_width","print-settings/line-width");
+ optgroup->append_single_option_line("sparse_infill_line_width","print-settings/line-width");
+ optgroup->append_single_option_line("internal_solid_infill_line_width","print-settings/line-width");
+ optgroup->append_single_option_line("support_line_width","print-settings/line-width");
optgroup = page->new_optgroup(L("Seam"), L"param_seam");
- optgroup->append_single_option_line("seam_position", "Seam");
- optgroup->append_single_option_line("seam_gap", "Seam");
+ //y32
+ optgroup->append_single_option_line("seam_position", "print-settings/seam");
+ optgroup->append_single_option_line("seam_gap", "print-settings/seam");
optgroup->append_single_option_line("seam_slope_type");
optgroup->append_single_option_line("seam_slope_conditional");
optgroup->append_single_option_line("scarf_angle_threshold");
@@ -1948,19 +1950,21 @@ void TabPrint::build()
optgroup->append_single_option_line("seam_slope_min_length");
optgroup->append_single_option_line("seam_slope_steps");
optgroup->append_single_option_line("seam_slope_inner_walls");
- optgroup->append_single_option_line("wipe_speed", "Seam");
+ optgroup->append_single_option_line("wipe_speed", "print-settings/seam");
optgroup = page->new_optgroup(L("Precision"), L"param_precision");
optgroup->append_single_option_line("slice_closing_radius");
- optgroup->append_single_option_line("resolution","acr-move");
- optgroup->append_single_option_line("enable_arc_fitting", "acr-move");
- optgroup->append_single_option_line("xy_hole_compensation", "xy-hole-contour-compensation");
- optgroup->append_single_option_line("xy_contour_compensation", "xy-hole-contour-compensation");
- optgroup->append_single_option_line("elefant_foot_compensation", "parameter/elephant-foot");
+ //32
+ optgroup->append_single_option_line("resolution","print-settings/arc-move");
+ optgroup->append_single_option_line("enable_arc_fitting", "print-settings/arc-move");
+ optgroup->append_single_option_line("xy_hole_compensation", "print-settings/xy-hole-contour-compensation");
+ optgroup->append_single_option_line("xy_contour_compensation", "print-settings/xy-hole-contour-compensation");
+ optgroup->append_single_option_line("elefant_foot_compensation", "print-settings/elephant-foot");
optgroup->append_single_option_line("precise_z_height");
optgroup = page->new_optgroup(L("Ironing"), L"param_ironing");
- optgroup->append_single_option_line("ironing_type", "parameter/ironing");
+ //y32
+ optgroup->append_single_option_line("ironing_type", "print-settings/ironing");
optgroup->append_single_option_line("ironing_pattern");
optgroup->append_single_option_line("ironing_speed");
optgroup->append_single_option_line("ironing_flow");
@@ -1968,7 +1972,8 @@ void TabPrint::build()
optgroup->append_single_option_line("ironing_direction");
optgroup = page->new_optgroup(L("Wall generator"), L"param_wall");
- optgroup->append_single_option_line("wall_generator", "wall-generator");
+ //y32
+ optgroup->append_single_option_line("wall_generator", "print-settings/wall-generator");
optgroup->append_single_option_line("wall_transition_angle");
optgroup->append_single_option_line("wall_transition_filter_deviation");
optgroup->append_single_option_line("wall_transition_length");
@@ -1979,47 +1984,56 @@ void TabPrint::build()
optgroup = page->new_optgroup(L("Advanced"), L"param_advanced");
optgroup->append_single_option_line("wall_sequence");
optgroup->append_single_option_line("is_infill_first");
- optgroup->append_single_option_line("bridge_flow","parameter/bridge");
- optgroup->append_single_option_line("thick_bridges","parameter/bridge");
+ //y32
+ optgroup->append_single_option_line("bridge_flow","print-settings/bridge");
+ optgroup->append_single_option_line("thick_bridges","print-settings/bridge");
optgroup->append_single_option_line("top_solid_infill_flow_ratio");
optgroup->append_single_option_line("initial_layer_flow_ratio");
optgroup->append_single_option_line("top_one_wall_type");
optgroup->append_single_option_line("top_area_threshold");
optgroup->append_single_option_line("only_one_wall_first_layer");
optgroup->append_single_option_line("detect_overhang_wall");
+ //1.9.5
+ optgroup->append_single_option_line("smooth_speed_discontinuity_area");
+ optgroup->append_single_option_line("smooth_coefficient");
optgroup->append_single_option_line("reduce_crossing_wall");
optgroup->append_single_option_line("max_travel_detour_distance");
page = add_options_page(L("Strength"), "empty");
optgroup = page->new_optgroup(L("Walls"), L"param_wall");
- optgroup->append_single_option_line("wall_loops","wall-generator");
- optgroup->append_single_option_line("detect_thin_wall","wall-generator");
+ //y32
+ optgroup->append_single_option_line("wall_loops","print-settings/wall-generator");
+ optgroup->append_single_option_line("detect_thin_wall","print-settings/wall-generator");
optgroup = page->new_optgroup(L("Top/bottom shells"), L"param_shell");
optgroup->append_single_option_line("interface_shells");
- optgroup->append_single_option_line("top_surface_pattern", "fill-patterns#Infill of the top surface and bottom surface");
+ //y32
+ optgroup->append_single_option_line("top_surface_pattern", "print-settings/fill-patterns");
optgroup->append_single_option_line("top_shell_layers");
optgroup->append_single_option_line("top_shell_thickness");
- optgroup->append_single_option_line("bottom_surface_pattern", "fill-patterns#Infill of the top surface and bottom surface");
+ //y32
+ optgroup->append_single_option_line("bottom_surface_pattern", "print-settings/fill-patterns");
optgroup->append_single_option_line("bottom_shell_layers");
optgroup->append_single_option_line("bottom_shell_thickness");
optgroup->append_single_option_line("internal_solid_infill_pattern");
optgroup = page->new_optgroup(L("Sparse infill"), L"param_infill");
optgroup->append_single_option_line("sparse_infill_density");
- optgroup->append_single_option_line("sparse_infill_pattern", "fill-patterns#infill types and their properties of sparse");
+ //y32
+ optgroup->append_single_option_line("sparse_infill_pattern", "print-settings/fill-patterns");
optgroup->append_single_option_line("sparse_infill_anchor");
optgroup->append_single_option_line("sparse_infill_anchor_max");
optgroup->append_single_option_line("filter_out_gap_fill");
optgroup = page->new_optgroup(L("Advanced"), L"param_advanced");
- optgroup->append_single_option_line("infill_wall_overlap","parameter/strength-advance-settings");
- optgroup->append_single_option_line("infill_direction","parameter/strength-advance-settings");
- optgroup->append_single_option_line("bridge_angle","parameter/strength-advance-settings");
- optgroup->append_single_option_line("minimum_sparse_infill_area","parameter/strength-advance-settings");
- optgroup->append_single_option_line("infill_combination","parameter/strength-advance-settings");
- optgroup->append_single_option_line("detect_narrow_internal_solid_infill","parameter/strength-advance-settings");
- optgroup->append_single_option_line("ensure_vertical_shell_thickness","parameter/strength-advance-settings");
+ //y32
+ optgroup->append_single_option_line("infill_wall_overlap","print-settings/strength-advance-settings");
+ optgroup->append_single_option_line("infill_direction","print-settings/strength-advance-settings");
+ optgroup->append_single_option_line("bridge_angle","print-settings/strength-advance-settings");
+ optgroup->append_single_option_line("minimum_sparse_infill_area","print-settings/strength-advance-settings");
+ optgroup->append_single_option_line("infill_combination","print-settings/strength-advance-settings");
+ optgroup->append_single_option_line("detect_narrow_internal_solid_infill","print-settings/strength-advance-settings");
+ optgroup->append_single_option_line("ensure_vertical_shell_thickness","print-settings/strength-advance-settings");
//optgroup->append_single_option_line("internal_bridge_support_thickness","parameter/strength-advance-settings");
page = add_options_page(L("Speed"), "empty");
@@ -2034,14 +2048,18 @@ void TabPrint::build()
optgroup->append_single_option_line("sparse_infill_speed");
optgroup->append_single_option_line("internal_solid_infill_speed");
optgroup->append_single_option_line("top_surface_speed");
- optgroup->append_single_option_line("enable_overhang_speed", "slow-down-for-overhang");
+ //y32
+ optgroup->append_single_option_line("enable_overhang_speed", "print-settings/slow-down-for-overhang");
Line line = { L("Overhang speed"), L("This is the speed for various overhang degrees. Overhang degrees are expressed as a percentage of line width. 0 speed means no slowing down for the overhang degree range and wall speed is used") };
- line.label_path = "slow-down-for-overhang";
+ //y32
+ line.label_path = "print-settings/slow-down-for-overhang";
line.append_option(optgroup->get_option("overhang_1_4_speed"));
line.append_option(optgroup->get_option("overhang_2_4_speed"));
line.append_option(optgroup->get_option("overhang_3_4_speed"));
line.append_option(optgroup->get_option("overhang_4_4_speed"));
optgroup->append_line(line);
+ //1.9.5
+ optgroup->append_single_option_line("overhang_totally_speed");
optgroup->append_single_option_line("bridge_speed");
optgroup->append_single_option_line("gap_infill_speed");
optgroup->append_single_option_line("support_speed");
@@ -2082,10 +2100,11 @@ void TabPrint::build()
page = add_options_page(L("Support"), "support");
optgroup = page->new_optgroup(L("Support"), L"param_support");
- optgroup->append_single_option_line("enable_support", "support");
- optgroup->append_single_option_line("support_type", "support#support-types");
- optgroup->append_single_option_line("support_style", "support#support-styles");
- optgroup->append_single_option_line("support_threshold_angle", "support#threshold-angle");
+ //y32
+ optgroup->append_single_option_line("enable_support", "print-settings/support");
+ optgroup->append_single_option_line("support_type", "print-settings/support");
+ optgroup->append_single_option_line("support_style", "print-settings/support");
+ optgroup->append_single_option_line("support_threshold_angle", "print-settings/support");
optgroup->append_single_option_line("support_on_build_plate_only");
optgroup->append_single_option_line("support_critical_regions_only");
optgroup->append_single_option_line("support_remove_small_overhang");
@@ -2095,40 +2114,48 @@ void TabPrint::build()
optgroup->append_single_option_line("raft_layers");
optgroup->append_single_option_line("raft_contact_distance");
optgroup->append_single_option_line("raft_first_layer_density");
- optgroup->append_single_option_line("raft_first_layer_expansion");
optgroup = page->new_optgroup(L("Support filament"), L"param_support_filament");
- optgroup->append_single_option_line("support_filament", "support#support-filament");
- optgroup->append_single_option_line("support_interface_filament", "support#support-filament");
- optgroup->append_single_option_line("support_interface_not_for_body", "support#support-filament");
+ //y32
+ optgroup->append_single_option_line("support_filament", "print-settings/support");
+ optgroup->append_single_option_line("support_interface_filament", "print-settings/support");
+ optgroup->append_single_option_line("support_interface_not_for_body", "print-settings/support");
//optgroup = page->new_optgroup(L("Options for support material and raft"));
//QDS
optgroup = page->new_optgroup(L("Advanced"), L"param_advanced");
- optgroup->append_single_option_line("tree_support_branch_distance", "support#tree-support-only-options");
- optgroup->append_single_option_line("tree_support_branch_diameter", "support#tree-support-only-options");
- optgroup->append_single_option_line("tree_support_branch_angle", "support#tree-support-only-options");
+ //1.9.5
+ optgroup->append_single_option_line("raft_first_layer_expansion"); // not only for raft, but for support too
optgroup->append_single_option_line("tree_support_wall_count");
- optgroup->append_single_option_line("tree_support_brim_width");
- optgroup->append_single_option_line("support_top_z_distance", "support#top-z-distance");
- optgroup->append_single_option_line("support_bottom_z_distance", "support#bottom-z-distance");
- optgroup->append_single_option_line("support_base_pattern", "support#base-pattern");
- optgroup->append_single_option_line("support_base_pattern_spacing", "support#base-pattern");
+ //y32
+ optgroup->append_single_option_line("support_top_z_distance", "print-settings/support");
+ optgroup->append_single_option_line("support_bottom_z_distance", "print-settings/support");
+ optgroup->append_single_option_line("support_base_pattern", "print-settings/support");
+ optgroup->append_single_option_line("support_base_pattern_spacing", "print-settings/support");
optgroup->append_single_option_line("support_angle");
- optgroup->append_single_option_line("support_interface_top_layers", "support#base-pattern");
- optgroup->append_single_option_line("support_interface_bottom_layers", "support#base-pattern");
- optgroup->append_single_option_line("support_interface_pattern", "support#base-pattern");
- optgroup->append_single_option_line("support_interface_spacing", "support#base-pattern");
+ //y32
+ optgroup->append_single_option_line("support_interface_top_layers", "print-settings/support");
+ optgroup->append_single_option_line("support_interface_bottom_layers", "print-settings/support");
+ optgroup->append_single_option_line("support_interface_pattern", "print-settings/support");
+ optgroup->append_single_option_line("support_interface_spacing", "print-settings/support");
optgroup->append_single_option_line("support_bottom_interface_spacing");
- optgroup->append_single_option_line("support_expansion", "support#base-pattern");
+ //y32
+ optgroup->append_single_option_line("support_expansion", "print-settings/support");
//optgroup->append_single_option_line("support_interface_loop_pattern");
+ //y32
+ optgroup->append_single_option_line("support_object_xy_distance", "print-settings/support");
+ optgroup->append_single_option_line("support_object_first_layer_gap", "print-settings/support");
+ optgroup->append_single_option_line("bridge_no_support", "print-settings/support");
+ optgroup->append_single_option_line("max_bridge_length", "print-settings/support");
+ optgroup->append_single_option_line("independent_support_layer_height", "print-settings/support");
- optgroup->append_single_option_line("support_object_xy_distance", "support");
- optgroup->append_single_option_line("support_object_first_layer_gap", "support");
- optgroup->append_single_option_line("bridge_no_support", "support#base-pattern");
- optgroup->append_single_option_line("max_bridge_length", "support#base-pattern");
- optgroup->append_single_option_line("independent_support_layer_height", "support");
+ //1.9.5
+ optgroup = page->new_optgroup(L("Tree Support"), L"param_advanced");
+ //y32
+ optgroup->append_single_option_line("tree_support_branch_distance", "print-settings/support");
+ optgroup->append_single_option_line("tree_support_branch_diameter", "print-settings/support");
+ optgroup->append_single_option_line("tree_support_branch_angle", "print-settings/support");
page = add_options_page(L("Others"), "advanced");
optgroup = page->new_optgroup(L("Bed adhension"), L"param_adhension");
@@ -2136,30 +2163,37 @@ void TabPrint::build()
optgroup->append_single_option_line("skirt_height");
optgroup->append_single_option_line("skirt_distance");
//optgroup->append_single_option_line("draft_shield");
- optgroup->append_single_option_line("brim_type", "auto-brim");
- optgroup->append_single_option_line("brim_width", "auto-brim#manual");
- optgroup->append_single_option_line("brim_object_gap", "auto-brim#brim-object-gap");
+ //y32
+ optgroup->append_single_option_line("brim_type", "print-settings/brim");
+ optgroup->append_single_option_line("brim_width", "print-settings/brim");
+ optgroup->append_single_option_line("brim_object_gap", "print-settings/brim");
optgroup = page->new_optgroup(L("Prime tower"), L"param_tower");
- optgroup->append_single_option_line("enable_prime_tower","parameter/prime-tower");
- optgroup->append_single_option_line("prime_tower_width","parameter/prime-tower");
- optgroup->append_single_option_line("prime_volume","parameter/prime-tower");
- optgroup->append_single_option_line("prime_tower_brim_width","parameter/prime-tower");
+ //y32
+ optgroup->append_single_option_line("enable_prime_tower","print-settings/prime-tower");
+ optgroup->append_single_option_line("prime_tower_width","print-settings/prime-tower");
+ optgroup->append_single_option_line("prime_volume","print-settings/prime-tower");
+ optgroup->append_single_option_line("prime_tower_brim_width","print-settings/prime-tower");
optgroup = page->new_optgroup(L("Flush options"), L"param_flush");
- optgroup->append_single_option_line("flush_into_infill", "reduce-wasting-during-filament-change#wipe-into-infill");
- optgroup->append_single_option_line("flush_into_objects", "reduce-wasting-during-filament-change#wipe-into-object");
- optgroup->append_single_option_line("flush_into_support", "reduce-wasting-during-filament-change#wipe-into-support-enabled-by-default");
+ //y32
+ // optgroup->append_single_option_line("flush_into_infill", "reduce-wasting-during-filament-change#wipe-into-infill");
+ // optgroup->append_single_option_line("flush_into_objects", "reduce-wasting-during-filament-change#wipe-into-object");
+ // optgroup->append_single_option_line("flush_into_support", "reduce-wasting-during-filament-change#wipe-into-support-enabled-by-default");
+ optgroup->append_single_option_line("flush_into_infill");
+ optgroup->append_single_option_line("flush_into_objects");
+ optgroup->append_single_option_line("flush_into_support");
optgroup = page->new_optgroup(L("Special mode"), L"param_special");
optgroup->append_single_option_line("slicing_mode");
- optgroup->append_single_option_line("print_sequence", "sequent-print");
- optgroup->append_single_option_line("spiral_mode", "spiral-vase");
- optgroup->append_single_option_line("spiral_mode_smooth", "spiral-vase#smooth");
- optgroup->append_single_option_line("spiral_mode_max_xy_smoothing", "spiral-vase#max-xy-smoothing");
- optgroup->append_single_option_line("timelapse_type", "Timelapse");
+ //y32
+ optgroup->append_single_option_line("print_sequence", "print-settings/print-by-object");
+ optgroup->append_single_option_line("spiral_mode", "print-settings/spiral-print");
+ optgroup->append_single_option_line("spiral_mode_smooth", "print-settings/spiral-print");
+ optgroup->append_single_option_line("spiral_mode_max_xy_smoothing", "print-settings/spiral-print");
+ optgroup->append_single_option_line("timelapse_type", "print-settings/timelapse");
- optgroup->append_single_option_line("fuzzy_skin", "parameter/fuzzy-skin");
+ optgroup->append_single_option_line("fuzzy_skin", "print-settings/fuzzy-skin");
optgroup->append_single_option_line("fuzzy_skin_point_distance");
optgroup->append_single_option_line("fuzzy_skin_thickness");
@@ -2606,8 +2640,9 @@ void TabPrintPlate::build()
auto page = add_options_page(L("Plate Settings"), "empty");
auto optgroup = page->new_optgroup("");
optgroup->append_single_option_line("curr_bed_type");
- optgroup->append_single_option_line("print_sequence", "sequent-print");
- optgroup->append_single_option_line("spiral_mode", "spiral-vase");
+ //y32
+ optgroup->append_single_option_line("print_sequence", "print-settings/print-by-object");
+ optgroup->append_single_option_line("spiral_mode", "print-settings/spiral-print");
optgroup->append_single_option_line("first_layer_sequence_choice", "parameter/filament-sequence-for-different-layers");
optgroup->append_single_option_line("other_layers_sequence_choice", "parameter/filament-sequence-for-different-layers");
@@ -3036,7 +3071,8 @@ void TabFilament::build()
optgroup = page->new_optgroup(L("Print temperature"), L"param_temperature");
- optgroup->append_single_option_line("chamber_temperatures","chamber-temperature");
+ //y32
+ optgroup->append_single_option_line("chamber_temperatures");
line = { L("Nozzle"), L("Nozzle temperature when printing") };
line.append_option(optgroup->get_option("nozzle_temperature_initial_layer"));
@@ -3113,29 +3149,31 @@ void TabFilament::build()
//};
//optgroup->append_line(line);
optgroup = page->new_optgroup(L("Cooling for specific layer"), L"param_cooling");
- optgroup->append_single_option_line("close_fan_the_first_x_layers", "auto-cooling");
+ //y32
+ optgroup->append_single_option_line("close_fan_the_first_x_layers", "print-settings/auto-cooling");
//optgroup->append_single_option_line("full_fan_speed_layer");
optgroup = page->new_optgroup(L("Part cooling fan"), L"param_cooling_fan");
line = { L("Min fan speed threshold"), L("Part cooling fan speed will start to run at min speed when the estimated layer time is no longer than the layer time in setting. When layer time is shorter than threshold, fan speed is interpolated between the minimum and maximum fan speed according to layer printing time") };
- line.label_path = "auto-cooling";
+ //y32
+ line.label_path = "print-settings/auto-cooling";
line.append_option(optgroup->get_option("fan_min_speed"));
line.append_option(optgroup->get_option("fan_cooling_layer_time"));
optgroup->append_line(line);
line = { L("Max fan speed threshold"), L("Part cooling fan speed will be max when the estimated layer time is shorter than the setting value") };
- line.label_path = "auto-cooling";
+ line.label_path = "print-settings/auto-cooling";
line.append_option(optgroup->get_option("fan_max_speed"));
line.append_option(optgroup->get_option("slow_down_layer_time"));
optgroup->append_line(line);
- optgroup->append_single_option_line("reduce_fan_stop_start_freq", "auto-cooling");
- optgroup->append_single_option_line("slow_down_for_layer_cooling", "auto-cooling");
+ optgroup->append_single_option_line("reduce_fan_stop_start_freq", "print-settings/auto-cooling");
+ optgroup->append_single_option_line("slow_down_for_layer_cooling", "print-settings/auto-cooling");
//w14
optgroup->append_single_option_line("dont_slow_down_outer_wall");
- optgroup->append_single_option_line("slow_down_min_speed","auto-cooling");
+ optgroup->append_single_option_line("slow_down_min_speed","print-settings/auto-cooling");
- optgroup->append_single_option_line("enable_overhang_bridge_fan", "auto-cooling");
- optgroup->append_single_option_line("overhang_fan_threshold", "auto-cooling");
- optgroup->append_single_option_line("overhang_fan_speed", "auto-cooling");
+ optgroup->append_single_option_line("enable_overhang_bridge_fan", "print-settings/auto-cooling");
+ optgroup->append_single_option_line("overhang_fan_threshold", "print-settings/auto-cooling");
+ optgroup->append_single_option_line("overhang_fan_speed", "print-settings/auto-cooling");
optgroup = page->new_optgroup(L("Auxiliary part cooling fan"), L"param_cooling_fan");
optgroup->append_single_option_line("additional_cooling_fan_speed");
@@ -3280,7 +3318,7 @@ void TabFilament::toggle_options()
toggle_line(elem, m_config->opt_bool("activate_air_filtration",0)&&support_air_filtration);
//w13
- bool support_seal = wxGetApp().app_config->get_seal();
+ bool support_seal = wxGetApp().enable_seal();
bool has_auxiliary_fan = m_preset_bundle->printers.get_edited_preset().config.opt_bool("auxiliary_fan");
toggle_option("additional_cooling_fan_speed", has_auxiliary_fan& support_seal);
toggle_option("additional_cooling_fan_speed_unseal", !support_seal & has_auxiliary_fan);
@@ -3519,7 +3557,7 @@ void TabPrinter::build_fff()
//w12
option = optgroup->get_option("thumbnail_size");
option.opt.full_width = true;
- optgroup->append_single_option_line(option, "thumbnail_size");
+ optgroup->append_single_option_line(option, "");
optgroup->m_on_change = [this](t_config_option_key opt_key, boost::any value) {
wxTheApp->CallAfter([this, opt_key, value]() {
if (opt_key == "thumbnail_size" && m_config->has("thumbnails_formats")) {
@@ -3976,27 +4014,29 @@ void TabPrinter::build_unregular_pages(bool from_initial_build/* = false*/)
};
optgroup = page->new_optgroup(L("Layer height limits"), L"param_layer_height", -1, true);
- optgroup->append_single_option_line("min_layer_height", "adaptive-layer-height", extruder_idx);
- optgroup->append_single_option_line("max_layer_height", "adaptive-layer-height", extruder_idx);
+ //y32
+ optgroup->append_single_option_line("min_layer_height", "toolbar/variable-layer-height", extruder_idx);
+ optgroup->append_single_option_line("max_layer_height", "toolbar/variable-layer-height", extruder_idx);
optgroup = page->new_optgroup(L("Position"), L"param_retraction", -1, true);
optgroup->append_single_option_line("extruder_offset", "", extruder_idx);
//QDS: don't show retract related config menu in machine page
optgroup = page->new_optgroup(L("Retraction"), L"param_retraction");
- optgroup->append_single_option_line("retraction_length", "parameter/retraction#length", extruder_idx);
- optgroup->append_single_option_line("z_hop", "parameter/retraction#z-hop-when-retracting", extruder_idx);
- optgroup->append_single_option_line("retract_lift_above", "parameter/retraction#z-hop-upper-and-lower-boundary", extruder_idx);
- optgroup->append_single_option_line("retract_lift_below", "parameter/retraction#z-hop-upper-and-lower-boundary", extruder_idx);
- optgroup->append_single_option_line("z_hop_types", "parameter/retraction#z-hop-type", extruder_idx);
- optgroup->append_single_option_line("retraction_speed", "parameter/retraction#retraction-speed", extruder_idx);
- optgroup->append_single_option_line("deretraction_speed", "parameter/retraction#deretraction-speed", extruder_idx);
+ //y32
+ optgroup->append_single_option_line("retraction_length", "print-settings/retract-setting", extruder_idx);
+ optgroup->append_single_option_line("z_hop", "print-settings/retract-setting", extruder_idx);
+ optgroup->append_single_option_line("retract_lift_above", "print-settings/retract-setting", extruder_idx);
+ optgroup->append_single_option_line("retract_lift_below", "print-settings/retract-setting", extruder_idx);
+ optgroup->append_single_option_line("z_hop_types", "print-settings/retract-setting", extruder_idx);
+ optgroup->append_single_option_line("retraction_speed", "print-settings/retract-setting", extruder_idx);
+ optgroup->append_single_option_line("deretraction_speed", "print-settings/retract-setting", extruder_idx);
//optgroup->append_single_option_line("retract_restart_extra", "", extruder_idx);
- optgroup->append_single_option_line("retraction_minimum_travel", "parameter/retraction#travel-distance-threshold", extruder_idx);
- optgroup->append_single_option_line("retract_when_changing_layer", "parameter/retraction#retract-on-layer-change", extruder_idx);
- optgroup->append_single_option_line("wipe", "parameter/retraction#wipe-while-retracting", extruder_idx);
- optgroup->append_single_option_line("wipe_distance", "parameter/retraction#wipe-distance", extruder_idx);
- optgroup->append_single_option_line("retract_before_wipe", "parameter/retraction#retract-amount-before-wipe", extruder_idx);
+ optgroup->append_single_option_line("retraction_minimum_travel", "print-settings/retract-setting", extruder_idx);
+ optgroup->append_single_option_line("retract_when_changing_layer", "print-settings/retract-setting", extruder_idx);
+ optgroup->append_single_option_line("wipe", "print-settings/retract-setting", extruder_idx);
+ optgroup->append_single_option_line("wipe_distance", "print-settings/retract-setting", extruder_idx);
+ optgroup->append_single_option_line("retract_before_wipe", "print-settings/retract-setting", extruder_idx);
optgroup = page->new_optgroup(L("Retraction when switching material"), L"param_retraction", -1, true);
optgroup->append_single_option_line("retract_length_toolchange", "", extruder_idx);
diff --git a/src/slic3r/GUI/WebGuideDialog.cpp b/src/slic3r/GUI/WebGuideDialog.cpp
index e41927b..d972454 100644
--- a/src/slic3r/GUI/WebGuideDialog.cpp
+++ b/src/slic3r/GUI/WebGuideDialog.cpp
@@ -1021,8 +1021,9 @@ int GuideFrame::GetFilamentInfo( std::string VendorDirectory, json & pFilaList,
std::string FPath = pFilaList[FName]["sub_path"];
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " Before Format Inherits Path: VendorDirectory - " << VendorDirectory << ", sub_path - " << FPath;
- wxString strNewFile = wxString::Format("%s%c%s", wxString(VendorDirectory.c_str(), wxConvUTF8), boost::filesystem::path::preferred_separator, FPath);
- boost::filesystem::path inherits_path(w2s(strNewFile));
+ //1.9.5
+ std::string strNewFile = VendorDirectory + "/" + FPath;
+ boost::filesystem::path inherits_path(strNewFile);
//boost::filesystem::path nf(strNewFile.c_str());
if (boost::filesystem::exists(inherits_path))
diff --git a/src/slic3r/GUI/WebViewDialog.cpp b/src/slic3r/GUI/WebViewDialog.cpp
index cac2506..3e14505 100644
--- a/src/slic3r/GUI/WebViewDialog.cpp
+++ b/src/slic3r/GUI/WebViewDialog.cpp
@@ -814,7 +814,30 @@ void WebViewPanel::SetMakerworldPageLoginStatus(bool login ,wxString ticket)
mw_currenturl.Replace("modelid=", "");
}
- //mw_currenturl.Replace("modelid=", "");
+ //1.9.5
+ //If AgreeTerms, Redirect Other Url
+ std::regex pattern("^https://.*/(.*/){0,1}agree-terms.*");
+ if (std::regex_match(mw_currenturl.ToStdString(), pattern)) {
+ std::regex ParamPattern("agreeBackUrl=([^&]+)");
+ std::smatch match;
+ std::string CurUrl = mw_currenturl.ToStdString();
+ if (std::regex_search(CurUrl, match, ParamPattern))
+ {
+ //std::cout << "Param Value: " << match[1] << std::endl;
+ mw_currenturl = wxGetApp().url_decode(std::string(match[1]));
+ } else {
+ //std::cout << "Not Find agreeBackUrl" << std::endl;
+ auto host = wxGetApp().get_model_http_url(wxGetApp().app_config->get_country_code());
+
+ wxString language_code = wxGetApp().current_language_code().BeforeFirst('_');
+ language_code = language_code.ToStdString();
+
+ mw_currenturl = (boost::format("%1%%2%/studio/webview?from=qidistudio") % host % language_code.mb_str()).str();
+ }
+ } else {
+ //std::cout << "The string does not match the pattern." << std::endl;
+ }
+
wxString mw_jumpurl = "";
bool b = GetJumpUrl(login, ticket, mw_currenturl, mw_jumpurl);
@@ -1375,6 +1398,8 @@ void WebViewPanel::SwitchWebContent(std::string modelname, int refresh)
CallAfter([this]{
SetWebviewShow("online", false);
SetWebviewShow("right", true);
+
+ GetSizer()->Layout();
});
}
}
diff --git a/src/slic3r/GUI/Widgets/ComboBox.cpp b/src/slic3r/GUI/Widgets/ComboBox.cpp
index bb5055d..5c86ae5 100644
--- a/src/slic3r/GUI/Widgets/ComboBox.cpp
+++ b/src/slic3r/GUI/Widgets/ComboBox.cpp
@@ -52,10 +52,10 @@ ComboBox::ComboBox(wxWindow *parent,
GetTextCtrl()->Hide();
TextInput::SetFont(Label::Body_14);
TextInput::SetBorderColor(StateColor(std::make_pair(0xDBDBDB, (int) StateColor::Disabled),
- std::make_pair(0x4479FB, (int) StateColor::Hovered), // y96
+ std::make_pair(0x4479FB, (int) StateColor::Hovered), // y35
std::make_pair(0xDBDBDB, (int) StateColor::Normal)));
TextInput::SetBackgroundColor(StateColor(std::make_pair(0xF0F0F1, (int) StateColor::Disabled),
- std::make_pair(0x4479FB , (int) StateColor::Focused), // y96
+ std::make_pair(0xe0ffff , (int) StateColor::Focused), // y35
std::make_pair(*wxWHITE, (int) StateColor::Normal)));
TextInput::SetLabelColor(StateColor(std::make_pair(0x909090, (int) StateColor::Disabled),
std::make_pair(0x262E30, (int) StateColor::Normal)));
diff --git a/src/slic3r/GUI/Widgets/DropDown.cpp b/src/slic3r/GUI/Widgets/DropDown.cpp
index 0528c4a..a32a9f0 100644
--- a/src/slic3r/GUI/Widgets/DropDown.cpp
+++ b/src/slic3r/GUI/Widgets/DropDown.cpp
@@ -39,9 +39,9 @@ DropDown::DropDown(std::vector &texts,
, state_handler(this)
, border_color(0xDBDBDB)
, text_color(0x363636)
- , selector_border_color(std::make_pair(0x4479FB, (int) StateColor::Hovered), // y96
+ , selector_border_color(std::make_pair(0x4479FB, (int) StateColor::Hovered), // y35
std::make_pair(*wxWHITE, (int) StateColor::Normal))
- , selector_background_color(std::make_pair(0x4479FB , (int) StateColor::Checked), // y96
+ , selector_background_color(std::make_pair(0xe0ffff , (int) StateColor::Checked), // y35
std::make_pair(*wxWHITE, (int) StateColor::Normal))
{
}
diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp
index 9bae333..cdd831e 100644
--- a/src/slic3r/GUI/wxExtensions.cpp
+++ b/src/slic3r/GUI/wxExtensions.cpp
@@ -465,6 +465,55 @@ wxBitmap create_scaled_bitmap( const std::string& bmp_name_in,
return *bmp;
}
+//y33
+wxBitmap create_scaled_bitmap_of_login(const std::string& bmp_name_in,
+ wxWindow* win/* = nullptr*/,
+ const int px_cnt/* = 16*/,
+ const bool grayscale/* = false*/,
+ const std::string& new_color/* = std::string()*/, // color witch will used instead of orange
+ const bool menu_bitmap/* = false*/,
+ const bool resize/* = false*/,
+ const bool bitmap2/* = false*/,
+ const vector& array_new_color/* = vector*/)//used for semi transparent material)
+{
+ static Slic3r::GUI::BitmapCache cache;
+ if (bitmap2) {
+ return create_scaled_bitmap2(bmp_name_in, cache, win, px_cnt, grayscale, resize, array_new_color);
+ }
+ unsigned int width = 0;
+ unsigned int height = (unsigned int)(win->FromDIP(px_cnt) + 0.5f);
+
+ std::string bmp_name = bmp_name_in;
+
+ bool dark_mode =
+#ifdef _WIN32
+ menu_bitmap ? Slic3r::GUI::check_dark_mode() :
+#endif
+ Slic3r::GUI::wxGetApp().dark_mode();
+
+ // Try loading an SVG first, then PNG if SVG is not found:
+ wxBitmap* bmp;
+ if(!bmp_name.empty())
+ bmp = cache.load_login_png(bmp_name, width, height, grayscale, resize ? win->FromDIP(10) * 0.1f : 0.f);
+ else
+ {
+ if(px_cnt > 50)
+ bmp = cache.load_png("user_dark", width, height, grayscale, resize ? win->FromDIP(10) * 0.1f : 0.f);
+ else
+ {
+ height = (unsigned int)(win->FromDIP(40) + 0.5f);
+ bmp = cache.load_png("user_dark_tiny", width, height, grayscale, resize ? win->FromDIP(10) * 0.1f : 0.f);
+ }
+ }
+
+ if (bmp == nullptr) {
+ // Neither SVG nor PNG has been found, raise error
+ throw Slic3r::RuntimeError("Could not load bitmap: " + bmp_name);
+ }
+
+ return *bmp;
+}
+
wxBitmap create_scaled_bitmap2(const std::string& bmp_name_in, Slic3r::GUI::BitmapCache& cache, wxWindow* win/* = nullptr*/ ,
const int px_cnt/* = 16*/, const bool grayscale/* = false*/ , const bool resize/* = false*/ ,
const vector& array_new_color/* = vector()*/) // color witch will used instead of orange
diff --git a/src/slic3r/GUI/wxExtensions.hpp b/src/slic3r/GUI/wxExtensions.hpp
index 667a726..3bd994c 100644
--- a/src/slic3r/GUI/wxExtensions.hpp
+++ b/src/slic3r/GUI/wxExtensions.hpp
@@ -63,6 +63,14 @@ wxBitmap create_scaled_bitmap(const std::string& bmp_name, wxWindow *win = nullp
const bool menu_bitmap = false, const bool resize = false,
const bool bitmap2 = false,// for create_scaled_bitmap2
const std::vector& array_new_color = std::vector());
+//y33
+wxBitmap create_scaled_bitmap_of_login(const std::string& bmp_name, wxWindow* win = nullptr,
+ const int px_cnt = 16, const bool grayscale = false,
+ const std::string& new_color = std::string(), // color witch will used instead of orange
+ const bool menu_bitmap = false, const bool resize = false,
+ const bool bitmap2 = false,// for create_scaled_bitmap2
+ const std::vector& array_new_color = std::vector());
+
//used for semi transparent material
wxBitmap create_scaled_bitmap2(const std::string& bmp_name_in, Slic3r::GUI::BitmapCache& cache, wxWindow* win = nullptr,
const int px_cnt = 16, const bool grayscale = false, const bool resize = false,
diff --git a/src/slic3r/Utils/Http.cpp b/src/slic3r/Utils/Http.cpp
index 737e862..8f877a0 100644
--- a/src/slic3r/Utils/Http.cpp
+++ b/src/slic3r/Utils/Http.cpp
@@ -15,6 +15,8 @@
#include
+#include "../GUI/PrinterWebView.hpp"
+
#ifdef OPENSSL_CERT_OVERRIDE
#include
#endif
@@ -232,6 +234,9 @@ int Http::priv::xfercb(void *userp, curl_off_t dltotal, curl_off_t dlnow, curl_o
{
auto self = static_cast(userp);
bool cb_cancel = false;
+ //y36
+ if (PrintHost::GetStop())
+ cb_cancel = true;
if (self->progressfn) {
double speed;
diff --git a/src/slic3r/Utils/NetworkAgent.cpp b/src/slic3r/Utils/NetworkAgent.cpp
index 2248890..df0bb0b 100644
--- a/src/slic3r/Utils/NetworkAgent.cpp
+++ b/src/slic3r/Utils/NetworkAgent.cpp
@@ -145,6 +145,31 @@ NetworkAgent::~NetworkAgent()
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", this %1%, network_agent=%2%, destroy_agent_ptr=%3%, ret %4%")%this %network_agent %destroy_agent_ptr %ret;
}
+//1.9.5
+std::string NetworkAgent::get_libpath_in_current_directory(std::string library_name)
+{
+ std::string lib_path;
+#if defined(_MSC_VER) || defined(_WIN32)
+ wchar_t file_name[512];
+ DWORD ret = GetModuleFileNameW(NULL, file_name, 512);
+ if (!ret) {
+ BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", GetModuleFileNameW return error, can not Load Library for %1%") % library_name;
+ return lib_path;
+ }
+ int size_needed = ::WideCharToMultiByte(0, 0, file_name, wcslen(file_name), nullptr, 0, nullptr, nullptr);
+ std::string file_name_string(size_needed, 0);
+ ::WideCharToMultiByte(0, 0, file_name, wcslen(file_name), file_name_string.data(), size_needed, nullptr, nullptr);
+
+ std::size_t found = file_name_string.find("qidi-studio.exe");
+ if (found == (file_name_string.size() - 16)) {
+ lib_path = library_name + ".dll";
+ lib_path = file_name_string.replace(found, 16, lib_path);
+ }
+#else
+#endif
+ return lib_path;
+}
+
int NetworkAgent::initialize_network_module(bool using_backup)
{
//int ret = -1;
@@ -159,7 +184,7 @@ int NetworkAgent::initialize_network_module(bool using_backup)
//first load the library
#if defined(_MSC_VER) || defined(_WIN32)
- library = plugin_folder.string() + "/" + std::string(QIDI_NETWORK_LIBRARY) + ".dll";
+ library = plugin_folder.string() + "\\" + std::string(QIDI_NETWORK_LIBRARY) + ".dll"; //1.9.5
wchar_t lib_wstr[128];
memset(lib_wstr, 0, sizeof(lib_wstr));
::MultiByteToWideChar(CP_UTF8, NULL, library.c_str(), strlen(library.c_str())+1, lib_wstr, sizeof(lib_wstr) / sizeof(lib_wstr[0]));
@@ -170,6 +195,20 @@ int NetworkAgent::initialize_network_module(bool using_backup)
::MultiByteToWideChar(CP_UTF8, NULL, library.c_str(), strlen(library.c_str()) + 1, lib_wstr, sizeof(lib_wstr) / sizeof(lib_wstr[0]));
netwoking_module = LoadLibrary(lib_wstr);
}*/
+ //1.9.5
+ if (!netwoking_module) {
+ BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", try load library directly from current directory");
+
+ std::string library_path = get_libpath_in_current_directory(std::string(QIDI_NETWORK_LIBRARY));
+ if (library_path.empty()) {
+ BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", can not get path in current directory for %1%") % QIDI_NETWORK_LIBRARY;
+ return -1;
+ }
+ BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", current path %1%")%library_path;
+ memset(lib_wstr, 0, sizeof(lib_wstr));
+ ::MultiByteToWideChar(CP_UTF8, NULL, library_path.c_str(), strlen(library_path.c_str())+1, lib_wstr, sizeof(lib_wstr) / sizeof(lib_wstr[0]));
+ netwoking_module = LoadLibrary(lib_wstr);
+ }
#else
#if defined(__WXMAC__)
library = plugin_folder.string() + "/" + std::string("lib") + std::string(QIDI_NETWORK_LIBRARY) + ".dylib";
@@ -298,7 +337,7 @@ int NetworkAgent::initialize_network_module(bool using_backup)
get_model_mall_rating_result_ptr = reinterpret_cast(get_network_function("qidi_network_get_model_mall_rating"));
get_mw_user_preference_ptr = reinterpret_cast(get_network_function("qidi_network_get_mw_user_preference"));
- get_mw_user_4ulist_ptr = reinterpret_cast(get_network_function("qidi_network_get_mw_user_4ulist"));
+ get_mw_user_4ulist_ptr = reinterpret_cast(get_network_function("qidi_network_get_mw_user_4ulist")); //1.9.5
return 0;
}
@@ -446,12 +485,19 @@ void* NetworkAgent::get_qidi_source_entry()
memset(lib_wstr, 0, sizeof(lib_wstr));
::MultiByteToWideChar(CP_UTF8, NULL, library.c_str(), strlen(library.c_str())+1, lib_wstr, sizeof(lib_wstr) / sizeof(lib_wstr[0]));
source_module = LoadLibrary(lib_wstr);
- /*if (!source_module) {
- library = std::string(QIDI_SOURCE_LIBRARY) + ".dll";
+ //1.9.5
+ if (!source_module) {
+ BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", try load QIDISource directly from current directory");
+ std::string library_path = get_libpath_in_current_directory(std::string(QIDI_SOURCE_LIBRARY));
+ if (library_path.empty()) {
+ BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", can not get path in current directory for %1%") % QIDI_SOURCE_LIBRARY;
+ return source_module;
+ }
+ BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", current path %1%")%library_path;
memset(lib_wstr, 0, sizeof(lib_wstr));
- ::MultiByteToWideChar(CP_UTF8, NULL, library.c_str(), strlen(library.c_str()) + 1, lib_wstr, sizeof(lib_wstr) / sizeof(lib_wstr[0]));
+ ::MultiByteToWideChar(CP_UTF8, NULL, library_path.c_str(), strlen(library_path.c_str()) + 1, lib_wstr, sizeof(lib_wstr) / sizeof(lib_wstr[0])); //1.9.5
source_module = LoadLibrary(lib_wstr);
- }*/
+ }
#else
#if defined(__WXMAC__)
library = plugin_folder.string() + "/" + std::string("lib") + std::string(QIDI_SOURCE_LIBRARY) + ".dylib";
diff --git a/src/slic3r/Utils/NetworkAgent.hpp b/src/slic3r/Utils/NetworkAgent.hpp
index 685ec0f..79a178c 100644
--- a/src/slic3r/Utils/NetworkAgent.hpp
+++ b/src/slic3r/Utils/NetworkAgent.hpp
@@ -115,6 +115,7 @@ class NetworkAgent
{
public:
+ static std::string get_libpath_in_current_directory(std::string library_name); //1.9.5
static int initialize_network_module(bool using_backup = false);
static int unload_network_module();
#if defined(_MSC_VER) || defined(_WIN32)
diff --git a/src/slic3r/Utils/PresetUpdater.cpp b/src/slic3r/Utils/PresetUpdater.cpp
index fb9014b..1b6517d 100644
--- a/src/slic3r/Utils/PresetUpdater.cpp
+++ b/src/slic3r/Utils/PresetUpdater.cpp
@@ -1202,7 +1202,7 @@ void PresetUpdater::priv::check_installed_vendor_profiles() const
bool version_match = ((resource_ver.maj() == vendor_ver.maj()) && (resource_ver.min() == vendor_ver.min()));
if (!version_match || (vendor_ver < resource_ver)) {
- BOOST_LOG_TRIVIAL(info) << "[QDT Updater]:found vendor "<