Commit Graph

30084 Commits

Author SHA1 Message Date
ExPikaPaka
1f35b28a50 Serealize all value fields for Preset class to minimize regression later 2026-08-05 21:14:56 +08:00
ExPikaPaka
68e7810c73 Update check for stale cache 2026-08-05 21:14:56 +08:00
ExPikaPaka
2ac64f7171 Revert json cache back 2026-08-05 21:14:56 +08:00
ExPikaPaka
c0cfcbbc64 Fix build for windows arm64 2026-08-05 21:14:55 +08:00
ExPikaPaka
3c6d104c71 Remove leftover cache file 2026-08-05 21:14:55 +08:00
ExPikaPaka
d85b555748 Skip invalid vendors 2026-08-05 21:14:55 +08:00
ExPikaPaka
ff92efa91f Remove BOM added by VSC 2026-08-05 21:14:55 +08:00
ExPikaPaka
89b66daeca Use get_vendor_cache_key() to match cache keys written by the app 2026-08-05 21:14:55 +08:00
ExPikaPaka
1f29ef3adc Fix use-after-free in CallAfter lambda; replace raw thread pointer with unique_ptr 2026-08-05 21:14:55 +08:00
ExPikaPaka
fe216a4ded Remove CachedPrinterModel/VendorProfile/Preset mirror structs from VendorCache 2026-08-05 21:14:55 +08:00
ExPikaPaka
8ea0b121e7 Add cereal serialize() to VendorProfile, PrinterModel, Preset, and Semver 2026-08-05 21:14:55 +08:00
ExPikaPaka
1d19e39625 Simplify code a bit more 2026-08-05 21:14:55 +08:00
ExPikaPaka
273d325066 Simplify code by mergin it in PresetBundle 2026-08-05 21:14:55 +08:00
ExPikaPaka
5ad7a3eb5d Generate cache per vendor 2026-08-05 21:14:55 +08:00
ExPikaPaka
c12e348ce3 Add inspecting tool and fix CI cache generation 2026-08-05 21:14:55 +08:00
ExPikaPaka
b34923fc7c Add cache to GuideDialog as previos version didn't work as expected 2026-08-05 21:14:55 +08:00
ExPikaPaka
a1eba4b2c8 Handle corrupted files 2026-08-05 21:14:55 +08:00
ExPikaPaka
6b45fa2c97 Add partial cache generation when only one of the vendros is changed to speed up recalculation time 2026-08-05 21:14:55 +08:00
ExPikaPaka
6b3e4f18e1 Add CI\CD step to prepare cache file in ahead of time so user does not need to wait 2026-08-05 21:14:55 +08:00
ExPikaPaka
25b1577c45 Integrate caching into WebGuideDialog which speeds up time of SetupWizzard and PrinterSelection dialog 2026-08-05 21:13:48 +08:00
ExPikaPaka
69c1f6880c Removing user\bundle serialization and keeping it only for system presets 2026-08-05 21:13:48 +08:00
ExPikaPaka
86bedc1e37 Add caching system for presets 2026-08-05 21:13:48 +08:00
SoftFever
a10d9e77cf Make the wipe tower's planner flush and dwell work on Klipper (#15133)
# Description

On Klipper the wipe tower's motion-queue synchronization silently did
nothing. Klipper acts on commands the moment it parses them, and its
`G4` reads only `P` in milliseconds — it ignores `S` — so the `G4 S0`
the tower used to flush the queue before a temperature change never
synchronized anything, and the cooling delay after a filament's cooling
moves passed instantly instead of waiting. The tower now emits `M400`
for the flush and `G4 P<ms>` for the dwell when the flavor is Klipper.

Only `gcode_flavor = klipper` is affected; G-code for every other flavor
is byte-identical, so no shipped profile or existing project file
changes.

# Screenshots/Recordings/Graphs

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

## Tests

<!--
> Please describe the tests that you have conducted to verify the
changes made in this PR.
-->

