Commit Graph
32894 Commits
Author SHA1 Message Date
HanifKoh 40d7f25ff9 Bump wxWidgets to the Fork Commit With the Wayland Seat Release Fix (#17015)
* Update WxWidget Git Tag

* Bump the Flatpak wxWidgets Pin to the Same Commit as the Deps Build
2026-10-29 14:45:40 +08:00
SoftFever 0db324476f Fix crash on New Project after opening the Design tab (#16997)
# Description

Starting a new project or opening one could crash OrcaSlicer if the
Design tab had been opened earlier in the session and OrcaSlicer wasn't
the active window at that moment. It no longer crashes, and the Design
tab is still cleared for the new project as before.

Only reachable with the CAD feature turned on. No change to slicing or
to project files.

# Screenshots/Recordings/Graphs

<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->

## Tests

Reproduced on a Windows Release build of a feature branch that has the
same code, by driving New Project with OrcaSlicer visible but not the
active window and a debugger attached. Before the change it crashed with
the same stack as the original crash log. After it, the same steps
finish without a crash. This branch (main plus the change) wasn't built
on its own. There's no automated test, because the crash needs a real
change of window focus.

<!--
> A guide for users on how to download the artifacts from this PR.
-->

[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
2026-10-29 14:03:19 +08:00
Lam Wei Lun 45a29d391b Fix Full Publish variant layout and project round trip (#17014)
* fix: keep a Full Publish copy's variant vectors and list in step

A published Full entry clones the receiver's filament preset and overlays
the author's values, but the copy's variant list was rewritten to the
author's columns even when a variant-bearing key could not be filled from
the file. That key kept the receiver's width while every reader sizes the
layout from the list, so one variant silently read another variant's
value.

Copy a variant key only when the file carries all of the author's
columns, then drop any remaining variant key whose length disagrees with
the author's column count, and set the list last. filament_extruder_variant
is itself a member of filament_options_with_variant and is skipped by that
cleanup. The layout joins the entry's dedup key, so two entries naming one
preset but carrying different variants cannot share a copy.

A Full copy is detached and parentless, which also meant it never reached
the receiver's saved project: get_preset_differed_for_save stored no diff
without a parent, and load_project_embedded_presets dropped a preset whose
inherits did not resolve. Embed a parentless preset with its whole config
and resolve it over the default preset on load, mirroring the custom-root
branch of the user-preset loader. A preset naming a missing parent is
still dropped.

Tests: a Full copy drops a variant key the file cannot fill; a parentless
project-embedded preset keeps its own variants on reload.

* fix: stop relabelling and truncating published filament variants

Review of the previous commit found three paths that still let a Full
Publish copy or a loaded preset describe variants its vectors do not
hold.

set_num_filaments resizes every key in m_filament_option_keys to the
filament count, and two of those keys (filament_retract_length_nc and
volumetric_speed_coefficients) are variant-bearing. Loading a
multi-variant preset, including a saved Full copy, truncated them to the
first variant, which readers then hid by clamping. Skip variant-bearing
keys there, as Preset::normalize's own pass already does.

A variant key the file did not carry was kept whenever its width matched
the author's column count, then relabelled with the author's variant
names. When the receiver lists the variants in another order, that puts
one variant's value under another's name. Keep the key only when the
receiver's list is the same layout, or it holds a single value; otherwise
drop it and report it in skipped_keys.

An imported material key that names a file column but is per-slot in this
build was read positionally, returning another slot's column. Skip and
report it instead.

Also narrow the parentless project-embedded preset path to a filament
preset that carries a variant layout, and keep a failed apply from
aborting the whole project load.

* test: store filament_retract_length_nc as the nullable option it is

The filament count test set the key through the non-nullable accessor.
The option's default is ConfigOptionFloatsNullable although the
definition says coFloats, so the value was written through the wrong
dynamic type and the later lookup returned null. Use the nullable
accessor and assert the lookups succeed instead of dereferencing blindly.
2026-10-29 13:37:23 +08:00
HanifKoh 2cb2f0d2e7 Validate Only the Edited Variant's Adaptive PA Model and Accept Spaces in It (#16978)
* Validate Only the Edited Variant's Adaptive PA Model and Accept Spaces in It

Since pressure advance became a per-variant filament setting, the Filament
tab validated every variant column of the adaptive pressure advance model
whenever one was edited. The columns the user never touched still hold the
default placeholder, which the validator rejects, so every edit of a
multi-variant filament ended in a "Line 1: flow value must be greater than PA
value" dialog about a column the user could not see. The check now covers the
variant being edited only, as the nozzle temperature checks on the same tab do.

The validator also rejected whitespace between the values, which the model
parser accepts, so a model typed as "0.027, 8.1416, 2000.0" sliced correctly
but warned on every slice. Whitespace is now ignored before the values are
checked.

Enabling adaptive pressure advance before entering a model warned that the
model "may contain invalid values", which only meant that the placeholder is
all zeros. That case now gets its own warning saying that no measurements
have been entered.

* Keep the Empty Adaptive PA Model a Single Filament Column in Its Test

Deserializing an empty string into the model option leaves it with no
entries, and get_at on an empty vector aborts on a libstdc++ built with
assertions, as the Flatpak unit-test lanes are. Presets always hold one
column per filament, so set the value directly.
2026-10-29 12:08:50 +08:00
Lam Wei Lun c0efd44e56 Fix Publish 3MF export and import of filament variants (#16984)
* Fix Publish 3MF export and import of filament variants

Variant-bearing filament keys (filament_options_with_variant) hold one
value per (slot, variant) in the uncompacted config, but the published
path addressed them by slot: export kept the wrong column once an
earlier filament had more than one variant, import wrote every material
key to receiver variant 0, and Full Publish copied a single variant.

Add a column model in PublishSettings: file columns from
filament_self_index, exact variant matching, and the column a slot
actually prints with (filament_map / filament_volume_map / nozzle
types, hybrid mapped through the slot's own volume type). Export
rewrites partial material entries to base#col, masks those keys by
column instead of slot, and drops a key whose column is foreign, out of
range, or whose vector does not match the file layout. Import maps
base#col back to the receiver preset's variant with the same name and
skips (reports) a miss instead of writing variant 0; plain keys from
older publishes keep the positional import. Full Publish copies every
variant of the author's slot and sets the copy's
filament_extruder_variant.

No new file keys: variant-bearing material keys gain a #col suffix.
No UI change in this commit.

* Fix missing includes

* Fix unit tests

* Fix unit tests
2026-10-29 10:55:35 +08:00
TheLegendTubaGuy d81a212f53 Fix printer agent firmware check and send dialog name list (#16970)
MachineObject::upgrade_display_state lost its initializer when it became an enum, and only Bambu status messages assign it. Printer agent printers (Moonraker, Qidi) kept whatever value was in memory, so the Print and Send dialogs could block an idle printer as "updating firmware". It now starts at UpgradingUnavaliable, the value it had before.

The Send to Printer dialog now labels printers with get_shown_printer_name(), so printer agent printers show "Name (IP)" and Bambu labels are unchanged. Printers that share a name each get their own entry, where before every entry pointed to the first printer with that name.
2026-10-28 15:43:24 -05:00
TheLegendTubaGuy 2e562e8b9e Fix camera orbit speed multiplier ignoring decimals in non-English languages (#16967)
The orbit multiplier preference is stored with a decimal point, but was
parsed with std::stod, which follows the C locale set by the interface
language. With a comma-decimal language, 0.99 parsed as 0 (frozen camera)
and 1.99 as 1. Parse it with string_to_double_decimal_point instead.

Fixes #11534
2026-10-28 15:40:22 -05:00
SoftFever ba756706be Fix crash on New Project after opening the Design tab 2026-10-29 03:02:17 +08:00
Erkan Ozgur Yilmaz d709eb251c Keep Paint on Sharp Edges After Subdivision Mesh (#16484)
Subdivision mesh now keeps paint on sharp edges and corners when "Keep painted feature after mesh change" is on. The paint is remapped onto the subdivided mesh before its vertices are smoothed. That mesh still lies on the old surface, and the smoothed mesh has the same triangles, so the paint data stays valid for it. With the preference off, nothing changes. The menu item no longer says "(Lost color)".
2026-10-28 10:06:29 -05:00
Gazi Faysal Jubayer 4b68224ff4 Use the assigned filament's settings in the PA Line calibration test (#16882)
The PA Line test took its speed limit, line width and extrusion from filament 0, whatever filament the test was assigned to. On any other AMS slot or filament, the test printed with the wrong speeds and the wrong extrusion (#16530).

The test now uses the filament the G-code generator has selected for it:
- the fast lines are capped by that filament's max volumetric speed;
- the line width uses the nozzle diameter of that filament's extruder;
- the lines and the number box use Extruder::e_per_mm() times print_flow_ratio, like a regular print.

With one filament whose flow ratio is not 1, the PA lines now use that flow ratio too. PA Pattern output is unchanged.

Adds a regression test that checks the PA line feedrate and extrusion for a test assigned to the second of two different filaments.
2026-10-28 09:57:43 -05:00
sirjassamandIan Bassi f0827063bd Add PrintaLot PLA profiles for Bambu Lab printers (#16951)
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
2026-10-28 11:27:56 -03:00
Nathanandyw4z 7349ea795b Fix STL export creating duplicate file extensions (#15296)
Strip known model extensions from object names in per-object STL export, so `bracket.stl` exports as `bracket.stl` instead of `bracket.stl.stl`. Leading and trailing dots and spaces are trimmed too, so names like `.stl` no longer become hidden files.

Co-authored-by: yw4z <ywsyildiz@gmail.com>
2026-10-28 09:14:35 -05:00
HanifKoh 8c2c16f318 Match BBLModelTask to the 02.08.04 Plug-in's Layout (#16973)
The 02.08.04 Bambu network plug-in series appended four strings to
BBLModelTask (design_title, title, instance_title, create_client).
get_subtask() hands the plug-in an OrcaSlicer-allocated BBLModelTask to
fill in place, so the plug-in wrote 128 bytes past the end of the object
and corrupted the heap as soon as the Device tab fetched the subtask of a
connected printer. Routing get_subtask through the Bambu agent (#15908)
exposed it; before that the call hit the Orca Cloud stub.

Add the members so the object is as large as the plug-in's. Older
plug-ins fill only the leading members and leave these empty.
2026-10-28 22:11:49 +08:00
HanifKohandLam Wei Lun 541ff1da58 Prune the Cached Preset JSONs Once for All Windows Targets (#16926)
* Prune the Cached Preset JSONs Once for All Windows Targets

build_preset_cache.bat pruned each target on its own, reading every
vendor's preset list from the checkout's <vendor>.json. CI names the
checkout as the first target, and pruning it deletes those files, so the
install tree that the portable zip and the MSIX are packed from only
lost the 71 vendor JSONs and kept all 14,600 preset JSONs next to the
caches. The prune also started one PowerShell per vendor and deleted
file by file, which took 28 minutes on the Windows arm64 runner against
under a minute on x64, and set the wall clock of every PR.

The pruning moves to prune_cached_presets.ps1, run once for all targets:
it reads every vendor profile before touching any target and deletes in
a single process, printing how long each target took. The batch script
only validates the targets, installs the caches and queues them.

A test suite exercises the script on a made-up profiles tree, including
the source-then-install-tree order CI uses, and runs in the Windows build
script tests job.

* Resolve the Prune Script Next to the Repo Root, Not %0

The prune label runs after the argument loop has shifted %0 along with
the rest, so %~dp0 named the last target's directory and PowerShell
could not find the script. REPO_ROOT was captured before any shift.

* Read the Preset List From the Target's Own Profile in the Shell Script

The shell script read each vendor's preset list from the source profiles,
which is gone once an earlier --prune-source target has been pruned. No
caller passes the source as a target today, so this is the same latent
dependency the batch file had, removed before it bites.

Ported from https://github.com/OrcaSlicer/OrcaSlicer/pull/16975.

---------

Co-authored-by: Lam Wei Lun <weilun.lam@gmail.com>
2026-10-28 22:11:34 +08:00
Rui Valimandmattjanus d67e0d8dc4 Fix Creality Hi CFS filament sync over Moonraker (#15857)
The Creality Hi runs Moonraker but reports its CFS in the `box` printer object, which the Moonraker agent didn't read, so filament sync found no slots. The agent now queries `box` when it finds no lane data or Happy Hare, and the parser lives in `Utils/CrealityCfs.cpp`. Creality material IDs map to filament types, with the K2 family's `same_material` list as a fallback for branded spools.

`update_filament_multi_color()` no longer stops at the first slot without a multi-colour list. It uses the slot's own colour instead, so the list stays aligned with the filament list and selecting a later filament no longer writes past its end.

The CrealityPrintAgent fallback no longer syncs a preset of a different material when no base preset of the reported type exists.

The K2 Plus `same_material` fallback is from mattjanus.

Co-authored-by: mattjanus <18539984+mattjanus@users.noreply.github.com>
2026-10-28 08:50:51 -05:00
SoftFever 4720370149 Fix Windows startup failure on an OrcaSlicer.conf without a trailing newline (#16983)
# Description

On Windows, OrcaSlicer refused to start with "Orca Slicer GUI
initialization failed: invalid string position" when `OrcaSlicer.conf`
ended right at its closing brace, as it does after a person or a tool
edits and saves it. Such a file now loads, and the missing checksum is
only logged, as it already was for a checksum that doesn't match. A
backup `OrcaSlicer.conf.bak` without its checksum line no longer crashes
the recovery path either; as before, it is not used to restore a
corrupted configuration.

No change for configuration files the app saved itself: their checksum
is still verified.

# Screenshots/Recordings/Graphs

<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->

## Tests

New `[AppConfig]` tests load a configuration without the checksum line
(ending at the brace, and at a newline), restore a corrupted
configuration from a backup whose checksum matches, and leave a backup
without its checksum line unused. The two regression tests fail without
the fix with "invalid string position" and pass with it; the full test
suite passes on Windows.

By hand on Windows: a build without the fix shows the initialization
error on a configuration ending at its brace, this branch opens the main
window on it, and restarting on the configuration the app then saved
logs no checksum warning.

<!--
> A guide for users on how to download the artifacts from this PR.
-->

[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
2026-10-28 21:39:08 +08:00
Kris Austin 42608687e5 Fix AltGr typing in settings boxes switching tabs, and add go-to shortcuts for the other tabs (#16918)
Remove the old Ctrl+1 to Ctrl+4 key handler on settings fields. wxWidgets reports AltGr as Ctrl+Alt, so on AZERTY and similar layouts, typing `{`, `~` or `#` in a multi-line settings box switched the main tab. The handler was also outside the shortcut registry and clashed with the Ctrl+1 to Ctrl+4 camera shortcuts.

Add unbound "Go to the ... tab" shortcuts for Home, Design, Multi-device and Calibration, next to the Prepare, Preview, Device and Project ones from #16301.

Fixes #9649
2026-10-28 07:17:52 -05:00
TheLegendTubaGuy e66569a966 Fix center of mass details, belt preview and section view bugs (#16958)
* Fix center of mass details, belt preview and section view bugs

Fixes the center of mass bugs from #16781 (center of mass a-d and
rendering b).

- The details box follows its marker, so zooming toward the cursor
  could slide it under the mouse, where ImGui took the wheel and
  zooming stopped. The wheel now zooms over the box.
- Esc closes the details box. A click on a marker now focuses the 3D
  view first, so Esc reaches it after typing in a sidebar field.
- On belt printers the Preview markers stayed in the raw G-code frame
  while the upright view draws the toolpaths back-transformed. The
  masses now get the toolpaths' transform. It shears, so the second
  moments are kept as a full 3x3 matrix to keep the moments of
  inertia right, and the bounding box rows are left out for a map
  that mixes the axes, where the box of the mapped corners would be
  far too large.
- At the top layer of the slider the solid marker of what is printed
  so far covered the faded finished-print one, which could not be
  clicked. At the top layer only the finished print's markers show,
  drawn solid.
- The section view cuts a marker away when its center is on the cut
  side, as it does the toolpaths' option markers.

* Keep the belt bounding box and store six second moments

- Belt prints keep the bounding box rows in the details. The G-code
  back-transform moves from GCodeViewer into
  BeltTransformPipeline::build_gcode_back_transform(), and on a belt
  print the processor keeps a second box per mass, of each segment's
  ends and bead height mapped by its linear part. ObjectMass::transform()
  moves that box by the translation, instead of dropping the box that
  the shear would blow up.
- A mass stores its second moments as the diagonal and the three cross
  terms instead of a full matrix, which is built only to transform it.
2026-10-28 08:04:52 -03:00
SoftFever c7fc22288e Fix Windows startup failure on an OrcaSlicer.conf without a trailing newline 2026-10-28 18:00:29 +08:00
Lam Wei Lun aa3291b380 Publish per-extruder process settings in the Publish 3MF dialog (#16971)
* Publish per-extruder process settings in the Publish 3MF dialog

Process settings that differ per extruder (speeds, accelerations, jerk,
top surface flow ratio) were published as one row showing extruder 1 and
exported as the whole vector, so the dialog could not select an extruder's
value and checking the row shipped every extruder's value.

- Dialog: one tab per extruder, as in the Printer section. On a
  multi-extruder printer the tabs sit behind a MultiSwitchButton below the
  page tabs; each row is keyed "key#N" and reads the uncompacted config.
  Pre-check follows each row's own key. Single-extruder printers get one
  "Extruder" page tab.
- Export: "key#N" process keys are masked to the checked slot, as printer
  keys already are.
- Import: the file carries the author's print extruder layout. Process keys
  map by extruder number and nozzle type on multi-extruder receivers.
  Single-extruder receivers keep the positional import. Files without the
  layout keep the positional import.
- Reopening a file without the layout: its "key#N" process entries select
  that setting on every extruder, so re-publishing keeps the values it had.
- MultiSwitchButton gains Unselect(), which clears the selection without
  an event.

* Fixes clang-tidy

* Fix per-extruder masking test to use the nullable outer_wall_speed type

outer_wall_speed is ConfigOptionFloatsNullable, so the ConfigOptionFloats
casts in the test returned null and the test segfaulted.
2026-10-28 15:55:22 +08:00
Ian ChuaandLam Wei Lun 3a0517831f fix: warn on preset save when plugin not found (#16929)
* fix: warn on preset save when plugin not found

* refactor: build the unsaved-changes save config in one place

* Fixes clang-tidy

---------

Co-authored-by: Lam Wei Lun <weilun.lam@gmail.com>
2026-10-28 13:02:05 +08:00
Gazi Faysal Jubayer 3322f6101c Set the Snapmaker U1's printer structure to CoreXY (#16914)
The U1 profiles never set printer_structure, so every U1 preset showed Undefined. Set it to corexy on fdm_U1, the base all five U1 nozzle presets inherit, and bump the Snapmaker bundle version to 02.04.00.20.

Slicing output is unchanged: the code only branches on i3, so CoreXY and Undefined take the same paths.

Fixes #16413
2026-10-27 21:15:47 -05:00
yw4z e410cf3656 Fix crash at exit from the preset sync thread (#16948)
The preset sync thread pushed bundle notifications to the notification manager directly from the thread. At exit the Plater is destroyed before OnExit() joins the thread, so a pass still running could crash in push_notification_data().

The notifications are now pushed on the GUI thread with CallAfter() and dropped once the app is closing or the sync is stopped. The bundle loop also returns as soon as the sync is stopped, so the thread exits quickly and does not delete the subscribed bundles it did not reach.
2026-10-27 21:01:03 -05:00
Fernando Marino` 5897d95d4d Fix filament slot editor desync across multi-material presets (#15896)
On printers where a filament slot's edit button opens the editor directly (IDEX, toolchanger, multi-extruder), cancelling the unsaved-changes dialog wrote the preset still open in the editor into the clicked slot.

- `switch_to_tab()` now compares the slot's assigned preset with the one open in the editor to decide whether to reload.
- The edit button sets `editing_filament` only after `switch_to_tab()` succeeds, as `Sidebar::edit_filament()` does.
- `UnsavedChangesDialog::build()` checks the `find_preset()` result for null.

Fixes #15767
2026-10-27 21:00:02 -05:00
Lam Wei Lun 97e6c71793 Fix Publish 3MF showing Undefined for extra printer extruders (#16940)
* Fix Publish 3MF printer extruder values showing Undefined

The Publish dialog indexed printer per-extruder rows by variant column
but read them from full_config(), which compacts those vectors to one
slot per extruder. Read the Printer rows from full_config(false) instead.

Inherited printer per-variant vectors also kept the root's length, so a
printer with more variants than its root had no value for the extra
variants. Pad them to the printer's variant count after inheritance.

* Map published printer keys to the receiver's extruder with the same number

A published printer key used to land on the receiver's slot with the
same index, so the author's layout decided the target. Files now carry
the author's printer_extruder_id and printer_extruder_variant. On import,
each key goes to the receiver's extruder with the author's number, when
that extruder currently runs the author's nozzle type. Anything else is
left unapplied and reported. Files without the layout keep the positional
import.

* Fix clang-tidy
2026-10-28 08:42:10 +08:00
TheLegendTubaGuyandIan Bassi 9c3b0a86e1 Fix realistic view shadows for by-object prints and the section view (#16942)
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
2026-10-27 20:54:58 -03:00
Ian Bassi e105d3c587 Fix support painting overhang highlight missing faces at the threshold angle (#16957) 2026-10-27 20:52:32 -03:00
Clifford 59aa101ea6 Check mixed filaments against their component filaments' extruders (#16947)
A mixed filament prints with its component filaments, each on its own extruder, but the placement checks resolved it as a filament of its own. On non-Bambu multi-tool printers this could block an object because an extruder that prints none of the components can't reach it, or allow it when a component's extruder can't.

Mixed filaments are now expanded to their components before extruder resolution in the printable area check (GUI and CLI), arrange and the exclusion volume preview, Print::validate(), and brim and support exclusion clipping.

Fixes #16945
2026-10-27 18:33:28 -05:00
Eminyandyw4z 3936995b6e Update Turkish translations (#16943)
* Update Turkish translations

* Match option names to the existing Turkish labels

* Drop the AI Translated comments from the reviewed Turkish entries

---------

Co-authored-by: yw4z <ywsyildiz@gmail.com>
2026-10-28 01:34:52 +03:00
Grzegorz Libiszewski 6d2869c430 Allow network upload of manual multi-material prints to Flashforge printers without IFS (#15547)
Uploading a multi-filament plate to a Flashforge printer failed with "Enable IFS" even when the printer has no IFS and the profile uses Manual Filament Change. The upload dialog now skips the IFS requirement when Manual Filament Change is on, and starts with IFS unchecked in that case on printers that have one.

Fixes #15307
2026-10-27 15:28:44 -05:00
foXaCe 9f39b8347f Fix Qidi exported filename showing slot-1 material instead of the printed one (#16922)
fdm_process_qidi_x3_common used {filament_type[0]} in filename_format, so files were named after the material in filament slot 1. Use {filament_type[initial_tool]} like the other Qidi process presets, and bump the Qidi profile version to 02.04.00.20.
2026-10-27 14:20:07 -05:00
Clifford b7ecf1b295 Fix false "G-code path exceeds the printable range" when an extruder area is inset on several sides (#16931)
The post-slice check compared each path with the bounding box of the region its nozzle can't reach. When the nozzle's printable area is inset on two or more sides, that region is L-, U- or frame-shaped and its box covers the whole bed, so every slice failed. The check now tests the path's box against the region itself, and the same result sets limit_filament_maps.

Fixes #15746
2026-10-27 14:16:48 -05:00
Downtime 731a08d1c6 fix(gui): improve code -1 connection failure guidance (#16273)
When the Bambu network plugin reports a failed LAN connection with code -1, the dialog now lists three things to check under the existing error line. They cover the network and IP address, the network plug-in version in Preferences, and a missing or damaged certificate in printer.cer.

The error line keeps its existing msgid, and each hint is its own translatable sentence.
2026-10-27 13:58:44 -05:00
Kuzuri a30ca5e54a By object: print tall objects later when the list order would collide (#14987)
When the object list order fails the height-to-rod check, look for an order that passes. Each object taller than the rod height prints after every object it overlaps in Y, keeping the list order where possible. A list order that already passes is kept as it is.

When an object has to print later than its place in the object list, a warning names it and links to it. If no order works, the "too tall" error is still reported.

Adds tests in test_print.cpp for both cases.
2026-10-27 13:53:40 -05:00
SoftFever e4e00e9746 Fix macOS notarization stapling failing on GitHub-hosted runners (#16939)
Since mid-October, `xcrun stapler staple` on GitHub-hosted macOS runners loses its connection to Apple's ticket service (-1005, Error 68) after notarization is accepted, and all three retries fail. The stapler fetches the ticket over HTTP/3 on UDP 443, which the hosted runners drop (actions/runner-images#14924). A new step blocks outbound UDP 443 before signing, so the stapler uses TCP. It is skipped on self-hosted runners, where the firewall rule would outlive the job.
2026-10-27 13:36:20 -05:00
Eric Lin 7125a546b8 Fix Slice sometimes needing a second click (#15180)
The GUI re-applies the unchanged config after every slice. filament_map, filament_volume_map and filament_nozzle_map are adopted from the new config but were left in full_config_diff, because the erase was commented out. That invalidated psGCodeExport on every reapply, so the slice that had just finished was thrown away. Erase them from full_config_diff too, including filament_nozzle_map in manual map mode.
2026-10-27 10:53:44 -05:00
TheLegendTubaGuy b6ca378b23 Apply the print dialog's Box mapping on Qidi printers (#16723)
With printer agents on, the Qidi agent now uses the Box slot picked for each filament in the print dialog. After the upload it writes `SAVE_VARIABLE VARIABLE=value_t<n> VALUE="'slot<m>'"` for each mapped filament, which the firmware's T<n> macros read. Then it starts the print through `/printer/print/start`, because the Max 4, Q2, Q2C and Plus 5 only open prints from the copy that Moonraker's print start makes.

- `MoonrakerPrinterAgent::start_local_print` now ends with a virtual `print_uploaded_file()`. The default still sends `SDCARD_PRINT_FILE`, so other Moonraker agents are unchanged.
- Box units show as "Qidi Box 1", "Qidi Box 2". Agents can set an optional `display_name` on an AMS unit.
- New agent flag `native_device_tab`. Qidi sets it to false, so its native Device and Calibration tabs are hidden and the web page becomes the Device tab.
- The Moonraker agent retries its first connection with the status stream's backoff. A disconnect, a newer connection or closing the app stops the retries.
- The print dialog fetches filament data itself for agents that only send it when asked, so the slot picker shows the Box units without a sidebar sync.
- Agent printers show their address in the print dialog's printer list instead of "(LAN)". Bambu printers keep "(LAN)".
- A single nozzle whose size the printer hasn't reported shows no size instead of "Unknown".
2026-10-27 10:47:06 -05:00
Eldenroot af16875afb ENH: Configurable shortcuts to switch between the main tabs including tab switching (#16301)
Adds unbound shortcuts to jump to Prepare, Preview, Device and Project, and Ctrl+Tab / Ctrl+Shift+Tab to cycle through the tabs. Cycling wraps around, skips tabs that refuse the switch, and moves focus to the tab bar on web pages so the next key press still works.
2026-10-27 10:10:20 -05:00
SoftFever 65aab6bcf7 Stop preset cloud deletes from retrying forever (#16928)
# Description

Deleting a custom printer preset queued every compatible system filament
for a cloud delete. These ids can never name a cloud profile, so
OrcaSlicer resent each one about once a minute for as long as it ran.
Deletes for profiles the signed-in account doesn't have were also resent
forever, even across restarts. After an account switch, a pending delete
could go out with the other account's token.

With this change:
- Only the user's own presets are queued.
- A delete is finished once the server confirms the profile is gone or
there was nothing to delete.
- Network failures are no longer mistaken for "not found".
- Other failures wait longer between attempts, up to an hour.
- A delete is only ever sent with its own account's token.
- A delete still pending when OrcaSlicer quits is sent at the next
start. That includes a custom printer's, which were missed before.

Deleting a custom printer also deleted every user filament and process
preset that worked with it, including presets with no printer
restriction that other printers use. It now deletes only the presets
made for that printer alone, and the confirmation dialog counts exactly
those.
- **Inherited presets stay.** A preset made for the printer is kept if a
kept preset inherits from it, so the kept preset still loads.
- **Copies of bundle presets count as the printer's own.** Presets
copied from a bundle's when the printer was created are treated like the
printer's other presets.

Saving another preset's settings over an existing synced preset deleted
that preset's cloud profile right after uploading the replacement. Other
devices then dropped the preset until the saving device restarted. The
replacement now takes over the profile and updates it. When the update
gives a preset with no parent a parent, or takes it away, other devices
move the preset's file instead of keeping a second copy.

Subscription polls downloaded the whole subscription list every minute,
although the gateway can answer 304 Not Modified when it hasn't changed.
Each poll now asks whether the list the signed-in account received last
is still current, and reuses it when it is. One account's list is never
reused for another, or kept after signing out.

There is no change to slicing.

# Screenshots/Recordings/Graphs

<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->

## Tests

**Built:** macOS arm64 Release, with the app and the test suite.

**New unit tests**, in `tests/slic3rutils/test_cloud_delete_queue.cpp`
and new cases in `test_orca_cloud_agent.cpp`:
- **What they cover:**
- ownership of each delete, and account switches, including one in the
middle of a request;
  - the retry waits;
- the scan for deletes left over from an earlier run, custom printers'
among them, and cleanup of their `.info` files.
- **How the agent cases run:** against a local HTTP server, with real
requests. They also cover a token refresh that switches the session to
another account during a retry.
- **Results:**
- All 19 queue test cases and all 29 cloud agent test cases pass, in
random order.
- Most of the new tests use code this PR adds, so they can't build
without it.

**New subscription tests**, in `test_orca_cloud_agent.cpp`, cover:
- a 304 answer reusing the list received last;
- a changed list replacing it;
- a list never being revalidated for another account, or after signing
out.

**New preset tests**, in
`tests/libslic3r/test_preset_bundle_loading.cpp`, check:
- which presets go with a deleted printer;
- that a preset a kept preset inherits from stays;
- that a preset copied from a bundle's for a new printer is the user's
own;
- that saving another preset over a synced preset keeps its cloud
profile, and leaves no `.info` that would turn into a delete;
- that a cloud update giving a root preset a parent leaves no copy of it
in `base`.

They and all `[Preset]` test cases pass in random order: 202 on macOS
and the 198 that build on Windows.

**Full `slic3rutils` suite, without the Python tests:** passes, except
`JPEG texture decoding coexists with thumbnails and video frames`. It
fails the same way on its own and doesn't touch this code.

**Full `libslic3r` suite:** passes, except two `[TextureImport]` cases
that decode JPEGs. They fail the same way on `main`.

**Run by hand on two machines**, macOS arm64 and Windows 11 arm64,
signed in to the same Orca Cloud account against api.orcaslicer.com.
Both machines ran `c34532ae`. Results:
- **Deleting a custom printer:**
- The printer had a filament and a process made for it alone. It also
had a filament made for it alone that an unrestricted filament inherits
from.
  - The dialog said "1 filament preset and 1 process preset".
  - Only the printer and those two presets were deleted.
- The filament inherited from was kept, and the filament inheriting from
it still loaded after a restart.
- A filament shared with another printer, an unrestricted filament and
the account's other user presets were kept.
- **Deleting the same printer on the second machine:** its profiles were
already gone from the cloud. Each delete got one 404 and finished
without a retry.
- **Deleting a custom printer while offline:**
- The deletes were retried after 1 and then 2 minutes, and the `.info`
files stayed.
- The app was then quit while offline, the network reconnected, and the
app started again.
- The deletes of the printer and its filament were sent at startup, and
their `.info` files were removed.
  - The printer was not brought back by the startup pull.
- On an earlier run, a filament deleted offline was retried after 1, 2
and 4 minutes, and the attempt after reconnecting succeeded.
- **`.info` files left by older builds, at startup:**
  - A system preset id sent no request.
- Profiles the cloud doesn't have, one of them a custom printer's, each
got one 404 and finished.
  - An entry owned by another account was never sent.
- **Deleting a filament from the Edit Filament dialog:** its delete was
sent and succeeded.
- **Saving another preset over a synced preset**, on `1e1f9dc2` and then
`dc2400b2`:
- Each save was on the Mac. It uploaded an update under the same id and
sent no delete.
  - Windows got the new settings at its next start.
- Two of the saves replaced a preset with no parent, and on the Mac its
file moved out of `base` with nothing left behind.
- On `1e1f9dc2`, Windows kept the old copy in `base` as well. On
`dc2400b2` it moved its copy the same way the Mac did.
- **Subscription polls:** every poll after the first got a 304 and
logged `(unchanged)`, including the first poll after the network came
back.

**Not run by hand: copying a bundle's presets for a new printer.** The
account has no subscribed bundles, so this is covered only by the unit
test.

**Not run: switching accounts.** This should be checked by hand with two
accounts before merging:
1. As account A, go offline and delete a synced user preset.
   - Expected: the delete fails and its `.info` file stays.
2. Sign in as B and go back online.
   - Expected: nothing of A's is sent.
3. Sign back in as A.
- Expected: the delete is sent with A's token and the `.info` is
removed.

<!--
> A guide for users on how to download the artifacts from this PR.
-->

[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
2026-10-27 22:29:55 +08:00
Ioannis Giannakas 176b1dc63d Fix Arachne wall order at pinched holes and next to one wall on top (#16894)
* Arachne wall order pinch and top band

* Cover Inner/Outer and Outer/Inner in the one wall on top order test
2026-10-27 14:08:09 +00:00
SoftFever dc2400b235 Remove a preset's old copy when a cloud update moves its file 2026-10-27 22:05:41 +08:00
SoftFever 1e1f9dc27a Keep a preset's cloud profile when saving another preset over it 2026-10-27 21:52:44 +08:00
TheLegendTubaGuy 4c7928d8aa Fix the prime tower being decided from the previous model's filaments (#16326)
The late normalize_fdm_2 pass in Print::apply counted filaments before the regions were rebuilt, and it could only turn options off. After a filament change, the first slice had no prime tower, and export sliced again with one.

The late pass now runs after the region rebuild, on a copy of the config from before normalization. It can turn the tower on as well as off, and it re-slices the objects when it changes the tower. PartPlate::load_gcode_from_file no longer applies twice.

Fixes #15991
2026-10-27 08:34:40 -05:00
Clifford c7bc1b27a5 Fix extruder printable area placement checks for non-BBL multi-nozzle printers (#14140)
Non-Bambu printers do not regroup filaments, but the placement check
before slicing treated them as if they did. In auto map mode it only
flagged a filament that fits on no extruder, so an object outside its
own extruder's printable area got no warning until slicing failed.

On these printers the check now uses the filament map from
get_effective_exclusion_filament_maps(), the same map the
exclusion-volume check and arrange use. A conflict on a third or later
extruder now shows a generic message. Before, it blocked slicing with
no message. The "Click here to regroup" link is hidden on non-Bambu
printers.

Fixes #14070
2026-10-27 08:17:33 -05:00
HanifKoh be4eff43f4 Fail the Profile Checks When a Changed Bundle Keeps Its Version (#16923)
The app installs a bundled profile set only when its version is newer than
the installed one, and the OTA profile update is named after the version, so
a vendor bundle merged without a bump in its <Vendor>.json never reaches a
user. Nothing checked that: two recent OrcaFilamentLibrary additions and a
Qidi printer model merged with their version unchanged.

Add a version-check command to orca_profile_tool.py that diffs two revisions
(or the working tree against the commit it left main at), groups the changed
files by vendor bundle, and fails unless every changed bundle's version is
newer than before and written as four numbers. The fourth component folds
into the third as the app reads it, so 02.04.00.100 is not newer than
02.04.01.00. A bundle the base does not have, blacklist.json and the user
preset directory are not judged.

Run it as the version_bump check in the Check profiles workflow against the
branch a PR merges into, and in check_profile.sh and check_profile.ps1,
which take --base / -Base to compare with another ref and skip the check for
a --profiles tree outside a git checkout.
2026-10-27 21:10:54 +08:00
HanifKoh a50b0a167b Bump the Version of Nine Vendor Bundles Changed Since Their Last Bump (#16924)
The app installs a bundled profile set only when its version is newer than
the installed one. These bundles changed on main after their version was
last raised, so users who already had them never received the change:

  Qidi           02.04.00.18 -> 02.04.00.19  X-Smart 5 added
  Elegoo         02.04.00.11 -> 02.04.00.13  reverted below the 02.04.00.12
  OrcaArena      02.04.00.07 -> 02.04.00.09  and 02.04.00.08 nightlies shipped
  M3D            02.04.00.05 -> 02.04.00.06  cover images and bed textures
  Meltingplot    02.04.00.01 -> 02.04.00.02
  Pragostroj     01.00.01.00 -> 01.00.01.01
  RH3D           02.04.00.05 -> 02.04.00.06
  WonderMaker    02.04.00.04 -> 02.04.00.05
  Wanhao France  02.04.00.06 -> 02.04.00.07  fdm_machine_common.json fix

Elegoo and OrcaArena skip a number because the version the revert went back
to is below what nightlies from 2026-09-29 to 2026-10-08 installed.
2026-10-27 21:10:36 +08:00
SoftFever c34532aefa Recover pending custom-printer deletes and keep parents of kept presets
Presets cloned from a bundle's for a new printer are the user's own, and every
cloud delete now passes the same check that the preset is the user's synced one.
2026-10-27 20:46:21 +08:00
SoftFever 474980a51b Revalidate the subscription list instead of downloading it on every poll 2026-10-27 18:53:55 +08:00
SoftFever c313f3328b Keep shared user presets when deleting a custom printer 2026-10-27 18:35:10 +08:00
SoftFever f5b6d95cae Include the headers clang-tidy asks for in CloudDeleteQueue 2026-10-27 18:34:58 +08:00