* Regenerate the translation template and catalogs for 2.5.0
* Restore and fill translations for the strings added since 2026-11-03
* correct Chinese translations
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
(cherry picked from commit 8b9e977458)
67 Prusa process profiles write keys that PrintConfigDef does not define,
so the loader drops them and they never reach a slice:
- inital_layer_height (64 files), a misspelling of initial_layer_print_height
- tree_support_bramch_diameter_angle (65 files), a misspelling of
tree_support_branch_diameter_angle
- tree_support_branch_diameter_double_wall (17 files), an option OrcaSlicer
removed in 2.3.0
The loader already drops these keys, so removing them changes no setting.
Each misspelled value in a selectable preset also equals the value the
correctly spelled key resolves to, so renaming them would only repeat values.
Bump the Prusa bundle version to 02.04.00.18.
(cherry picked from commit 6aaee84c1f)
* Fix Creator 5 0.32mm process nozzle and Flashforge default processes
The 0.32mm Standard @FF C5 0.8 nozzle process listed the Creator 5 and
Creator 5 Pro 0.6 nozzle printers, so it showed up for the 0.6 nozzle and
was missing for the 0.8 nozzle. It now lists the 0.8 nozzle printers, like
the other 0.8 nozzle processes.
23 Flashforge printers named a default process they cannot use: Creator 5
and 5 Pro 0.4, 0.6 and 0.8, AD5X, Guider4, Guider4 Pro, and Adventurer 3
Series 0.6, whose default process doesn't exist. Each now names its own
process at the usual layer height for its nozzle: 0.12mm for 0.25, 0.20mm
for 0.4, 0.30mm for 0.6 and 0.40mm for 0.8.
Fixes#17306
* Let Creator 5 Pro heat the chamber when chamber control is on
The Creator 5 Pro start G-code had M191 S0. Orca skips its own M191 when
the start G-code already sets the chamber temperature, so the chamber
never heated, even with chamber control on. The line is removed from all
four nozzles. Orca now writes M191 with the highest chamber temperature of
the filaments that turn chamber control on, and M141 S0 at the end.
The 0.8 nozzle had support_chamber_temp_control off, unlike the other
nozzles, which hid the chamber control setting. Fourteen C5P filaments,
ABS and ASA among them, turn it on, so it is now on for the 0.8 nozzle too.
Fixes#14353
(cherry picked from commit b46bf81396)
* Add Recycling Fabrik and EverLoop filament profiles
Add six filament profiles for Recycling Fabrik (Braunschweig, Germany)
and its premium sub-brand EverLoop to OrcaFilamentLibrary:
- Recycling Fabrik rPLA, rPETG, rABS
- EverLoop rPLA Premium, rPLA Premium Matte, rPETG Premium
Values are the manufacturer's own print settings; temperature ranges
and densities follow the manufacturer's technical datasheets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Reindex OrcaFilamentLibrary after merging main
main bumped OrcaFilamentLibrary to 02.04.00.25 as well, and the textual
merge of the index left it invalid JSON. Took main's index, re-ran
update-index to add the twelve new profiles and bumped the version to
02.04.00.26. No profile values changed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
(cherry picked from commit 6b0d50bf7c)
"Sovol SV08 0.4 nozzle" named "0.20mm Standard @Sovol SV08" and "Sovol SV08
0.8 nozzle" named "0.20mm Standard @Sovol SV08 0.8 nozzle" as their
default_print_profile. Neither process exists in the Sovol bundle; the
processes shipped for these printers are "0.20mm Standard @Sovol SV08 0.4
nozzle" and "0.40mm Standard @Sovol SV08 0.8 nozzle". When the name is not
found, PresetCollection::select_preset_by_name falls back to the first visible
process preset, so selecting one of these printers does not land on its own
process.
Bump the Sovol bundle version to 02.04.00.10.
(cherry picked from commit ca9204927e)
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)
#17029 added the PrintaLot PETG profiles without a version bump, so the bundle changed but its version did not. This fails the version check on the 2.5.0 branch.
(cherry picked from commit d76276778c)
The SV08 MAX ships with 0.2, 0.4, 0.6, 0.8 and 1.0 mm nozzles and uses the
same extruder as the Sovol Zero, but the bundle only had 0.4, 0.6 and 0.8.
Machines copy the MAX 0.4 and 0.8 printers; layer-height range and
retraction come from the Sovol Zero 0.2 and 1.0 printers. The 0.2 process
applies to the MAX 0.4 process the same changes Sovol made between its SV08
0.4 and SV08 0.2 processes. The 1.0 process takes line widths, layer heights
and extrusion speeds from the Sovol Zero 1.0 process and keeps the MAX 0.8
accelerations, overhang speeds and shells. The eight SV08 MAX filaments list
the two new variants, and the model advertises all five nozzles.
Bump the Sovol bundle version to 02.04.00.10.
(cherry picked from commit 1f7e195d88)
* Add PrintaLot PETG profiles for Bambu Lab printers
* Remove redundant PETG defaults after independent review
* Declare PrintaLot PETG's own values on its base
The type, 255 °C and the 17 mm³/s limit are PrintaLot's values, not the
library's PETG defaults, so they should not change if fdm_filament_pet
does. filament_type is also part of the filament_id.
* Drop PrintaLot PETG values Bambu Lab printers never read
- The multitool ramming values: only the Type 2 prime tower reads them,
and Bambu Lab printers always use Type 1.
- volumetric_speed_coefficients: only read with adaptive volumetric
speed, which is off.
- filament_retract_length_nc outside the H2C: only the H2C's
change-filament G-code reads it.
- retraction_distances_when_ec where long retraction on extruder change
is off.
- filament_preheat_temperature_delta outside the H2C: only used on
printers with several nozzles per extruder.
- filament_flush_temp_fast 0 and filament_extruder_variant
"Direct Drive Standard": both are the defaults.
* Move values shared by the PrintaLot PETG presets to the base
The 17 mm³/s limit and slow_down_min_speed are the same in every preset
except the 0.2 nozzles (1 mm³/s) and the A2L 0.2 nozzle (40 mm/s), and
most presets write the same placeholder filament start and end G-code.
Presets with other values keep their own.
* bump OrcaFilamentLibrary.json
---------
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
(cherry picked from commit 7374b734d3)
* 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)
The navigator is drawn into ImGuizmo's NoInputs "gizmo" window, so ImGui
never owns the press (mouse_avail_to_imgui is false) and WantCaptureMouse
only reflects what the previous frame requested. ViewManipulate asked for
capture only on frames with a non-zero MouseDelta, so the still frame that
follows the press dropped it.
The next motion event then reached the canvas, which latched it as a camera
drag. With an object behind the navigator that drag is refused at
GLCanvas3D::on_mouse (the m_hover_volume_idxs gate of the rotate branch),
so nothing marked the scene dirty, no frame rendered, and the navigator never
rotated. The armed isClicking survived to the release frame and snapped the
view to the pressed panel instead.
Request capture for as long as the press is held, so the navigator owns the
whole gesture.
Fixes#17282
(cherry picked from commit 61e1841f9d)
* 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)
* Sign Windows release and nightly builds in CI
* Replace the README's SignPath signing policy with a signed-builds note
(cherry picked from commit 73e64d3bc5)
* Speed Dial: fix side effects of single-click launch
Follow-up to the single-click launch behaviour:
- hovering a row or favourite previews it in the footer, so its description
and wiki link stay readable without running it
- the click that dismisses the pin menu only closes the menu instead of also
running the row under the cursor
- a double-click on "Go to tab..." no longer jumps to the tab that renders
under the cursor
* Speed Dial: keep the hover preview on the row the pointer rests on
mouseenter also fires when rows move under a stationary pointer, so typing
a search or pressing the arrow keys moved the footer onto whatever row
scrolled beneath it while Enter still ran the highlighted one. Listen to
mousemove instead: only the pointer's own motion previews a row.
Moving from a row to the footer crosses the rows below it, and each of
them replaced the preview, so the Wiki link belonged to the last row
crossed. Commit the preview only after the pointer rests (150 ms) and
drop a pending one when it leaves the list, so the footer keeps the row
the pointer came from.
* Speed Dial: restart the hover preview timer on pointer movement
The 150 ms settle timer ran from the moment the pointer entered a row, so a row that took longer than that to cross was previewed on the way down to the footer; the wiki link then described a crossed row instead of the row the pointer came from.
Restart the wait on every move of 6 px or more and cap it at 1 s, so a crossed row is never committed while a pointer that never rests still previews the row it stays on. Moves under 6 px are hand jitter and keep the running timer, so a shake still previews. The timing is pinned by a node-vm regression test with faked timers.
---------
Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
(cherry picked from commit d2ade00ad8)
* 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)
A scarf ramp that would end less than half a step before the next loop
vertex was extended to that vertex, so that no flat stub follows the ramp.
Arachne places the wall's vertices a little differently on every layer, and
arc fitting moves them further, so the ramp grew by a different amount on
neighbouring layers: the scarf end, which the preview draws as the seam,
stepped sideways by up to half a step from one layer to the next.
Where the vertex lies within an eighth of a common line width of the
straight line from the exact ramp end to the vertex after it, measured in
3D so a Z contour is kept, the flat path now skips that vertex instead. The
ramp keeps its exact length and ends at the same place on every layer, and
the first flat segment is still at least as long as the one that followed
the vertex. At a corner, or when the vertex ends the path, the ramp is
extended as before.
(cherry picked from commit 6c96e41162)
On Linux, Esc in the settings search reached the printer or filament
settings dialog, which closed while the search popup kept its input grab.
On Wayland this froze the whole UI; on X11 the popup stayed on screen and
swallowed the next click. Esc in the object list search did nothing.
Both search popups now handle Esc themselves: it closes the search and
goes no further. In the settings search, focus returns to the search
button, so the dialog stays open and a second Esc closes it.
(cherry picked from commit 06bccd5570)
With slowdown_for_curled_perimeters on, the fully unsupported entry of the overhang speed table was overhang_4_4_speed for every role. Since #14735 samples the inside of a line, the unsupported middle of an anchored bridge strand got that speed. Bridge infill now uses bridge_speed there, like the branch without curled slowdown. Other roles keep their old speeds.
(cherry picked from commit 533d4c3e9e)
Mesh boolean crashed in the CGAL volume check when a mesh had vertices that no triangle used. The conversion to CGAL now removes those vertices and renumbers the rest. The conversion used by UV unwrapping still keeps the original vertex numbering.
(cherry picked from commit b3f8d0af15)
* Keep Short Objects on the Plate When Arranging By Object
Arranging objects shorter than the nozzle height for printing by object
placed them off the plate, and the plate then reported them too close to
each other (#16991).
- The arrange bed grew by half the extruder clearance radius, while short
objects are only inflated by half the gap between them, so the extra bed
was free to use. The bed now grows by the objects' actual inflation,
after the bed margin is given back to the largest object.
- Arrange kept short objects 2 mm apart, but the sequential clearance
check needs a nozzle diameter between them.
- Giving back the bed margin measures objects without that inflation,
which only keeps objects apart, plus EPSILON so rounding still lets an
object that fills the bed be placed.
- Exclusion regions are moved only when the bed grows, so short objects
keep their gap to calibration regions on every side.
* Avoid objects at the bed edge and fit turned objects when arranging by object
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
(cherry picked from commit 041df4031e)
* Verify and improve AI pt_BR translations
* Fix typos and agreement left by the pt_BR term changes
Cabeçote is masculine and ponte feminine, so the switch from cabeça da ferramenta and pórtico left mismatched articles and pronouns. Also restore capitals on sentence-initial "Clique" and fix "rteservada".
---------
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
(cherry picked from commit 4ab172fd33)
wall_loop_direction and initial_solid_infill_acceleration in the three
SV08 MAX processes, and minimum_sparse_infill_threshold in eight SV06 ACE
and SV06 Plus ACE processes, are not options OrcaSlicer defines. The
loader drops them, so removing them does not change the sliced output.
The SV06 ACE files already set minimum_sparse_infill_area.
Bump the Sovol bundle version to 02.04.00.09.
(cherry picked from commit 4274ea6bb3)
Adds system profiles for the BenFab 450, a Klipper (Moonraker) FFF printer with a 426 x 426 x 480 mm build volume: 0.4/0.6/0.8/1.0 mm nozzle variants, Fine/Optimal/Standard/Draft processes per nozzle, OrcaFilamentLibrary generic filaments, cover image, bed model and texture.
Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit ffdb5da100)
* Inline Machine start gcode for RF50 0.6 nozzle
The previous fix seperated the `machine_start_gcode` into
multiline strings sperated by commas which were then translated
to real commas on the RF50 0.6 nozzle profile. Now it's inline
and the gcode commands are only seperated by a newline. This way
there are no errors when printing with this profile and the correct
pressure advance is set when the print start.
* Bump up Blocks profile version
(cherry picked from commit eac3ba4416)
* Group a filament onto the nozzle that has it loaded in Filament-Saving mode
* Match closer colours and the same filament sub-type in Convenience mode
(cherry picked from commit 7b6c12cf74)
The lightning distance field samples each layer's overhang on a grid
anchored at the bounding box of the infill outlines. The opening it
applies to the overhang first can push a sample a little past that box.
Such a sample falls into its neighbor's grid cell or one update() never
visits, so it is never erased, and generateNewTrees() adds the same
point to the tree forever until memory runs out.
Grow the box to cover every sample. It only changes when a sample lies
outside it, and models that slice today give the same result.
Fixes#17051
(cherry picked from commit 7ac46c9a61)
A user printer preset with more extruders than its system parent lost the extra extruders' values on load. The parent copy is now grown to the child's extruder count before the child's values are merged, in all three load paths.
Fixes#16535
(cherry picked from commit 9b4f84a923)
* Test the layer height limits taken for an object, and that they don't keep objects from sharing a prime tower
* Take the layer height limits from an object's own extruder, and don't let them refuse a prime tower
* Test the prime tower check through Print::validate(), and shorten the equal_layering comment
The test runs Print::validate() on two cubes, on filaments 1 and 3 of a printer whose first extruder allows thicker layers than the others. Without this PR, and with only the index fix, it fails with the refusal from #16938. It uses filament 3 because filament 2 read extruder 1's limits before the index fix.
---------
Co-authored-by: raistlin7447 <kris.austin@gmail.com>
(cherry picked from commit fcd96ad91c)
On a single-extruder printer with several filaments, every filament used filament 1's "Only lift Z above", "Only lift Z below", "On surfaces" and "Travel distance threshold" values, so a filament's own overrides of these settings were ignored. All four are now read for the filament that is printing.
Fixes#16185
(cherry picked from commit 98b539c3e6)
fix: crash opening a project with missing or empty settings
load_files reads filament_colour from the project config before the
defaults are merged in, and uses it without a null check. A 3MF whose
project_settings.config has no filament_colour crashes on open. The
2.3.1-alpha migration reads sparse_infill_rotate_template and
sparse_infill_pattern the same way.
Check those reads for null. A missing filament_colour keeps the count
at 1, and a missing infill pattern falls back to the default the merge
would apply. The two identical 2.3.1-alpha migrations become one lambda.
The 2.3.1-alpha and newer-version branches also skipped the empty-config
check, so an empty project config reached the same reads. Send every
project config the load skips through one fallback that loads the
geometry only and logs it. It keeps each branch's notice, and a
config-only import now says the 3MF has no project settings OrcaSlicer
can import instead of claiming to load geometry. A same-version file no
longer calls itself old.
Geometry-only imports decided by these checks never added filaments for
objects assigned past the first, because that step ran before them. Run
it after the checks. Count project filaments per file, and drop the two
branches at the end of the chain that no file type reaches.
Fixes#17008
(cherry picked from commit eda4062d68)
* Enable Basque language in preferences
Add Basque to the supported languages list and display it as Euskara in the language menu.
* only formating
---------
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
(cherry picked from commit f894d08881)
# Description
<!--
> Please provide a summary of the changes made in this PR. Include
details such as:
> * What issue does this PR address or fix?
> * What new features or enhancements does this PR introduce?
> * Are there any breaking changes or dependencies that need to be
considered?
-->
When an AMS reports a system filament preset, syncing will replace a
custom preset based on it, losing the user’s overrides. Keep the
existing preset when it inherits from the reported preset, while still
syncing the tray’s filament data.
# Screenshots/Recordings/Graphs
<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->
## Tests
<!--
> Please describe the tests that you have conducted to verify the
changes made in this PR.
-->
<!--
> A guide for users on how to download the artifacts from this PR.
-->
[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
(cherry picked from commit db35f3d098)
Deleting the last modifier of an unprintable object painted it in its
normal colour again: ModelObject::delete_volume gives the remaining
volume a new id, reload_scene then builds a fresh GLVolume for it, and
nothing copied the instance's printable flag into the new volume. The
object list and the slice were right; only the 3D view went stale.
reload_scene now copies ModelInstance::printable into every GLVolume it
creates or reuses, so the canvas follows the model on every reload
instead of relying on each call site to refresh it afterwards.
Checked on Linux with a cube plus a block modifier saved as unprintable:
deleting the modifier turned the cube from grey to its normal colour
before, and leaves it grey now; toggling Printable from the object's
context menu still switches it both ways.
(cherry picked from commit 9e5110d593)
A print host job scheduled by Print is moved into the print host job queue at
the end of prepare_upload(). When the run ended before that point, because a
post-processing script or a slicing-pipeline plugin failed in upload mode, or
because the slice was cancelled, the job stayed in m_upload_job. Every later
plain slice, even in a new project, then ran prepare_upload() again with the
first job's output name and uploaded (and printed) the file although only Slice
was pressed, until an upload succeeded or OrcaSlicer was restarted.
reset_export() runs after every completed, failed or cancelled slice and on a
new project, and already clears the export path for the same reason. Clear the
scheduled upload there as well.
(cherry picked from commit efe735853a)
The post-slice check stored the extruders that can't print each filament as bits in an int. From the 32nd extruder on, the shift overflowed, and on x86 extruder 33's bit landed on extruder 1. limit_filament_maps and the printable area mask are now 64-bit, which covers MAXIMUM_EXTRUDER_NUMBER. Printers with up to 31 extruders get the same values as before.
The tests check the area, height and filament type limits on nozzles 2, 32, 33 and 64, and slice a cube on nozzle 64 of a 64-nozzle printer.
(cherry picked from commit 5ea64864ef)
The Linux build unpacks the AppImage to add the preset caches and packs
it again with appimagetool. The runtime extracts every directory as
0700, and appimagetool's continuous build 333 (2026-10-29) refuses to
pack a tree that other users could not read, so every Linux build has
failed at that step since. Give the whole extracted tree, caches
included, world read and execute access right before repacking.
(cherry picked from commit 3911c9a56e)
On macOS the app could hang at 100% CPU when a project with customized
presets was opened into a running app and the message box was closed
while the idle prebuild was building the Project page's web view. The
web view waits for WebKit in a wxYield() loop, and closing the dialog
aborts the modal session, so the reply never arrives.
The idle scheduler now runs a slice only in the main event loop, so no
pages are built while a modal dialog is open. Building resumes when the
dialog closes.
(cherry picked from commit 3610d8bb35)
Synchronize filament list showed "OrcaSlicer can't connect to <printer>"
whenever the filament list came back empty. For pull-mode agents that is
also the normal outcome on a reachable printer that has no AMS, CFS or
other multi-material unit, so every such Moonraker printer was reported as
powered off or off the network.
When the printer is online and has already reported its status, explain
that it lists no filament system instead.
(cherry picked from commit 6112429980)
* Add K1 Max printer model to Creality multicolor capable prints
Not sure why, but for some reason the K1 Max is not under CFS-capable models while all others are.
This corrects that mistake
It also enables using the lidar (enableSelfTest) which the k1 max came with from the factory
* fix(CrealityPrint): treat K1 Max as a K1-family model
K1 Max firmware stores gcodes under /usr/data and uses the stricter
WebSocket protocol, so it needs the same handling as the other K1
models. Add it to is_k1_family().
* profiles: switch K1 Max to the CrealityPrint host
Mirror the rest of the K1 family (#14089): set host_type and
printer_agent to crealityprint so the K1 Max uses the CrealityPrint
LAN host instead of the generic Octo/Klipper host, and bump the
Creality profile version.
* fix(CrealityPrint): cover the K1 *_CFS-C model names
The CFS bundle variants report their own literal /info model names, so
list K1 Max_CFS-C, K1 SE_CFS-C and K1C_CFS-C in both the K1-family set
and the CFS-capable table, next to the existing K1_CFS-C entry.
Also refresh the discovery comments, which still described the K2
platform only.
* profiles: switch the remaining K1 CFS-C variants to the CrealityPrint host
K1 Max_CFS-C, K1 SE_CFS-C and K1C_CFS-C were the last K1 machine
profiles still on the generic Octo/Klipper host after #14089. Set
host_type/printer_agent to crealityprint like their non-CFS siblings.
* Recognise the Creality K2 SE (F016) as a CFS-Capable Printer
The Creality Print host gates CFS filament sync, the colour mapping in the
send dialog and the multi-colour start command on a model table that had no
entry for the K2 SE. Its firmware reports the model code F016, so a K2 SE
Combo was treated as a plain printer: the CFS was never queried, the
Moonraker fallback found nothing and the sidebar reported a connection
failure.
Add F016 to the table under the name Creality Print uses for it.
* Use the CrealityPrint Host for the K2 SE Profile
The K2, K2 Plus and K2 Pro presets talk to the printer through the
CrealityPrint host, which is where CFS sync, the colour mapping and the
multi-colour start command live. The K2 SE preset was still on the generic
Octo/Klipper host with no printer agent, so a stock K2 SE never reached that
code even once its model code is recognised.
Switch it to the same host and agent as the rest of the K2 family. The
bundle version was already raised in this change.
---------
Co-authored-by: Maarten <9350591+mjkl-gh@users.noreply.github.com>
Co-authored-by: Hanif Koh <hanifkoh@outlook.com>
(cherry picked from commit 88806ac63e)
Enum list options in the static print config defaults had no keys map. A config copied from them, such as `DynamicPrintConfig::full_print_config()`, wrote these options as an empty string and crashed when a name was read into one. `StaticCache::finalize()` now sets `coEnums` defaults from `create_default_option()`, which adds the keys map. Option values are unchanged.
Fixes#16964
(cherry picked from commit d28c71c485)
With a raft, an object too thin for any layer gets an empty layer
list. Two functions read it as if it had an entry.
- groupingVolumesForBrim() reads the first layer, and slice() calls it
before its own check for an empty list.
- With Precise Z height on, adjust_layer_series_to_align_object_height()
read the last entry. This also runs in Print::validate(), so it
crashed before slicing started.
Both functions now return early on an empty list, so slicing reaches
the existing "No layers were detected" error.
Fixes#17009
(cherry picked from commit 59f0cc3806)
With "Use printer agents" on, Print plate and Send on Moonraker-based printer agents uploaded the plate's .gcode.3mf bundle under a .gcode name, so Klipper read a zip as G-code and cancelled the print.
Both paths now upload the plate's G-code from the bundle, named after the job. Printers whose profile sets use_3mf keep getting the bundle, named <job>.gcode.3mf, and the Qidi agent's print start names the plate with plateindex. The print start quotes the file name, so job names keep spaces, apostrophes and non-ASCII letters.
Picks up #16453 by DIEHARDave, who wrote the plate G-code extraction for Print plate.
Fixes#16954
Co-authored-by: DIEHARDave <diehard.dave@gmail.com>
(cherry picked from commit 187baae4ee)
Transferring an unsaved post-processing script onto a preset with no scripts crashed Orca. apply_only called set_at() on the empty target list, and set_at() reads the list's first value. apply_only now gives an empty target list a first value, and an empty source list replaces the target list.
deep_diff now reports serialized lists (post-processing scripts and the flow compensation model) as one setting, through is_edited_as_whole_list(). Tab::options_list_storage_key uses the same check. The unsaved changes and Compare Presets dialogs show these lists the way the settings tab does.
(cherry picked from commit 98619b64a2)
# Description
Starting a new project or opening one could crash OrcaSlicer if the
Design tab had been opened earlier in the session and OrcaSlicer wasn't
the active window at that moment. It no longer crashes, and the Design
tab is still cleared for the new project as before.
Only reachable with the CAD feature turned on. No change to slicing or
to project files.
# Screenshots/Recordings/Graphs
<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->
## Tests
Reproduced on a Windows Release build of a feature branch that has the
same code, by driving New Project with OrcaSlicer visible but not the
active window and a debugger attached. Before the change it crashed with
the same stack as the original crash log. After it, the same steps
finish without a crash. This branch (main plus the change) wasn't built
on its own. There's no automated test, because the crash needs a real
change of window focus.
<!--
> A guide for users on how to download the artifacts from this PR.
-->
[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
(cherry picked from commit 0db324476f)
* fix: keep a Full Publish copy's variant vectors and list in step
A published Full entry clones the receiver's filament preset and overlays
the author's values, but the copy's variant list was rewritten to the
author's columns even when a variant-bearing key could not be filled from
the file. That key kept the receiver's width while every reader sizes the
layout from the list, so one variant silently read another variant's
value.
Copy a variant key only when the file carries all of the author's
columns, then drop any remaining variant key whose length disagrees with
the author's column count, and set the list last. filament_extruder_variant
is itself a member of filament_options_with_variant and is skipped by that
cleanup. The layout joins the entry's dedup key, so two entries naming one
preset but carrying different variants cannot share a copy.
A Full copy is detached and parentless, which also meant it never reached
the receiver's saved project: get_preset_differed_for_save stored no diff
without a parent, and load_project_embedded_presets dropped a preset whose
inherits did not resolve. Embed a parentless preset with its whole config
and resolve it over the default preset on load, mirroring the custom-root
branch of the user-preset loader. A preset naming a missing parent is
still dropped.
Tests: a Full copy drops a variant key the file cannot fill; a parentless
project-embedded preset keeps its own variants on reload.
* fix: stop relabelling and truncating published filament variants
Review of the previous commit found three paths that still let a Full
Publish copy or a loaded preset describe variants its vectors do not
hold.
set_num_filaments resizes every key in m_filament_option_keys to the
filament count, and two of those keys (filament_retract_length_nc and
volumetric_speed_coefficients) are variant-bearing. Loading a
multi-variant preset, including a saved Full copy, truncated them to the
first variant, which readers then hid by clamping. Skip variant-bearing
keys there, as Preset::normalize's own pass already does.
A variant key the file did not carry was kept whenever its width matched
the author's column count, then relabelled with the author's variant
names. When the receiver lists the variants in another order, that puts
one variant's value under another's name. Keep the key only when the
receiver's list is the same layout, or it holds a single value; otherwise
drop it and report it in skipped_keys.
An imported material key that names a file column but is per-slot in this
build was read positionally, returning another slot's column. Skip and
report it instead.
Also narrow the parentless project-embedded preset path to a filament
preset that carries a variant layout, and keep a failed apply from
aborting the whole project load.
* test: store filament_retract_length_nc as the nullable option it is
The filament count test set the key through the non-nullable accessor.
The option's default is ConfigOptionFloatsNullable although the
definition says coFloats, so the value was written through the wrong
dynamic type and the later lookup returned null. Use the nullable
accessor and assert the lookups succeed instead of dereferencing blindly.
(cherry picked from commit 45a29d391b)
* Fix Publish 3MF export and import of filament variants
Variant-bearing filament keys (filament_options_with_variant) hold one
value per (slot, variant) in the uncompacted config, but the published
path addressed them by slot: export kept the wrong column once an
earlier filament had more than one variant, import wrote every material
key to receiver variant 0, and Full Publish copied a single variant.
Add a column model in PublishSettings: file columns from
filament_self_index, exact variant matching, and the column a slot
actually prints with (filament_map / filament_volume_map / nozzle
types, hybrid mapped through the slot's own volume type). Export
rewrites partial material entries to base#col, masks those keys by
column instead of slot, and drops a key whose column is foreign, out of
range, or whose vector does not match the file layout. Import maps
base#col back to the receiver preset's variant with the same name and
skips (reports) a miss instead of writing variant 0; plain keys from
older publishes keep the positional import. Full Publish copies every
variant of the author's slot and sets the copy's
filament_extruder_variant.
No new file keys: variant-bearing material keys gain a #col suffix.
No UI change in this commit.
* Fix missing includes
* Fix unit tests
* Fix unit tests
(cherry picked from commit c0efd44e56)
* Validate Only the Edited Variant's Adaptive PA Model and Accept Spaces in It
Since pressure advance became a per-variant filament setting, the Filament
tab validated every variant column of the adaptive pressure advance model
whenever one was edited. The columns the user never touched still hold the
default placeholder, which the validator rejects, so every edit of a
multi-variant filament ended in a "Line 1: flow value must be greater than PA
value" dialog about a column the user could not see. The check now covers the
variant being edited only, as the nozzle temperature checks on the same tab do.
The validator also rejected whitespace between the values, which the model
parser accepts, so a model typed as "0.027, 8.1416, 2000.0" sliced correctly
but warned on every slice. Whitespace is now ignored before the values are
checked.
Enabling adaptive pressure advance before entering a model warned that the
model "may contain invalid values", which only meant that the placeholder is
all zeros. That case now gets its own warning saying that no measurements
have been entered.
* Keep the Empty Adaptive PA Model a Single Filament Column in Its Test
Deserializing an empty string into the model option leaves it with no
entries, and get_at on an empty vector aborts on a libstdc++ built with
assertions, as the Flatpak unit-test lanes are. Presets always hold one
column per filament, so set the value directly.
(cherry picked from commit 2cb2f0d2e7)
MachineObject::upgrade_display_state lost its initializer when it became an enum, and only Bambu status messages assign it. Printer agent printers (Moonraker, Qidi) kept whatever value was in memory, so the Print and Send dialogs could block an idle printer as "updating firmware". It now starts at UpgradingUnavaliable, the value it had before.
The Send to Printer dialog now labels printers with get_shown_printer_name(), so printer agent printers show "Name (IP)" and Bambu labels are unchanged. Printers that share a name each get their own entry, where before every entry pointed to the first printer with that name.
(cherry picked from commit d81a212f53)
The orbit multiplier preference is stored with a decimal point, but was
parsed with std::stod, which follows the C locale set by the interface
language. With a comma-decimal language, 0.99 parsed as 0 (frozen camera)
and 1.99 as 1. Parse it with string_to_double_decimal_point instead.
Fixes#11534
(cherry picked from commit 2e562e8b9e)
The PA Line test took its speed limit, line width and extrusion from filament 0, whatever filament the test was assigned to. On any other AMS slot or filament, the test printed with the wrong speeds and the wrong extrusion (#16530).
The test now uses the filament the G-code generator has selected for it:
- the fast lines are capped by that filament's max volumetric speed;
- the line width uses the nozzle diameter of that filament's extruder;
- the lines and the number box use Extruder::e_per_mm() times print_flow_ratio, like a regular print.
With one filament whose flow ratio is not 1, the PA lines now use that flow ratio too. PA Pattern output is unchanged.
Adds a regression test that checks the PA line feedrate and extrusion for a test assigned to the second of two different filaments.
(cherry picked from commit 4b68224ff4)
Strip known model extensions from object names in per-object STL export, so `bracket.stl` exports as `bracket.stl` instead of `bracket.stl.stl`. Leading and trailing dots and spaces are trimmed too, so names like `.stl` no longer become hidden files.
Co-authored-by: yw4z <ywsyildiz@gmail.com>
(cherry picked from commit 7349ea795b)
The 02.08.04 Bambu network plug-in series appended four strings to
BBLModelTask (design_title, title, instance_title, create_client).
get_subtask() hands the plug-in an OrcaSlicer-allocated BBLModelTask to
fill in place, so the plug-in wrote 128 bytes past the end of the object
and corrupted the heap as soon as the Device tab fetched the subtask of a
connected printer. Routing get_subtask through the Bambu agent (#15908)
exposed it; before that the call hit the Orca Cloud stub.
Add the members so the object is as large as the plug-in's. Older
plug-ins fill only the leading members and leave these empty.
(cherry picked from commit 8c2c16f318)
* Prune the Cached Preset JSONs Once for All Windows Targets
build_preset_cache.bat pruned each target on its own, reading every
vendor's preset list from the checkout's <vendor>.json. CI names the
checkout as the first target, and pruning it deletes those files, so the
install tree that the portable zip and the MSIX are packed from only
lost the 71 vendor JSONs and kept all 14,600 preset JSONs next to the
caches. The prune also started one PowerShell per vendor and deleted
file by file, which took 28 minutes on the Windows arm64 runner against
under a minute on x64, and set the wall clock of every PR.
The pruning moves to prune_cached_presets.ps1, run once for all targets:
it reads every vendor profile before touching any target and deletes in
a single process, printing how long each target took. The batch script
only validates the targets, installs the caches and queues them.
A test suite exercises the script on a made-up profiles tree, including
the source-then-install-tree order CI uses, and runs in the Windows build
script tests job.
* Resolve the Prune Script Next to the Repo Root, Not %0
The prune label runs after the argument loop has shifted %0 along with
the rest, so %~dp0 named the last target's directory and PowerShell
could not find the script. REPO_ROOT was captured before any shift.
* Read the Preset List From the Target's Own Profile in the Shell Script
The shell script read each vendor's preset list from the source profiles,
which is gone once an earlier --prune-source target has been pruned. No
caller passes the source as a target today, so this is the same latent
dependency the batch file had, removed before it bites.
Ported from https://github.com/OrcaSlicer/OrcaSlicer/pull/16975.
---------
Co-authored-by: Lam Wei Lun <weilun.lam@gmail.com>
(cherry picked from commit 541ff1da58)
The Creality Hi runs Moonraker but reports its CFS in the `box` printer object, which the Moonraker agent didn't read, so filament sync found no slots. The agent now queries `box` when it finds no lane data or Happy Hare, and the parser lives in `Utils/CrealityCfs.cpp`. Creality material IDs map to filament types, with the K2 family's `same_material` list as a fallback for branded spools.
`update_filament_multi_color()` no longer stops at the first slot without a multi-colour list. It uses the slot's own colour instead, so the list stays aligned with the filament list and selecting a later filament no longer writes past its end.
The CrealityPrintAgent fallback no longer syncs a preset of a different material when no base preset of the reported type exists.
The K2 Plus `same_material` fallback is from mattjanus.
Co-authored-by: mattjanus <18539984+mattjanus@users.noreply.github.com>
(cherry picked from commit d67e0d8dc4)
# Description
On Windows, OrcaSlicer refused to start with "Orca Slicer GUI
initialization failed: invalid string position" when `OrcaSlicer.conf`
ended right at its closing brace, as it does after a person or a tool
edits and saves it. Such a file now loads, and the missing checksum is
only logged, as it already was for a checksum that doesn't match. A
backup `OrcaSlicer.conf.bak` without its checksum line no longer crashes
the recovery path either; as before, it is not used to restore a
corrupted configuration.
No change for configuration files the app saved itself: their checksum
is still verified.
# Screenshots/Recordings/Graphs
<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->
## Tests
New `[AppConfig]` tests load a configuration without the checksum line
(ending at the brace, and at a newline), restore a corrupted
configuration from a backup whose checksum matches, and leave a backup
without its checksum line unused. The two regression tests fail without
the fix with "invalid string position" and pass with it; the full test
suite passes on Windows.
By hand on Windows: a build without the fix shows the initialization
error on a configuration ending at its brace, this branch opens the main
window on it, and restarting on the configuration the app then saved
logs no checksum warning.
<!--
> A guide for users on how to download the artifacts from this PR.
-->
[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
(cherry picked from commit 4720370149)
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
(cherry picked from commit 42608687e5)
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.
(cherry picked from commit af16875afb)
* Fix center of mass details, belt preview and section view bugs
Fixes the center of mass bugs from #16781 (center of mass a-d and
rendering b).
- The details box follows its marker, so zooming toward the cursor
could slide it under the mouse, where ImGui took the wheel and
zooming stopped. The wheel now zooms over the box.
- Esc closes the details box. A click on a marker now focuses the 3D
view first, so Esc reaches it after typing in a sidebar field.
- On belt printers the Preview markers stayed in the raw G-code frame
while the upright view draws the toolpaths back-transformed. The
masses now get the toolpaths' transform. It shears, so the second
moments are kept as a full 3x3 matrix to keep the moments of
inertia right, and the bounding box rows are left out for a map
that mixes the axes, where the box of the mapped corners would be
far too large.
- At the top layer of the slider the solid marker of what is printed
so far covered the faded finished-print one, which could not be
clicked. At the top layer only the finished print's markers show,
drawn solid.
- The section view cuts a marker away when its center is on the cut
side, as it does the toolpaths' option markers.
* Keep the belt bounding box and store six second moments
- Belt prints keep the bounding box rows in the details. The G-code
back-transform moves from GCodeViewer into
BeltTransformPipeline::build_gcode_back_transform(), and on a belt
print the processor keeps a second box per mass, of each segment's
ends and bead height mapped by its linear part. ObjectMass::transform()
moves that box by the translation, instead of dropping the box that
the shear would blow up.
- A mass stores its second moments as the diagonal and the three cross
terms instead of a full matrix, which is built only to transform it.
(cherry picked from commit e66569a966)
* 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.
(cherry picked from commit aa3291b380)
The U1 profiles never set printer_structure, so every U1 preset showed Undefined. Set it to corexy on fdm_U1, the base all five U1 nozzle presets inherit, and bump the Snapmaker bundle version to 02.04.00.20.
Slicing output is unchanged: the code only branches on i3, so CoreXY and Undefined take the same paths.
Fixes#16413
(cherry picked from commit 3322f6101c)
The preset sync thread pushed bundle notifications to the notification manager directly from the thread. At exit the Plater is destroyed before OnExit() joins the thread, so a pass still running could crash in push_notification_data().
The notifications are now pushed on the GUI thread with CallAfter() and dropped once the app is closing or the sync is stopped. The bundle loop also returns as soon as the sync is stopped, so the thread exits quickly and does not delete the subscribed bundles it did not reach.
(cherry picked from commit e410cf3656)
On printers where a filament slot's edit button opens the editor directly (IDEX, toolchanger, multi-extruder), cancelling the unsaved-changes dialog wrote the preset still open in the editor into the clicked slot.
- `switch_to_tab()` now compares the slot's assigned preset with the one open in the editor to decide whether to reload.
- The edit button sets `editing_filament` only after `switch_to_tab()` succeeds, as `Sidebar::edit_filament()` does.
- `UnsavedChangesDialog::build()` checks the `find_preset()` result for null.
Fixes#15767
(cherry picked from commit 5897d95d4d)
* Fix Publish 3MF printer extruder values showing Undefined
The Publish dialog indexed printer per-extruder rows by variant column
but read them from full_config(), which compacts those vectors to one
slot per extruder. Read the Printer rows from full_config(false) instead.
Inherited printer per-variant vectors also kept the root's length, so a
printer with more variants than its root had no value for the extra
variants. Pad them to the printer's variant count after inheritance.
* Map published printer keys to the receiver's extruder with the same number
A published printer key used to land on the receiver's slot with the
same index, so the author's layout decided the target. Files now carry
the author's printer_extruder_id and printer_extruder_variant. On import,
each key goes to the receiver's extruder with the author's number, when
that extruder currently runs the author's nozzle type. Anything else is
left unapplied and reported. Files without the layout keep the positional
import.
* Fix clang-tidy
(cherry picked from commit 97e6c71793)
* Update Turkish translations
* Match option names to the existing Turkish labels
* Drop the AI Translated comments from the reviewed Turkish entries
---------
Co-authored-by: yw4z <ywsyildiz@gmail.com>
(cherry picked from commit 3936995b6e)
When the Bambu network plugin reports a failed LAN connection with code -1, the dialog now lists three things to check under the existing error line. They cover the network and IP address, the network plug-in version in Preferences, and a missing or damaged certificate in printer.cer.
The error line keeps its existing msgid, and each hint is its own translatable sentence.
(cherry picked from commit 731a08d1c6)
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".
(cherry picked from commit b6ca378b23)
A mixed filament prints with its component filaments, each on its own extruder, but the placement checks resolved it as a filament of its own. On non-Bambu multi-tool printers this could block an object because an extruder that prints none of the components can't reach it, or allow it when a component's extruder can't.
Mixed filaments are now expanded to their components before extruder resolution in the printable area check (GUI and CLI), arrange and the exclusion volume preview, Print::validate(), and brim and support exclusion clipping.
Fixes#16945
(cherry picked from commit 59aa101ea6)
Uploading a multi-filament plate to a Flashforge printer failed with "Enable IFS" even when the printer has no IFS and the profile uses Manual Filament Change. The upload dialog now skips the IFS requirement when Manual Filament Change is on, and starts with IFS unchecked in that case on printers that have one.
Fixes#15307
(cherry picked from commit 6d2869c430)
fdm_process_qidi_x3_common used {filament_type[0]} in filename_format, so files were named after the material in filament slot 1. Use {filament_type[initial_tool]} like the other Qidi process presets, and bump the Qidi profile version to 02.04.00.20.
(cherry picked from commit 9f39b8347f)
The post-slice check compared each path with the bounding box of the region its nozzle can't reach. When the nozzle's printable area is inset on two or more sides, that region is L-, U- or frame-shaped and its box covers the whole bed, so every slice failed. The check now tests the path's box against the region itself, and the same result sets limit_filament_maps.
Fixes#15746
(cherry picked from commit b7ecf1b295)
Since mid-October, `xcrun stapler staple` on GitHub-hosted macOS runners loses its connection to Apple's ticket service (-1005, Error 68) after notarization is accepted, and all three retries fail. The stapler fetches the ticket over HTTP/3 on UDP 443, which the hosted runners drop (actions/runner-images#14924). A new step blocks outbound UDP 443 before signing, so the stapler uses TCP. It is skipped on self-hosted runners, where the firewall rule would outlive the job.
(cherry picked from commit e4e00e9746)
The GUI re-applies the unchanged config after every slice. filament_map, filament_volume_map and filament_nozzle_map are adopted from the new config but were left in full_config_diff, because the erase was commented out. That invalidated psGCodeExport on every reapply, so the slice that had just finished was thrown away. Erase them from full_config_diff too, including filament_nozzle_map in manual map mode.
(cherry picked from commit 7125a546b8)
@@ -87,7 +87,7 @@ The [wiki](https://www.orcaslicer.com/wiki) aims to provide a detailed explanati
📥 **[Download the Latest Stable Release](https://github.com/OrcaSlicer/OrcaSlicer/releases/latest)**
Visit our GitHub Releases page for the latest stable version of OrcaSlicer, recommended for most users.
Windows release binaries are code signed; see our [Code signing policy](#code-signing-policy).
Windows and macOS release and nightly builds are code signed.
## Nightly Builds
@@ -245,16 +245,6 @@ OrcaSlicer began in that same spirit, drawing from BambuStudio, PrusaSlicer, and
The OrcaSlicer logo was designed by community member [Justin Levine](https://github.com/jal-co).
# Code Signing Policy
Free code signing provided by [SignPath.io](https://about.signpath.io), certificate by [SignPath Foundation](https://signpath.org).
Windows release binaries are built by GitHub Actions from this repository and signed through the SignPath Foundation program. Every signing request is manually approved.
**Team roles:** [SoftFever](https://github.com/SoftFever) is the committer, reviewer and approver for all signed releases.
**Privacy policy:** See the [OrcaSlicer privacy policy](https://www.orcaslicer.com/privacy-policy/).
# License
- **OrcaSlicer** is licensed under the GNU Affero General Public License, version 3.
@@ -35,9 +35,9 @@ what will be printed, so its markers come from the toolpaths, whose mass depends
and flow as well. There the solid markers are for what is printed up to the top layer the layer
slider shows: for the plate with brim, raft and supports, where the weight rests at that point of
the print; for an object or a body, its own extrusions. Each has a faded twin for the same at the
end of the print, so the slider shows the weight moving toward where it ends, and at the top layer
the two meet. In Prepare the plate has the model alone, as brim, raft and supports exist only once
sliced.
end of the print, so the slider shows the weight moving toward where it ends. At the top layer what
is printed is the finished print, whose markers then show alone and solid. In Prepare the plate has
the model alone, as brim, raft and supports exist only once sliced.
## Prepare: from the meshes
@@ -94,8 +94,8 @@ extrudes it, so a print of several materials weighs each as it is. Flow ratio, l
and purging into infill all count
as printed. Its mass spreads evenly along the segment the bead's center runs, half the layer height
below the nozzle, in the frame of the stored moves: plate offset added, Z offset removed. Such a
segment from `a` to `b` adds `m (a + b) / 2` to the moments and `m (a² + a b + b²) / 3` to the second
moments along each axis, and its box widened by half the bead's height to the bounding box; not by
segment from `a` to `b` adds `m (a + b) / 2` to the moments and `m (2 a aᵀ + a bᵀ + b aᵀ + 2 b bᵀ) / 6`
to the second moments, and its box widened by half the bead's height to the bounding box; not by
half its width, which the processor only estimates, so that a box runs along the walls' center lines. Arcs are already split into segments by the processor. Walls, infill, top and bottom surfaces, ironing
and gap fill make the parts. The brim and the support roles, the raft among them, count only in what
the plate prints. The skirt, the prime tower and custom G-code count nowhere.
@@ -127,6 +127,15 @@ of which is the faded marker's, so the solid marker for any slider position is a
the moves carry, which are also the layers of libvgcode and of the slider; in a print by object they
follow the order of printing, so the solid markers show the objects printed so far as they are.
The belt printers' upright view draws the toolpaths through the affine map that takes the moves back
to the model's frame: `BeltTransformPipeline::build_gcode_back_transform()`, then a translation that
lays them on the model. `GCodeViewer` maps the masses with it as well: their mass and volume stay as
printed, and their moments and second moments follow the map. The map shears, so mapping the corners
of a mass's box would give a box far larger than the moves. On a belt print the processor therefore
keeps a second box for each mass, of the ends of each segment, half the bead's height below and
above, mapped by the linear part of the map, which depends on the config alone; the translation then
moves it into place. The raw view draws the moves as they are, and the masses with them.
## Drawing
`smooth_sphere()` with a resolution divisible by four leaves every triangle within one octant, so it
@@ -145,7 +154,9 @@ The markers are part of the cached scene, so toggling them, or changing a filame
they are shown, marks the scene dirty, and moving the layer slider redraws the scene with the solid
markers where they belong. In Prepare they are hidden while any gizmo other than Move, Rotate, Scale
and Lay on face is open, since the others work on the surface a marker would cover, and a hidden
object has no markers.
object has no markers. The section view (see section-view.md) cuts a marker away whole when its
center lies on the cut side, as it does the toolpaths' option markers, and it cannot be clicked
then.
## Details
@@ -153,19 +164,23 @@ The markers drawn last are kept, and a left click is tested against them before
center and a point a radius to its right are projected to the screen, and the click hits a marker
within that distance. The solid markers are tested before the faded ones and the smaller kinds
before the larger, the order in which they cover each other. A hit opens the details of that marker
and keeps the click from changing the selection; a click anywhere else closes them. The box is an
and keeps the click from changing the selection; a click anywhere else, or Esc, closes them. The box is an
ImGui window beside the marker, redrawn with the overlay from the markers of the last scene, so it
follows a dragged object, and in Preview the layer slider. It closes when its marker is gone, or when
the number of markers of its kind changes, as then it may stand for something else.
the number of markers of its kind changes, as then it may stand for something else. As it moves with
the view, zooming toward the cursor can bring it under the mouse, so the wheel zooms over it rather
than going to ImGui.
Its title says what the marker stands for: the plate, an object, an assembly or a part, the body of
an assembly. The G-code export lists the object instances for the processor, marking assemblies, as
it hands it the locator.
Each marker carries its sums: mass, volume, first moments and the second moments about the origin
along each axis, `Σ m x²`, `Σ m y²` and `Σ m z²`, which add up from parts to objects to plates. The
moment of inertia about the axis through the center parallel to x is then
`m (σy² + σz²)`, with `σ² = Σ m x² / m - c²` along each axis, and likewise for y and z. Masses are
along each axis, `Σ m x²`, `Σ m y²` and `Σ m z²`, and across them, `Σ m x y`, `Σ m x z` and `Σ m y z`,
which add up from parts to objects to plates. Together they make the symmetric `Σ m x xᵀ`, which a
shear such as the belt's maps only whole. The moment of inertia about the axis through the center
parallel to x is then `m (σy² + σz²)`, with `σ² = Σ m x² / m - c²` along each axis, and likewise for
y and z. Masses are
kept in mg, volume times density in g/cm³, and shown in g, volumes in cm³ and moments of inertia in
g·mm². In Preview the box tells the finished print from what is printed up to the layer shown, the
two weighing differently, and both are placed in the bounding box of everything the marker holds
# Plugin permissions and audit - High Level Design
## Purpose and scope
Python plugins run inside the OrcaSlicer process. OrcaSlicer restricts what a plugin
can do by installing a CPython audit hook and judging the events it recognizes against
per-plugin grants. This document describes that policy: how an event is attributed to a
plugin, when it is allowed without a prompt, how the user is asked, where the answer is
stored, and what full access changes.
The policy is a Python audit-hook policy, not an operating-system sandbox. A plugin still
runs in the host process with the user's filesystem and network rights. The limits that
follow from that are listed under "Security limitations".
The Plugins dialog exposes the stored grants and the full-access switch, but the
enforcement lives in `src/slic3r/plugin` (built into `libslic3r_gui`) and applies whenever
a capability call runs, whether or not the dialog is open. The Script execution path that opens the audit scope is described
in [python-plugin-async-bridge.md](python-plugin-async-bridge.md).
## Permission model
Permissions are stored per plugin key. A plugin can hold:
| Field | Kind | Governs |
| --- | --- | --- |
| `fs_read` | target list | Read-shaped filesystem events. Targets are exact paths or `<dir>/*` trees. |
| `fs_readwrite` | target list | Write-shaped and read/write filesystem events mapped to `FsReadWrite`: a write-mode `open`, rename, chmod, utime, copy, move, archive extraction, and similar. Same target matching as `fs_read`. A write-mode `open` can create a file, but this grant does not cover events mapped to `FsCreate` or `FsDelete`, which have no persistent grant list. |
| `network_http` | target list | Network targets, consulted together with `network_socket` for both HTTP and socket events. A canonical `scheme://host` entry is host-wide and covers both layers; a URL with a path, port, query or trailing slash is exact; a bare host or legacy address tuple covers raw sockets. |
| `network_socket` | target list | The same network matching, kept as a separate list so a plugin can declare socket access without an HTTP URL. |
| `process` | target list | Process creation and process replacement: `os.system`, `subprocess.Popen`, `os.spawn*`, `os.exec*`, `pty.spawn`, `_winapi.CreateProcess`, and similar. Targets match the audited value verbatim. |
| `threading` | boolean | Permission to start a Python thread with `_thread.start_new_thread`. |
| `events` | target list | Audited events that expose no target, keyed as `<Category>:<event>`, for example `Socket:socket.__new__`. Matched verbatim. |
| `full_access` | boolean | Turns off the permission decision for the plugin. See "Full access". |
Filesystem create and delete events (`os.mkdir`, `os.symlink`, `tempfile.mkstemp`,
`os.remove`, `shutil.rmtree`, and similar) are audited, but they have no persistent grant
list. A `fs_read` or `fs_readwrite` grant does not cover these events, although a write grant
can create a file through `open()`. Without full access, each such
event outside an allowed root is prompted only when it can be answered inline. On the wx
main thread a Yes applies only to the operation that raised it and is not saved. Off the
main thread the event is denied immediately and an informational denial is shown instead;
there is no Yes/No prompt, no saved grant, and no promise that a later attempt will be
approved.
### Target matching
- Exact filesystem entries match the audited path verbatim. An absolute exact entry also
matches an equivalent canonical path, including a symlink alias or a relative target resolved
against the current working directory. Relative exact entries match only verbatim, so their
equivalence scope cannot move with the working directory. Canonical equivalence fails closed
for dangling final symlinks; verbatim matches retain their existing behavior.
A tree grant `<dir>/*` covers the named folder and every path below it. `*` is the only
wildcard and is recognized only as the final path component. A read grant never
authorizes a write, and the reverse. Tree matching canonicalizes both sides, so a
symlink below the granted folder cannot extend the grant outside it. A tree grant's
root must be absolute on the current platform: a relative root never matches, even when a
target is spelled exactly like the entry, so the scope cannot float with the process
working directory.
- Network entries can be an HTTP URL, a canonical `scheme://host`, a bare host, a
`host:port` pair, or a legacy persisted address tuple such as `('host', 443)`.
`normalize_network_url` reduces a URL to lowercase `scheme://host`; path, query,
fragment, userinfo and port are dropped. A bare host, a `host:port` pair, or a legacy
tuple is a raw-socket grant; it does not match an HTTP URL. A raw-socket entry has its
port removed when it is matched, so a host-based network grant does not restrict ports.
A canonical entry is host-wide and applies to HTTP and raw socket events for that host.
A URL with a path, port, query, fragment or trailing slash that was stored without
normalization remains an exact match.
- Process entries are compared verbatim with the string the audit event reports,
including Python representations of a command.
- An event with no target is granted by the `events` entry for its category and name. A
targetless network event, such as `http.client.send`, is covered by any recorded
network grant instead.
## Runtime enforcement
### Audit hook and attribution
`PluginAuditManager::install_hook` installs a global CPython audit hook with
`PySys_AddAuditHook` while the embedded interpreter initializes, before any plugin code
runs. The hook recognizes a fixed set of audit events and groups them into filesystem
read, filesystem read/write, filesystem create, filesystem delete, HTTP, socket, process
create, process replace, and threading categories. Events outside that map are ignored.
`open` is categorized from its mode: write, append, update, or exclusive modes are
write-shaped, and a read-only mode is read-shaped.
Attribution is thread-local. `ScopedPluginAuditContext` stores the previous plugin key,
capability name, scoped filesystem roots and operation-root frames, then installs the
current call's values. The trampoline machinery opens this scope for every C++ to Python
capability call; the Script worker opens it for the whole invocation, including an async
suspension, and the `_thread.start_new_thread` shim re-establishes it inside a thread the
plugin creates. Events raised while no plugin scope is active are allowed and not
attributed. Module import and `register_capabilities` run without such a scope.
### Decision order
For a recognized event raised inside a plugin scope, `audit_plugin_event` decides in this
order:
1.**Unconditional denied path.** For a filesystem event, a target whose base name is a
denied filename, or whose path contains a denied keyword, is denied. This check runs
before allowed roots, before a granted operation and before full access, so no grant
can make a denied path reachable.
2.**Covered by a granted operation.** When a granted root operation is still running,
nested events raised through its standard-library frames are allowed without another
prompt. The coverage is bounded to the operation frame and does not extend to plugin
or third-party frames it calls back into. A nested `urllib.Request` is judged on its
own URL, including when it follows a redirect.
3.**Implicit allowed root or standard-library read.** A filesystem target inside an
allowed root is allowed; a read of the interpreter's standard library is also allowed.
See "Implicit access".
4.**Full access.** If the plugin's readable sidecar has `full_access` set, the event is
allowed.
5.**Saved grant.** A matching entry in the appropriate list allows the event.
6.**Prompt.** Otherwise the user is asked. A granted prompt allows the event and, for a
category with a persistent list, saves the target. A denied or unanswered prompt raises
`PermissionError` in the plugin and records the violation.
After a granted root event with a target, the hook records the operation frame so the
nested events of the same operation are not asked again.
## Permission prompts
### Declared permissions during load
A plugin declares its needs from Python with `orca.request_permissions(...)` while
`register_capabilities` runs. The bridge collects the declarations per plugin. After
registration returns and before any capability instance is created, OrcaSlicer presents
one combined prompt for the targets not already stored. Denying the request aborts the
load. A readable sidecar with `full_access` accepts the declaration without a prompt and
without adding a grant.
Network URLs passed to `request_permissions(network=...)` are normalized to
`scheme://host` before prompting or storing, so one approval covers every path and port
on that host and also authorizes raw sockets to it. A relative filesystem tree grant is
resolved against the working directory when the request is made, so the prompt and the
sidecar show the absolute scope it covers.
### Runtime prompts
An event that is not covered by a saved grant or an implicit rule is either put to the
user or denied. If the caller is on the wx main thread, the modal runs inline. If it is
not, as on the Script workflow, the plugin-load worker, or the slicing worker, the current
event is denied and the outcome is reported asynchronously. For a category with a persistent
grant list, a Yes/No prompt is posted to the main thread with `CallAfter`; if the user
accepts, the grant is saved and a later matching attempt can succeed without another prompt.
Create and delete do not support persistent grants: on the main thread they use the inline
prompt described above, while off the main thread they are denied and only an informational
denial is posted. That path offers no Yes/No choice and does not claim that the operation can
be approved on a retry. Blocking a worker on a marshalled modal is avoided because the UI
thread can itself be parked on the slicing worker.
Runtime approvals store the target observed by the audit hook. A URL with a path, port or
query is therefore an exact grant; a bare host remains usable for raw sockets. The
declared form and the runtime form are not normalized by the same code path.
## Implicit access
Some access needs no grant because it is part of the plugin system's normal operation:
-`data_dir()` is a read-write root. It contains the plugin directories, each plugin's
storage, the installed/system profile cache, and the plugin package files themselves.
-`resources_dir()` is a read-only root. Plugins can inspect bundled assets but cannot
write to the shared installation.
- Standard-library files are readable. Site-packages are excluded from this exemption.
- A per-call scoped root can be added. The G-code post-process hook grants the folder
containing the exported G-code file so the plugin can edit it; the root is scoped to
that call.
### Denied paths
The following are denied before any allowed root or full-access check:
- Base names starting with the application configuration names, the cloud user-secret
file, or `.install_state.json`. The comparison is case-insensitive and covers `.bak`
and `.tmp` companions through the prefix match.
- Any path component matching `secret`, `secrets`, `cert`, `certs`, `certificate`,
`certificates`, `conf`, or `config`. The `conf` keyword also blocks `.conf` and `.ini`
file names. Matching is on whole components, not substrings, so imports such as
`numpy/__config__.py` remain usable. Inside `data_dir()`, only components below
`data_dir()` are checked, because the application data directory can itself sit under
a path component such as `config`.
## Persistence and editing
Grants and install state live in `.install_state.json` in the plugin root. The
"machine_end_gcode":";PRINT_END\nG90 ;Absolute positionning\nM83 ; extruder relative mode\nG92 E0 ; zero the extruder\nG1 E-1.5 F1800\nG2 I1 J0 Z{max_layer_z+0.5} F3000 ; lower z a little\nG90\nG1 X10 Y{print_bed_max[1]*0.8} Z{min(max_layer_z+50, printable_height)} E-5 F{travel_speed*60} ; Move print head up\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\nM84 X Y E ;Disable all steppers but Z",
"layer_change_gcode":";LAYER:{layer_num+1}\n",
"change_filament_gcode":"M600",
"machine_pause_gcode":"M600",
"gcode_flavor":"klipper",
"extruder_offset":[
"-1x-2"
],
"printable_height":"265",
"cooling_tube_length":"5",
"enable_filament_ramming":"1",
"max_layer_height":[
"0.28"
],
"min_layer_height":[
"0.08"
],
"scan_first_layer":"0",
"extruder_clearance_radius":"47",
"extruder_clearance_height_to_rod":"34",
"printer_technology":"FFF",
"machine_start_gcode":"M400 ; wait for buffer to clear\n;[printer_model]\n;initial_filament:{filament_type[initial_extruder]}\n;curr_bed_type={curr_bed_type}\nM220 S100 ;Set the feed speed to 100%\nM221 S100 ;Set the flow rate to 100%\nM104 S140\nM190 S[bed_temperature_initial_layer_single]\nG90\nG28 ;home\nG1 Z10 F300\nG1 X{print_bed_max[0]*0.5-50} Y0.5 F6000\nG1 Z0.4 F300\nM109 S[nozzle_temperature_initial_layer]\nG92 E0 ;Reset Extruder\nG1 X{print_bed_max[0]*0.5+50} E30 F400 ;Draw the first line\nG1 Z0.6 F120.0 ;Move to side a little\nG1 X{print_bed_max[0]*0.5+47} F3000\nG92 E0 ;Reset Extruder\n;LAYER_COUNT:[total_layer_count]\n;LAYER:0\n",
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.