<!--
> 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-08-05 18:21:05 +08:00
SoftFever
1d023216f2 clean up 2026-08-05 18:09:36 +08:00
SoftFever
dc2796209f feat: printer agent UI (#15111)
# Description

Changes the device tab to render native wxWidgets UI and route the UI
via printer agents.

When the flag introduced in #15110 is enabled, the tab bar will show
both the native wxWidgets device tab and webview tab under the name
device (legacy)

This is a prerequisite for implementing the printer agent workflow.

<img width="3377" height="1378" alt="image"
src="https://github.com/user-attachments/assets/d72b646b-e6c6-4e10-b5d4-fc989debfca8"
/>
<img width="3377" height="1378" alt="image"
src="https://github.com/user-attachments/assets/2356c0f8-bffe-4cd5-bf4d-31f4b5c7706e"
/>

<!--
> 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-08-05 17:25:23 +08:00
SoftFever
194ef34080 Wait in the wipe tower with a millisecond dwell on Klipper
The wipe tower's "Delay after unloading" never happened on Klipper. It was
emitted as G4 S<seconds>, and Klipper's G4 reads only the P parameter, in
milliseconds, so the pause was silently skipped. The option now produces a
dwell Klipper actually performs.

Also corrects the planner flush rationale, which cited an extruder position
reset that Klipper resolves at parse time and does not need synchronized, and
adds end-to-end coverage that slices a two-filament print and checks the
emitted wipe tower G-code on both a Klipper and a non-Klipper flavor.

No change to any other firmware flavor's output, and no shipped profile sets a
non-zero delay, so no shipped profile's output moves either.
2026-08-05 17:15:35 +08:00
SoftFever
4e1caa39eb Flush the wipe tower planner queue with M400 on Klipper
The wipe tower emitted G4 S0 to make the firmware finish its queued moves
before commands that must not take effect early. Klipper's G4 reads only the
P parameter, so that flush never happened there and a temperature change could
land seconds ahead of the moves it was meant to follow. Klipper now gets M400
instead, through one helper shared by both wipe tower implementations.

No change to any other firmware flavor's output, so no shipped profile or saved
project is affected.
2026-08-05 17:15:35 +08:00
Ian Chua
38f5c84e7f fix: regression error 2026-08-05 16:20:58 +08:00
Ian Chua
4d8ce0e8a7 Merge branch 'main' into feat/printer-agent-ui 2026-08-05 13:40:20 +08:00
Ian Chua
38cb1ae8d1 Add developer flag for printer agents (#15110) 2026-08-05 13:40:05 +08:00
Ian Chua
32f82b64e7 fix: enable both device tabs 2026-08-05 13:07:32 +08:00
Ian Chua
e56d7aeb80 Merge branch 'feat/printer-agent-ui' of https://github.com/OrcaSlicer/OrcaSlicer into feat/printer-agent-ui 2026-08-05 13:07:08 +08:00
Ian Chua
4758dc6c68 Merge branch 'main' into feat/printer-agent-ui 2026-08-05 13:06:47 +08:00
Ian Chua
596cbb8b2d Keep printer-agent error codes available to UI workflow 2026-08-05 11:39:37 +08:00
SoftFever
6312caaf13 Add filament_retract_length_toolchange/filament_retract_restart_extra_toolchange config and update tool changer printer's profiles (#15039)
* update snapmaker profiles. largely ported for Snapmaker Orca fork

* update prime volume

* set precise_outer_wall to 1

* Update per-material multi-tool ramming to the filament library

* Add per-filament overrides for toolchange retraction

* Set toolchange retraction per filament for Snapmaker U1

* set default support type to tree

* format snapmaker profiles
2026-08-05 00:13:27 +08:00
SoftFever
0051768206 Smooth out the spiral lift when arc fitting is disabled (#15118)
The linear approximation used a heuristic segment count clamped to 4..16, so the
lift ran as a coarse polygon. Every vertex is a direction change large enough to
hit the firmware's jerk limit, forcing a decelerate/accelerate at each corner —
the lift micro-stutters instead of running at speed. The segment count now comes
from the chord deviation against the slicing resolution, reusing
Geometry::ArcWelder::arc_discretization_steps, which keeps the turn at each
vertex shallow enough for the firmware to carry speed through the whole move.

Points are emitted through GCodeG1Formatter so they carry the same quantization
as the rest of the G-code, and the move comment now trails the feedrate line to
match _travel_to_z and the G2/G3 branch. No change when arc fitting is enabled.
2026-08-05 00:09:46 +08:00
Ian Bassi
1d078e005a Mouse ear Wiki redirect (#15115)
Based in https://github.com/OrcaSlicer/OrcaSlicer/pull/15015 and https://github.com/OrcaSlicer/OrcaSlicer_WIKI/pull/323
2026-08-04 11:37:05 -03:00
Kris Austin
82759d3899 fix: make the error dialog caret point at the character it's blaming (#14886)
* fix: make the error dialog caret point at the character it's blaming

Custom G-code parse errors print the offending line with a '^' under the
character that broke, positioned with spaces so it only lines up in a
fixed-width font. Since v2.3.2 these dialogs rendered entirely in the
proportional UI font, so the caret drifted left of its column and landed
on unrelated text.

Render only the code excerpts (the offending source line and its caret) in
the fixed-width face, leaving the surrounding prose in the UI font, and
reserve the horizontal scrollbar's height so a long line does not clip.
Rename the flag to has_code_excerpts to match what it now means.

Fixes #14869

* refactor(GUI): use <code> instead of <tt> for error excerpts

wxHTML maps <tt>, <code>, <kbd> and <samp> to the same fixed-width
handler, so this renders identically. <code> is the non-deprecated
tag and matches what the original code used.

* fix(GUI): align the error caret with real spaces, not &nbsp;

The caret line was padded with &nbsp; so its spaces would survive inline
HTML. wxHTML measures every glyph by its font extent, so where the fixed
font lacks a U+00A0 glyph the fallback renders it about twice as wide, and
the all-&nbsp; caret line outran the source, drifting the ^ to the right.

Wrap the excerpts in a small <excerpt> tag, registered on the dialog's own
parser, that switches on wxHTML literal-whitespace mode so the caret uses
real spaces that match the source column in any font. It sits inside <code>
for the fixed face; <pre> would do both but forces a blank line above it.

---------

Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
2026-08-04 22:01:45 +08:00
Ian Bassi
59155f26ac Build Arch Fix (#15107)
Arch Fix
2026-08-04 21:56:15 +08:00
Ian Chua
79dcace1ac Add unsupported-command feedback to the device UI 2026-08-04 21:26:50 +08:00
Andrew
8dfc7a14b9 Gate agent mode behind use_printer_agents toggle
Replace per-printer auto-activation
(is_current_printer_agent_plugin)
with a global experimental AppConfig
toggle, default off: legacy
print-host behavior is unchanged
until the user opts in. The toggle
drives device-tab routing, print
button defaults, connect-button
visibility and sidebar layout, and
dedups machine-select dialog opens.
2026-08-04 18:12:11 +08:00
Andrew
1534268183 Reset device selection on agent swap or unload (#124)
set_live_printer_agent centralizes
the swap: deselect the machine,
clear stale sidebar state and the
previous agent's Other Devices, then
install the new agent (or null when
its provider vanished). Plugin
load/unload callbacks refresh the
dropdown and re-run agent selection.
load_last_machine no longer falls
back to the first available machine.
2026-08-04 18:12:11 +08:00
Andrew
501af81ba9 Replace fake-enum printer agent dropdown (#121)
A dedicated PrinterAgentChoice field
reads rows straight from the live
agent registry and stores the agent
id string, replacing the fake-coEnum
index mapping. The field moves to
TabPrinter and registers with the
searcher so UnsavedChanges renders
it; the PhysicalPrinterDialog copy
and its update hook are removed
(#125). switch_printer_agent now
resolves ids via
resolve_printer_agent_id.
2026-08-04 18:12:10 +08:00
Ian Chua
16c44940d2 Add developer flag for printer agents 2026-08-04 18:12:10 +08:00
yw4z
40eab797c6 match em_unit value for on_dpi_change for linux (#15043)
* Update GUI_Utils.hpp

* Update GUI_Utils.hpp
2026-08-04 08:45:31 +08:00
Kiss Lorand
ca7fbfb007 Fix missing overhang wall when no partial counterbore bridge is generated (#15100) 2026-08-03 18:02:48 -03:00
Mikhail f. Shiryaev
7b404596e9 Add Skip G-code config block to exclude the config comments from G-code files (#12455)
Add feature to skip CONFIG_BLOCK in G-code files
2026-08-03 15:10:01 -03:00
Kris Austin
06ef58bad8 test: replace the disabled convex_hull_2d test (#14892)
test(libslic3r): replace the disabled convex_hull_2d test, closing #11269

The last "failing libslic3r test" from #11269 was the disabled
SCENARIO("2D convex hull of sinking object", "[3mf][.]") in test_3mf.cpp.
It checked ModelObject::convex_hull_2d for a sinking object against
PrusaSlicer's reference hull, but Orca's convex_hull_2d does not clip
geometry below the bed the way PrusaSlicer's its_convex_hull_2d_above does,
so the reference never matched. The test also wrote a debug mesh to a
hardcoded /tmp path and its comparison loop was inverted.

Remove it and add tests/libslic3r/test_model.cpp characterizing
convex_hull_2d on non-sinking transforms (identity and scale+offset),
where the projected footprint is unambiguous. Homed in a Model test file
since it exercises ModelObject, not 3MF.
2026-08-03 22:29:00 +08:00
SoftFever
74c4a7e450 Support printer specific filament profiles in the OrcaFilamentLibrary (#15101)
* Support printer specific filament profiles in the Orca Filament Library
2026-08-03 22:25:50 +08:00
Noisyfox
dbb991bf07 Fix gizmo being closed after releasing mouse outside the gizmo floating window (#15095)
* Fix gizmo being closed after releasing mouse outside the gizmo floating window

The left up event of a drag started on the gizmo floating window (e.g.
selecting text in an input field) and released over the bed was treated
as a click on the plate, which deselected the objects and closed the
active gizmo. Add the ignore_left_up guard to the plate select branch,
matching the deselect branch above.

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

* Fix Emboss gizmo being closed after releasing mouse outside its floating window

The Emboss gizmo has its own close-on-click-away handler
(on_mouse_change_selection) that was not protected against left up events
originating from ImGui windows, so the gizmo was still closed when a drag
started on its floating window (e.g. selecting text in the input field)
ended over the 3D scene. Expose the canvas's ignore_left_up state to
gizmos and skip the close check for such releases.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-03 18:34:15 +08:00