Commit Graph
1087 Commits
Author SHA1 Message Date
SoftFever 1093ff0714 Let Slice and Print retry after a post-processing script or plugin fails (#17095) 2026-11-01 03:14:58 +08:00
HanifKoh c77020e654 Keep a Loaded Creality CFS Spool the Printer Cannot Name (#17034)
A K2 SE lists a loaded spool whose RFID tag the firmware does not know
with only its colour: vendor, type and name blank, state 2. The printer
shows the spool, but parse_cfs_response skipped every material with a
blank vendor and type regardless of state, so the sync dialog never
offered that slot. No firmware has been seen marking an empty slot that
way; empty slots carry state 0 and no colour.

Skip a non-zero state entry only when its colour is blank too. The slot
then shows in the sync dialog as an unread tray, like a Bambu tray with
an unknown spool: mapping it yields Generic PLA in the default colour.
The preset matcher returns no preset for an empty type instead of
scanning every preset for nothing.

The sync code for Moonraker printers assumes every tray either carries
a filament id or is a placeholder for an empty slot; an existing tray
with neither shifts the entries of the trays after it in an overwrite
sync. So a tray that resolved to no preset is published as a placeholder
as well: the overwrite sync keeps the project filament in that position,
as it does for an empty slot, and the tray stays visible in its colour.

Read the box and material fields through the null-safe JSON helpers the
K1 parser already uses, so a null or mistyped field reads as blank
instead of throwing out of the sync.

Tests: parse the reporter's boxsInfo payload and check that the unnamed
spool is listed, a truly blank entry is still skipped, a null field
reads as blank, and an empty type matches no preset; an overwrite sync
with such a placeholder between loaded slots keeps every slot's colour.
2026-11-01 03:14:28 +08:00
TheLegendTubaGuyandSoftFever 041df4031e Keep Short Objects on the Plate When Arranging By Object (#17011)
* Keep Short Objects on the Plate When Arranging By Object

Arranging objects shorter than the nozzle height for printing by object
placed them off the plate, and the plate then reported them too close to
each other (#16991).

- The arrange bed grew by half the extruder clearance radius, while short
  objects are only inflated by half the gap between them, so the extra bed
  was free to use. The bed now grows by the objects' actual inflation,
  after the bed margin is given back to the largest object.
- Arrange kept short objects 2 mm apart, but the sequential clearance
  check needs a nozzle diameter between them.
- Giving back the bed margin measures objects without that inflation,
  which only keeps objects apart, plus EPSILON so rounding still lets an
  object that fills the bed be placed.
- Exclusion regions are moved only when the bed grows, so short objects
  keep their gap to calibration regions on every side.

* Avoid objects at the bed edge and fit turned objects when arranging by object

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-11-01 02:35:55 +08:00
SoftFever 913c622574 Remember the last printer and keep AMS-synced filaments across restarts (#17086) 2026-11-01 00:26:17 +08:00
SoftFever 27cafaa06c Read nozzle diameters correctly when the UI language uses a decimal comma (#17079) 2026-10-31 20:35:45 +08:00
SoftFever 8e37d7d4b2 Match closer colours and the same filament sub-type in Convenience mode 2026-10-31 14:25:00 +08:00
SoftFever aa66e41e64 Group a filament onto the nozzle that has it loaded in Filament-Saving mode 2026-10-31 14:25:00 +08:00
Kris Austin 7ac46c9a61 Fix lightning infill hang when an overhang sample lands past the infill (#17066)
The lightning distance field samples each layer's overhang on a grid
anchored at the bounding box of the infill outlines. The opening it
applies to the overhang first can push a sample a little past that box.
Such a sample falls into its neighbor's grid cell or one update() never
visits, so it is never erased, and generateNewTrees() adds the same
point to the tree forever until memory runs out.

Grow the box to cover every sample. It only changes when a sample lies
outside it, and models that slice today give the same result.

Fixes #17051
2026-10-30 22:00:00 -05:00
SwineFlew931 9b4f84a923 Keep Each Extruder's Values on User Printers With More Extruders Than Their Parent (#16536)
A user printer preset with more extruders than its system parent lost the extra extruders' values on load. The parent copy is now grown to the child's extruder count before the child's values are merged, in all three load paths.

Fixes #16535
2026-10-30 21:58:08 -05:00
Arthur Portoandraistlin7447 fcd96ad91c Give each object the layer height limits of its own extruder, and compare layers rather than limits for the prime tower (#17000)
* Test the layer height limits taken for an object, and that they don't keep objects from sharing a prime tower

* Take the layer height limits from an object's own extruder, and don't let them refuse a prime tower

* Test the prime tower check through Print::validate(), and shorten the equal_layering comment

The test runs Print::validate() on two cubes, on filaments 1 and 3 of a printer whose first extruder allows thicker layers than the others. Without this PR, and with only the index fix, it fails with the refusal from #16938. It uses filament 3 because filament 2 read extruder 1's limits before the index fix.

---------

Co-authored-by: raistlin7447 <kris.austin@gmail.com>
2026-10-30 21:56:12 -05:00
Ian Bassi 304924a69a Fix infill and surface filaments overriding each other in Filament for features (#17058) 2026-10-30 18:38:40 -03:00
Gazi Faysal Jubayer 98b539c3e6 Use the printing filament's retraction lift settings (#16965)
On a single-extruder printer with several filaments, every filament used filament 1's "Only lift Z above", "Only lift Z below", "On surfaces" and "Travel distance threshold" values, so a filament's own overrides of these settings were ignored. All four are now read for the filament that is printing.

Fixes #16185
2026-10-30 14:16:22 -05:00
SoftFever abe28edbe7 Merge branch 'main' into fix/ams-sync-preset-override 2026-10-30 18:50:23 +08:00
SoftFever 23fe913936 Keep a slot's user preset when AMS sync reports the same filament 2026-10-30 18:48:37 +08:00
HanifKoh 9992b585b0 Name the Filament and the Line in the Adaptive Pressure Advance Model Warning (#17033)
The slice-time warning for an invalid Adaptive Pressure Advance model
only said that the model "for one or more extruders may contain invalid
values". It now names the filament and carries the validator's message,
which identifies the line, on a second line. The check no longer stops
at the first invalid model, so every filament with one gets its own
notification.
2026-10-30 13:31:51 +08:00
29e1899571 fix: fix no sparse layers during a toolchange (#15441)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
2026-10-29 18:06:26 -03:00
foXaCe f273fe8ac1 Add printing_filament_types placeholder for the output filename (#14706)
Adds the printing_filament_types placeholder. It lists the filament types that are actually printed on the plate, with duplicates removed, in filament order, joined with "_" (for example ABS_PLA). It works in the file name template and in custom G-code. Before slicing, the file name shows the placeholder unfilled, the same way print_time does.

Nothing changes for templates that don't use it.
2026-10-29 15:53:19 -05:00
Clifford 5ea64864ef Widen the post-slice extruder masks to 64 bits (#17002)
The post-slice check stored the extruders that can't print each filament as bits in an int. From the 32nd extruder on, the shift overflowed, and on x86 extruder 33's bit landed on extruder 1. limit_filament_maps and the printable area mask are now 64-bit, which covers MAXIMUM_EXTRUDER_NUMBER. Printers with up to 31 extruders get the same values as before.

The tests check the area, height and filament type limits on nozzles 2, 32, 33 and 64, and slice a cube on nozzle 64 of a 64-nozzle printer.
2026-10-29 15:50:57 -05:00
Clifford 7dcceeb9ee Compare the plate's IMEX cache key field by field (#17001)
On IMEX printers, each plate built a string cache key from a dozen
config lookups twice a frame, and resolved the active mode through
find_imex_mode(), which copies the whole mode, G-code included.

The key is now ImexLayoutKey in IMEXZones, compared field by field
against the live config and copied only when something changed. The
active mode's roster and Primary head are resolved only when the key
changes. The G-code preview's carriage marker key is built on the same
struct.

Clearances and the carriage margin are now compared exactly, so a
change under 0.1 mm rebuilds the zones.
2026-10-29 15:48:04 -05:00
Gazi Faysal Jubayer d28c71c485 Give enum list options in the print config defaults their keys map (#16966)
Enum list options in the static print config defaults had no keys map. A config copied from them, such as `DynamicPrintConfig::full_print_config()`, wrote these options as an empty string and crashed when a name was read into one. `StaticCache::finalize()` now sets `coEnums` defaults from `create_default_option()`, which adds the keys map. Option values are unchanged.

Fixes #16964
2026-10-29 08:35:13 -05:00
Kris Austin 59f0cc3806 fix: slicing crash on an object too thin for any layer with a raft (#17013)
With a raft, an object too thin for any layer gets an empty layer
list. Two functions read it as if it had an entry.

- groupingVolumesForBrim() reads the first layer, and slice() calls it
  before its own check for an empty list.
- With Precise Z height on, adjust_layer_series_to_align_object_height()
  read the last entry. This also runs in Print::validate(), so it
  crashed before slicing started.

Both functions now return early on an empty list, so slicing reaches
the existing "No layers were detected" error.

Fixes #17009
2026-10-29 07:05:05 -05:00
Kris AustinandDIEHARDave 187baae4ee fix: Print plate and Send to Moonraker printers upload a 3MF zip as G-code (#16968)
With "Use printer agents" on, Print plate and Send on Moonraker-based printer agents uploaded the plate's .gcode.3mf bundle under a .gcode name, so Klipper read a zip as G-code and cancelled the print.

Both paths now upload the plate's G-code from the bundle, named after the job. Printers whose profile sets use_3mf keep getting the bundle, named <job>.gcode.3mf, and the Qidi agent's print start names the plate with plateindex. The print start quotes the file name, so job names keep spaces, apostrophes and non-ASCII letters.

Picks up #16453 by DIEHARDave, who wrote the plate G-code extraction for Print plate.

Fixes #16954

Co-authored-by: DIEHARDave <diehard.dave@gmail.com>
2026-10-29 07:03:15 -05:00
Kris Austin 98619b64a2 Fix crash when transferring a post-processing script to another preset (#16963)
Transferring an unsaved post-processing script onto a preset with no scripts crashed Orca. apply_only called set_at() on the empty target list, and set_at() reads the list's first value. apply_only now gives an empty target list a first value, and an empty source list replaces the target list.

deep_diff now reports serialized lists (post-processing scripts and the flow compensation model) as one setting, through is_edited_as_whole_list(). Tab::options_list_storage_key uses the same check. The unsaved changes and Compare Presets dialogs show these lists the way the settings tab does.
2026-10-29 07:01:55 -05:00
HanifKoh 0e33e3239a Resolve a Renamed System Preset by Its Old Name in the CLI (#16735)
A project saved before a system preset was renamed names it by its old
name. The GUI finds the renamed preset through renamed_from and refreshes
the project's unlisted values from it; the CLI looked the name up exactly,
logged "No vendor lists the preset" and sliced with the stored values.

find_preset_vendor now matches renamed_from once no vendor lists the name
itself, from each preset's file or from the vendor's preset cache, and
the vendor bundle the CLI loads builds its rename map so find_preset()
returns the renamed preset.
2026-10-29 17:33:48 +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
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
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
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
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
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
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
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
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