A drag that starts on the center of mass details box, off its close button, now turns or pans the view like a drag over empty space. Its release no longer opens the canvas context menu. A right click off the box now closes it, the same as a left click. A click inside the box always goes to ImGui, including the click that closes a context menu.
(cherry picked from commit 6d33e58347)
The Measure and Assembly tools could crash on a click when the hovered gripper had nothing to select. That happened off the model over an edge's highlight, on a feature that Assembly mode filters out, or on a selection sphere that was just removed. The click dereferenced an empty `std::optional`, which aborts on builds with libstdc++ assertions, like the Flatpak.
The hover id now names only a gripper hit this frame. A click selects a selection sphere that still exists, or the hovered feature and, in point selection, its point. Otherwise it acts like a click on empty space.
The selected planes and circles no longer get pick raycasters, since a click selects from the hovered feature. The selected circles' raycasters pointed at the hovered circle's, which was freed on the next hover. Also fixes the selected circle's ring keeping the thickness from the zoom it was selected at, a missed ray storing `DBL_MAX` as the point in point selection, and a selected feature's volume being recorded from whatever was under the cursor a frame later.
Checked by hand on Windows and on the Linux Flatpak.
Fixes#17367
Co-authored-by: yw4z <28517890+yw4z@users.noreply.github.com>
(cherry picked from commit 91db25f2cf)
The ratio triangle handle no longer jumps to the opposite side when it is dragged outside the triangle. It now snaps to the nearest point on the outline.
When the dialog grows for a third material or the gradient editor, it now stays inside its display and is never taller than the display, so Cancel and OK stay above the taskbar. A DPI change resizes it the same way.
The 10% minimum for each filament is now drawn as a dashed line on the triangle, the ratio bar and the gradient graph. The gradient grid is now 10x10, so the line falls on a grid line. The two-material ratio bar now spans the full dialog width, below the preview.
Part of #16781.
(cherry picked from commit 376fd433f2)
Older A1 and A1 mini firmware reports PA support through `support_flow_calibration` but leaves `home_flag` bit 16 clear, so `parse_home_flag` reset `is_support_pa_calibration` and the Flow Dynamics Calibration checkbox was hidden when sending a print. On series N printers, `home_flag` no longer clears the two calibration flags once either one is set. Other printers are unchanged.
(cherry picked from commit f9d5a614b0)
The HTTPS CA file in the IP and access code dialog had no effect for Bambu Lab printers. For Bambu printers, the CA path is now saved with the printer's local machine entry instead of being read from the selected preset. On connect, Orca builds `<data_dir>/cert` with the bundled `printer.cer` plus the CA of each printer connected in this session, and points the network plug-in there. The file must contain only CA certificates. If it doesn't, Orca logs a warning and keeps the bundled certs. Other printer agents still use `printhost_cafile` from the preset.
A CA chosen before this change is not migrated. Choose it again in the dialog.
Fixes#17061
(cherry picked from commit 96d7742974)
When no visible filament preset matched the material a printer reported, first_visible_idx_by_type() returned an arbitrary visible preset, so the slot showed a different material. It now returns no match, and the Moonraker, Creality CFS, Qidi and Snapmaker agents fall back to the OrcaFilamentLibrary generic for that material.
The generic name table now maps PLA+, PLA PRO, ABS+ and PETG+ to their family, and adds PLA Matte, PETG HF, PETG-CF, PE-CF, PP-CF and PP-GF. The redundant visible-base check in the Creality CFS fallback is gone.
(cherry picked from commit fabad6114a)
Since 2.5.0 the CrealityPrint host starts a print with a /mnt/UDISK path
on every model outside the K1 family. The Ender-3 V3 KE (F005) keeps its
gcodes under /usr/data like the K1, so the firmware ignores the start
command and the uploaded file never prints. The Ender-3 V3 series (F001),
Ender-3 V3 Plus (F002), CR-10 SE (F003) and Ender-5 Max (F004) also keep
their gcodes under /usr/data and get the same wrong path.
The K2 SE (F016) keeps its gcodes under /usr/data too, unlike the other
K2 models. OrcaSlicer sent its CFS start commands with a /mnt/UDISK path,
so the printer ignored them.
Add those models to the /usr/data list, and rename the list since it
isn't only K1-family models anymore. Every other model still uses
/mnt/UDISK.
Fixes#17363Fixes#8735Fixes#17078Fixes#17364
(cherry picked from commit e2db7e5ef1)
`is_print_object_the_same` now also compares `center_offset()`. Two objects with the same transform can have different offsets, because the offset comes from each object's first instance. Before, the object that took over the other's layers printed shifted.
(cherry picked from commit 0f15db8b83)
A plate whose parts use one filament, with only the support on another, was refused for prime tower rules before slicing even when no part needed support and no tower would be printed.
- The layering checks run before slicing only when a tower is certain: the parts use more than one filament, custom G-code changes the tool, or wrapping detection or a smooth timelapse forces one. Otherwise they run in _make_wipe_tower() once the tool changes are known, and only if a tower is generated.
- The "No sparse layers" check before slicing still refuses objects next to the tower. Objects away from it are judged after slicing against the real tower height, and the drag preview draws the height limit plane only on objects the check before slicing refuses.
- The fake tower is reset at each slicing, and the conflict check only uses it when a tower is generated. It was read uninitialized on plates with no tool change.
Fixes#16936
(cherry picked from commit 7906d7e02a)
Copies of an object with the same mesh, transform and settings reuse one set of sliced layers. The check ignored height range modifiers, so when only one copy had a range, that range was either dropped from the copy or applied to both.
The check now compares the ranges and their settings too, so objects whose ranges differ slice on their own.
(cherry picked from commit 6d312b0441)
A crafted AMF could freeze Orca on Windows and macOS. The bundled expat 2.5.0 was built without XML_DTD, so its entity-amplification guard was compiled out. Expat 2.10.0 is now built from the release tarball with the guard on. Linux uses the system library only if it is already 2.10.0. Files that rely on unbounded entity expansion now fail to import instead of exhausting memory. The vendored 2.5.0 and 2.2.0 copies are removed, and the old expat.lib in existing Windows deps folders is overwritten. Deps need a rebuild on every platform.
(cherry picked from commit 7f124c1b0a)
A print host with a port connected once, then failed in every later session. The agent announced the bare IP, that overwrote the saved address, and the next launch went to port 80. The announce now keeps host:port. For Moonraker, Qidi, Snapmaker and CrealityPrint, connect() also takes the port from the dev_id when the saved dev_ip has none, which repairs records saved by 2.5.0.
(cherry picked from commit bac7112046)
* Join Precise-Z Sliver Layers to the Prime Tower Layer Below
Precise Z height ends each object at its exact top, so another object's
layers can print a few microns above these. Each sliver became its own
wipe tower layer, and a tool change on it was sized for that height: a
0.0009 mm layer asked for a 230 mm ramming band, which grew the tower
past the bed ("Prime tower is partially outside the printable area").
Once sized correctly, G-code export lost step with the tower and threw
"append_tcr was asked to do a toolchange it didn't expect".
A tower layer thinner than half the printer's minimum layer height now
joins the tower layer below: ToolOrdering records the tower layer each
layer prints on and whether it finishes it, the tower plans the joined
tool changes on that layer's z and height, and the G-code neither
advances the tower on a joined layer nor finishes the layer before it.
* Finish a Joined Prime Tower Layer on Its Last Tool Change
The joined layer always finished the tower layer, so a joined layer that
changed no tools asked for a result after the layer below had taken them
all and threw "Wipe tower generation failed". The layer that finishes is
now the last of the group that changes tools, or the last one when none
does, matching how a single layer merges its finish into a tool change.
A joined layer also reset the Type 1 tower's first print, so smooth
timelapse replayed the tower layer's wall and threw the same error.
Layers are now joined below the printer's minimum layer height instead of
half of it: precise Z height can move a layer off by up to a layer height,
and the 0.04-0.08 mm layers left on their own still grew the tower off the
bed.
* Print Joined Prime Tower Purges at the Tower Layer's Z
A joined layer printed its purges at its own nozzle height, up to just
under the minimum layer height above the tower layer, so the beads were
not pressed onto it. The emitter now descends to the tower layer's z for
a joined layer, travelling over the tower first and climbing back after,
the way it already does for a tower compacted below the objects.
Layers sliced at exactly the minimum layer height sum to gaps a hair
under it and were joined to the layer below; an EPSILON margin keeps
them apart.
* Travel Over the Prime Tower Before a Joined Layer Descends
With no change_filament_gcode and no nozzle change, the Type 1 emitter
descended to the joined tower layer's z while the head was still over the
part, then travelled to the tower at that z. It now travels over the tower
first. The tests check that every descent below the object layer happens
over the tower.
(cherry picked from commit 1c9f6f9318)
* Travel back from a lift at the lifted height, then descend
After a tool change on the Bambu Lab prime tower, the nozzle is lifted
at the tower and then travels to the next object. That travel is forced
to set the layer Z, which sent it down the final branch of
travel_to_xyz(): it cancelled the lift and emitted one combined XYZ move,
so the nozzle sank over the print and left color streaks. When the
nozzle is lifted and the target is lower, move in XY first and descend
at the target, as the branch already does after a filament change.
Fixes#14968
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep a lifted nozzle up over every travel that descends to the print
A multi-point avoid-crossing or exclusion-volume travel now stays at the
lifted height and descends only at its last point. The split descent also
covers printers with an axis remap, takes its Z move from the target
position, and is skipped when X and Y do not change. The test parses with
GCodeReader and runs with arc fitting both off and on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Check exclusion volumes from the height a lifted nozzle travels at
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Merge the lifted and multi-point travel branches into one loop
The 2-point travel, the lifted detour and the avoid-crossing detour now
share one loop; a detour only moves to the layer height at its first point
when the nozzle is not staying lifted. A new test lifts at each layer change
of a concave part with avoid crossing walls on, so lifted detours of more
than two points are checked for a nozzle that comes down before the end.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep an exclusion-volume detour lifted when its lift is still pending
A retraction leaves its lift pending until the first leg of the travel.
The interpolated-Z detour only checked for a lift already made, so it
lifted on the first leg and then lowered at each later waypoint. A lift
the first leg will make now skips the interpolation, so the detour stays
lifted and descends at its last point.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Kris Austin <kris.austin@gmail.com>
(cherry picked from commit 99fada6aab)
The height ranges are uncompensated print heights. The layer height profile
clipped them against the compensated object height, and the region ranges
were compared with the compensated slices and volume boxes without scaling,
so the range's layer height and its settings ended up at different heights.
The region ranges are now scaled by the Z compensation (not on belt printers,
whose slices are taken in the rotated frame), and the cached regions are only
reused while their ranges are unchanged.
Co-authored-by: SoftFever <softfeverever@gmail.com>
(cherry picked from commit 5fd0edf5cc)
Opening a project with fewer filaments than the printer has tools tops
up filament_presets and the flush matrix, but leaves filament_colour
and the other per-filament arrays at the project's count. Slicing then
fails the flush matrix check, and an overwriting filament sync reads
past the end of those arrays.
load_current_presets() used to fill the arrays on every load. Since
#15385 it compares against filament_presets, which the top-up has
already raised, so it no longer runs. Grow the arrays where the project
is loaded.
(cherry picked from commit b5c4ccd9c5)
* 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>
(cherry picked from commit bd3e9aeb96)
* WipeTower2: on Klipper, sync motion only before temperature commands
Follow-up to #15133. On Klipper, flush_planner_queue() emitted M400 at
every toolchange boundary, stalling the toolhead over the tower. Keep the
sync only before M104/M109/M591, and drop the sync line left behind when
GCode.cpp strips the interface-temperature M109.
End the deretraction placeholder with a newline: without the M400 that
used to follow it, the next tower move was glued to the placeholder line,
skipped post_process_wipe_tower_moves and kept tower-local Y.
Creator 5 Pro, 247 toolchanges: 1235 M400 -> 247 (~30 min saved).
* Update src/libslic3r/GCode.cpp
Good point, done. The strip now uses flush_planner_queue_command() and follows whatever the tower writes.
Co-authored-by: Kris Austin <kris.austin@gmail.com>
* tests: move the wipe tower slice and shared checks into one helper
* WipeTower2: keep the sync at the end of the unload on Klipper
[change_filament_gcode] and Tn are macros on Klipper; their non-motion
parts run when parsed, so without the sync a filament-change macro could
run while the unload and ramming moves are still queued.
Creator 5 Pro, 247 toolchanges: 494 M400 instead of 1235 (247 in this PR
before). The other boundary flushes, which stalled the toolhead over the
tower, stay removed.
* tests: check the unload sync before each change_filament_gcode
* WipeTower2: don't sync the cooldown after the interface wipe
The reset to the base temperature after the interface wipe isn't
timing-critical, but its M400 stopped the head over the tower before the
tower perimeter. Test print, Creator 5 Pro, 247 toolchanges: 3:22 with
the sync, 3:17 without it.
* tests: check only the interface cooldown for a missing sync
* WipeTower2: skip the cooldown sync on Klipper only
---------
Co-authored-by: Kris Austin <kris.austin@gmail.com>
Co-authored-by: GhZserG <ghzserg@zmod.link>
(cherry picked from commit cb80a0db84)
* Restore the Custom Camera Source in the Device Tab
The printer-agent refactor reused the Device tab's WebView for the
generic snapshot stream and dropped the "Custom camera source" row from
the Camera Setting popup along with the code that showed the user's URL
in that WebView. The two app-config keys were then read nowhere, so
anyone who had a custom camera configured lost it on upgrade.
Bring the row back and show the stored URL when the source is enabled,
with the title-bar switch button toggling between it and the printer's
own stream. The agent-driven snapshot path leaves the WebView alone while
a custom source is enabled, a URL without a scheme gets http://, and the
Enable/Disable labels are translatable separately.
* Offer the Custom Camera Source Only Alongside the Bambu Native Stream
The custom view hides the Device tab's media control and play bar, which
every agent camera mode plays through (snapshot mode via the very WebView
the custom source takes over), and the 2.4.2 feature was only ever used
against the Bambu native stream. Gate the row and the stored URL on camera
mode none, which is that stream, so the custom source never contends with
an agent's own playback. Stop the native stream when the custom view takes
over, reapply the switch icon on rescale and theme change, trim and
normalise the URL in one shared helper, and reword the hint to say a URL
is expected.
* Keep the Custom Camera View in Step With the Agent's Camera Mode
Selecting a printer whose agent streams through the shared WebView
leaves the stored custom source unsupported, so reapply the view
whenever the stored state and the applied one differ, on every camera
tick and on the no-printer reset. Read the config flag before asking
the agent for its mode, so users without a custom source pay one config
lookup per tick. Stop the printer stream for the view switch without the
failure bookkeeping, which could open the LAN dialog mid-connect. Write
the trimmed URL back into the field and store it only when enabling.
* Load the Custom Camera Page Only While It Is On Screen
Let the show helper own the WebView page: it stops the native stream,
then loads the URL when the custom view comes up and a blank page when
it goes away, so a hidden view pulls no stream and the load never races
the stop. Track the applied state in a member and evaluate the stored
state once per tick. A view-switch stop leaves no retry count or
back-off behind, the URL field is read-only while the source is
enabled, and the gating comment says what mode none actually is.
* Pass the Custom Camera URL Through Once Per Tick
Read the stored URL once per camera tick and hand it to the sync, apply
and show helpers, so a toggle can no longer show a blank page when the
URL is empty and the camera-state branches no longer start with an empty
if. Disable the URL field while the source is enabled, which greys it
out, instead of a read-only state with no visual cue. The gating comment
now gives the real reason: the custom view hides the media control and
play bar that every agent mode plays through, and the feature was only
ever used against the Bambu native stream.
* Offer the Custom Camera Source With the Bambu Printer Agent Only
Printer agents are not for general use in 2.5.0, so gate the row on the
active printer agent being the Bambu one instead of on its camera mode.
The interaction with the other agents' camera modes gets a proper design
after the release.
* Note That the Custom Camera Source Is a Temporary Bambu-Only Patch
Say at the gate and in the header that the feature is a patch for the
Bambu printer agent and is to be deprecated or extended to the other
agents once printer agents are fully implemented.
(cherry picked from commit 606b50f187)
* Keep non-Latin path names intact in the plugin audit keyword check
is_denied_path_keyword() lowercased every path component with
std::tolower(), which follows the C locale. With a single-byte locale,
which the UI language sets on Windows (Russian_Russia.1251), that
rewrites bytes of UTF-8 sequences: "Новая папка" is no longer valid
UTF-8, and has_denied_config_extension() then throws "boost::filesystem
::path codecvt to wstring: partial" while turning it back into a path.
The exception left the CPython audit hook, so the plugin call never
returned, and the app crashed later in PyFrame_GetCode.
The keyword check now uses the file's ascii_lower(), which lowercases
A-Z only; the keywords are ASCII, so matching stays case-insensitive.
ascii_lower() itself no longer goes through a locale-aware
boost::algorithm::to_lower(), so the network permission keys get the
same guarantee. The audit hook also no longer lets any C++ exception
reach the interpreter: a check that fails denies the event, like an
unanswered prompt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Address review: narrower try in audit_hook, shorter comments, a test for the catch
- Wrap only audit_plugin_event() in the try, so release_frames() is called
once after the event is decided.
- Shorten the ascii_lower() comment and drop the one that repeated it.
- Use only the .1251 locale in the non-Latin path test.
- Test that a permission prompt that throws denies the event, which
reaches the new catch on every platform.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: GNUGiminot <215263196+GNUGiminot@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
(cherry picked from commit 2ec1a0732f)
By layer: order As object list copies by their list position
sort_object_instances_by_model_order() keyed every instance on its object's
index when it initialized the order, so all copies of an object tied.
print.objects() does not list the copies in list order either: copies with a
different rotation live in separate PrintObjects, ordered by transformation,
so the ties were broken by that grouping and the copies printed as 2, 4, 6,
1, 3, 5. std::sort reordering the ties made it worse from 17 instances up.
Number the instances by their position in the model's object and instance
lists instead. No order key repeats, so a plain sort is enough; the renumber
after it compacts this print's instances to 1..n. The other intra-layer orders
and the by-object path are unaffected.
The new test rotates every second copy, which fails on every platform before
this change, MSVC included.
(cherry picked from commit a620d804ef)
* always enable OTA
* Stop vendor profile update checks in stealth mode
* Keep vendor profile updates off in dev builds
(cherry picked from commit 637d7a9ce6)
PlaterPresetComboBox::update() froze the combo and returned without
thawing it when the slot had no colour icon, which happens on a tool
changer whenever filament_presets is topped up to the tool count while
the colour arrays keep the project's shorter length. The leaked freeze
count left the combo unpainted for the rest of the session.
The slot now shows a blank swatch and still fills its list, and
update_ams_color() grows the colour arrays to the slot before writing,
as sync_colour_config() already does.
(cherry picked from commit 1a61ffd32e)
Fixes#17256
On a machine with no saved `sync_state`, the first `sync/pull` sent whatever was in memory as `?cursor=`. The server answered 400, nothing was downloaded, and the account's presets never arrived because only a 410 clears the cursor.
`SyncState::last_sync_timestamp` now starts at zero, so a session with no saved state pulls everything. `SyncPullResponse::next_cursor` had the same problem on a 304, where a stray value would have been saved to `sync_state` and sent on every later pull, so it and the other scalars in `ProfileUpsert` and `SyncPushResult` start at zero too.
(cherry picked from commit dd0079ec64)
Fixes#17128
Clicking Print on a Creality printer asked it for its CFS slots on the UI thread, with the 10 s command timeout. A K1C without a CFS never answers that query, so OrcaSlicer froze for 10 s on every click.
The send dialog now opens right away and reads the printer on a background thread. Upload works at once, and Upload and Print turns on when the read ends. The slot query waits 5 s, or the full 10 s once the printer reports `"cfsConnect": 1`, and stops as soon as it reports `"cfsConnect": 0`. When there is no filament mapping, the dialog says whether the printer reports no CFS, lists no slots, or can't be reached.
(cherry picked from commit 0b1d825142)
Internal solid infill fell back to fixed width loops so that Arachne's open
walls would not be printed after an outward spiral, which ends at the edge
and travelled back to the centre for them. Fixed width loops leave strips
up to two lines wide in the middle of an island and wedges where it
branches: on calicat.3mf they need 218 mm of gap fill against 53 mm with
Arachne, and with gap fill off for internal solid those gaps stay empty.
Keep Arachne for every solid surface and print each open wall at the centre
end of the nearest spiral instead: before an outward spiral, which starts
there, and after an inward one, which ends there.
(cherry picked from commit 9afa96e92f)
insert_gap_fill() put each piece of gap fill wherever it added the least
travel, which could be before the extrusions bordering it: the centre gap
of a Spiral Inset printed before the spiral that starts there, and gaps
where spirals meet printed before the later spiral. Each piece now only
goes after the last extrusion of its fill that passes within half its
widest width and a line spacing of it.
(cherry picked from commit 88c4c1e915)
fix: keep the Speed Dial anchored to the main window
The dial is a long-lived hidden window. Its origin was computed once, at
construction (DPIAware's CenterOnParent and create_webview's), and never
again, so moving or resizing the main frame - or dragging it to another
display - left the dial at the centre of the frame's original rect. Wayland
only looked correct because the compositor places the window there.
Re-derive the origin from the parent's current screen rect on every open,
again once the window is mapped (GTK drops a position requested before the
map), and on a DPI change. The origin comes from the fixed 540x282 box
rather than the current client height, so the content-driven resize does
not move the window while the user types. On GTK, clear the dialog's
default CENTER_ON_PARENT hint so the window manager stops overriding the
computed coordinates.
The geometry is a free function, so the centring and the work-area clamp
are testable without a GUI.
(cherry picked from commit 78134d24c6)
A printer saved while its preset used the default Orca agent stayed tagged "orca" after the preset moved to another agent such as Moonraker. select_machine() reused that entry as is, but the new agent's machine list can't see it, so the printer never connected and filament sync did nothing.
select_machine() now re-inserts such an entry for the active agent, which retags it and replaces the placeholder access code with the preset's API key. Entries saved under any other agent are left alone, so a code entered for that agent is kept.
Fixes#17004
(cherry picked from commit a30aa7ba8d)
The sync dialog is reused between syncs, and its plate index is left over from the last one. If that plate no longer exists, because it was deleted or a project with fewer plates was loaded, the next sync read the thumbnail of a null plate and crashed. reinit_dialog() now falls back to the current plate when the index is out of range.
(cherry picked from commit 70bc685101)
On a belt the brim and the part's outer wall didn't land at the same
height above the belt, so no single endstop or Y offset setting worked
for both (#16705). Brim lines sat at a fixed 0.75 layer height above
the belt. The outer wall where it rests on the belt sits half a layer
up, because the layer is sliced at mid-height, plus half its width
times tan(tilt), because it is inset half a width from the slice edge.
At 45 degrees with 0.32 mm layers and a 0.4 mm wall that is 0.24
against 0.36 mm. Brim lines now sit at the clearance of the outer wall
that rests on the belt in their own band's layer, with XY contour
compensation included. Each line's bead is built from its spacing and
clearance, so it fills its cell however small the clearance gets.
Flow::with_cross_section(), used before, delivers only a quarter of the
area once it falls back to a round bead.
The first-layer test measured from the nozzle, so a wall resting on
the belt never counted as first layer and printed at full speed with
the fan on, and the raised brim would have dropped out too. It now
measures from the belt under the edge of the bead. Travels use the
width of the path they lead to. Brim lines are as wide as the bands
are far apart, not as a bead, so they always count as resting on the
belt.
Speed, flow ratio and acceleration are chosen once per path, and a
wall loop runs from the belt up the part, so the whole loop took
whatever its seam point got. Belt paths are now cut where they cross
the edge of the first-layer band or a step of the slow_down_layers
ramp. Each piece is judged by the heights of all its points. Small-area
flow compensation keeps using the original line lengths.
Non-belt printers are unaffected.
Claude-Session: https://claude.ai/code/session_01Ux9BwdWCA7N8UG7ftaNkWg
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 3ac1b0078d)
On a belt printer the slicing height comes from the box of the mesh under
trafo_centered(), which already carries the shrinkage compensation, and
SlicingParameters::create_from_config() scaled it by the Z compensation again.
With a Z shrinkage above 100 % the top of the part was not sliced.
The belt build height check now also compares the compensated height when the
object is too tall, so an object that only fits after the compensation is no
longer refused.
Co-authored-by: SoftFever <softfeverever@gmail.com>
(cherry picked from commit a837652833)
The supported AMS firmwares were stored in an unordered_map, so the AMS
type combo listed them in an unspecified order and then selected the
current firmware by treating its id as a combo row. With an AMS Lite
(id 0) the dialog showed "AMS/AMS 2 Pro/AMS HT", and choosing a type
sent the row index as the firmware id, so it could request the opposite
firmware.
Store the firmwares in a std::map, so iteration is ordered by firmware
id and the id stays a valid combo row index.
Fixes#17125
(cherry picked from commit a5210459ee)
A vendor's installed preset cache survives an app upgrade, and the
dictionary records the type every option was written as. When a build
reads a cache written by a build that typed an option differently, the
reader dropped the option and the preset fell back to the collection
default, which is not what the vendor's JSON says. enable_arc_fitting
became an enum in 2.5.0-beta, so every vendor whose bundle was not bumped
between the alpha and the beta now loads with arc fitting off from the
alpha's cache, and the alpha reads the beta's cache the same way.
Read such a value by the writer's type and hand its text to
set_deserialize through a scratch config, so handle_legacy and the
bool/enum substitution run on it exactly as for a JSON profile and a
failed parse leaves nothing behind. A text this build cannot place is
still dropped, reported once per key per file.
(cherry picked from commit 5fb129f1f3)