* Update eigen from v3.3.7 to v5.0.1.
This updates eigen from v3.3.7 released on December 11, 2018-12-11 to v5.0.1
released on 2025-11-11. There have be a large number of bug-fixes,
optimizations, and improvements between these releases. See the details at;
https://gitlab.com/libeigen/eigen/-/releases
It retains the previous custom minimal `CMakeLists.txt`, and adds a
README-OrcaSlicer.md that explains what version and parts of the upstream
eigen release have been included, and where the full release can be found.
* Update libigl from v2.0.0 (or older) to v2.6.0.
This updates libigl from what was probably v2.0.0 released on 2018-10-16 to
v2.6.0 released on 2025-05-15. It's possible the old version was even older
than that but there is no version indicators in the code and I ran out of
patience identifying missing changes and only went back as far as v2.0.0.
There have been a large number of bug-fixes, optimizations, and improvements
between these versions. See the following for details;
https://github.com/libigl/libigl/releases
I retained the minimal custom `CMakeLists.txt`, added `README.md` from the
libigl distribution which identifies the version, and added a
README-OrcaSlicer.md that details the version and parts that have been
included.
* Update libslic3r for libigl v2.6.0 changes.
This updates libslic3r for all changes moving to eigen v5.0.1 and libigl
v2.6.0. Despite the large number of updates to both dependencies, no changes
were required for the eigen update, and only one change was required for the
libigl update.
For libigl, `igl::Hit` was changed to a template taking the Scalar type to
use. Previously it was hard-coded to `float`, so to minimize possible impact
I've updated all places it is used from `igl::Hit` to `igl::Hit<float>`.
* Add compiler option `-DNOMINMAX` for libigl with MSVC.
MSVC by default defines `min(()` and `max()` macros that break
`std::numeric_limits<>::max()`. The upstream cmake that we don't include
adds `-DNOMINMAX` for the libigl module when compiling with MSVC, so we need
to add the same thing here.
* Fix src/libslic3r/TriangleMeshDeal.cpp for the unmodified upstream libigl.
This fixes `TriangleMeshDeal.cpp` to work with the unmodified upstream
libigl v2.6.0. loop.{h,cpp} implementation.
This file and feature was added in PR "BBS Port: Mesh Subdivision" (#12150)
which included changes to `loop.{h,cpp}` in the old version of libigl. This PR
avoids modifying the included dependencies, and uses the updated upstream
versions of those files without any modifications, which requires fixing
TriangleMeshDeal.cpp to work with them.
In particular, the modifications made to `loop.{h,cpp}` included changing the
return type from void to bool, adding additional validation checking of the
input meshes, and returning false if they failed validation. These added
checks looked unnecessary and would only have caught problems if the input
mesh was very corrupt.
To make `TriangleMeshDeal.cpp` work without this built-in checking
functionality, I removed checking/handling of any `false` return value.
There was also a hell of a lot of redundant copying and casting back and forth
between float and double, so I cleaned that up. The input and output meshs use
floats for the vertexes, and there would be no accuracy benefits from casting
to and from doubles for the simple weighted average operations done by
igl::loop(). So this just uses `Eigen:Map` to use the original input mesh
vertex data directly without requiring any copy or casting.
* Move eigen from included `deps_src` to externaly fetched `deps`.
This copys what PrusaSlicer did and moved it from an included dependency under
`deps_src` to an externaly fetched dependency under `deps`. This requires
updating some `CMakeList.txt` configs and removing the old and obsolete
`cmake/modules/FindEigen3.cmake`. The details of when this was done in
PrusaSlicer and the followup fixes are at;
* 21116995d7
* https://github.com/prusa3d/PrusaSlicer/issues/13608
* https://github.com/prusa3d/PrusaSlicer/pull/13609
* e3c277b9ee
For some reason I don't fully understand this also required fixing
`src/slic3r/GUI/GUI_App.cpp` by adding `#include <boost/nowide/cstdio.hpp>` to
fix an `error: ‘remove’ is not a member of ‘boost::nowide'`. The main thing I
don't understand is how it worked before. Note that this include is in the
PrusaSlicer version of this file, but it also significantly deviates from what
is currently in OrcaSlicer in many other ways.
* Whups... I missed adding the deps/Eigen/Eigen.cmake file...
* Tidy some whitespace indenting in CMakeLists.txt.
* Ugh... tabs indenting needing fixes.
* Change the include order of deps/Eigen.
It turns out that although Boost includes some references to Eigen, Eigen also
includes some references to Boost for supporting some of it's additional
numeric types.
I don't think it matters much since we are not using these features, but I
think technically its more correct to say Eigen depends on Boost than the
other way around, so I've re-ordered them.
* Add source for Eigen 5.0.1 download to flatpak yml config.
* Add explicit `DEPENDS dep_Boost to deps/Eigen.
I missed this before. This ensures we don't rely on include orders to make
sure Boost is installed before we configure Eigen.
* Add `DEPENDS dep_Boost dep_GMP dep_MPFR` to deps/Eigen.
It turns out Eigen can also use GMP and MPFR for multi-precision and
multi-precision-rounded numeric types if they are available.
Again, I don't think we are using these so it doesn't really matter, but it is
technically correct and ensures they are there if we ever do need them.
* Fix deps DEPENDENCY ordering for GMP, MPFR, Eigen, and CGAL.
I think this is finally correct. Apparently CGAL also optionally depends on
Eigen, so the correct dependency order from lowest to highest is GMP, MPFR, Eigen, and CGAL.
---------
Co-authored-by: Donovan Baarda <dbaarda@google.com>
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
With this change, builds on ARM64 hosts will successfully kick off!
Unfortunately there are still missing/outdated dependencies, so the build doesn't yet succeed. This makes it much easier to check what we're failing on though.
* deps: Use CMAKE_BUILD_PARALLEL_LEVEL for dependency builds.
If set when initial CMake is run, don't hard-code the number of CPUs for all the
recursive child builds.
* build_linux: Pass -j1 for dependency build.
This is recommended by the comment at the top of deps/CMakeLists.txt, and makes
sense as the recursive build steps will pick up
CMAKE_BUILD_PARALLEL_LEVEL (otherwise the number of parallel jobs is squared).
* Add runtime display backend detection for Wayland support
Add LinuxDisplayBackend utility to detect X11 vs Wayland at runtime
using GDK_IS_X11_DISPLAY / GDK_IS_WAYLAND_DISPLAY macros. This is
the foundation for removing the forced GDK_BACKEND=x11 and enabling
native Wayland support.
- New files: LinuxDisplayBackend.hpp/.cpp with get_linux_display_backend(),
is_running_on_wayland(), and is_running_on_x11()
- Propagate wxHAVE_GDK_X11 / wxHAVE_GDK_WAYLAND from FindGTK3.cmake
as compile definitions to libslic3r_gui
- No-op on non-Linux platforms (returns Unknown / false)
* Fix Phase 1 code quality: pragma once, source ordering, static cache
* Make X11 initialization conditional for Wayland support
Remove the unconditional GDK_BACKEND=x11 force that blocked native
Wayland. Replace with conditional logic:
- EGL safety fallback: re-force X11 only when wxUSE_GLCANVAS_EGL is
off and WAYLAND_DISPLAY is set, with a warning log
- XInitThreads() only called when DISPLAY is set (X11 in use)
- __GLX_VENDOR_LIBRARY_NAME only set when DISPLAY is present (GLX-specific)
- WEBKIT_DISABLE_COMPOSITING_MODE only set under XWayland (both
DISPLAY and WAYLAND_DISPLAY present)
- Guard X11/Xlib.h include with __has_include for robustness
- Restore display validation to accept either DISPLAY or WAYLAND_DISPLAY
This is Phase 2 of the Wayland support plan.
* Fix Phase 2: safer EGL macro check, add clarifying comments
* Add GLAD2 library and replace GLEW linkage in build system
Set up GLAD2 as a static library to replace GLEW for OpenGL loading.
GLAD2 supports both GLX and EGL, which is required for Wayland support.
- Create src/glad/ with pre-generated GLAD2 sources (GL 4.6 compat)
- Add src/glad/CMakeLists.txt building glad as a static library
- Wire glad into src/CMakeLists.txt before libvgcode
- Modify libvgcode to use shared glad for GL path (keeps local copy
only for GLES2/Emscripten) to avoid duplicate symbol conflicts
- Replace GLEW::GLEW with glad in libslic3r_gui link libraries
Note: GLEW is kept in deps for OpenCSG. Code migration from GL/glew.h
to glad/gl.h headers will follow in Phase 3B+3C.
* Fix Phase 3A+3D: libvgcode GLAD include, dead files, dlopen dep, OpenGL link var
* Migrate from GLEW to GLAD: replace headers and API calls across codebase
Replace all #include <GL/glew.h> with <glad/gl.h> across 49 source files.
Migrate GLEW API calls to GLAD equivalents:
- glewInit/glewExperimental -> gladLoaderLoadGL()
- GLEW_EXT_* / GLEW_ARB_* extension checks -> GLAD_GL_EXT_* / GLAD_GL_ARB_*
- Remove GLEW-specific EGL/GLX mismatch #error guards (not needed with GLAD)
- Replace unavailable EXT symbols with core GL equivalents in
GLCanvas3D.cpp (GL_MAX_SAMPLES, glRenderbufferStorageMultisample,
glBlitFramebuffer, GL_READ/DRAW_FRAMEBUFFER)
- Update log messages from glewInit to gladLoadGL
* Fix Phase 3B+3C: remove GLEW find, clean EXT symbols, update attribution
- Remove find_package(GLEW) block from root CMakeLists.txt since GLEW
is no longer linked by any main application code
- Remove "glew" from SLIC3R_STATIC option description
- Replace all remaining EXT framebuffer symbols with core equivalents
in render_thumbnail_framebuffer_ext and _rectangular_selection_picking_pass
- Update AboutDialog credits from GLEW to GLAD
* Enable EGL in wxWidgets and add runtime GLX/EGL selection for Wayland
- Set wxUSE_GLCANVAS_EGL=ON in wxWidgets build and Flatpak manifest
- Add PreferGLX() call on X11 sessions for driver compatibility
- Remove Phase 2 safety fallback (EGL is now always compiled in)
- Guard SwapBuffers against hidden canvases to prevent Wayland stalls
* Fix Phase 4: move PreferGLX to app startup, fix FPS counter guard
Move wxGLCanvas::PreferGLX() from OpenGLManager::create_wxglcanvas()
(static initializer) to GUI_App::on_init_inner() before any wxGLCanvas
is constructed. This prevents a race where SkipPartCanvas could trigger
wxGLBackend::Init() before the GLX preference is set. The new location
also adds explicit is_running_on_wayland() detection with a warning for
unknown backends.
Move increment_fps_counter() inside the IsShownOnScreen() guard so FPS
is only counted when a frame is actually swapped.
* Update GLFW from 3.3.7 to 3.4 for runtime Wayland/X11 backend selection
Replace the compile-time GLFW_USE_WAYLAND flag (which locked to a single
backend) with GLFW 3.4's GLFW_BUILD_WAYLAND + GLFW_BUILD_X11 flags that
build both backends and auto-select at runtime based on the available
display server. This enables the CLI thumbnail renderer to work on both
Wayland and X11 sessions without separate builds.
* wayland: Fix UI call sites that rely on global screen coordinates
On Wayland, wxGetMousePosition() returns (0,0) and SetPosition() is a
no-op for top-level windows. Fix the highest-impact call sites:
- GLCanvas3D: Use cached m_mouse.position from event handlers instead
of wxGetMousePosition() + ScreenToClient() in get_local_mouse_position()
- Plater: Use event-relative coords via ClientToScreen(e.GetPosition())
instead of wxGetMousePosition() in 3 leave-window handlers
- BBLTopbar: Use event.GetPosition() and FindToolByPosition() directly
in mouse handlers instead of wxGetMousePosition()/FindToolByCurrentPosition()
- Search: Use focus-based dismiss logic on Wayland instead of
wxGetMousePosition()-based rect checks in SearchDialog and
SearchObjectDialog
- GUI_App: Skip SetPosition() in window_pos_restore() on Wayland where
it is a no-op; still restore size and maximize state
- Button: Position tooltip relative to button widget via ClientToScreen
instead of wxGetMousePosition()
* Fix SearchDialog Wayland dismiss: guard against search_line focus
* flatpak: Add Wayland socket permission for native Wayland support
* spec
* Fix crash on Wayland when wxWidgets lacks EGL support
Restore the safety fallback that forces GDK_BACKEND=x11 when wxWidgets
was not built with wxUSE_GLCANVAS_EGL=ON. Without this, the GLX backend
tries to access a non-existent X11 display on native Wayland, crashing
in wxGLCanvas::IsDisplaySupported() with SIGSEGV at offset 0xe4.
Also add a defense-in-depth guard in detect_multisample() that skips
the IsDisplaySupported call entirely on Wayland without EGL.
Root cause: deps/wxWidgets must be rebuilt after enabling EGL. The
compile-time check in OrcaSlicer.cpp detects the mismatch and falls
back safely.
* Fix EGL detection: use wxHAS_EGL instead of wxUSE_GLCANVAS_EGL
wxUSE_GLCANVAS_EGL is a CMake build option, NOT a C++ preprocessor
macro. The actual macro defined in wxWidgets setup.h is wxHAS_EGL.
All compile-time EGL checks were using the wrong macro, causing
the safety fallback to always trigger even with a properly built
EGL-enabled wxWidgets.
* Fix GL function pointers invalidated on Wayland/EGL
gladLoaderLoadGL() dlopen's libGL.so.1 to resolve GL function pointers
via dlsym, then immediately dlclose's the handle. On X11/GLX this is
fine because the GLX context keeps libGL.so mapped. On Wayland/EGL,
nothing else holds libGL.so open, so dlclose unmaps it and all function
pointers become dangling — causing SIGSEGV on the first GL call.
Fix: on Wayland, use gladLoadGL(eglGetProcAddress) which resolves
function pointers through the EGL loader without opening/closing
libGL.so.
* fix crash on start and various rendering issues
* fix crash on close
* small refactor
* move GPU selection to desktop file
* clean up a bit
* clean up more
* fix appimage error
- add a new mode to build in docker
- Improve AppImage
1. fix libbz2 soname differeence issue on appimage
2. Downgrade to 22.04 for better compatibility
3. improve appimage overall
wxWidgets 3.3 cmake install doesn't include private headers.
OrcaSlicer uses some private headers for accessibility support.
Add a post-install step to copy the private headers directory.
wxWidgets 3.3 bundles its own NanoSVG in bmpsvg.cpp, conflicting with
OrcaSlicer's bundled copy which includes the nsvgRasterizeXY extension.
Set wxUSE_NANOSVG=OFF in deps cmake to use OrcaSlicer's version only.
# Description
update cmake to 4.3.x version for better support of new build tools
# Screenshots/Recordings/Graphs
<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->
## Tests
<!--
> Please describe the tests that you have conducted to verify the
changes made in this PR.
-->
Defaults to ignore:
/opt/local (MacPorts)
/opt/homebrew (Homebrew on ARM)
/opt/local (Homebrew on x86)
We want to ignore these paths so any dependencies they might contain don't interfere with the build.
This fixes https://github.com/OrcaSlicer/OrcaSlicer/issues/10460
* Fix GIT_COMMIT_HASH not set in Flatpak builds
The env var check was gated inside the .git directory check, so
Flatpak builds (which exclude .git from the sandbox) always fell
back to "0000000". Lift the env var check to top level and inject
the commit hash into the Flatpak manifest via build-options.env.
* Switch Flatpak build to Clang/LLD via LLVM 21 SDK extension
- Add org.freedesktop.Sdk.Extension.llvm21
- Bump runtime to GNOME 49 (SDK 25.08) for llvm21 availability
* fix build errors and improving build speed for flatpak
* fxi more build errors
* Update error messages for GNOME Platform and SDK versions
* Reapply "Switch to self hosted mac runner (#12024)" with proper fix
This reverts commit 783f9926e3.
* use conditional logic for self-hosted runners
* improve readbility
- Add configurable GLEW_USE_EGL option (default OFF) to match wxWidgets
- Explicitly set wxUSE_GLCANVAS_EGL=OFF for vendored wxWidgets build
- Add compile-time check to detect EGL/GLX backend mismatch between
GLEW and wxWidgets, preventing silent rendering failures
The bug occurred when GLEW was compiled with EGL support (using
eglGetProcAddress) but wxWidgets created GLX contexts. This mismatch
caused OpenGL function pointers to fail loading, resulting in blank
3D model preview.
Co-authored-by: SoftFever <softfeverever@gmail.com>
* Add read support for Google's Draco (.drc) format.
* Fix build on Linux
* Use boost instead of fstat.
* Switch to boost memory-mapped file to save RAM and potentially improve performance.
* Trim trailing whitespace.
* Initial Draco write support.
Currently always exports with 16-bit precision and speed 0 (best compression).
The back-end function does have arguments to specify them, it's just not hooked into the GUI.
* Add Draco to the About dialogue.
* Fix Linux compile (hopefully)
* Add an option to associate DRC files on Windows.
* Implement a Preferences option to set Draco position quantization bits
* Update src/slic3r/GUI/Preferences.cpp
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
* Some slight changes to ianalexis's suggestion.
* Implement a create_item_spinctrl() function for numeric inputs, and use that instead of create_item_input().
* Move "bits" to inside the spinctrl box.
* Refactor following yw4z's feedback
* Update src/slic3r/GUI/Preferences.cpp
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
* Change to 0 bits as the default setting for Draco export precision.
* Change to a lossy checkbox and a bits field with a range of 8-30.
* Proper SpinInput code from yw4z
* Revert "Proper SpinInput code from yw4z"
This reverts commit 7e9c85f31a.
* Revert "Change to a lossy checkbox and a bits field with a range of 8-30."
This reverts commit d642c9bcc0.
* Redo preferences based on SoftFever's feedback
* Refactor to minimize code duplication
* Fix padding
* Improve Draco export quality level tooltip clarity
Clarify that 0 means lossless compression (not uncompressed),
document the valid lossy range (8-30), and better explain the
tradeoff between file size and geometric detail.
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
# Description
[Updated Qhull]
changelog
https://github.com/qhull/qhull/releases/tag/v8.0.2
# Screenshots/Recordings/Graphs
<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->
## Tests
<!--
> Please describe the tests that you have conducted to verify the changes made in this PR.
-->
Add fallback URL for MPFR source download
Updated MPFR.cmake to include both the GNU FTP and mpfr.org URLs for downloading the MPFR source. This improves reliability in case one of the sources is unavailable.
* Add script with VS version auto detection
* Add msvc145 toolset support
* Fix issue when build slicer only
* Fix vs2026 OpenCV build
* Set github action to use new build script
* Get vs version from `msbuild --version` so it works for github action
* Auto generate CMAKE_PREFIX_PATH/DESTDIR
* Auto set CMAKE_INSTALL_PREFIX
* Always default SLIC3R_STATIC to on
* Only allow one value for CMAKE_OSX_ARCHITECTURES
* Set arch for OpenSSL from CMAKE_OSX_ARCHITECTURES
* Set CMAKE_INSTALL_RPATH from CMAKE_PREFIX_PATH
* Default CMAKE_MACOSX_RPATH and CMAKE_MACOSX_BUNDLE to on
* Auto set BBL_RELEASE_TO_PUBLIC based on build config
* Default to GTK 3
* Fix linux debug build
Update find modules to also look for the debug variant of the libraries
* Set DEP_DEBUG and ORCA_INCLUDE_DEBUG_INFO based on CMAKE_BUILD_TYPE
* Add a fallback value for Windows SDK if the env variables are not set
* Reflect CMake changes in the build scripts
* Add missing line
* Fix auto setting DEP_DEBUG and ORCA_INCLUDE_DEBUG_INFO
* Update dep folder name for linux in GH actions
* Invert dep-folder-name conditions
`''` is considered a falsy value, which was causing the value to always be set to 'OrcaSlicer_dep'
* Properly handle finding the debug version of libnoise
* Convert FindNLopt.cmake to a config mode wrapper
* Use separate build directory for debug builds on Linux
* Move find_package for libnoise
* Cleanup and improve linux build script
- Add dry run
- Add build in RelWithDebInfo
- Add function to print and run commands
* Remove linux destdir deprecation and cleanup
* Fix flatpak build
* Disable fail fast for flatpak builds
* Flatpak improvements
- Build wxWidgets using deps cmake
- Improve handling of space freeing commands while building deps
- Allow cmake to directly download deps
- Set needed flags within cmake instead of the build manifest
* Print clean build commands
* Implement shellcheck recommendations
* Cleanup
* Fix CMakeLists.txt syntax by replacing empty elseif with else statement
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
Move many third-party components' source codes from the src folder to a new folder called deps_src. The goal is to make the code structure clearer and easier to navigate.
* remove OSMesa
OSMesa is depricated for quite a while and got removed with Mesa 25.1.0
* remove OSMesa from all buildfiles, readmes, etc…
---------
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
* Revert 98be94a729
We carry a wxgtk patch [1] that detects dark theme automatically. If it
doesn't work, it means that either selected Gtk theme is not installed
in flatpak environment, or appropriate xdg-desktop-portal for the DE is not
installed.
Plasma users may need to install org.gtk.Gtk3theme.Adapta
Also see https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Settings.html
[1] 0001-Enable-using-a-dark-theme-when-Gnome-dark-style-is-s.patch
* flatpak: introduce ORCA_SLICER_DARK_THEME to force dark theme
If ORCA_SLICER_DARK_THEME is set, dark theme will be applied regardless
of system settings.
* FIX: occt build failure
Pick up build error fix from upstream:
7236e83dcc
/run/build/BambuStudio/deps/build/dep_OCCT-prefix/src/dep_OCCT/src/StdPrs/StdPrs_BRepFont.cxx: In member function ‘Standard_Boolean StdPrs_BRepFont::renderGlyph(Standard_Utf32Char, TopoDS_Shape&)’:
/run/build/BambuStudio/deps/build/dep_OCCT-prefix/src/dep_OCCT/src/StdPrs/StdPrs_BRepFont.cxx:465:30: error: invalid conversion from ‘unsigned char*’ to ‘const char*’ [-fpermissive]
465 | const char* aTags = &anOutline->tags[aStartIndex];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| unsigned char*
* Set policy CMP0167 to NEW
Newer cmake switched to using BoostConfig.cmake shipped with boost-1.70
or later for detecting boost, to preserve old behavior policy CMP0167
was introduced.
Set it to "NEW" to indicate that we want to use .cmake shipped with
boost
* Add OpenSSL tarball link to the manifest
* Add curl zip to the manifest
* flatpak: bump runtime version to 47
Gnome 47 has been released a while ago
---------
Co-authored-by: Bastien Nocera <hadess@hadess.net>
* Patch GMP to build on GCC15
* Add cstdint include - GCC15 defaults to C23
* Update GMP PATCH_COMMAND to work without a valid git repo
* Set GMP_DIRECTORY_FLAG
* Fix OCCT and OpenCV patching during build
The inclusion of the `--directory` flag here isn't necessary because of
how `PATCH_COMMAND` applies patches. In fact this causes issues when
trying to build from an archive, `--directory` seems to imply `--index`
and thus this patch only succeeds if you're inside an initialized git
repo. If you simply use the archive without a git repo the build fails
at the patch step.
* Alter patch command based on git repo status
`git apply` has different behavior when inside a git repo vs not. If
we're in a git repo we need to fully quality the path for these patches,
otherwise we can omit the directory flag.
---------
Co-authored-by: Joe Palazzolo <joe@joepalazzolo.net>
* Add support for perlin noise fuzzy skin
* Support multiple types of coherent noise
* Updated tooltips for more clarity.
* Reorder options as suggested by @discip
* Fix accidental removal of &
* Move libnoise to deps
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>