Commit Graph
32878 Commits
Author SHA1 Message Date
SoftFever dc522e59e4 Start an opt-in MCP server with slicer, preset, action and screenshot tools 2026-10-28 19:43:09 +08:00
SoftFever 16c4ef8675 Add the MCP protocol, loopback transport and job core 2026-10-28 19:43:08 +08: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
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
SoftFever bec67ab2c7 Stop preset cloud deletes from retrying forever 2026-10-27 17:52:57 +08:00
HanifKoh e28af4e5f2 Bump the Orca Filament Library Version to 02.04.00.20 (#16919)
The School House Spools filaments from #16780 were added without a version bump, so datadirs that already hold 02.04.00.16 (the 2.5.0 alpha) never reinstall the library. Nightlies from the OTA test (#16017, #16151) shipped 02.04.00.17 to .19, so the bump skips past those too.
2026-10-27 13:48:41 +08:00
TheLegendTubaGuyandLam Wei Lun 70b0530c22 Keep the mouse pointer visible after closing a webview from the keyboard on Windows (#16880)
Keep the mouse pointer visible after closing a webview from the keyboard

WebView2 runtime 152+ hides the pointer while typing and only shows it
again on a mouse event inside the webview. Closing the Speed Dial with
Enter after typing left the pointer hidden over all of OrcaSlicer until
the dial was reopened (WebView2Feedback#5687, still open on 155).

Disable the runtime's HideCursorWhileTyping feature at startup on
Windows, before any webview is created, unless the user already set
WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS.

Fixes #16868

Co-authored-by: Lam Wei Lun <weilun.lam@gmail.com>
2026-10-27 13:42:16 +08:00
f92dc78be0 Check Moonraker Free Space Before Reporting Storage (#16903)
* Report storage on every Moonraker status push

MachineObject sets the storage state on every push, first from "sdcard"
and then from home_flag bits 8-9. The Moonraker agent sent neither, so
each push reset the state to NO_SDCARD and the send dialog blocked with
"Storage needs to be inserted before printing". Moonraker printers always
have storage (virtual_sdcard), so report it in both places.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Check Moonraker Free Space Before Reporting Storage

Report storage only when the gcodes root has free space, read from
disk_usage in /server/files/directory?path=gcodes, instead of always
reporting it. The status stream checks before the subscription and again
from the read loop every 30 s. A check that fails counts as no storage.

Move the Http::get boilerplate of the device info, status, object list
and storage queries into one get_json helper.

* Ask to Insert Storage or Free Up Space Before Printing

A printer agent now also reports no storage when its disk is full, so
the messages for that state say to free up space as well. The two
"before send(ing) to printer" variants share one string.

---------

Co-authored-by: dr-apple <15102858+dr-apple@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 13:27:04 +08:00
HanifKoh f7d23705ea Name the Tool When a Temperature Tower Steps the Nozzle Temperature (#16898)
The temperature tower re-targets the hotend at every layer with a bare
M104. Every other temperature command on a multi-tool printer names its
tool, and the firmware applies a tool-less M104 to whichever tool it
considers active, so a tower assigned to any tool but the first heated
the wrong nozzle. Pass the tool printing the tower, as the first-layer
M109 right before it already does.
2026-10-27 12:22:50 +08:00
packerlschupfer adea4e48a6 CLI: report configuration values that were substituted with defaults (#16305)
When a preset or a 3mf has an enum or bool value this build cannot parse, the config loader replaces it and records a substitution. The CLI only logged these at info level, which the default log level filters out. A preset with an invalid ironing_type therefore sliced with ironing off, printed nothing and exited 0.

Each substitution is now printed to stderr and added to result.json's warnings array with the class config_value_substituted. Exit codes are unchanged, and --strict does not escalate these warnings. test_cli_strict.sh has a new case for it.
2026-10-26 21:35:55 -05:00
packerlschupfer 35235d9a43 CLI: write result.json and --pipe progress even when a name is not valid UTF-8 (#16303)
nlohmann's dump() throws type_error.316 on a string that is not valid UTF-8. Object names come from file names, which on Linux can be any bytes. In record_exit_reson() the catch-all swallowed the throw, so no result.json was written. In cli_callback_mgr_t::notify() nothing caught it, so a --pipe run aborted.

Both calls now dump with error_handler_t::replace, which writes U+FFFD in place of the invalid bytes. Output for valid UTF-8 is unchanged.
2026-10-26 21:32:54 -05:00
Kiss Lorand ee6d195b0e Fix slicing validation for multipart objects outside the plate (#16564) 2026-10-26 18:57:25 -03:00
EldenrootandClaude Sonnet 5.5 63048e3858 ENH: Add a Select All button to the timelapse and model file lists of the printer storage (#16716)
* Add a Select All button to the printer's timelapse and model file lists

While files are being selected for batch download or deletion, one click now
selects every file of the list that is shown.

Ported from BambuStudio 2.5.0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GYra1zfuVBUu8unsTTXHVN

* Keep Select All visible and let it start the selection like BambuStudio

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GYra1zfuVBUu8unsTTXHVN

* Let the Select All button clear the selection once every file is selected

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GYra1zfuVBUu8unsTTXHVN

* Revert the Select All toggle: Cancel already clears the selection

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GYra1zfuVBUu8unsTTXHVN

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-26 23:34:37 +03:00
Error404JoyNotFound e52c735d1a Fix unindexed vector placeholders reading the wrong filament or extruder (#16211)
Unindexed vector placeholders like `{z_hop}` read `filament_map` as a 0-based index, so they used the wrong slot. Per-extruder options now use `filament_map - 1`, and options that filament overrides expand per filament (`filament_extruder_override_keys`) use the current filament.

Fixes #12804
2026-10-26 13:45:55 -05:00
yw4z 2801c679b1 Fix: Prevent saving profiles with non valid names (#15579)
Disable OK in the Save preset dialog while the name is invalid. Before, an invalid name such as an empty one could still be saved.

The Save preset and Physical Printer dialogs now share one name check, check_preset_name(). It adds three new checks: control characters, Windows reserved device names (CON, PRN, AUX, NUL, COM0-9, LPT0-9), and a length limit of 230 bytes and 150 UTF-16 units, so the save file fits within the Linux file name and Windows path limits.
2026-10-26 13:38:47 -05:00
Andrew Gribben 21d2856429 Size painted segmentation from the filament count, not the color palette (#15998)
multi_material_segmentation_by_painting sized its per-filament output from filament_colour, but apply_mm_segmentation reads one entry per filament_diameter. When the palette was shorter than the filament list, slicing an object painted with a filament that had no color read past the end and crashed. Size it from filament_diameter instead.

Adds a regression test that paints one side of a cube with filament 2 while filament_colour has one entry.
2026-10-26 13:36:37 -05:00
yw4zandcook0001 ab24043937 Make plate renames undoable and refresh G-code that uses {plate_name} (#16900)
Renaming a plate now creates an undo snapshot, so a rename is its own undo step and marks the project as modified. All four rename paths use the new `Plater::rename_plate()`.

When a G-code template uses `{plate_name}`, renaming a sliced plate invalidates only the G-code export step, so the next slice only re-exports the G-code. `filename_format` is excluded because the file name is built from the current plate name at export time.

The "Rename Plate" undo snapshot is from #16141.

Co-authored-by: cook0001 <79376116+cook0001@users.noreply.github.com>
2026-10-26 13:25:16 -05:00
RrrrobertB1992 e00f4b7008 Moonraker printer agents: report a color list for every slot (#16630)
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.
2026-10-26 13:16:15 -05:00
Ian Bassi 0ef9015904 Ask for the size of a primitive when adding it (#16848) 2026-10-26 15:01:47 -03:00
Lam Wei Lun 0b4e7e9e2a Handle Unreadable Bundled uv Path in Python Plugin Init (#16888)
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.
2026-10-27 00:28:53 +08:00