# Description
- Changing the filament name from Z-Bolt PLA (ABS, ABS HT, PETG, PA) to Generic PLA @Z-Bolt (etc);
- Increased size of g-code thumbnails for S800 Dual and S1000/S1000 Dual;
- The profile structure has been optimized to reduce the variety of profiles for each printer model;
- Extruder temperatures for all filaments have been increased for hardened steel nozzles;
- New process profiles have been added for the 0.6mm nozzle (0.16mm High Quality and 0.20mm High Quality);
- Disabling multicolor printing for single-head printers;
- The "_BEFORE_LAYER_CHANGE" and "_AFTER_LAYER_CHANGE" macros have been added to printer profiles.
<!--
> Please provide a summary of the changes made in this PR. Include details such as:
> * What issue does this PR address or fix?
> * What new features or enhancements does this PR introduce?
> * Are there any breaking changes or dependencies that need to be considered?
-->
# Screenshots/Recordings/Graphs
<img width="762" height="257" alt="изображение" src="https://github.com/user-attachments/assets/b5c2ef09-343f-47e8-adb5-fcf682866882" />
<img width="731" height="361" alt="изображение" src="https://github.com/user-attachments/assets/b3259fed-7698-4ab2-89d7-b6b00d974b02" />
<img width="736" height="889" alt="изображение" src="https://github.com/user-attachments/assets/be79822a-da82-4715-a5c0-c393f0cb98b7" />
<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->
## Tests
OrcaSlicer_profile_validator.py
<img width="1053" height="84" alt="изображение" src="https://github.com/user-attachments/assets/a3427a51-e77f-40f3-a7b4-efbd62992290" />
check_profiles.yml
<img width="2203" height="681" alt="изображение" src="https://github.com/user-attachments/assets/994d0423-660a-4e0e-be4f-4b1c72b653f3" />
orca_extra_profile_check.py
<img width="1024" height="142" alt="изображение" src="https://github.com/user-attachments/assets/ddd8e3bf-b845-48fc-b736-ca80c138ce64" />
<!--
> Please describe the tests that you have conducted to verify the changes made in this PR.
-->
Fix segfault in CLI mode when extruder/filament options absent
When slicing via CLI (--slice) with a BBL printer profile such as the
P1S, update_values_to_printer_extruders and
update_values_to_printer_extruders_for_multiple_filaments dereference
option pointers without checking for nullptr first, causing a SIGSEGV.
Root cause: printer profiles that have different_extruder=true (e.g.
P1S variants) trigger these code paths even in single-extruder CLI
invocations where filament_map, extruder_type, and nozzle_volume_type
options may not be present in the resolved config.
Fix: add null guards before dereferencing option<> / dynamic_cast<>
results, consistent with the pattern used in PR #12719. Log a warning
and return early rather than crashing.
Fixes CLI --slice segfault (exit 139) with P1S profiles.
Related: #12426, #12719
# Description
<!--
> Please provide a summary of the changes made in this PR. Include details such as:
> * What issue does this PR address or fix?
> * What new features or enhancements does this PR introduce?
> * Are there any breaking changes or dependencies that need to be considered?
-->
# 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.
-->
Reduce the size of current and new JSONs by standardising them with 1 tab indentation instead of 4 spaces.
This effectively reduces the size by almost 20 MB.
| Current | New |
|---|---|
| 85.2 Mib | 67 Mib |
Used [JQ](https://jqlang.org/) `--tab` to automatically format every current JSON.
> [!NOTE]
> Some profiles had the arrays on the same line, but those created by Orca were in the standard format (each object below the previous one). In some cases, this increases the number of tabs due to the new lines, but the increase is negligible, and this way both the base profiles and those created by Orca maintain the same style.
* identified code for snapping to buidlplate
* rename internal name to ensure_on_bed to be consistent, saves option in 2mf, finish Move UI, use in both ensure_on_bed() functions
* makes auto_drop a per-object setting, removes global setting
* remove adUndef, add auto_drop to constructor/serialize
* fixes drop() button
* add "auto_drop" checkmark to "load as single object" dialog,
nothing changes if auto_drop == yes || "load as single object",
if auto_drop == false and "load as single object" == false the objects now retain their relative position to each other
* retains auto_drop (and printable) state when assembling or splitting objects,
adds ObjectList::printable_state_changed() overload to be able to only provide ModelObject* vector
* adds dialog when splitting to ask if auto_drop should be disabled,
only shows when auto_drop enabled and atleast one volume floating
* adds arrow indicator on bounding box if auto_drop == false
* removes unneeded code, keeps "auto_drop" naming consistent
* makes for loop simpler in set_printable, set_auto_drop and get_auto_drop,
makes get_auto_drop const,
fixes wording in Snapshot text
---------
Co-authored-by: Hanno Witzleb <hannowitzleb@gmail.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
* 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
Bump GitHub Actions action versions
Update workflow action versions: upgrade geekyeggo/delete-artifact from v5 to v6 and microsoft/setup-msbuild from v2 to v3 across .github/workflows/build_all.yml, build_deps.yml, and build_orca.yml. This brings workflows to newer action releases for compatibility and fixes.
* Updated profile to match latest officlal BBL tweaks
Updated the profile for the P2S with several changes to match the latest machine gcode changes made by BBL:
- Added Ventobox support
- Added air purification at the end of the print. When exhaust fan controls are setup in the filament profile, this is skipped
- Disabled auxiliary_fan by default to fix the issue that it overrides auto cooling and heating managed by the printer. Enabling this in printer settings makes it behave as before if so desired
- Updated with other tweaks made by BBL
* Reverted one line in layer change code
Reverted one line in layer change gcode as it was causing issues and was bambu studio specific anyway. Filament change works exactly as expected now.
* Re-enabled soaking time
This was a personal change that sneaked in, but may be unwanted for other users who have been using Orca for this printer for a while.
* Fixed redundant homing command and moved enable input shaping up
Fixed some issues BBL made in their original startup code that executes one redundant homing command for people who disable ABL. Also moved up the enable input shaping command to make the startup sequence quieter.
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
## Summary
Adds proper system profiles for the **Anycubic Kobra Neo** with 0.4mm nozzle (stock Marlin firmware).
This replaces the profiles from #12341 which had several issues:
- All files had `"from": "User"` instead of `"from": "system"` — causing profile loading failures
- No `inherits` or `type` fields — broke the inheritance chain
- Klipper-only gcode (not stock firmware)
- No `Anycubic.json` index entries — printer never appeared in the UI
- Cover image was 382x600 instead of 240x240 (displayed squashed)
- Profiles were subsequently removed in #12889
### Files added/modified
| File | Description |
|------|-------------|
| `machine/Anycubic Kobra Neo.json` | Base machine model (220x220x250mm) |
| `machine/Anycubic Kobra Neo 0.4 nozzle.json` | 0.4mm nozzle variant, stock Marlin gcode |
| `process/0.12mm Detail @Anycubic Kobra Neo 0.4 nozzle.json` | Detail process profile |
| `process/0.16mm Standard @Anycubic Kobra Neo 0.4 nozzle.json` | Standard process profile |
| `process/0.20mm Standard @Anycubic Kobra Neo 0.4 nozzle.json` | Standard process profile |
| `process/0.28mm Standard @Anycubic Kobra Neo 0.4 nozzle.json` | Standard process profile |
| `filament/Anycubic PLA @Anycubic Kobra Neo 0.4 nozzle.json` | PLA filament profile |
| `Anycubic Kobra Neo_cover.png` | Resized to 240x240 |
| `Anycubic.json` | Added index entries for all new profiles |
### Approach
- Based on the working **Anycubic Kobra 2 Neo** profiles (similar hardware — direct drive, 220x220 bed)
- Start gcode uses `G29` for auto bed leveling (stock Kobra Neo probes fresh each print)
- Profiles use proper `"from": "system"` and `"inherits": "fdm_machine_common"` / `"fdm_process_common"` chains
- Buildplate model and texture from #12341 are already in the repo
### Testing
- Verified profiles load correctly in OrcaSlicer 2.3.2 (no errors in log)
- Printer appears in Printer Selection dialog with correct 240x240 cover image
- Process/filament presets appear when printer is selected
- **Note:** Start/end gcode adapted from Kobra 2 Neo for stock Marlin — testing on stock firmware by Kobra Neo owners would be appreciated
Closes the gap left by #12341 and #12889.
* Fix crash-inconsistent draft shield
* Skip empty skirt G-code and fix skirt_done handling
Track whether a skirt was actually generated for the current print Z and avoid appending empty skirt G-code. Only pop m_skirt_done when a skirt was emitted to prevent corrupting skirt state across multiple instances per layer. Also use a temporary string (moved into the main gcode) to detect emptiness before updating state. Preserves existing first-layer clearing behavior.
* Union ex brims
Revert "Union ex brims"
This reverts commit bbc9a39faf318dc2df093eb2bdcebf19a4162fe9.
Update Brim.cpp
* dont repeat paths
* Update Brim.cpp
* multimaterial brim independiente
* Normal brim if is by object
* fix print order
* cleaning 1
* cleaning 2
* Normal brim if multimaterial on first layer
* fix artifact
* combine_brim optional
refactoring
* refactoring gcode.cpp
* refactoring brim.cpp
Update Brim.cpp
* Remove multimaterial first-layer check for brims
Stop detecting extruders used on the first layer and remove the is_multimaterial_first_layer guard. Simplify can_combine_brims to only consider combine_brims and whether printing is ByObject, allowing brims to be combined across extruders unless printing by object or combine_brims is disabled. Cleans up unused code and simplifies brim-generation conditions.
* Remove material specification from unified brim comment
* Update PrintConfig.cpp
* Fix return from assembly linux
* Tie deferred callback to canvas lifetime and add shutdown guards
Use m_canvas->CallAfter instead of wxGetApp().CallAfter to ensure the callback is only executed if the canvas is still alive.
Add early returns if wxGetApp().is_closing() is true before accessing plater or the 3D canvas, reducing the risk of use-after-free during application shutdown.
Addresses feedback regarding potential UI teardown race conditions.
* copilot suggestion
* Use local reference to wxGetApp() in Return button callback
Replace multiple calls to wxGetApp() with a single local reference
to improve readability and avoid redundant function calls.
* Don't assume 0.4mm nozzle; format as "unknown" if not defined.
* Skip nozzle diameter and hardness checks if nozzle info unknown.
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
# Description
The Qidi Max 4 and Q2 don't report what they are via /server/info like
the other Qidi printers apparently do. This means that filament matching
is a fool's erand because you'll never actually match anything. this
adds a fallback where we just use the configured machine type. I'm not
sure why we wouldn't just do that all the time, but I wanted to change
as little as possible.
Here's the entirety of the `/server/info` output from a Qidi Max 4:
```
{
"result": {
"klippy_connected": true,
"klippy_state": "ready",
"components": [
"secrets",
"template",
"klippy_connection",
"jsonrpc",
"internal_transport",
"application",
"websockets",
"database",
"dbus_manager",
"file_manager",
"authorization",
"klippy_apis",
"shell_command",
"machine",
"data_store",
"proc_stats",
"job_state",
"job_queue",
"history",
"http_client",
"announcements",
"webcam",
"extensions",
"octoprint_compat",
"timelapse",
"frp_manager",
"mqtt"
],
"failed_components": [],
"registered_directories": [
"config",
"logs",
"gcodes",
"timelapse",
"timelapse_frames",
"config_examples",
"docs"
],
"warnings": [],
"websocket_count": 3,
"moonraker_version": "?",
"missing_klippy_requirements": [],
"api_version": [
1,
4,
0
],
"api_version_string": "1.4.0"
}
}
```
There's no machine name or hostname. This is also what the response
looks like from a Q2, including the exact same API version numbers, so
we cannot match on that either.