mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-03 18:27:59 -05:00
b1d8c5da60c76bec120b83bc64aa2391b083b8d1
439
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
bd3e9aeb96 |
fix: stop the Speed Dial dismissing itself on the first open (#17245)
* fix: stop the Speed Dial dismissing itself on the first open Opening the dial with Space and not touching anything closed it again a moment later, on GNOME and KDE, X11 and Wayland, and only on the first open. The dial hides on wxEVT_ACTIVATE(false), but wxGTK does not deliver that event to the window that lost the focus: gtk_frame_focus_out_callback sends it to g_activeFrame, the toplevel that was activated last (wx src/gtk/toplevel.cpp:192-205). A deactivation that belongs to another window, or the same one arriving while the dial is still taking the focus, therefore read as "the user dismissed the dial". The first open is the only one that maps the window, moves it, resizes it to its content and grabs focus into a web view that has never held it, so it is the only open exposed to that ordering. Validate the dismissal instead of trusting the event: arm a 150 ms one-shot, cancelled by any activation, and hide only if the dial is still shown and its window is no longer active. On GTK ask the window with gtk_window_is_active(), because wxTopLevelWindow::IsActive() resolves through wx focus tracking, which does not follow the focus that WebKit's native widget takes. Also skip the pre-map focus grab on the first open: at that point wxGTK has not mapped the window yet, so the grab cannot land. speed_dial_should_hide() is a free function, so the rule is covered by tests/slic3rutils/test_speed_dial_dismiss.cpp without a GUI. * docs(wxwidgets-skill): document the validated Speed Dial deactivation Section 10 described the dial's old handler, which hid on every wxEVT_ACTIVATE(false). The skill is the review ground truth, so it has to match the code: the deactivation is now validated after a settle interval against the window's real active state, because wxGTK sends that event to the last activated toplevel whatever window lost the focus. * Ignore Page Changes of Inner Books in the Main Tab Handler The main frame's tab-panel handler receives the page-changed event of any book inside a page, because wxBookCtrlEvent propagates and the Calibration page's Tabbook has no handler of its own. It then treated the inner page switch as a main tab change: it reset the selected tab, toggled the undo/redo buttons and called SetFocus() on the current page. On wxGTK, SetFocus() on a child of a visible but inactive top-level window presents that window. While the Calibration page is built in the background after start-up, this re-activated the main window and the Speed Dial, which hides when it loses the focus, closed by itself a moment after its first open on Linux. Only act on events whose object is the main tab panel. * Include wx/timer.h Where the Speed Dial Binds Its Timer * Describe the Real Cause of the Speed Dial's First-Open Close The deferred, re-checked hide absorbs a focus bounce shorter than its delay. It did not stop the first-open close, which was the main frame activating itself from its tab handler; say so in the comments, the test and the skill reference instead of describing a misdelivered deactivation. --------- Co-authored-by: Hanif Koh <hanifkoh@outlook.com> |
||
|
|
e2acd9ec06 |
Speed up startup by skipping repeated refreshes and building the UV editor on first use (#16930)
Startup to the main window is about 280 ms faster with 24 filaments and about 170 ms faster with 4 (Windows, Bambu H2S, median of 4 runs). - Filament lists are refreshed once per config change instead of once for each of `filament_colour`, `filament_type` and `filament_is_support`. - The UV editor pane is built the first time it is shown, through `Lazy<T>`, and keeps its saved dock position when it was not built in a session. - The SLA import dialog is built on first use, through `Lazy<T>`. - The sidebar and main window are no longer frozen while the window is hidden. - The filament combos are not filled before the main window is shown. The printer tab fills them once while presets load. - The object settings refresh is skipped until the main window is shown, when no object can be selected yet. |
||
|
|
fcab66ca9e | fix: revert native device tab flag (#17162) | ||
|
|
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
|
||
|
|
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. |
||
|
|
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". |
||
|
|
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. |
||
|
|
13a40b47a2 |
Fix MSVC-only lazy preset dialog build failure (#16899)
* Fix MSVC-only build failures after MainFrame forward declarations * Defer lazy preset dialog instantiation with unique_ptr * Include memory directly for std::make_unique |
||
|
|
2a6e7a199b |
Forward Declare GUI Panels in MainFrame.hpp (#16842)
* Forward Declare GUI Panels in MainFrame.hpp * Include wx/statline.h Directly Where wxStaticLine Is Used The Windows builds failed in AboutDialog.cpp because MainFrame.hpp no longer brings in wx/statline.h. * Include BBLTopbar.hpp Directly in GUI_App.cpp The Windows builds failed in GUI_App.cpp with member access into incomplete type BBLTopbar. |
||
|
|
00444ae4d7 |
Add 3Dconnexion Settings to the View Menu (#16345)
* Add 3Dconnexion Settings to the View Menu The 3Dconnexion settings overlay could only be opened with its keyboard shortcut. On macOS that is Cmd+Shift+M, because plain Cmd+M is the system Minimize shortcut, so users who pressed Cmd+M minimized the window and never found the dialog (#5484). Add a "3Dconnexion settings" check item to the View menu. It toggles the overlay and shows the shortcut bound to it, and its label follows the key if the user rebinds it. It is enabled only on Prepare and Preview when a device is connected (on Windows, also only with the legacy 3Dconnexion option enabled). Move that availability test into Mouse3DController::can_show_settings_dialog() so the menu item and the canvas shortcut share it. * Rename and move the 3Dconnexion Settings menu item Label it "Show 3Dconnexion Settings" to match the other View menu items, and move it below "Reset Window Layout" in its own separated group since it opens a settings window. --------- Co-authored-by: yw4z <ywsyildiz@gmail.com> |
||
|
|
14da40e3a7 |
End the Process if Closing OrcaSlicer Takes More Than 30 Seconds (#16766)
Last resort for code that never returns while the app closes, such as plugin code, vendor libraries or a lost network call. Once closing can no longer be vetoed, a watchdog thread waits 30 seconds, logs that the app did not finish closing and ends the process with std::_Exit. The app config is saved on idle and again in MainFrame::shutdown, so little is lost. |
||
|
|
3f8ff53e65 |
Keep keys away from the 3D view while ImGui has the keyboard (#16673)
The 3D view decided whether to run its shortcuts from ImGui's "wants the keyboard" flag, which is updated a frame late. The first key typed after clicking into a field could still reach the canvas. The canvas now leaves every key to ImGui while an ImGui text field is active, while a popup (dropdown, menu or modal) is open, or while a slider or button is held with the mouse. A focused sidebar text field works the same way. Global shortcuts still run unless they edit text. Every key still goes to ImGui. - ImGuiWrapper::claim_key_event() decides on the key-down. The key's repeats, char event and release follow that decision, so a key never both runs a shortcut and types. - Esc closes an open dropdown or menu before the gizmo. - Esc and Tab during a slider drag no longer close the gizmo or switch views. - text_input_active() reads ImGui's text input request, so a slider that once had a value typed into it no longer counts as a text field when dragged. - A modifier whose key-up went to a dialog no longer stays stuck. The canvas releases held modifiers when it loses the focus, and ImGui takes its modifiers from each mouse event. - The macOS Edit menu's key equivalents follow the same rule. |
||
|
|
f92f75e0fa |
Feat: Add multiple and 3D bed exclusion volumes (#13777)
# Description This PR adds opt-in, height-aware exclusion volumes to OrcaSlicer, including multi-nozzle handling, object and generated-geometry validation, final G-code collision checking, and travel rerouting. It grew from the original object-placement prototype into a collision-aware slicing pipeline with documented limitations. The central compatibility decision is that Orca's existing `bed_exclude_area` keeps its historical meaning, while the new `bed_exclude_volumes` setting explicitly enables the stronger collision-aware behavior. <img width="935" height="707" alt="Travel paths routed around exclusion volumes" src="https://github.com/user-attachments/assets/22925e5c-a3b1-4c26-be1a-8a89d9970cb5" /> Related issues: #5922, #10579, #10638 and #12774. ## Why this is useful The existing 2D exclusion area prevents object placement in areas such as the filament-cutter corner on Bambu printers. It cannot describe low bed clips, raised tool docks, camera arms, flying-gantry hardware, or other obstacles that occupy only part of the printer's Z range. Treating every existing area as a physical motion obstacle would also be unsafe for compatibility: some printers deliberately move into their excluded material area. This PR therefore separates the two concepts rather than changing the meaning of existing profiles. | Setting | Purpose | Existing motion affected? | | --- | --- | --- | | `bed_exclude_area` | Existing bed-fixed material/placement keep-out | No G-code checking or travel rerouting | | `bed_exclude_volumes` | Shared 3D collision volumes | Object/generated-material checks, G-code validation and travel rerouting | | `extruder_bed_exclude_volumes` | Per-extruder 3D collision volumes | Same collision behavior, resolved for the active physical nozzle | Bed areas and collision volumes are additive. A printer can retain an existing cutter/material keep-out while adding separate physical collision volumes. Belt printers retain the existing projection of bed areas onto the tilted belt surface; collision volumes remain in model coordinates. ## Configuration and syntax `bed_exclude_volumes` accepts one or more polygonal prisms: ```text XxY,XxY,... ``` defines a full-height collision volume. ```text REGION|REGION|REGION ``` defines multiple independent volumes. ```text ZMIN..ZMAX;XxY,XxY,... ``` defines a volume active only across that Z range. Either Z bound may be omitted: ```text ..10;20x20,40x20,40x40,20x40 30..;20x20,40x20,40x40,20x40 ``` For example: ```text 20x0,45x0,45x18,20x18|8..22;115x20,145x20,145x48,115x48 ``` defines one full-height volume and one volume active from Z=8 mm to Z=22 mm. Z ranges are validated and clamped against the configured printable height, and decimal parsing is locale-independent. The CLI exposes the same distinction: ```text --bed-exclude-area --bed-exclude-volumes ``` Existing scripts using `--bed-exclude-area` retain the original polygon format and behavior. ## Backward compatibility and migration - Existing profiles and projects using only `bed_exclude_area` keep its material/placement keep-out meaning; they do not implicitly enable collision-volume checking or travel rerouting. - Stock printer motion is not checked or rerouted against bed areas. This is important for machines that deliberately enter an excluded material area during cutting or loading. - The new syntax is stored under separate config keys, so an older Orca build does not try to deserialize a volumetric string as the existing point-list option. - In **Printer settings → Basic information → Printable space**, **Excluded bed area** remains a normal editable field with Orca's standard reset controls. **Toolhead collision volumes** is a separate field directly below it. There is no Convert/Copy button and neither setting clears the other. - A bed-area polygon can be manually copied into the collision-volume field to describe a full-height physical obstacle. Pasting volume syntax into the bed-area field instead prompts for confirmation before adding it to the appropriate volume definitions. The saved bed area, existing volumes and selected nozzle mode are preserved; cancelling leaves them unchanged. - If a user does not configure the new volume keys, the new G-code checker, rerouter, support trimming and nozzle-specific brim behavior remain inactive. This gives existing profiles a stable compatibility boundary while allowing users and maintainers to migrate deliberately to full collision checking over time. ## Multi-nozzle behavior For multi-nozzle printers, the collision-volume mode selects one of three behaviours. In individual mode, each extruder's definition is edited on its own Extruder settings page. These modes apply only to collision volumes; the excluded bed area stays shared and bed-fixed. Collision volumes support three modes: <img width="549" height="441" alt="Exclusion volume behavior selector" src="https://github.com/user-attachments/assets/6ca8c2e2-d00e-4b32-9b12-bfbff0928966" /> ### Shared Every physical nozzle uses the same collision-volume definition. <img width="2353" height="1633" alt="Shared exclusion volumes" src="https://github.com/user-attachments/assets/96fe938b-07b4-4cd9-b587-e31f2ebba5f8" /> ### Toolhead-relative (nozzle offsets) The shared definition is treated as relative to the toolhead. Orca derives the other nozzles' collision regions using their configured XY offset from the reference nozzle. This is useful where the same physical carriage must avoid an obstacle but its position changes when a different offset nozzle prints at the same model coordinate. <img width="1084" height="803" alt="Toolhead-relative exclusion volumes" src="https://github.com/user-attachments/assets/e0790ee4-68b5-444f-90ac-22a5eba05eec" /> ### Individual per extruder Each physical extruder/nozzle has its own independent volume definition. This supports machines whose valid region differs by tool and cannot be derived from a simple nozzle offset. <img width="1123" height="761" alt="Independent exclusion volumes for three extruders" src="https://github.com/user-attachments/assets/c6404ceb-9958-4df8-93ed-5ff2ac7dc658" /> Object validation resolves logical filament assignments to the physical nozzle or nozzles that may print the object, including automatic Bambu mapping. If an object may use several nozzles through painting, feature-level assignments, modifiers, support or interface material, the complete object is conservatively checked against every relevant nozzle's volumes. ## Object validation and 3D preview Object collision detection uses a cheap XY/Z broad phase followed by an exact mesh-versus-prism test. The exact test: - Avoids rejecting an object whose XY shadow overlaps a raised volume while its real mesh remains clear. - Detects normal surface crossings. - Detects a volume completely enclosed inside a solid model. - Respects object-instance and model-volume transforms. - Separates the collision decision from optional preview-mesh generation. When a collision is found, Orca reports the relevant extruder where possible and renders the intersecting model surface in red. The bed preview shows a neutral grey footprint, a thin nozzle-colored ownership border where appropriate, and a translucent 3D prism when a nearby object makes the volume relevant. Raised volumes keep their ownership outline on the bed rather than floating at their starting Z. <img width="578" height="534" alt="Red model and exclusion-volume intersection preview" src="https://github.com/user-attachments/assets/d409f574-1790-48e5-b4a3-703273439954" /> Single-nozzle/shared geometry remains visually neutral; nozzle colors are used when they convey distinct tool ownership. The default automatic preview limits the translucent 3D geometry to nearby object height to avoid obscuring the workspace. **View → Show all collision volumes** displays the complete configured Z ranges, including on an empty bed. Its default shortcut is **Ctrl+Shift+V** (**Command+Shift+V** on macOS), and it can be changed in the shortcut settings. Orca remembers this application-level display preference independently of printer presets; it does not change collision checks or slicing. ## Arrange and Fill Bed Arrange and Fill Bed receive Z-aware, nozzle-aware obstacles, so an object may occupy a footprint belonging only to another nozzle or pass below a raised volume when its height permits it. - Existing objects remain obstacles when Fill Bed creates new copies. - Convex volume footprints are passed through accurately. - Orca's current libnest2d path supports convex NFP obstacles only, so non-convex volumes use a documented conservative bounding box until convex decomposition is implemented. - Orca's existing final alignment and normal unplaced-item behavior are retained. <img width="1097" height="846" alt="Fill Bed with multiple tools and exclusion volumes" src="https://github.com/user-attachments/assets/8c0ee5cf-624b-42a6-b57a-13c73400ac5c" /> ## Brim and support generation When collision volumes are enabled, object and support brims are clipped against the relevant first-layer volume footprints before their final extrusion paths are generated. Brim ownership is retained so touching object and support brims cannot be merged and silently reassigned to a nozzle whose volume they intersect. Established bed-edge and bed-area brim clipping remains unchanged when collision volumes are not configured. <img width="1139" height="770" alt="Object and support brims clipped around nozzle-specific volumes" src="https://github.com/user-attachments/assets/2913ff31-53e4-4e43-8b27-1afba7e3bafb" /> Normal support and raft polygon categories are trimmed against the relevant volumes over each support layer's actual vertical slab. Support-material resolution accounts for explicit support/interface tools, “current filament” behavior, alternating material layers, automatic physical-nozzle mapping, support brims, and shared support geometry. TreeSupport3D receives active exclusion geometry during branch planning so its existing avoidance machinery can steer branches around obstacles rather than merely cutting finished paths. ## Final G-code collision validation The final emitted G-code is checked as a safety backstop after slicing. The checker tracks: - The active physical nozzle and its XY offset. - Absolute and relative XY/Z motion. - Travel, extrusion and other parsed motion types. - Tool selection and physical/nozzle mapping. - Explicit motion in start, filament-change and tool-change G-code. - Coordinate resets and common `G28` forms, including bare, spaced, compact and parameterized axis selections. Material keep-outs from `bed_exclude_area` are deliberately ignored by the motion checker. Only explicit collision volumes constrain motion. If Z is genuinely unknown, the check is conservative across all relevant heights and the warning identifies that fact and includes the relevant G-code line. The artificial first segment that the preview draws from `(0,0)` is not treated as a real machine move. ## Travel rerouting Generated travel moves are rerouted around active collision volumes when a valid route exists. Routing is: - Aware of the travel's actual Z slab and planned lift/Z-hop. - Resolved for the active physical nozzle. - Constrained so any detour vertices added by Orca remain inside the printable bed. - Able to accept firmware-established start/end points on or beyond the nominal bed edge. - Revalidated before the replacement path is emitted. The implementation covers ordinary generated travels, the first generated move after start G-code, and moves following physical or same-nozzle filament changes. Explicit movement commands in custom start/tool-change G-code update the tracked position so the next generated travel begins from the correct point without defeating Orca's post-toolchange Z restoration. Obstacle geometry is cached by extruder and active Z-region set, with bounding-box rejection before expensive polygon work. Clear travels therefore avoid repeatedly unioning and offsetting the same obstacles. If no safe route can be found, Orca leaves the original move for the final checker to report rather than emitting an assumed-safe detour. Extrusion paths are validated but never rerouted. <img width="1286" height="706" alt="Travel rerouting from start G-code across multiple Z-aware volumes" src="https://github.com/user-attachments/assets/a68cd98f-5576-4f78-af43-697e9f687a9b" /> And here is an example of independent nozzle travel rerouting: <img width="2532" height="876" alt="image" src="https://github.com/user-attachments/assets/28b0c26e-59d6-42b9-a64f-4c2205c4ea3f" /> ## Testing and review status Targeted Catch2 coverage now includes: - Bed-area/volume parsing, validation, confirmed paste handling, additive behavior and CLI options. - Belt-surface projection of bed areas through both static and dynamic region resolution, including the reported cube positions, with collision volumes left unprojected. - Shared, toolhead-relative and individual per-extruder resolution. - Physical-nozzle and filament mapping. - Exact object intersection, including fully enclosed prisms and transformed instances. - 3MF persistence. - Arrange behavior for convex and non-convex obstacles. - Brim bed-boundary and volume clipping regressions. - Support and interface-material masks across support polygon categories. - G-code motion classification, coordinate tracking, homing forms and tool selection. - Safe travel rerouting, Z-aware activation, nozzle selection, off-bed firmware endpoints and failure cases. The reviewed `929beaee15` revision passed the CI checks, and review testing confirmed that the unit tests and earlier arrange, tool-change Z restoration, support, brim and brim-ownership regressions still pass. Stock-output comparisons covered 12 printers × 3 jobs plus 17 project files and produced G-code identical to `main` when the new feature was not configured. The belt projection correction and its regression coverage are included in the latest update. Please use the checks below for the current head's build and test status; earlier successful runs do not substitute for validation of a new revision. Review also compared CLI output against `main` across stock printers and multi-filament projects. The compatibility regressions found during that review—including stock Bambu cutter motion, preset dirty state, unintended bed-area brim/support changes, tool-change Z restoration, stale post-change origins, arrange rejection, router cost, locale parsing and bed-edge brim clipping—have been addressed. ## Known limitations and follow-up work The implementation deliberately favors conservative safety. A false positive or some unused build volume is preferable to emitting a movement that may collide with the machine. Collision warnings are not an automatic repair or a guarantee of safe output. - Skirts and draft shields are not regenerated or detoured around collision volumes. The final checker can report an intersection, but producing a valid closed loop around internal obstacles while remaining inside the bed needs a dedicated solution. - Extrusion paths are checked but not rerouted. - Spiral Z-hop's circular XY sweep is generated after the primary travel route has been planned. That sweep is not currently rerouted; the final G-code checker can report a collision, but does not repair it. - Orca cannot infer movement hidden inside an opaque firmware macro. A deterministic macro endpoint should be exposed with explicit `G90`/`G91` and `G0`/`G1` motion in Orca's custom G-code so the following travel can be routed from a known position. Movements inside custom G-code are checked, but only the generated travel after them is rerouted. - Negative model parts are not applied to the raw object-intersection mesh, so geometry removed only by a negative part can produce a conservative false positive. - Multi-nozzle object validation applies every relevant nozzle's volume to the complete object rather than only its visibly painted surface. - Support shared by several instances uses a conservative union of relevant plate-space exclusions. - Support avoidance trims or steers generated geometry but does not perform structural support re-planning. Support above a raised volume may resume over a void; native tree-support paths not using TreeSupport3D are not yet volume-aware. - Raised-only collision volumes are not yet fully represented in prime/wipe-tower placement validation; the final G-code checker remains the safety backstop. - Existing cross-object support-to-support overlap behavior is outside this PR. - “No tool selected” carriage-only exclusions are not represented by Orca's current backend and remain a possible future extension. ## Origin This work began with the [Muon3D M1](https://www.youtube.com/watch?v=jBatFQpTM6g), whose notched glass bed leaves usable print volume above a low obstruction. Upstreaming the capability lets other printers describe low clips, raised docks, toolchanger hardware and per-tool clearance limits without requiring a permanent fork. Thank you to everyone who tested the implementation, reviewed the architecture, identified regressions and helped improve the test coverage—especially the multi-tool and macOS testers. Further real-hardware feedback remains welcome, but the current implementation and compatibility behavior are ready to merge. Harry Loud Muon3D |
||
|
|
857896dc6b |
Make Ctrl+Q quit the application on Linux and Windows
Quit was only bound to Cmd+Q on macOS. Add a Quit entry to the shortcut registry bound to Ctrl+Q and handle it in the global key handler, so the shortcut reaches the app regardless of focus. The File menu shows it as display text. The macOS-only key check is removed; Cmd+Q now goes through the registry. |
||
|
|
c67a46a277 | Merge branch 'main' into feat-3D-Exclusion-Volumes | ||
|
|
0f59cd5d05 |
Let Global shortcuts run while typing, except keys that edit text (#16558)
#16505 skipped every Global shortcut while ImGui had the keyboard, so Ctrl+S, Ctrl+R and the others did nothing while the cursor was in the text tool's box. Skip only the chords that edit text, and only while a text field (a wx text entry, a spin control, a web view, or an active ImGui InputText) has the focus. Skip every Global shortcut while an ImGui modal is open on the focused canvas. KeyChord::edits_text() defines the text-editing chords. The Global page of the shortcuts dialog no longer says these shortcuts apply while typing. |
||
|
|
29b6bbb8c9 | Keep Slice and Print Visible When Plugin Page Tabs Overflow (#16541) | ||
|
|
247e903cbe | Merge upstream/main and resolve exclusion volume integration conflicts | ||
|
|
81ec931990 |
Keep global shortcuts out of in-canvas ImGui text fields
Space opened the Speed Dial and Ctrl+P the Preferences while the text tool's box or a sketch value field was being typed into. Those fields are ImGui drawn on the GL canvas, so the canvas is the focused wx window and focus_keeps_space() cannot see them; the CHAR_HOOK handler took the chord first and the field never saw the key. Skip the global shortcut dispatch while ImGui reports that one of its items owns the keyboard and the focused window is not a wxControl. |
||
|
|
5c8a287b5e |
Keep User Filament Presets on Printers Their Parent Listed in 2.4.2 (#16367)
* Keep User Filament Presets on Printers Their Parent Listed in 2.4.2
User presets store only their diff, so they inherit the parent's
compatible_printers. Profile changes since 2.4.2 renamed and narrowed many
system filament presets, so user presets made against them disappear from
printers they were made for and the saved selection silently falls back to
another filament at startup.
orca_profile_tool.py legacy-compat writes, per current system filament
preset, the printers it covered in an older release and no longer lists,
kept only where a preset with the same filament_id still covers the printer
and they share an extruder variant. The loader gives these printers to user
presets that inherit their parent's list, without writing any file; saving
a preset detached, cloned or with its own list drops them.
* Ask Before Migrating User Filament Presets to Their Legacy Printers
Instead of giving user presets their parent's 2.4.2 printers in memory,
detect the user presets that inherit their parent's compatible_printers
and are missing printers from the legacy map, and offer to migrate them
at startup or from Help > Migrate Filament Presets.
Migrating first backs up the user folder to
filament_preset_migration_<datetime>_backup.zip in the configuration
folder, and migrates nothing if that fails. It then writes the printers
into each preset's compatible_printers, patching only that key so the
preset keeps the parent name it was saved with and older releases can
still resolve it. Cloud-synced presets are marked for upload.
No asks again at the next launch; "Don't remind me again" stops the
startup prompt.
* Key the legacy filament preset map by the parent's 2.4.2 name
* Check the legacy filament preset map in CI
* Limit the 2.4.2 filament preset migration to presets that need it
Only presets that still name their parent as 2.4.2 did and have no printer
list of their own are offered, and a preset changed after it was found is
left alone. The startup prompt appears once, after upgrading from 2.4.2 or
earlier, as a standard dialog that keeps "Don't remind me again"; Help >
Migrate Filament Presets is unchanged. Migrating no longer overwrites an
unsaved printer-list edit or marks the project modified.
* Ask on Every Start and Take the User Presets Lock Once When Migrating Filament Presets
The startup prompt no longer depends on the version the previous run
recorded: whoever still has user filament presets that lost printers is
asked, including users already on a 2.5.0 nightly or alpha. Answering No
asks again at the next start; "Don't remind me again" stops it.
Migration takes the user presets lock once, around the backup and every
file write, instead of once per preset. A lock another instance holds is
reported once ("another OrcaSlicer instance is saving presets") with
nothing written, rather than as one failed preset after another once the
lock's cool-down kicks in. Detection records each preset's file and the
list it will get, so the writes need no collection lock while the user
presets lock is held, the order InstanceLock requires; the loaded presets
are updated afterwards.
* Run the Legacy Compatible Printers Map Check in check_profile.sh and .ps1
CI's "Check profiles" job checks resources/info/legacy_compatible_printers.json
against the v2.4.2 profiles, and its failure message points at these scripts
as the local reproduction, so they run the same check: legacy_compat, right
after profile_tool. The v2.4.2 tree comes from git archive of the tag, is
cached in the work dir like the other downloads, re-extracted with --refresh,
and fetched from upstream first when the checkout lacks the tag.
* Back Up Before the User Presets Lock and Merge Migrated Printers Into the Live List
The lock guard is meant for a few file operations, and zipping a large user
folder is not one, so the backup is taken before it and the guard covers the
writes only; each write re-reads its file, so a save that slipped in before
is still respected.
The in-memory update adds the lost printers to the list the preset holds at
that moment rather than replacing it with the one found at detection, and
leaves a pending cloud sync state alone: a download waiting to be saved kept
its newer list and its "save" flag, which "update" would have cancelled.
The lock message no longer blames another instance alone, since the lock is
also refused for a while after a miss and when the lock file cannot be
opened.
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
|
||
|
|
e821665e4b |
Add orca-translations Claude skill and PO tool (#16436)
* Add orca-translations Claude skill and PO tool
Add a .claude skill that guides translation passes over the localization/i18n gettext catalogs. It covers the workflow: run gettext, settle new glossary terms, translate in batches, verify, and report.
Includes translation-rules.md, which condenses the placeholder, line-break and glossary rules plus the guidance on review notes.
Also adds scripts/po_tool.py (standard library only). It lists pending entries with glossary hints, validates and applies translations, adding '# AI Translated' and '# Needs human review' comments, and rewrites only the entries it changes. It can also check catalogs, look up existing translations, suggest glossary candidates and update the wiki glossary TSV.
* Let po_tool apply translations by entry id
pending now gives each entry a short id, so a translation file can name
entries by id instead of repeating the English msgid. apply accepts either.
A "review": "" item clears an earlier review note when overwriting an
entry, and check gives each msgfmt run its own temporary output file so
parallel checks do not collide.
* Fill all empty translations
Regenerate the template with run_gettext --full and translate every empty
entry in the 22 catalogs (7,089 entries) with the orca-translations skill,
following the localization glossary, including the new belt printer,
IDEX/IQEX and plugin terms. Every new entry is marked "# AI Translated";
122 also carry "# Needs human review" with what to check.
* Show entry ids in po_tool lookup and search translations
lookup now prints each entry's id, so an entry found there can be
rewritten with apply --overwrite without repeating the English, and
--msgstr searches the translations instead of the msgids, which finds
every entry that still uses a term being changed.
SKILL.md describes how to change an established term: check the
catalog's usage first, update the glossary cell, then rewrite only the
entries where the term has that meaning.
* Fix mistranslated terms and align catalogs with the glossary
Correct labels that the glossary had copied, and the entries that used
them:
- ca: Raft was rendered as the Brim term; it is now "Rai". Exhaust fan,
Monotonic line, Unretract, Slice, Lateral Honeycomb and PA Tower
labels fixed.
- cs: Lightning infill is "Blesk", not "Osvětlení" (illumination).
- sv: Retraction is "Retraktion", not "Reduktion"; Unretract,
Lagerhöjd, Delkylningsfläkt, Utsugsfläkt, Aligned Rectilinear and the
Preset label fixed.
- de: Brim is "Rand" and Skirt is "Umrandung", as most entries already
had them.
- lt: brim entries used the Skirt word "apvadas"; they now use "kraštas".
- es: Sparse infill is "relleno de baja densidad", the catalog majority.
- eu: nozzle wipe is "garbiketa", not purge.
- th: the project plate is "เพลต", distinct from the bed.
- uk: Quarter Cubic, Latin "PA" in PA Tower, and Belt purge tower.
- pl: Cross Hatch, Tri-hexagon, Volumetric speed and Raft labels.
- zh_TW: Brim stays "Brim", as the existing labels have it.
- tr: "Prime Tower" read "Prime Minister Tower".
- ko: the plugin "Capabilities" label read "performance".
- Build Volume labels fixed in tr, de, cs and eu.
All 242 rewritten entries are marked "# AI Translated".
* Make more UI text translatable and fix pluralization and context
Audit the sources for text that translators could not translate
correctly and fix it.
Mark text that reached users in English only: IDEX/IQEX role names,
plugin permission prompts and errors, 3MF/preset loading errors, G-code
placeholder parser errors, calibration and device messages, notification
texts, file dialog filters, and the config validation messages.
Replace sentences built from translated fragments, such as the prime
tower warnings, "left"/"right" nozzle names, and "Filament " + number,
with single msgids that have placeholders, so translators can reorder
and inflect them.
Use plural forms for texts with a count ("%1% mixed filaments",
"%d objects", "%1% triangles") instead of "(s)" and mismatched verbs.
Fix the swapped singular/plural pair in "The following presets inherit
this preset".
Add translation contexts where one English word has several meanings
(Subscribed/Local, Standard, Pause, View, Step, Model, Camera, Flow,
Filter, Others, Prepare, the Design tools). Show "Size" instead of
"Build Volume" in the Cut tool, which displays the object size.
Fix code that compared translated text with English (the Edit G-code
dialog group, the plugin registration failure check), and add the
bundled web pages' missing string-table entries. Use the single
character for degrees Celsius, say "G-code", and describe the head
filament map without internal jargon.
Install the libslic3r translate callback before the presets load, so
their load errors are translated, and list the 28 source files that had
marked strings but were never extracted into localization/i18n/list.txt.
* Suggest earlier translations and list fuzzy entries in po_tool pending
pending now attaches the closest earlier translation of a similar
English text (from obsolete or translated entries), so a reworded or
split string keeps its wording, and it lists fuzzy entries by default,
since users never see them. A fuzzy entry also carries its stale
translation as previous_translation.
* Fix wording of the non-boolean operands error
The logical operation error said "operators" where it means the
operands the operation was applied to.
* Translate the newly translatable strings in all languages
Regenerate the template after the translatability changes and fill every
new or changed entry in the 22 catalogs (about 12,800 entries): the
strings that became translatable, the plural forms, the entries split by
context, and the previously fuzzy singular entries that became plurals.
Every new entry is marked "# AI Translated", and about 360 also carry a
"# Needs human review" note saying what to check. Terms follow the
localization glossary. Earlier translations of reworded strings were
reused where the meaning was unchanged. Existing entries were not
changed, and obsolete entries are kept.
* Document the source translatability audit in the orca-translations skill
Add a reference describing how strings reach translators, what to look
for (untranslated text, spliced sentences, missing plurals, ambiguous
words), what not to translate, where a context cannot be carried, and
what to do after the edits, plus a scanner that lists untranslated
user-facing string literals.
* Document how to write translatable strings in AGENTS.md
Tell developers to keep each message complete in one msgid: use
placeholders instead of concatenating translated fragments, plural forms
for counts, and contexts for ambiguous words, and to list new source
files in localization/i18n/list.txt. Add a matching code review item.
* Translate the strings added since the rebase
Regenerate the template against the current main and translate the 26
new entries per language: the Fix Model commands and messages, and the
texture displacement image adjustment panel. Each new entry is marked
"# AI Translated"; existing entries are unchanged.
* tidy
|
||
|
|
a671bf605d |
Dismiss the Slice-Plate Popup on Every Path Into the Filament Grouping Dialog (#16359)
#16284 closed the Slice-plate hover popup only when the Slice button opened the filament grouping dialog. The dialog also opens from the plate's filament grouping icon, the preview legend, slicing notification links and the send dialog, and a popup still shown on those paths keeps the mouse capture on macOS and starves the modal dialog of clicks. Dismiss it in FilamentMapDialog::ShowModal() instead, so every path is covered. The popup could also stay up on its own on macOS: an enter event stopped its close timer, and when the timer fired with the cursor inside it returned without re-arming, so without a later leave event the popup never closed. On macOS the timer now keeps running while the popup is shown and closes it once the cursor is outside. The popup also stops and frees its timer when destroyed. |
||
|
|
2c0ce5c38b | Merge upstream/main and refine exclusion-volume configuration UI | ||
|
|
f970a607ae |
Merge upstream main: belt printing, texture displacement color mixing, 3MF component cycle checks, undo blocked during background jobs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ae59656fa4 |
Dismiss the Slice-Plate Popup Before the Filament Grouping Dialog Opens (#16284)
The Slice-plate hover popup (FilamentGroupPopup, a wxPopupTransientWindow) takes the mouse capture while it is shown, and on macOS its OnIdle handler reacquires that capture whenever the cursor sits outside the popup. If the popup is still shown when the modal filament grouping dialog opens, wx routes every dialog mouse event to the now-hidden popup, because WX_filterSendEvent short-circuits to the capture window while GetCapture() is non-null. The dialog's filament blocks never receive a mouse-down, so they can't be dragged and the whole app looks frozen even though its modal loop is healthy and the keyboard still works. Dismiss the popup synchronously before the dialog opens: Dismiss() hides it and releases the capture, and hiding it stops OnIdle from reacquiring. This is a no-op where the popup is never shown (Linux, where the hover popup is disabled, and any non-dual-nozzle printer). |
||
|
|
d09850c528 | Merge branch 'main' into main | ||
|
|
6cd5feed79 |
Remove Duplicate Includes and the Dead GCodeSender Sources (#16249)
46 files include the same header twice at file scope, outside any #if, 66 times in all: Model.cpp included Model.hpp twice, Utils.hpp <algorithm> and <string_view> twice, seven GUI headers <wx/dataview.h> and <wx/artprov.h> twice. The second include of each is removed. GCodeSender.cpp and GCodeSender.hpp have been commented out of libslic3r/CMakeLists.txt since 2022 and their only two includes are commented out as well. Both files go, with the commented lines, and the CMake entry for SLA/SupportTreeIGL.cpp, a file that no longer exists. |
||
|
|
7fdfea6efa | Merge branch 'main' into main | ||
|
|
73d32d4791 |
Stop Leaking json Through Headers and Drop Includes Kept Only for the Name (#16221)
* Stop Leaking json Through Headers and Drop Includes Kept Only for the Name AppConfig.hpp, DeviceManager.hpp and UserManager.hpp carried a global "using namespace nlohmann;", json_diff.hpp a global "using json = nlohmann::json;" and PrinterFileSystem.h a global "using nlohmann::json;". Every file that included one of them, directly or not, could write a bare json, and 63 did without declaring it. The last two also made the include checker treat json_diff.hpp and PrinterFileSystem.h as the headers that provide json, so they were included from files that use nothing else from them: 57 of the 59 includers of json_diff.hpp never name json_diff. The five statements are removed. Headers that use the type now spell nlohmann::json, source files declare their own "using json = nlohmann::json;", and the includes that only supplied the name are dropped or replaced by <nlohmann/json.hpp>. Eight files reached json_diff.hpp only through an include that is now gone and with it lost that header's "using namespace std;". The std names they used unqualified are qualified. * Declare json in OrcaSlicer.cpp on Every Platform OrcaSlicer.cpp had its "using namespace nlohmann;" and the json include inside the Linux-only include block, so on Windows and macOS it took json from AppConfig.hpp's global directive, which is gone. The include and a "using json = nlohmann::json;" now sit outside the block. |
||
|
|
6561c4d35b | Merge branch 'main' into main | ||
|
|
1d577ea4e2 | build: add the missing includes only a Windows build reports (#16110) | ||
|
|
881f2e0c12 | Merge branch 'main' into main | ||
|
|
257c589331 | Merge branch 'main' into claude/inspiring-knuth-7cp6pk-upstream | ||
|
|
4895bc03b4 |
Remove Unused Project Includes and Forward-Declare Where a Type Is Only Referenced (#16099)
* Remove Unused Project Includes and Forward-Declare Where a Type Is Only Referenced Generated with include-what-you-use and applied conservatively. Only OrcaSlicer's own headers, the ones under src/ and tests/, are removed or forward-declared; standard-library and third-party includes are left alone. An include is removed only when both the Release and the Debug configuration leave it unused, never from inside a conditional block, and never from a file with platform-specific blocks, which only gain includes. Files whose only use of a header sits behind a feature or debug macro (libvgcode's OpenGL ES and marker code, the ARACHNE/TESTS_EXPORT_SVGS debug output) keep their includes. clonable_ptr.hpp gains #pragma once; it had no include guard and was only safe while Config.hpp was its sole includer. * Remove Unused Project Includes From Files With Platform-Specific Code A Linux include-what-you-use run cannot see the code inside _WIN32, __APPLE__ or __linux__ blocks, so its verdict is only taken where nothing the removed header declares, directly or through what it includes, is named inside those blocks. Removals also have to hold in both the Release and Debug configuration and never touch a line inside a conditional block. * Restore the libslic3r Precompiled Header and Direct Includes Lost in the Platform Pass The platform-file pass treated pchheader.hpp as an ordinary header and emptied it, and left GUI_Preview.hpp and 14 other files relying on headers they no longer reached directly. * Restore MainFrame.hpp in ParamsDialog.cpp for the Windows-Only Reparent Call * Include Headers That Files Reached Through Ones the Cleanup Removed * Drop Includes Duplicated by the Cleanup or by Main's Own Additions * Leave PreciseSeam.cpp as Main Has It After the Precise Seam Rework |
||
|
|
d47fb804c3 |
Make the Design tab sidebar dockable and collapsible like Prepare's
The sidebar can move to either side, float, be resized, and collapse with the canvas button or Shift+Tab. Its layout is remembered separately from Prepare's, starts where Prepare's sidebar is, and View > Reset Window Layout resets both tabs. |
||
|
|
815716a4b5 |
Merge branch 'main' into claude/inspiring-knuth-7cp6pk-upstream
Conflicts were only in include lists (CadDocument.cpp, SketchEngine.cpp); both sides' includes are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QK4VgguuCAk2hZLWgcjJb9 |
||
|
|
3637a6d164 |
Merge upstream, including cached config lookups in G-code export
Three commits: G-code export caches its filament config slot and repeated option lookups, per-plate bed type overrides follow the printer's multi-bed support, and the gizmo checkboxes and texture displacement panel get styling and refresh fixes. No conflicts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
1241dd5521 | Fix per-plate bed type handling (#15916) | ||
|
|
b1e44199c1 |
Merge upstream, including section view and a faster preview
Five commits: a section view for the 3D canvas, a faster G-code preview, user preset values kept on extruder variants they don't list, debug build CMake fixes, and a 30 minute timeout on macOS notarization. Two conflicts, both in GLCanvas3D. The header's were neighboring declarations, kept from both sides. In the transparent pass, the section view removed the assemble view's painter block that followed our ghost render; the ghost render stays where it was, at the end of that pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
9351bbaa83 | Merge branch 'main' into claude/inspiring-knuth-7cp6pk-upstream | ||
|
|
70bc02467b |
Faster Preview View (#15884)
Co-authored-by: Kris Austin <kris.austin@gmail.com> |
||
|
|
e8cd4be675 |
Merge upstream, including deterministic painted multi-material slicing
Seven commits: painted multi-material segmentation made deterministic, missing includes added across src/slic3r/GUI, U1 high-flow nozzle variants, Windows ARM64 build and HTTPS fixes, and a rule added to the wxWidgets agent skill. Three conflicts, all include lists: upstream's include pass and ours each added to the same lists in GCodeViewer.hpp, PartPlate.hpp and PartPlate.cpp. Resolved as the union of both. Three includes both sides had added at different places, which git kept twice, are kept once: Color.hpp and <set> in PartPlate.cpp, <sstream> in Plater.cpp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
1a5f91d727 |
Add Missing Includes Across src/slic3r/GUI (#16048)
* Add Missing Includes Across src/slic3r/GUI Every GUI source and header now directly includes the headers declaring what it uses, rather than relying on the precompiled header or transitive includes. Generated with clang-tidy misc-include-cleaner, plus one hand edit making CalibrationPanel.hpp self-contained. * Drop the OS-Specific Includes Added Outside Their Platform Guards GLib, GTK, D-Bus and POSIX headers are only used inside platform #if blocks, which already include them. Added unconditionally at the top of the file they broke the Windows build. * Add the clang-tidy Configuration That Generated These Includes Only misc-include-cleaner's missing-include check, with the headers it must never suggest: per-platform, internal and OS-specific ones that would break other platforms or are not meant to be included directly. * Match Windows Paths in the clang-tidy Ignore List Header paths use backslashes on Windows, so every / in a pattern is now [/\\]. The Windows SDK headers are ignored alongside the other OS-specific ones, and the list is one pattern per line. Suggested by @raistlin7447 from a Windows clang-cl run. |
||
|
|
410399fdb5 |
Design tab: follow Orca's theme, scale, mouse settings, dialogs and undo
Felix14-v2's review of OrcaSlicer#16019 found the tab behaving as a world of its own. - Icons: the design_* glyphs were drawn in a fixed light grey, made for the dark ribbon, and the toolbar re-tinted some of them by rebuilding the bitmap from a wxImage, which drops the HiDPI scale factor Orca sets on Windows: at 150 % the icons came out half again too large for buttons that were sized in raw pixels, overlapping and clipped. The glyphs now use Orca's sidebar icon grey (#949494), which the icon cache maps per theme, nothing is re-tinted, toolbar glyphs drawn for Prepare's light toolbar use their "_dark" twin, and every size is in DIP. - Theme: the chrome colours were read once, at construction, and nothing in the tab answered a theme switch, so switching left light surfaces and unreadable text in a dark tab and the other way round. The colours are now {light, dark} token pairs; MainFrame::on_sys_color_changed reaches DesignPanel::on_sys_color_changed, which moves every token colour onto the other theme's, runs the app's dark pass and re-rasterises the icons. Card borders are StateColors, resolved at paint time. - Scale: MainFrame::on_dpi_changed reaches DesignPanel::msw_rescale, which re-rasterises every icon (buttons, flyout rows, card headers, the tree's image list, now sized from its bitmaps) and re-measures the Orca widgets. - Mouse: the canvas no longer forces middle-drag to orbit and right-drag to pan; it reads the drag actions in Preferences > Control like Prepare. Left-drag is shared with picking, so the whole-body rubber band takes Shift+left-drag while left-drag is given to the camera. - FPS counter: ImGui's display size is shared and only refreshed when a canvas sees its own size change; the Design canvas now re-announces its size when the tab is entered (and the editor canvas when it is left), as Plater does between Prepare and Preview. - Viewport text: the status line and the tool readout were top-level popups over GL. A popup does not follow its frame, so the empty-canvas hint floated over other applications, and the readout was never taken down with the tab. Both are drawn by the canvas in the tool's ImGui pass now, with the theme's overlay style. - Dialogs: messages use MessageDialog/RichMessageDialog; Add/Edit Variable is one Orca dialog with Name and Expression fields instead of two native text prompts; the Text dialog uses TextInput, ComboBox and CheckBox (its height is a TextInput: SpinInput is integer-only), and enumerates the installed fonts once per session. The ribbon's Confirm/Cancel, the reference pick buttons and the expression buttons are Orca Buttons; the variable actions are icon buttons like the other cards'. - Undo: the tab's own Undo/Redo buttons are gone. The top bar's Undo/Redo drive the Design history while the tab is shown, greyed to what an undo would do, as Ctrl+Z and Edit already did. - The first build of the tab logs how long each phase took ("Design tab build: ..."): it is under a second here but was reported at about fifteen on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QK4VgguuCAk2hZLWgcjJb9 |
||
|
|
74409f1d3b |
Merge upstream, and move the IMEX placeholders onto the new def macro
Eleven commits, including a typed-config G-code export speedup, a printer agent refactor that generalizes the infrastructure beyond Bambu, gyroid optimization, and three CLI crash fixes. One conflict, in PrintConfig.cpp. Upstream introduced a new_def macro and began migrating the placeholder table onto it, adding curr_bed_type that way in the same block where this branch had added imex_mode, imex_mode_index and imex_mode_gcode in the older def = this->add(...) form. Both sides are kept and ours are converted to the macro, which expands to the same three statements and wraps label and tooltip in L() exactly as before, so nothing changes about what is registered or what is translatable. Note for anyone building this branch: the agent refactor adds a dependency, LibDataChannel, so the deps tree needs dep_DataChannel built before the app will configure. A distribution package of the same name will be found first if one is installed, and the resulting error names a missing RelWithDebInfo location rather than the wrong package, so point LibDataChannel_DIR at the dependency prefix if that happens. Verified: 789 targets build clean under -Werror, and the Release suite passes 1665 of 1665, up from 1630 before the merge -- the 35 new cases arrived with it and all pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
5254007a10 |
Merge main into the Design tab follow-up
main moved the CAD docs into docs/HLSD/design-tab.md and the offer generator and atlas into scripts/CAD/ (#15803). - The four docs this branch had edited are deleted as on main. What the branch changes about the design goes into the HLSD doc: the right-click is judged by drift over the whole press, with no time budget; a Text feature stores its outlines as well as its string, font and height; a new section on how the Design canvas renders bodies (studio lighting through the shared phong shader, B-rep edge ribbons). - gen_offer_table.py keeps both main's atlas validation and this branch's L() markers on user-facing strings. - The Text verb's hint is now changed in scripts/CAD/tool_atlas.json as well, so `gen_offer_table.py --check` passes. - DesignPanel.cpp keeps the DesignTextDialog include and main's new path in the offer comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QK4VgguuCAk2hZLWgcjJb9 |
||
|
|
a5413efc37 |
refactor: printer agent infrastructure changes to work with other printer agents aside from bambu (#15710)
* Add developer flag for printer agents
* Parse user print info on the UI thread to prevent heap corruption (#119)
get_user_print_info()'s HTTP fetch can run on a worker thread (e.g. BindJob),
but parse_user_print_info() mutates userMachineList (insert/erase/delete
MachineObject). on_machine_alive (SSDP) mutates the same maps on the UI thread
without locking, so parsing off-thread races the map and frees MachineObjects
out from under it -> heap corruption.
Keep all device-list mutation on the UI thread: parse inline when already on
the main thread, otherwise marshal via CallAfter so it stays serialized with
on_machine_alive.
* Prevent loss of user access code on LAN reselect
Keep user access code intact to maintain access rights even if
device slot is unpopulated, ensuring continuous connection
and status message reception.
* Harden send flow and separate upload failure recovery (#111)
* fix(send): harden FT send path + IP pre-flight UX
* Remove early returns
* Working Moonraker and Qidi printer agent transport (#104)
Folds the Qidi AMS box-mapping print
overrides (apply_box_mapping +
start_* wrappers) that the transport
fix builds on.
* Add support for runtime error status in plugins
Distinguish a loaded plugin whose
capability errored (RuntimeError,
warn-styled, stays checked) from a
load-time Error. Status now derives
via resolve_plugin_status(); enum
ordinal keeps dialog sort priority.
Unloading clears stale errors.
* Resolve duplicate agent ID conflicts
Reject a printer-agent capability
whose agent ID is already owned by
another capability or built-in:
flag the plugin error, disable the
capability, and warn the user
instead of silently ignoring it.
* fix: checkbox should depend on plugin is_loaded status
* 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.
* 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.
* 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.
* Track BBLPrinterAgentPlugin.py
* Add printer-agent and plugin status tests
Ports the agent lifecycle, duplicate
agent-id, built-in-id clash and
status-resolution tests. The loader
runs on a detached worker thread, so
the lifecycle tests live in their own
executable. Tests install the
production unload-side registry
wiring themselves (no GUI in the
test binary) and register agents
manually so concurrent loads stay
deterministic.
* fix: pin HTTP to prevent connection refusal
Set `use_ssl` to false to ensure Moonraker
connectivity, as the service uses HTTP rather
than HTTPS, preventing connection issues. Initialize
device info early for reliable name resolution.
* Bring Moonraker device panel to feature parity
The monitor panel showed wrong or missing
data for Moonraker printers, and its
controls did nothing.
Push payload now carries layer number and
total layers. Remaining time replaces the
wrong total_duration - print_duration
formula. The chamber light toggle maps to
Klipper SET_PIN / SET_LED, and pause,
resume and stop post to
/printer/print/{action}. Task thumbnails
resolve via /server/files/thumbnails onto
a new MachineObject thumbnail url.
Filament sync switches to pull mode so the
agent is queried on demand.
Not compiled or run.
* Stop blocking print on unreported nozzle data
* fix: make Klipper macro lamp control reliable
* Surface Moonraker webcams and gate unrunnable controls
* Keep Bambu AMS dialect out of the agent waist
M620 is Bambu firmware dialect, not a
neutral command. Composing it in
MachineObject let non-Bambu agents
(Moonraker/Klipper) forward it and
report success on firmware that
cannot run it.
Agents now own the dialect: the
default refusal on IPrinterAgent
returns not-supported so the UI
can say so; BBLPrinterAgent keeps
the byte-identical composition.
* Fix multi-color filament logic
Reuse color decoding across functions to improve
code readability and maintain consistency in
multi-color filament handling.
* Move Moonraker commands off the UI thread
Pause/resume/stop, g-code sends, temps, and
light ran synchronous HTTP on the UI thread,
freezing the app up to 10s per click on slow
or unreachable printers.
Run them on a single agent-owned FIFO worker
so g-code ordering is preserved, while command
translation stays synchronous so unsupported-
command dialogs still work.
Add a pending-disabled state to the pause,
resume, and abort buttons for Moonraker-family
printers: the icon only flips once the
WebSocket reports the real state, which also
rules out double-click races.
* Show Snapmaker U1 camera in Device tab
The U1 exposes no /server/webcams/list entry;
its camera only captures after an explicit
camera.start_monitor RPC, which the Moonraker
websocket executes unauthenticated but only
answers over MQTT - so the call is fire and
forget.
Start the camera when the camera view is
shown and renew every 300 s: the printer
retires the capture task at ~362 s and
stop_monitor is accepted but ineffective,
so teardown is simply to stop renewing.
Frames land in monitor.jpg as still JPEGs
(~2 fps at interval 0), so the webview loads
a local HTML wrapper that repolls with a
cache buster.
* fix: start stream when camera URL changes
* fix: stop Qidi slot parse throwing on null
* Keep printer-agent progress in sync
Keep the shared task progress aligned with agent
reports that lack Bambu cloud task identity.
Release the lazily allocated task during reset to
avoid leaks when machine objects reconnect.
* docs: document the printer-agent subsystem
* fix: merge access codes into one
* Reconcile implementation split with PR tip
* feat: abstract remaining gcode commands in devicemanager
* refactor: abstract bambu specific protocol to printer agent
* refactor: push bbl workflows to bbl printer agent
* remove unused
* fix: default impl
* fix callback error
* fix: remove redundant cache
* specify api for getting file transfer url
* revert file transfer abstraction
* fix: ams filament mapping workflow
* feat: update qidi to use subscription based filament sync mode
* fix: resolve stubgen byte header conflict
* fix: ams sync info and periodic ams sync via subscription workflow
* fix: skip filament sync dialog if filamentSyncMode is none
* feat: parse nozzle information for qidi and moonraker printer agents
* fix: extend access code requirements t 0, 8 or more characters.
* remove irrelevant docs
* fix: remove heavy includes from IPrinterAgent
* fix: defer filesystem and camera abstractions
* fix: remote do_fetch_filament_info from tests
* cleanup moonraker and snapmaker printer agents
* fix: access codes regression
* fix: tests
* fix: printer agent switching on preset change
* fix: remove unused variable
* fix: snapmaker U1 SelectMachineDialog blocking print
* fix: merge artifact
* fix: clear up some unrelated changes
* feat: connect to cloud printer and monitor
* feat: connect to cloud printer and monitor
* feat: generic camera stream support for http snapshot and rtsp
* fix: build & access code UI
* feat: generic camera stream support for http snapshot and rtsp
* fix: build & access code UI
* feat: connect to cloud printer and monitor
* feat: connect to cloud printer and monitor
* fix: build errors
* feat: camera via webrtc
* fix: build
* fix: cmake
* feat: remove frame assembler and change config to set protocol
* fix: orcaprinteragent refactor
* fix: LAN paths and camera stream
* feat: use ffmpeg to render http camera stream
* fix: make model_id/dev_type optional instead of blocking
* fix: connect via ip dialog
* feat: LAN impl for Orca Printer Agent
* fix: model_id resolution method for non bambu printers
* fix: ffmpeg http camera stream jittering due to incomplete frames
* fix: revert sdcard check
* feat: check printer storage status before sending
* fix: moonraker printer agent hang on printer power cut
* fix: shim layer for any compatibiliity changes
* fix: cloud printers were using the wrong MQTT endpoint
* feat: cloud download via HTTP
* temp: doc for intended change
* fix: warnings
* fix: warnings
* fix: camera auto-play on startup
* fix: split infra from impl
* fix: uninitialized ams state blocking print
* Fixes nullptr deref
* Log first before std::move
* fix: printer agent virutal optional functions
* fix: parameterize orcaslicer_copy_test_dlls() for printer_agent_plugin_tests
* Revert "fix: parameterize orcaslicer_copy_test_dlls() for printer_agent_plugin_tests"
This reverts commit
|
||
|
|
829124982d |
Design tab: one rule for mouse, Enter and Esc; honest status messages
Keyboard and mouse - Esc drops what is pending (picks, a dimension's first point, an edit-op or transform) and never applies it; Enter applies a ready edit-op/transform, ends a polyline/spline chain, ends an armed tool, and confirms a feature card exactly when its ✓ is enabled. - Right-click only abandons the gesture in progress; with nothing pending it opens the offer in every tool (Trim, edit-ops, transforms, Dimension, Constrain, TransformArt, move gizmo). Clicking empty space no longer commits. The offer needs no timing, only a still press. - Delete removes only an explicit selection. Undo/redo inside a sketch go through the same route as the buttons (whole shapes, with redo); Edit > Undo follows the shown tab. - The canvas no longer handles Delete/Esc/Ctrl+Z itself (Backspace in a value field deleted the geometry it measured); F is in the panel's key map. - Value fields: a refused value keeps the field open with the reason; click outside and Tab commit; an untouched field commits the exact value; any decimal separator is accepted; lengths are always mm; validation is the same for every editor. - Snapping: the marker shows only where the click will actually snap; pick tolerances are one set of pixel budgets (Constrain picks within reach; no mm floor on labels). Messages and consistency - set_status(kind, text) gives every status line its own colour and glyph; kernel errors are translated into sentences and formatted, not concatenated; sketch refusals go to the status line instead of the per-frame HUD that erased them. - Hints describe the gestures that now work; Dimension shows its second step; Constrain uses the sketch palette (red means conflict only); the straight slot's value is its width. - Hole/Thread/Project keep the user's pick or refuse up front; circular pattern opens with its own preview; thread fields use the nominal diameter and the ISO internal depth. Integration - MCP loads the project's recipe before touching the document, refuses to mutate it while the tab is busy, never runs a request that already timed out, only replaces a socket at its path, caps line length and removes the socket at exit; not started in the G-code viewer. - Hiding a feature keeps later body references on their bodies; a design keeps its modeling origin across printer changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QK4VgguuCAk2hZLWgcjJb9 |
||
|
|
0c09327c1a |
Merge upstream, and index pressure advance by extruder variant
Upstream moved pressure advance onto the extruder variant: enable_pressure_advance, pressure_advance and the four adaptive keys joined filament_options_with_variant, the repeated inline blocks in set_extruder() became a helper, and the lookups moved from the filament id to get_filament_config_index(). All three conflicts were the same collision, because this branch had modified two of those same inline blocks to pass a tool qualifier so each carriage is addressed explicitly in parallel modes. Taking either side whole would have lost something: upstream's drops the qualifier and leaves parallel carriages with no pressure advance, ours drops the per-variant indexing and reads the wrong column on a multi-variant printer. The helper now takes an optional tool, defaulting to -1, which omits the qualifier. imex_pem_tool_for() already returns -1 off IMEX and in primary mode, so non-IMEX output is unchanged, and the three call sites that never passed a tool keep upstream's behavior exactly. The third conflict was two test cases appended at the same place. Both are kept. Separately, one defect that merged cleanly and so was not flagged: the loop that emits pressure advance for secondary carriages at the start of a print still bounded and indexed those vectors with a raw filament id. They are variant expanded now, so their length is columns rather than filament slots -- the value read was the wrong column, and the bound no longer sat in slot space, letting an out-of-slot filament through. It now bounds on filament_diameter and translates with get_filament_config_index(), which is what the sibling second-layer temperature loop already does. Verified: both changed translation units compile clean under -Werror. The merge was resolved independently twice and the two resolutions agree on every line of code. Not yet run: the Release test suite and a parallel-mode slice sweep. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
3a0694dce6 |
Remember last print action (#15774)
Co-authored-by: Ian Bassi <ian.bassi@outlook.com> |