Moonraker agents now send cols and ctype for every tray, the same fields the Bambu AMS sends. A single-color tray sends its one color with ctype 1. A multi-color spool sends all its colors once an agent fills the new AmsTrayData::tray_colors. Sending cols for every tray keeps update_filament_multi_color() from stopping at the first tray that has none.
boost::filesystem::exists() threw on Windows error 1005 for the build-time uv path, which skipped the packaged uv fallback. Use the error_code overloads so an unreadable path counts as absent, and look up uv before scoped_interpreter is created so a failure there cannot leave the interpreter running.
Every connector hole was moved 0.05 mm toward the cut face so it would open
the face instead of leaving a coplanar skin. Moving the whole volume also
moved its far end, so a plug hole was 0.05 mm shallower than depth plus
tolerance, and each dowel hole 0.05 mm shallower than depth plus half the
tolerance.
Grow the plug and snap hole by the overlap at the face instead of moving it,
and cut each dowel half just past the plane so the holes keep their depth
and still overlap the face.
The connector tests now measure each hole from the cut face, which is what
shows the missing 0.05 mm, and also run on a tilted, shifted cut plane.
Give two Eigen `auto` locals in SLAPrint.cpp and Selection.cpp concrete types so they no longer refer to destroyed temporaries. Zero-initialize two vectors in GLGizmoBrimEars.cpp, and build each wxDataViewItem before its delete in ObjectDataViewModel::Delete.
Dowels are centered on the cut plane, so the extra depth from the tolerance already splits evenly between the two holes. Only plugs and snaps are now shifted along the cut normal.
The test fix that finds the cut parts by their position in the object is from HanifKoh.
Co-authored-by: HanifKoh <76276251+HanifKoh@users.noreply.github.com>
Filament presets have no `filament_colour`, so loading two or more filaments in the CLI without `--filament-colour` left a one-entry palette. Code that sizes per-filament tables from it then read out of bounds, which crashed the slicer or dropped the layers for filament 2. The CLI now pads `filament_colour` to the filament count and rebuilds the flush matrix. Adds a CLI test that slices a per-layer change to filament 2.
The cut and "Delete all connectors" removed objects without telling the plates, so the plates kept counting objects by their old index. Prime tower previews showed another plate's filaments, and Select All picked up objects from other plates.
Removing a whole object now also removes every instance of it from the plates, not just the first one.
The notices were rebuilt only during plate validation, so selecting a
preset that needs a missing plugin on an empty plate showed nothing.
new_project() cleared the notices but kept their shown state, so they
never came back.
Refresh the notices on every preset change or edit, when a plugin loads,
unloads or has a capability disabled, after a plugin is deleted or
unsubscribed, and at the end of new_project(). A notice that is no
longer on screen is pushed again even when its set of plugins is
unchanged.
# Description
AMS custom colors now support alpha and ordered gradients through the
shared color picker. Printers advertising manual multicolor support can
edit up to four gradient colors; other printers retain single-color
editing with alpha. The picker accepts a per-caller gradient limit while
project editing and shared favorites retain their existing seven-color
limit. Canceling or confirming an unchanged seed preserves selections
that the editor cannot represent.
Filament previews composite translucent colors over a checkerboard,
including AMS custom swatches, circles and cards, the filament rack,
Change Filament menus, object-list selectors and feature-filament
selectors. Single-color AMS, external-spool and AMS Lite cards use the
same checkerboard renderer and alpha compositing as gradient cards, with
no separate SVG checkerboard cache. Rounded AMS card fills retain their
geometry and remaining-material bounds. Generated preview bitmaps use
opaque RGB storage after compositing so Windows menu conversion does not
corrupt the numbered labels; stored RGBA colors remain intact.
The rendering uses the existing graphics-context path without alternate
rendering fallbacks. Existing project/profile formats and device
permission checks are preserved.
# Screenshots/Recordings/Graphs
AMS now can have custom gradient with alpha up to 4 colors:
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/c28c0ee6-aad2-41c8-ae03-b8bd25ce1da8"
/>
Checkerboard background for colors with alpha:
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/de2af9e5-141f-4ab2-bcfe-561168c2435b"
/>
Bambu Handy should work too:
<img width="500" alt="98456ee77c51d79981ac50cd8f562e86"
src="https://github.com/user-attachments/assets/86951dbf-b898-4caa-9dc6-9407204f61fc"
/>
<img width="500" alt="b911c1c638ce71306ad1ac92587aea96"
src="https://github.com/user-attachments/assets/2f65c748-25fc-4bde-bbcf-305d0dfd3293"
/>
## Tests
- Windows, using the existing `build-dbginfo` / `RelWithDebInfo`:
`ALL_BUILD` and `slic3rutils_tests` build successfully.
- Focused native tests pass: 63 test cases, 5118 assertions, randomized
order. Includes AMS settings, device command payloads, color picker
validation and bitmap pixels, including 48 solid-versus-gradient
transparency comparisons.
- `node --test
resources/web/dialog/ColorPickerDialog/colorpicker.test.js`: 10 tests
pass.
- Manual GUI/device writeback and macOS/Linux runtime verification were
not performed.
[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
The cooling buffer drops a G1 F that repeats the feedrate the preceding
travel, wipe or retraction already set, so an extrusion printed at the
travel speed reaches the adaptive pressure advance processor without a
feedrate line of its own. The processor only read standalone G1 F lines
and fell back to the last one it had seen, often the first layer's, so
the predicted pressure advance stayed at the first-layer value for the
rest of the print.
Track the feedrate every move with an F word sets, as the firmware does,
and use it for an extrusion that no G1 F precedes.
CrealityPrint::start_print() chose between the plain opGcodeFile start and the
colorMatch + multiColorPrint pair by the model id alone, and inside the
multi-colour branch it fell back to the plain start only when a filament was
mapped onto box 0. A K1-family printer reports the same model id with and
without a CFS, and without one it never answers the boxsInfo query, so the send
dialog had no slots to map and the printer received a colorMatch with an empty
list followed by multiColorPrint. The job printed, but the firmware flagged
"no material" (materialStatus 1) for its whole duration. The same happened on
any CFS-capable model whenever the boxsInfo query failed.
Treat an empty mapping like a mapping onto the spool holder and send the plain
start with enableSelfTest, which is what Creality Print does when the printer
lists no colours. The command building moves into start_print_commands(), a
pure function, so the decision is unit-tested. Every plain start now reads the
printer's answer best-effort before closing, as the non-CFS start already did,
so the close frame never follows the command in the same burst.
Fixes#16695.
* init
* update icons
* Fix macOS color sampler compilation with Xcode
* add linux support
* add more guards for portal
---------
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
* Make the Discrete GPU a Linux Preference Instead of a Desktop-Entry Hint
The desktop entries asked the launcher for the discrete GPU with
PrefersNonDefaultGPU and X-KDE-RunOnDiscreteGpu. KDE and GNOME honour
that by adding the PRIME variables to every menu launch, so on a hybrid
laptop under Wayland the 3D view was rendered by zink on the GPU that
does not drive the display and its frames never reached the compositor:
an empty Prepare and Preview canvas from the menu, a working one from a
terminal.
Drop the two keys from the installed desktop file, the AppImage's
embedded entry and the entries the Desktop Integration dialog writes.
Add a "Render on the discrete GPU" preference (Linux, default off,
requires restart) that exports DRI_PRIME and, with the NVIDIA kernel
module loaded, the NVIDIA render-offload variables before GTK opens the
display. The GDK_BACKEND=x11 opt-in path exported them unconditionally;
it now leaves GPU selection to the preference as well.
The preference acts before GUI_App loads the configuration, so
AppConfig::peek_bool reads one app boolean straight from the saved file
and xdg_config_dir resolves the default Linux data dir the way the wx
code did; GUI_App's two copies of that lookup use the same helper, and AppConfig::config_path gained a
static form so the file name lives in one place.
* Share the Linux Data-Dir Lookup and Let DRI_PRIME Override the GPU Preference
default_data_dir() in libslic3r resolves the Linux data dir a start without
--datadir uses: a portable data_dir folder next to the executable, else the
XDG config dir. GUI_App::init_app_config and the discrete-GPU start-up code
both call it, so they cannot drift apart.
A DRI_PRIME already in the environment now skips the export entirely, so one
start with DRI_PRIME=0 gets back to Preferences when the discrete GPU cannot
open the window. The tooltip says so.
* Attach the DRI_PRIME Translator Note to the Tooltip It Describes
* Forward Declare GUI Panels in MainFrame.hpp
* Include wx/statline.h Directly Where wxStaticLine Is Used
The Windows builds failed in AboutDialog.cpp because MainFrame.hpp no longer brings in wx/statline.h.
* Include BBLTopbar.hpp Directly in GUI_App.cpp
The Windows builds failed in GUI_App.cpp with member access into incomplete type BBLTopbar.
* Trim Heavy Includes from GUI_App.hpp
* Include winternl.h in the Windows Troubleshoot Dialog Code
The Windows builds failed in TroubleshootDialog.cpp with unknown type name NTSTATUS.
When an Orca Cloud account is logged in, on_init_inner() ran fetch_plugins_from_cloud() synchronously, about 2 s of UI-thread time before presets loaded. The fetch now runs on a worker thread while presets load and the main window is created.
The "no longer available" and "unauthorized" plugin notifications are posted with CallAfter. If they arrive before post_init(), they are kept and shown from post_init(). Before this change they were never shown at startup, because plater() was still null.
The thread is joined on logout, so the fetch can't re-add the old account's metadata, and in OnExit(), CleanUp() and the macOS wxEVT_END_SESSION handler.
The Moonraker printer agent's status stream returned at once for an https print host, so Orca got the printer's first status over HTTP and no live updates after it. The stream now connects over TLS for an https print host. Like the agent's HTTP requests, it does not verify the certificate, so a printer's self-signed one is accepted. It sends the host name for SNI, and the `Host` header leaves out the default port 443.
`run_on_ui_blocking()`, added in #16763, declared its call states in an enum inside the function template. MSVC does not find those enumerators from the default member initializer of the local `struct Call`, so `libslic3r_gui` failed to compile with cl (C2065, C2280). The states are now at namespace scope as `UiCallPending`, `UiCallClaimed` and `UiCallAbandoned`. Behavior is unchanged.
Undo/redo restores a plate's name but reattaches its Print without copying the name, so `{plate_name}` in the output filename and G-code could be empty or out of date. For example, delete a named plate and then undo. `PartPlate::set_print()` now copies the plate name to the Print.
`MachineObject::connect` read `use_ssl` from `dev_ip`, which holds host:port with the scheme removed. So the Moonraker printer agent always used plain HTTP and could not reach a printer whose print host is https. It now reads the scheme from the matching `print_host`.
* Bound Plugin Disconnect and Python Shutdown When OrcaSlicer Exits
A Python printer agent whose disconnect_printer() never returned froze
the closing app, and a plugin thread that never ended kept the process
alive after its window closed, because Py_Finalize joins every
non-daemon thread.
At shutdown a Python agent's disconnect_printer() now runs once per
agent on a helper thread with a 3 second deadline, holding a reference
that keeps the plugin object alive if the call outlives a forced
unload. PythonInterpreter::shutdown() waits up to 3 seconds for running
plugin calls and for non-daemon threads; if either is still going, the
interpreter is left unfinalized for the process exit to end.
* Run the Threading Atexit Hooks Before Waiting for Plugin Threads
An idle concurrent.futures worker only ends when the hooks registered with
threading._register_atexit() tell it to, and Py_Finalize runs those after
the shutdown wait, so a plugin that left an executor open made every exit
wait the full deadline and skip finalization. The hooks now run first, on a
daemon thread joined within the same deadline, since they join their
workers without a timeout.
Boost 1.87 removed io_service and io_context::reset(), and 1.88 moved the classic Boost.Process API under boost/process/v1/ and dropped deadline_timer from boost/asio.hpp. Use io_context, restart() and steady_timer, and include Boost.Process only through the new slic3r/Utils/BoostProcessCompat.hpp, which picks the v1 headers on 1.88+. The bundled Boost 1.84 build is unchanged.
get_first_layer_bbox() already returns plate-local coordinates, and generate_first_layer_bbox() subtracted the plate origin from them a second time. On every plate after the first, bbox_all and bbox_objects in plate_N.json ended up outside the bed. The CLI export path already wrote plate-local values, and the wipe tower handling is unchanged.
FreeType was only bundled for OCCT's font code in TKService. The only Orca code that used that font code was Shape/TextShape.cpp, and nothing calls it. Its one call in ImGuiWrapper.cpp is commented out. The Emboss tool and the Design tab's text use stb_truetype.
Build OCCT with USE_FREETYPE=OFF, and remove the FREETYPE dep, its Flatpak source entry, the freetype.dll copy on Windows, TextShape, and the freetype and fontconfig links in libslic3r. OCCT only links fontconfig when FreeType is on, and libslic3r_gui links fontconfig on its own.
• Makes gizmo more compact
• Moved budget and resolution on collapsible "Quality" section. it shows
"Auto" status on title
• Moved "Add layer" moved layers header. Fixes position of button and
thats important while adding layers repeatedly
**Before - After**
<img width="757" height="566" alt="Screenshot-20261015200616"
src="https://github.com/user-attachments/assets/d7e356fd-6685-4608-92a6-56e1d2518f69"
/>
ws_connect(), query_boxes_info() and start_print() set expires_after()
deadlines, then made synchronous Beast calls. Beast only applies those
deadlines to async operations, so none of them fired. A printer that
accepted the websocket and then stopped answering blocked the caller
forever. That froze the GUI thread when the Creality send dialog opened
or the sidebar synced filaments, and left uploads stuck after the file
arrived.
Run every websocket call as an async operation on the local io_context,
so the deadlines apply. run_until_done() and the per-address connect
loop move from MoonrakerPrinterAgent.cpp into AsioUtils.hpp, and both
files share them. Each resolved address gets its own connect deadline,
and start_print() gets a reply deadline for its commands. A start-print
timeout shows the translated timeout message that HTTP timeouts already
use, now shared through PrintHost::timed_out_message(), and other
websocket errors drop Boost's source location.
The websocket port and deadlines move into a protected ws_settings
member, so the tests can use a local port and short deadlines. The new
tests run CrealityPrint against a fake printer that goes silent before
or after the handshake.
Holding a +/- step button on a gizmo input changed the value only once. ImGui repeats a held button only on new frames, and the canvas draws only when an event arrives, so a mouse held still produced no repeats.
- Add ImGuiWrapper::request_frames_while_held() and call it after the Emboss Height and Depth, SVG Depth, and Cut groove Count inputs.
- Set io.DeltaTime from a real clock in ImGuiWrapper::new_frame(), capped at 1/60 s, so the repeat rate does not depend on the frame rate.
- Handle wxEVT_MOUSE_CAPTURE_LOST on the canvas, so a lost button-up does not leave an ImGui widget active.
- Cut groove Count no longer rebuilds when the value is already at its limit.
* Avoid SetLabel() on plain wxTextCtrl controls in Field.cpp
wxWidgets 3.3 turned wxTextCtrlBase::SetLabel() into an explicit
failure (wxFAIL_MSG, "Use SetValue() or ChangeValue() instead"). It
sets nothing, and with assertions enabled every call pops up an
assertion dialog.
TextCtrl::BUILD() only sets the side-text label in the single-line
case now (the TextInput composite). For multiline fields the control
is a plain wxTextCtrl, and the option group draws the side text
itself when there is any (combine_side_text() is false).
SpinCtrl::BUILD() replaces SetLabel() on the inner text control with
ChangeValue(). Nothing has been stored there since 3.3, and the one
reader of that label (propagate_value(), null-value case) already
sees an empty string. ChangeValue sets the initial text without
events, and the following SetValue(default_value) determines what is
displayed.
* Avoid label APIs on TextInput's inner wxTextCtrl
SetLabelText() routes to the virtual SetLabel(), which wx 3.3's
wxTextCtrlBase overrides, so both label APIs assert or silently no-op on
a plain wxTextCtrl. All become ChangeValue(), which sets the text
without events.
* Apply review suggestions to SliderCtrl, SpinCtrl, and machine dialog
---------
Co-authored-by: yw4z <ywsyildiz@gmail.com>
Use dynamic_cast in the vector branch of ConfigOptionVector::set_at. GCC at -O3 inlines set_at into the wipe tower position code, where the argument is a scalar ConfigOptionFloat, and the static_cast made it warn about an out-of-bounds read in the branch that never runs.
The scalar branch still uses static_cast. ConfigOptionFloatOrPercent is not a ConfigOptionSingle<FloatOrPercent>, so a dynamic_cast there would throw when a coFloatsOrPercents option is edited in the GUI.
Several per-filament and per-extruder options default to a single value. When a config lists fewer values than there are filaments or nozzles, the Type1 prime tower and the pre-heat injector read past the end of the vector, and the same scene could slice to different G-code from one run to the next.
- Read `filament_change_length`, `filament_change_length_nc` and `hotend_cooling_rate` with the same fallback to the first value that `get_at()` uses.
- `is_nil(idx)` falls back to the first value like `get_at()` instead of reading past the end.
- Skip the pre-cooling and last-layer reads when `get_extruder_id()` returns -1, and when no wall filament matches the selected category.
- Bounds-check the pre-heat injector's per-filament and per-extruder reads, and use the extruder index when `physical_extruder_map` is too short.
Configs that list a value for every filament and nozzle produce the same G-code as before.
Adds a test that nozzle-change ramming extrudes the same length in both directions when `filament_change_length` has one value for two filaments.