A new pane, opened from View > Agent Activity or the Speed Dial, lists live what an AI agent and other
automation (Action Replay, Run Script, the command line, plugins) do in OrcaSlicer while it is open: each
call with its source, what it changed, failures with their reason, the steps of a run and the dialogs a
rule answered. Opening a call shows its request and response with passwords, keys and typed text masked,
so a person can watch and check what an agent is doing to their project.
Choosing Cancel when a calibration asked to save the open project still
created the calibration on top of that project, so the project's pauses and
color changes ended up in the calibration's G-code. Only the flow rate tests
stopped. Cancel leaves the project as it was for every calibration.
Custom G-codes and wipe tower positions are stored by plate index, and reordering plates left them at the old index.
- Moving a plate reorders `wipe_tower_x` and `wipe_tower_y` with it.
- `PartPlateList::remap_custom_gcodes()` re-keys `plates_custom_gcodes` by plate ID after a plate move, a plate deletion and an undo/redo jump. Entries of a plate that an undo removes are kept and restored when the plate comes back.
- Undo/redo restores every changed wipe tower position instead of only the first.
With "No sparse layers" on, Arrange and Fill bed keep objects as far from the compacted prime tower as the slicer's clearance check needs. Objects stay the toolhead radius away, or 4 mm when none of the objects being placed is taller than nozzle_height. Objects taller than the rod clearance are also kept out of the tower's Y span, and the final alignment of the pile is skipped in that case. Placing a newly added object keeps the full toolhead radius.
With the option off, arranging is unchanged.
Fixes#17566
A --run launch that ended with a dialog open, such as the prompt to restore an unsaved project left by an
earlier session, crashed while closing and returned a crash code instead of the replay's result. It now
closes the dialog first and exits with the replay's code, and it no longer asks about or discards a
person's unsaved project, which their next normal launch still offers to restore.
A multi-nozzle printer whose profile never sets physical_extruder_map, such as the Snapmaker U1, carries the single-entry default {0}. PartPlate::get_physical_extruder_by_filament_id indexed it by logical extruder, so Print plate read past its end for any plate that used filament 2 or later, and the Flatpak aborted there.
PartPlate's lookup, the printer sync in Plater and the three calibration setups in CalibUtils now read the map through effective_physical_extruder_map. It returns the profile's map when its length matches the nozzle count and the identity otherwise, so printers that ship a full map get the same values as before. The helper moves unchanged from IMEXHelpers to PrintConfig and PresetBundle, and its tests move to test_config.cpp. The G-code paths are unchanged.
Merging a filament into a mixed filament that uses it asks for confirmation first. On
macOS that question was a native alert, which held the app so an agent driving it over
MCP could neither see nor answer it. It now opens in Orca's own dialog, as the app's
other warnings do, with the same text and buttons.
Agents can now read the whole filament list with filament_list, change a mixed filament with filament_edit_mixed,
and set a gradient by driving the Add or Edit Mixed Filament dialog. The slot colours and the flushing settings move
from the project tools to filament_set_colour and filament_set_flushing, beside the rest of the filament list.
Deleting or merging a filament that a mix uses now behaves as it does in the sidebar, and the settings tools no
longer edit a physical filament's preset through a mixed slot.
An agent could not remove a mixed filament slot, so a project that had one never got back to a single slot, and
deleting a physical slot a mix used left the mix broken. filament_delete now removes a mixed slot as the sidebar's
list does and refuses to delete a slot a mix needs. Exporting a sliced file to a given path no longer fails on the
file name template when the plate is not sliced, as it did on the Generic Klipper Printer.
After slicing a calibration, the preview shows the value it varies:
Pressure Advance for the PA line, pattern and tower, Temperature for the
temperature tower, Flow for the max flowrate and flow rate tests, Speed for
VFA and Jerk for the cornering test. Retraction and input shaping have no
matching view and keep the normal default.
It goes through apply_default_view_type, so it takes precedence over the
default view type preference and a view picked by hand survives a reslice.
The flow rate test sets no calibration mode on the print, because that would
change its G-code, so the Plater remembers it until other files are loaded.
The sweep's objects, presets, filaments, settings, project files, slicing, gizmos and GUI tools are tested by Python
tests that compare the app's state after every step with the values their entries write out, in place of the
replays, and the existing tests' checks that could not fail now can. The calls these tests found wrong now behave
as described: moving one instance no longer sinks the others, a toolpath export writes the layers shown, an
auto-answered dialog no longer reports its call blocked, and a web dialog that has just opened takes requests.
Outside the Design tab an agent had 175 commands, 50 of them in the tool
list. There are now 118, named by what they act on (`object_`, `plate_`,
`preset_`, `filament_`, `plugin_` and so on), and 115 are listed. Each takes
its target and values in the call, acts on the selection when it names no
target and says what it acted on; an old name is refused. Printers and
system filaments install and uninstall, preferences read and write, plugins
enable, reload, uninstall and refresh, and objects reorder, with no dialog
to drive.
The Speed Dial keeps its 129 tiles under the same ids. Eight defects in the
rows these commands share with the menus are fixed. For a person: an object
row that cannot run says why instead of "Select an object first.", rows
that failed no longer claim success, Duplicate Plate can be undone, and
Refresh Plugins picked while a refresh runs now runs after it instead of
beside it.
* Keep Heavy Boost and Plugin Headers Out of Widely Included Headers
Several headers that most of the code includes pulled in large libraries they barely use, so hundreds of files compiled them for nothing:
- Point.hpp, Line.hpp, Polygon.hpp and ExPolygon.hpp included all of Boost.Polygon to declare traits. Point and Line now include only the concept headers they need, and the polygon traits move to BoostPolygonTraits.hpp, included by BridgeDetector.cpp, the one file that runs Boost.Polygon algorithms on polygons.
- ProjectTask.hpp included Boost.Thread and the filesystem streams but only uses boost::filesystem::path.
- Utils.hpp included Boost.DateTime for one inline function, which moves to utils.cpp.
- Semver.hpp used boost::format for two version strings; std::to_string prints the same.
- MainFrame.hpp held PluginPages by value, which brought in the web view and plugin headers; it now holds it by unique_ptr.
- Model.hpp included STEP.hpp, and with it OpenCASCADE, for a forward-declarable type and two typedefs.
Files that relied on these headers arriving indirectly now include what they use.
* Include What the Polygon Traits and the End-Time Helper Use
* Drop Two Unneeded Includes and Include the Filesystem Directory Header
Since #16867 pads filament_colour to the filament count, every CLI run that loads filament presets without a colour recomputes the flush matrix. Standalone filament presets may omit the per-filament keys that block reads. A missing filament_diameter crashed the CLI, and a short filament_is_support failed the size check.
Grow both to the filament count before the recompute. A missing diameter follows the first filament, as get_at() reads it. A missing support flag is off.
get_min_flush_volumes() also read past the end of filament_long_retractions_when_cut and filament_retraction_distances_when_cut when a filament omitted them. Pad both with the first filament's value, so the flush matrix matches the print.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A Speed Dial command, the MCP tool that does the same thing and the plugin
API's preset calls now run one shared operation, so every route accepts and
refuses the same states, with one wording and a code for each refusal. An
import by a command or a tool is one undo step, and import_file adds geometry
only.
The cases where two routes behaved differently now behave the same: a project
is not saved under a .gcode.3mf name, an empty project exports as .3mf but not
as STL, arrange runs from any view and with a gizmo open, a mixed-colour
filament slot is refused as one, a hidden preset is shown before it is
selected, and a layer is refused while the Preview has none.
* Variable layer height on several objects, and with the prime tower on objects of different heights
The variable layer height tool now opens with several objects selected.
Adaptive, Smooth, Reset and manual edits apply to all of them: they share one
profile, the finest layer height any of them asks for at each Z, unless
"Each object separately" is ticked. Every selected object is painted with
its layer heights. With a profile each, up to three objects get a bar of
their own, drawn to one scale, and the bar under the mouse is the one edited.
The prime tower check compares the layers objects are sliced at over the
height they share, rather than the raw profiles, which never matched once the
profile of a lower object ended at its own top. Precise Z height, which fits
the last layers of each object to its own height, is left out of such a
print, with a warning.
* Check the prime tower layers on the sliced objects, and note the new strings for translators
* Include what the new tests use
* Compare the layers as sliced, before the prime tower is generated from them
* Check that precise Z height stays on without a prime tower
* Keep each object's layer height texture on the GPU, and mark only lower tops
The variable layer height tool sent a 1024x1024 texture to the GPU for every
selected object on every frame, and set_config(), run after every edit,
dropped the other objects' textures so that each was generated again.
Each other object now has a texture of its own on the GPU. It is generated
and sent only when its profile, its height or the slicing parameters it shows
change, which set_config() now only asks to check. The object shown sends its
texture only when it is generated, and while the objects share one profile,
those on its layers are drawn with its texture and need none of their own.
The textures of objects no longer selected are freed.
The bars and the layer height curves are built again only when what they
show changes, and each bar is scaled with its own object's layer heights.
A lower object's top is marked only when it is lower than the object shown,
objects ending at the same height share one label, and a label stays on the
canvas and below the one above it.
The comment on precise_z_height_overridden() now says what the override
trades: the tower can join the off-grid layers to the tower layer below, but
a joined layer holds two purges, which makes the tower deeper.
* Fix the precise Z warning, shared profiles across first layers and the bar clicked
- The precise Z override, and its warning, now need an object with precise
Z height on. Every plate with a prime tower and variable layer height on
objects of different heights warned about a setting that is off by
default.
- The objects the override slices again get their slicing parameters back
at once, since validate() reads them before slicing.
- When the objects share one profile, an object that starts its layers
elsewhere than the object shown, with a raft of its own say, keeps its
own. The shared profile starts with the first layer of the object shown,
and PrintObject::update_layer_height_profile() dropped it on such an
object, which then printed at the preset layer height.
- Clicking a bar edits its object, even when no frame was drawn since the
mouse got there.
- Select all is ignored while a profile is painted, and select all plates
while the tool is open.
- The bars' models are made again, not copied, when their number changes:
a copy shares the GPU buffers that the original deletes.
- Objects with no height above the bed are left out of the tool, and a
profile fitted within EPSILON above one of its entries no longer runs
past it.
* Keep the object top labels below the toolbar row
When the toolbar row ends next to the bar, the label of an object that
ends near the top of the tallest one covered the toolbar's last buttons.
Such a label now starts below the row, with its arrow pointing up to the
line on the bar.
* Fill the layer height texture up to the top of the object
The last layer can end under the top of the object, by up to half a
layer, and no layer wrote the cells there. The top face is drawn with
them, so it showed what the buffer held before: black on the texture of
an object made for the first time, or the colours of another object.
The last layer now fills them, with the shade of its top.
* Draw horizontal faces without the layer stripes
A horizontal face lies at one height, so the stripes cannot show on it,
only the shade they have there. That shade changed whenever a layer
under it moved, and the tops flickered at every stroke. Such a face now
gets the plain colour of its layer height, from the 2nd level of the
texture.
That level is now read at its own level of detail instead of with a
bias. On a horizontal face the texture coordinates do not change, so the
GPU picks the 1st level however large the bias, and read it at the
coordinates of the 2nd: the tops showed black, or the colour of another
height. The 110 shader does so where GL_ARB_shader_texture_lod is
available, and keeps the stripes elsewhere.
* Include ObjectID.hpp where ObjectWithTimestamp is used
clang-tidy (misc-include-cleaner) asks for the header to be included directly.
* Find the horizontal faces with the inverse transpose of the world matrix
The variable layer height shader took the normals to world space with the world matrix itself, which is only right under a uniform scale. With a non-uniform scale it drew sloped faces as flat, and once the object was also rotated it missed real flat ones. The normals now go through the inverse transpose of the world matrix, which render_object_volumes() already built for the view normal matrix.
* Note why the precise Z override keys on has_wipe_tower()
Since #16999 the tower is printed only when slicing finds it is needed, so
the override also applies on plates where no tower is printed in the end.
Turn imported layout as one piece and keep objects in place when centering
Preferred orientation turned every imported object around its own part
origins and then centered it in X, Y and Z without moving its instance.
Objects sank by half their height before the multi-part check, which then
asked about objects standing on the bed, AMF objects shifted by the
offset of their mesh from the file origin, and multi-part objects fell
apart at non-zero angles.
Model::rotate_and_center_objects() turns the file's content as one piece,
around the placed layout's center, or around the file origin for objects
without instances, and centers every placed object with its instances
compensating the shift, so nothing moves and origin_translation keeps
recording only uncompensated centering. Unplaced objects are centered in
XY only, as before minus Z, until they are placed.
Fixes#17084
Print::m_extruder_filament_info feeds filament grouping, but it was a plain
member with no change detection and no invalidation entry point. Changing only
the device-side AMS material inventory, such as a spool colour, therefore left
a finished slice valid: Print::apply() reported UNCHANGED, the grouping steps
stayed done, and export re-emitted the previous G-code with a stale
filament_map.
Compare the inventory in Print::apply() and invalidate the grouping steps when
it changed:
- set_extruder_filament_info() now only stashes the payload, so apply() can
compare it against the installed one and act on the change under the state
lock.
- The comparison projects both payloads exactly as grouping does: colour, type,
tray name, support flag and filament id per tray. Volatile AMS keys such as
remaining amount, temperatures and filament_changed therefore do not count.
- A changed inventory invalidates psWipeTower and psSkirtBrim, matching what
extruder_ams_count already does, and escalates to APPLY_STATUS_INVALIDATED
only when a step was actually taken back.
- A payload carrying no tray configs at all is treated as "not known yet"
rather than "no filaments", so an AMS reconnect does not invalidate a
finished slice, while clearing the last spool still does.
- The Plater hands the inventory to apply() before applying, so the change
rides the same pass.
Adds comparator tests for the inventory projection and an integration test that
drives process() and apply() over a two-extruder auto-match print.
* Keep original body names when importing STEP, AMF and 3MF geometry
STEP, AMF and 3MF bodies keep the names stored in the file. The three formats share one geometry import path with matching dialogs, per-format Preferences and cleanup of unsupported characters. AMF body groups load as one object, nested groups are flattened, and a CAD 3MF is imported as geometry.
* Use the app's widgets in the geometry import dialogs
Check boxes, radio buttons and the name replacement field in the STEP,
AMF/3MF and name cleanup dialogs now use the app's own controls instead
of the native ones; the name cleanup preview uses the dialogs' label font.
* Address review: AMF layout, Open Project cancel, part visibility
- AMF: the import dialog offers "Separate objects (as before)" first and
uses it by default, so files from PrusaSlicer and Slic3r, which keep a
whole plate in one constellation, load as separate objects again. The
assembly modes are opt-in.
- File > Open Project with a CAD 3MF replaces the project only after the
import dialogs were answered and the file was read with geometry to load.
A Cancel or an empty file keeps the current project, its unsaved state,
notifications and preview state; close_with_confirm() can hand back its
closing steps for this.
- The object list no longer changes the model while it checks whether a
single-object import hides its parts: ModelObject::hides_imported_parts()
is used by the list, Split to parts and its menu check, and the painting
gizmos' list update shows or hides the parts when painting changes.
Removing the part rows keeps the object a container for its instances.
- Progress: staged reading takes the first part of the bar and never goes
back within a file; the load loop takes the rest.
- A constellation id equal to an object id is logged as a warning.
- set_import_volume_order() is defined next to sort_objects().
* Address review: part rename on drag, Multi-part check for unplaced AMF
- Dragging a part of an imported object cancels a name editor that is
still open before the part rows are rebuilt. On GTK the editor opened by
pressing the selected row outlived the deleted row and wrote its name
into another part.
- The Multi-part check reads zero for objects the file does not place, as
min_z() did in Release builds, instead of their mesh height: the meshes
are already centered by then, so different heights asked the question
where main does not.
- Non-printable AMF groups skip the Multi-part question only in the
assembly modes; Separate objects asks as before.
- The first AMF load mode is "Load as separate objects".
---------
Co-authored-by: yw4z <ywsyildiz@gmail.com>
Startup to the main window is about 280 ms faster with 24 filaments and about 170 ms faster with 4 (Windows, Bambu H2S, median of 4 runs).
- Filament lists are refreshed once per config change instead of once for each of `filament_colour`, `filament_type` and `filament_is_support`.
- The UV editor pane is built the first time it is shown, through `Lazy<T>`, and keeps its saved dock position when it was not built in a session.
- The SLA import dialog is built on first use, through `Lazy<T>`.
- The sidebar and main window are no longer frozen while the window is hidden.
- The filament combos are not filled before the main window is shown. The printer tab fills them once while presets load.
- The object settings refresh is skipped until the main window is shown, when no object can be selected yet.
* Menu: disable "Scale to build volume" when it cannot apply
The enable condition Plater::can_scale_to_print_volume() already existed (used by the native command) but the context menu item ignored it, so the item was always enabled. Wire it in, so the item is greyed out for cut objects, for an empty selection and for bed shapes other than rectangle/circle. Matches BambuStudio.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N7uDtamzhNGT6PFwmVdRJ8
* Menu: add "Scale to build volume" to the multi-selection context menu
The item was only offered when a single object was selected. Add it to the
context menu shown for several selected objects as well; it uses the same
enable condition, so it is greyed out when it cannot apply.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GYra1zfuVBUu8unsTTXHVN
* Menu: show "Scale to build volume" in the single-object context menu
create_object_menu() is not called (see MenuFactory::init), so the single-object
menu is built by create_extra_object_menu() and the item that lives in
create_common_object_menu() never reached it; only the SLA menu used it.
Add the item after "Drop" in the extra object menu.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GYra1zfuVBUu8unsTTXHVN
* Scale to build volume: disable it for a selection of parts, where it has no effect
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GYra1zfuVBUu8unsTTXHVN
* Disable menu item for context menu
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: yw4z <ywsyildiz@gmail.com>