Commit Graph
1446 Commits
Author SHA1 Message Date
weng haishiandIan Chua d64ebfc0ef fix: fetch subscribed bundles on focus instead of every minute (#17939)
* fix: fetch subscribed bundles on focus instead of every minute

The preset sync loop asked Orca Cloud for the subscribed bundles every
60 s in every signed-in window, even in the background, though most users
have none. The preset push and deletes keep their 60 s cadence; the
subscriptions are now fetched:

- on the sync thread's first pass (startup, sign-in, Sync Presets);
- when the main window gains focus, the cloud pane closes, or the user
  leaves the Home tab with the cloud pane open, at most once a minute
  (a request inside the minute is kept until the minute is up);
- every 30 minutes for users who have subscribed bundles.

The schedule is OrcaCloudServiceAgent::subscriptions_fetch_due, covered
by new tests in test_orca_cloud_agent.cpp.

* fix: fetch subscribed bundles right after an unsubscribe

The Preset Bundle dialog's Unsubscribe only tells the server. The local
copy is removed by the sync loop's next subscriptions fetch, and while
the modal dialog is open nothing else asks for one, so the bundle stayed
listed. Ask for a fetch after a successful unsubscribe, so it goes within
a minute, as before.

* fix: poll subscriptions for all users with bounded retry traffic

---------

Co-authored-by: Ian Chua <iancrb00@gmail.com>
2026-12-01 21:16:30 +08:00
HanifKoh eb790b0a09 Let Users Hide, Reorder and Group the Prepare Toolbar and Gizmo Bar Icons (#17632)
* Add a Toolbar Layout Model With Merge and Round-Trip Tests

* Order and Hide Gizmo Bar Icons From the Saved Toolbar Layout

* Order and Hide Main Toolbar Items From the Saved Toolbar Layout

* Add a Customize Toolbar Dialog to the View Menu and Preferences

* Include What the Toolbar Layout Files Use

* Use the Gizmos' Contexts for Their Names and Never Press a Hidden Layer Editing Button

* Skip the Hidden Layer Editing Path When the Toolbar Has No Such Item

* Highlight the Selected Row and Move Rows in Place in the Customize Toolbar Dialog

A click anywhere on a full-width row selects it, and the selected row gets the list-selection colour. Selecting, moving and Reset now restyle or reorder the existing rows instead of rebuilding both lists, which flickered and, on GTK, made the rows 1px taller after each Reset. The up and down arrows sit to the left of the lists, and Reset to default joins OK and Cancel at the bottom.

* Show When a Row Can Move and Select a Row When Its Box Is Ticked

The up and down arrows are enabled, and drawn brighter, only when the selected row can move that way. Ticking a row's box also selects it, so it can be moved straight away, and an icon the current printer or selection leaves off the toolbar now says so.

* Show the Move Arrows on the Selected Row

The arrows sat in a column of their own to the left of both lists, which made them look as if they moved everything selected. Each row now has its own pair, shown only while the row is selected, so they plainly move that row. Their space is kept while hidden, so rows do not shift when the selection changes, and the pointer follows the arrow after a move so repeated clicks keep moving the same row. The arrows never take keyboard focus, so a disabled arrow cannot hand focus to another control; Alt+Up and Alt+Down move the selected row instead, and Tab selects a row by focusing its box.

* Leave the Pointer Where It Is After a Row Moves

Moving the pointer onto the arrow after each move kept repeated clicks on the same row, but apps moving the pointer is unexpected, macOS guidelines discourage it, and GNOME on Wayland ignores it, so the dialog behaved differently by platform. Without it the row slides out from under the pointer after a move, so a click where another row's hidden arrows sit now does nothing; before, a second click there selected the neighbour and a third moved it back. Alt+Up and Alt+Down remain the quick way to move a row several places.

* Move the Dialog's Row Actions to a Side Column and Add a Toolbar Right-Click Menu

The Customize Toolbar dialog gets a left column with Move up and Move
down, rows sit without gaps, the hovered row gets a border and the
selected row is highlighted without bold. Right-clicking the toolbar or
the gizmo bar on the Prepare canvas opens a menu with Customize Toolbar.

* Leave No Gap for Hidden Icons in the Toolbar Width

* Size the Customize Toolbar Dialog's Buttons and Lists Like the Mockup

* Save Named Gizmo Groups in the Toolbar Layout

The toolbar layout gains a list of named groups of gizmo bar icons. Loading drops members that are not gizmo bar icons or that an earlier group already holds, drops groups left with fewer than two members, and keeps each group's members together in the bar order. Entries this build does not recognise as groups are kept on save.

* Add Grouping, Ungrouping and Moving Rules for Gizmo Groups

The toolbar layout model gains the edits the Customize Toolbar dialog needs: the gizmo rows with a header before each group, making a group, adding rows to one, ungrouping, renaming, the default group name, and moving a row one step. A header moves its whole group, a plain row jumps a whole group, and a member moves within its group and leaves it at the group's edge; a group left with one member is removed.

* Compute a Gizmo Bar Slot for Each Group

Each group with at least two icons on the bar becomes one slot at its first icon's place. The slot shows the open tool, else the group's most recently used tool that can be opened, else the first that can, so it greys only when none of its tools can be opened.

* Collapse Each Gizmo Group Into One Bar Button With a List

Each group with two or more icons on the bar becomes one button with a corner triangle and the group's name as its tooltip. Clicking it opens a list under it, headed by the name, with each tool's icon, name and shortcut; a click on another group's button switches lists. A button does nothing while none of its own tools can be opened, a list closes when its group loses its slot, and the button shows the open or most recently used tool that can be opened.

* Let Users Group, Rename and Ungroup Gizmos in the Customize Toolbar Dialog

Ctrl+click or Shift+click selects several gizmo rows, and Group selected makes them a named group, asking for a name pre-filled with Group N; with a group and other rows selected it adds them to that group. A group shows as a bold header row with its members indented under it; its box is half-ticked when only some members show, and clicking it shows or hides them all. Rename (or a double-click on the header) and Ungroup act on the selected group, and the row arrows and Alt+Up/Down move a whole group, move a member within its group, or take it out at the group's edge. Rows rebuilt after the dialog is shown keep the row height measured when it opened.

* Let Users Group Object Tools Icons and Show Each Group as an Icon Grid

Groups now work in the Object tools column as well as the gizmo bar; a
group holds icons of one list, and the separator cannot be grouped. The
dialog's left column holds Rename, Move up, Move down, Group selected and
Ungroup. A group's list is a grid of toolbar-size icons, three per row,
named in their tooltips, and opens even when every member is disabled.
Three dots under a group's button mark it, in place of the corner
triangle.

* Match the Group Lists and the Dialog's Group Selection to the Mockup

The side buttons are full size with the short labels Up, Down and Group,
and each list is only as wide as its rows. Selecting a group highlights
its members with it. A group's list gets an accent border, and its title
is drawn in the normal text colour.

* Refresh Both Lists' Rows When Groups Change in the Customize Toolbar Dialog

Groups of both lists share one vector, so making or removing a group in
one list renumbers the other list's groups. Syncing only the changed
list left the other list's rows with stale group numbers, which picked
the wrong rows to highlight and could read past the end of the groups
on Ungroup or Reset.

* Ignore Focus Moves While the Customize Toolbar Dialog Syncs Its Rows

* Share One Group List Between the Two Bars and Open the Toolbar Menu From the Whole Strip

The main toolbar and the gizmo bar draw their group lists, dots and close
test with shared code, so the main toolbar's list now also stays on the
canvas. The lists' tooltips keep the usual border, open lists close when
the Customize Toolbar dialog opens, and a right click on the divider, the
gaps between gizmo icons or the assembly view button opens the menu too.

Smaller trims: one list of the gizmos shown on the bar, one gizmo id
lookup, a shorter choice of the tool a group shows, boost's trim, and
fewer one-line wrappers.

* Let a Quick Second Click Reopen a Group List

A press within the double-click time arrives as a double click, which group buttons ignored, so reopening a list right after closing it took another click. Group buttons now toggle on a double click like the bars' other icons, and a double click elsewhere closes an open list like a plain press.

* Keep the Upstream Main Toolbar Code and Reorder It Afterwards

Apply the saved layout to the stock toolbar with GLToolbar::apply_layout instead of rebuilding it from a builder map, open the toolbar menu from one right-click hook in GLCanvas3D, let the existing input-window path draw a gizmo opened while the gizmo bar is empty, read the layout through load_toolbar_layout, compute the gizmo bar's group slots once per pass, and skip folding when there are no groups and no group slots are left.

* Hide Empty Toolbars Fully and Keep the Group Dots Under Windows

- An empty main toolbar or gizmo bar takes no width and draws nothing, and a
  divider only follows a bar that shows icons.
- The group dots are drawn on ImGui's background list, so windows and
  tooltips cover them.
- The main toolbar is placed before its dots and group list are drawn, so
  they follow it right after a resize.
- A test ties every gizmo type to its id in the layout list.

* Keep the MCP Server's Gizmo List and Toolbar Clicks Right With Grouped and Hidden Icons

* Share Plain 16 px Arrow Icons for the Toolbar Dialog's Move Buttons

* Keep the Toolbar Dialog's Width and Keyboard Focus Steady While Rows Move

Measure a group header from its text, and only when its name changes:
the best size never drops below the min size, so every move widened
the header by 6 px and refitted the dialog.

Treat a double click on the Move buttons and row arrows as a press, so
a quick second click on Windows is not lost. Focus the clicked row's
box, so Space toggles that row, and let Up and Down select the row
they focus, as Tab does.

The MCP refusal for a hidden toolbar item now says when the printer,
not the layout, hides it.

* Ungroup Only the Selected Icons and Widen the List of a Large Toolbar Group

- Ungroup with only members selected takes those icons out of the group
  and puts them right below it; with the header selected it removes the
  group, as before. Either way the rows stay selected.
- A member moved up or down stops at its group's first and last place
  instead of leaving the group there.
- Group skips a separator in the selection instead of being disabled.
- A group's list is four icons wide from ten icons and five wide from
  seventeen.
- The main toolbar's group list takes the canvas's display scale, as the
  gizmo bar's does, so both have the same padding on a 2x display.
- Focus moves are ignored while the buttons take their new state: on
  Windows a focused button that gets disabled hands its focus to a row.

* Let a Click Decide the Selection After the Keyboard Was Used in the Toolbar Dialog

Once Tab, Up or Down had been pressed, a row's box taking the focus
selected its row from then on, also when a mouse click moved the focus
there. A click where a row's hidden arrows sit then selected that row,
and a Ctrl+click that deselected a row on its own area, not its name,
made it the only selection. A click on a row now ends that state until
the next Tab or arrow key. Left and Right count as Up and Down do, so
the row they focus is selected too.
2026-12-01 13:15:39 +08:00
Ian Bassi 7aa23c6928 Keep brush paint in place when a cut or boolean moves a mirrored part
To keep paint through a cut or a mesh boolean, the part's mesh is saved
with its paint, moved to where the part is, and the paint is transferred
from it onto the new mesh. Brush paint splits a triangle into smaller
ones, recorded against the order of its three vertices.

Cut flipped the saved mesh of a mirrored part to turn it right side out,
which swaps two vertices of every triangle, so each stroke was read back
in the wrong place inside its triangles. The mesh boolean did not flip,
so its saved mesh faced inward and the transfer, which only paints faces
that point the same way, dropped every stroke.

Move the saved mesh without reordering its vertices and mark a mirrored
one as inside out. The transfer reads the paint as recorded and turns
that mesh's normals around.
2026-11-30 17:03:38 -03:00
Ian Bassi ae92e7d071 Give split modifiers to every piece they reach, and painted ones to their part
Split to objects gave each negative part, modifier and blocker to the
one piece it overlapped most, so one reaching across two pieces no
longer acted on the other. It also copied a painted modifier with the
ID of the part it was painted on, which the split replaces, so the
modifier lost its part: the painting tool could not find it and 3MF
export dropped the link. When one part was split into its shells, the
modifier kept the whole mesh on a single piece, and paint on the other
shells was lost.

Give every such volume to each piece it overlaps. Give a painted
modifier to each piece of its part that holds some of its paint, point
it at that piece's part, and move its paint onto the piece's mesh.
2026-11-30 17:03:38 -03:00
Ian Bassiandbluetianyu 77dbd7dbdc Keep negative parts and modifiers when splitting an object
Split to objects made a new object from each part and dropped every
negative part, modifier, support blocker and enforcer without notice.
An object of a single part with a negative part also counted as one of
several parts, so it could not be split into its pieces at all. Count
only the parts, and give each other volume to the new object it
overlaps most, in the same place.

Ported from Snapmaker/OrcaSlicer@b5ff9ce0ae,
without its label that tracks which object of an assembly each volume
came from.

Co-authored-by: bluetianyu <421966588@qq.com>
2026-11-30 17:03:38 -03:00
Ian BassiandWongZzz 04cb1ce7d1 Paint every face of an imported vertex-colored OBJ that needs it
Importing vertex colors skipped the faces whose vertices were all on
filament 1, but the test read "<= 2" for the third vertex, so a face
with a filament 2 corner in that position lost its paint. It also
assumed the object's filament is 1, while it is the filament of the
first vertex. Skip only the faces that are entirely in the object's own
filament. Only the command line reaches this since the GUI imports
colors as textures.

Ported from Snapmaker/OrcaSlicer@22fae6ccbf

Co-authored-by: WongZzz <1184075697@qq.com>
2026-11-30 17:03:38 -03:00
Ian BassiandXieJiajun 4a4464305d Don't over-split painted triangles on scaled-down parts
The brush caps the length of the edges it splits at 0.05 mm, and the
height range tool at 0.1 mm. Edges are measured in mesh units, so on a
part stored large and scaled down (a model in micrometres, for example)
the caps shrank with the scale: at 1% every stroke split triangles down
to 0.0005 mm, which made painting slow. Widen the caps by the scale so
they hold in millimetres. Unscaled and enlarged parts are unchanged.

Ported from Snapmaker/OrcaSlicer@fd6e55e734

Co-authored-by: XieJiajun <68017138+PILIPALA030@users.noreply.github.com>
2026-11-30 17:03:38 -03:00
Ian Bassi 482ea00a1b Lift straight up in place with slope lift
A slope lift rises along a travel. Since the H2D port, a lift with no travel
after it, before a toolchange or a timelapse frame, was a spiral with Slope
Lift, though Slope never spirals elsewhere. It now goes straight up, as it did
for every Z-hop type up to 2.3.1. Auto and Spiral Lift still spiral there, as
Auto does at a layer change, and every Bambu Lab profile uses Auto Lift.
2026-11-30 14:27:08 -03:00
Ian Bassi c4a11e775b Lift before a filament change the way the Z hop type says
Without a prime tower, or with a Type 2 one, GCode::set_extruder()
lifted in a spiral before the filament change whatever the Z hop type,
so printers set to Normal Lift spiralled at every toolchange. Follow
the Z hop type, as the Type 1 tower already did: Normal Lift lifts
straight up, and Auto, Slope and Spiral Lift lift in a spiral, since a
slope needs a travel to follow. The two places that already mapped it
this way now share the helper.
2026-11-30 14:27:08 -03:00
Ian Bassi 51cfff89c6 Stop writing the fan speed marker at layer changes
Bambu Studio's cooling buffer read ;_SET_FAN_SPEED_CHANGING_LAYER to set
the layer's fan speed after the layer change. Orca's cooling buffer no
longer reads it, since the merge of Bambu Studio 1.7.4, so the marker
was left in every file as a comment. It sent no command, so nothing
else in the G-code changes.
2026-11-30 14:27:08 -03:00
Ian Bassi 1a57ea3a13 Compare floats with a tolerance in the G-code reader and fan mover tests 2026-11-30 14:27:08 -03:00
Ian Bassi fbb75de586 Retract for a toolchange on Hilbert curve surfaces
The rule that skips the retraction on Hilbert curve surfaces also
skipped the retraction for a toolchange, which GCode::set_extruder()
asks for without a role. On a first layer with Hilbert curve bottom
surfaces and no wipe, a toolchange then happened without any
retraction. Keep the skip for travels only.
2026-11-30 14:27:08 -03:00
Ian Bassi 5f6f61c179 Leave the relative moves of custom G-code alone in spiral vase mode
Spiral vase mode rewrote a lone G1 Z with an absolute height and let a
lift set the layer's starting height, also in relative positioning, so
custom G-code that lifts the nozzle with G91 moved it by the wrong
amount. Leave a move read in relative positioning as it is, keep it out
of the starting height, and read each layer from absolute positioning,
as it starts with Orca's own moves.
2026-11-30 14:27:08 -03:00
Ian Bassi 8700087b88 Read the moves after a role tag as absolute in the fan mover
Custom G-code that switches to G91 and back through a macro, such as
RESTORE_GCODE_STATE, left the fan mover's reader in relative positioning
for the rest of the print, so it measured every later move wrong and
split none. Orca's own moves, which follow a role tag, are absolute, or
the print itself would go wrong, so put the reader back to absolute
positioning at each role tag.
2026-11-30 14:27:08 -03:00
Ian Bassiandlhx 7ad819a2fa Check the Type 2 prime tower for conflicts on every plate
The conflict check offsets the prime tower by the plate origin it was
given, while the objects are already at their plate positions. The
Type 1 tower passed the plate origin, but the Type 2 tower passed zero,
so on plates 2+ it was checked as if it stood on the first plate and
conflicts with the objects there were missed. #12742 makes the same
change.

Ported from Snapmaker/OrcaSlicer@c75ddaabac

Co-authored-by: lhx <luohaoxuan@snapmaker.com>
2026-11-30 14:27:08 -03:00
Ian Bassiandlhx 021c6d6e22 Follow relative positioning in the G-code reader
GCodeReader read every X, Y and Z as absolute, also after G91. Custom
G-code that lifts the nozzle with "G91 / G1 Z2 / G90" left the reader
2 mm low, and the next absolute Z move looked like a move up. When the
fan mover then split that move to place a fan command earlier, it
wrote a Z between the wrong height and the target, so the nozzle dipped
into the print. Track G90 and G91, and make the distances and targets
of a line relative while G91 is in effect. The fan mover no longer
splits a move read in relative mode, since the split writes absolute
coordinates.

Ported from Snapmaker/OrcaSlicer@99d613e354

Co-authored-by: lhx <luohaoxuan@snapmaker.com>
2026-11-30 14:27:08 -03:00
Ian BassiandJoyx a14cfc290c Don't read a G-code file that could not be opened
GCodeReader went on to fread() from the FILE* even when opening the file
had failed. On Windows that null handle aborts the app through the CRT's
invalid parameter handler; elsewhere it is undefined behaviour. Return
false instead, as for a read error.

Ported from Snapmaker/OrcaSlicer@24593a3b77

Co-authored-by: Joyx <48636909+iesteem@users.noreply.github.com>
2026-11-30 14:27:08 -03:00
Ian Bassiandlujiaxin 5a5b8c2d99 Count each filament once before adding the prime tower filament
Print::extruders() adds the prime tower filament when more than one
filament is in use, but it counted them before removing duplicates.
Supports printed with the object's filament, or a brim filament equal
to it, list that filament twice. A plate printing a single filament
then gained the prime tower filament, which kept the prime tower
enabled, printed it with that filament and heated its extruder.

Ported from Snapmaker/OrcaSlicer@40adf181d8

Co-authored-by: lujiaxin <1091917314@qq.com>
2026-11-30 14:27:08 -03:00
Ian Bassiandfire2wind 99b70ef82f Wipe toward the Type1 prime tower on every plate
After a toolchange on the Type1 prime tower, the wipe path was built in
plate coordinates while the nozzle position includes the plate origin.
On every plate but the first, the wipe that ends the toolchange headed
toward the first plate instead of along the tower. The Type2 tower and
the nozzle change path already add the plate origin.

Found through Snapmaker/OrcaSlicer@407dc6f68e,
which adds the plate origin to the same wipe in the fork's version of
the Type2 path.

Co-authored-by: fire2wind <1229725087@qq.com>
2026-11-30 14:27:08 -03:00
Ian Bassiandlujiaxin 1f88152936 Consume every support interface fan end marker
The cooling buffer only handled the end marker of a support interface
when it had acted on the start marker. When it had not, for example on
a raft printed while the fan is still held off, the end marker fell
through and ";_SUPP_INTERFACE_FAN_END" was written to the G-code.
Handle the end marker unconditionally, as the ironing one already is.

Ported from Snapmaker/OrcaSlicer@b070bcfaff

Co-authored-by: lujiaxin <1091917314@qq.com>
2026-11-30 14:27:08 -03:00
Ian Bassiandlhx f564ce39c4 Finish the retraction after a wipe on Hilbert curve surfaces
A wipe retracts only part of the length and leaves the rest, including
retract_after_wipe, to the regular retraction that follows. On the first
layer with Hilbert curve bottom surfaces, and on Hilbert curve top
surfaces, that retraction is skipped, so the rest was silently dropped.
Always finish the retraction once a wipe has started it.

Ported from Snapmaker/OrcaSlicer@b070bcfaff

Co-authored-by: lhx <luohaoxuan@snapmaker.com>
2026-11-30 14:27:08 -03:00
Ian Bassiandzengerqi 2be8e9e955 Count only the layers that are printed in the total layer count
The layer count behind [total_layer_count] and "; total layers count"
included every object and support layer. process_layer() skips a layer
whose tool ordering has no extruder, such as the tip of a cone that is
too thin for a wall, so the count could be higher than the layer changes
in the file. Printers that report progress from it with
SET_PRINT_STATS_INFO then stopped short of the last layer. On flat beds,
count only the layers their tool ordering prints. Belt printers keep
their own filter.

Found by Snapmaker/OrcaSlicer@b070bcfaff,
which rewrites the count afterwards instead.

Co-authored-by: zengerqi <zengerqi@snapmaker.com>
2026-11-30 14:27:08 -03:00
Ian Bassiandjianglinfeng abe2fba75c Check the mesh before subdividing it
igl::loop() pairs exactly two faces per edge, running along it in
opposite directions, and sizes its vertex adjacency by the largest
vertex index in use. A repeated face, in either winding, a flipped face,
an edge shared by more than two faces, a face that repeats a vertex or
an unused vertex after the used ones made it index out of bounds. None
of these shows up as an open edge, so the menu still offered the
subdivision. Drop repeated faces, faces that repeat a vertex, which have
no area, and unused vertices. Report two faces running along an edge the
same way, as around a flipped face or on an edge of more than two faces,
as an error, which the menu already turns into a request to repair the
mesh. A clean mesh subdivides as before.

Ported from Snapmaker/OrcaSlicer@b070bcfaff

Co-authored-by: jianglinfeng <jianglinfeng@snapmaker.com>
2026-11-30 14:12:40 -03:00
Ian Bassi 52e9e93750 Put a test comment back above the test it documents
The tests for the bridge speed and the no-overlap area went in between the comment and the test it describes.
2026-11-30 14:11:14 -03:00
Ian Bassi 1913a24c91 Give regions with their own overhang speeds walls of their own
Regions that differ in the bridge speed or flow get walls of their own,
so their overhang walls print at their own speed. The speeds of partly
overhanging walls, and the settings that turn them on, had the same
problem: a modifier changing them shared its walls with the part around
it and printed at that part's speeds. Compare them too.
2026-11-30 14:11:14 -03:00
Ian Bassi 5abe532d67 Regenerate tree supports only when the first copy of the object moves
Tree supports place the bed border at the first instance of the object,
so a change to the others, such as adding a copy, regenerated them for
nothing. Supports that avoid bed exclusion volumes still follow every
instance.
2026-11-30 14:11:14 -03:00
Ian Bassi 552788ef3f Stop normal support expansion at walls thinner than a growth step
The expansion grew in 0.5 mm steps off the layer below, so a wall
thinner than a step, such as a single 0.4 mm wall, was still crossed:
subtracting it left a strip on its far side that the next steps kept
growing. Drop each piece a step reaches only across the layer below,
which touches nothing it grew from. This takes a loop of its own, so
the tree support helper is private again. A negative expansion shrinks
with shrink() now, as expand() expects a positive delta.
2026-11-30 14:11:14 -03:00
Ian Bassi 3b9face0f6 Grow every tree support raft layer by the first layer expansion once
Slim, Strong and Hybrid tree supports size their raft by the first
layer expansion, and the GUI greys out the raft expansion for them. The
fixed 3 mm grip from BambuStudio broke that: the field no longer did
what its text says, 0 no longer gave a flush raft, and a one layer raft,
which is an interface layer only, ignored the setting. Grow every raft
layer by the setting again, and drop only the second expansion of the
first layer that made it twice as wide.
2026-11-30 14:11:14 -03:00
Ian Bassiandwenbing.shao 1c4f5a515b Build a one layer tree support raft as one first layer
With a single raft layer, the Slim, Strong and Hybrid tree supports
added a first raft layer and then the interface layer, 0.3 mm thick by
default. The interface layer reached into the first support layer under
the object, so support there was printed twice. Build the single layer
at the first layer height only. Normal and organic supports, and rafts
of more than one layer, are unchanged.

Ported from bambulab/BambuStudio@635b51c6c2,
without its first layer speed change: Orca prints the whole first
object layer over a raft at the first layer speeds on purpose.

Co-authored-by: wenbing.shao <wenbing.shao@bambulab.com>
2026-11-30 14:11:14 -03:00
Ian BassiandColajichi bfce6f4925 Give regions with their own bridge speed walls of their own
Parts and modifiers with matching wall settings share their walls,
which are generated with the settings of the first one. The check did
not compare the bridge speed and bridge volumetric flow, though
overhang walls print at the bridge speed, so a part with its own bridge
speed printed its overhang walls at the speed of another part. Only
objects whose parts differ in these settings change.

Ported from bambulab/BambuStudio@2d6f964e24

Co-authored-by: Colajichi <shubo.nie@bambulab.com>
2026-11-30 14:11:14 -03:00
Ian Bassiandjiaxi.chen 122a46c9d7 Grow normal support expansion without crossing thin walls
Normal supports grew each overhang by the support expansion in one
offset. Where a wall was thinner than the expansion, the grown area
crossed it, and that part of the overhang was carried down as support
outside the object. Grow it in steps of 0.5 mm instead, keeping it off
the layer below after each step, as tree supports already do. Only
prints with a support expansion above 0 change.

Ported from bambulab/BambuStudio@61899ad6bb

Co-authored-by: jiaxi.chen <jiaxi.chen@bambulab.com>
2026-11-30 14:11:14 -03:00
Ian BassiandMax Paperno 43c3b24731 Keep fuzzy skin off when its parameters are out of range
A region whose fuzzy skin point distance or thickness is too small has
its fuzzy skin turned off. It was set to None, but None only means no
fuzzy skin outside painted areas: painting still turns it on, while
Disabled, the default, leaves painted areas without it. So a painted
object whose region had fuzzy skin disabled got fuzzy skin anyway, and
with a point distance of 0, which older projects can hold, slicing it
never finished. Turn it off with Disabled instead.

Ported from bambulab/BambuStudio@ca564f822c

Co-authored-by: Max Paperno <max@wdg.us>
2026-11-30 14:11:14 -03:00
Ian Bassiandsongwei.li b1c28b7a90 Clear the no-overlap fill area before generating the walls again
The fill area kept clear of the walls, which gap fill and concentric
infill stay inside, is only appended to while the walls are generated.
Objects with several regions cleared it first, but the path for a
single region did not. Every time only the walls were generated again,
after a change to the wall loops for example, the old area stayed, and
gap fill reached into the overlap with the walls. The G-code then
depended on the order of the changes rather than the settings.

Ported from bambulab/BambuStudio@6df6afa784

Co-authored-by: songwei.li <songwei.li@bambulab.com>
2026-11-30 14:11:14 -03:00
Ian Bassiandjiaxi.chen 0895cd8048 Prune tree support branches that reach the first layer inside the model
With tree support on the build plate only, a branch that cannot reach
the bed is pruned when it is dropped from its layer. Nodes are never
dropped from the first layer, so a branch that reached it inside the
model, on a slab one layer thick or on the floor of a pocket, stayed
and was printed onto the model. Prune those too.

Ported from bambulab/BambuStudio@851e982b49

Co-authored-by: jiaxi.chen <jiaxi.chen@bambulab.com>
2026-11-30 14:11:14 -03:00
Ian Bassiandzackaree-shen 141aeb8a00 Expand the first layer of a tree support raft once
The non-organic tree support raft was grown by the first layer
expansion on every raft layer, and its first layer by that expansion a
second time. The default 2 mm put the first layer 4 mm out, and a
20 mm setting 40 mm. The second expansion came with BambuStudio's fix
for this setting, which assumes the fixed 3 mm grip that Orca had
replaced with the setting. Restore that grip, so the setting widens the
first layer only, as it does for the other supports.

Ported from Snapmaker/OrcaSlicer@0e572ec63a

Co-authored-by: zackaree-shen <zackary_shen@qq.com>
2026-11-30 14:11:14 -03:00
Ian Bassiandzackaree-shen 553040c43c Regenerate supports that depend on the position of a moved object
Moving an object only invalidated its skirt, brim and G-code. Tree
supports are clipped to the bed shape at the position of the instance,
and every support avoids the bed exclusion volumes at that position,
so after a move they kept the old position until a setting changed.
Regenerate supports in those cases; normal supports on a bed without
exclusion volumes are still kept.

Ported from Snapmaker/OrcaSlicer@4e0aa3acc1

Co-authored-by: zackaree-shen <zackary_shen@qq.com>
2026-11-30 14:11:14 -03:00
Ian Bassiandlhx dc86c5fbf0 Compensate every piece of a polygon that simplification splits
Elephant foot compensation measured contour widths on the polygon
simplified with SCALED_EPSILON, and kept only the first piece the
simplification returned. Where the simplification split a polygon, for
example at walls thinner than that tolerance, the other pieces were
dropped from the first layer; where it returned nothing, front() was
undefined. Compensate each piece instead. A polygon that simplifies to
a single piece is compensated exactly as before.

Ported from Snapmaker/OrcaSlicer@3412141cc7

Co-authored-by: lhx <luohaoxuan@snapmaker.com>
2026-11-30 14:11:14 -03:00
Ian Bassiandlhx 04c29af445 Keep internal bridges inside the area of their own filament
An internal bridge is expanded to anchor it, and the expansion could
reach into a neighbouring region. That area was then cut out of every
region and kept only in the bridge's own region, so on painted or
multi-filament objects part of another region printed in the bridge's
filament. On layers whose regions use more than one solid infill
filament, clip each bridge to the fill area of its own filament.
Layers with one filament are unchanged.

Ported from Snapmaker/OrcaSlicer@b070bcfaff

Co-authored-by: lhx <luohaoxuan@snapmaker.com>
2026-11-30 14:11:14 -03:00
HanifKoh 8ce5eb7b12 Bend Text Along a Circle With a Curve Slider in the Text Tool (#17943)
* Add `bend_to_arc` to Lay Aligned Text Along a Circle

* Lay Text Along a Circle When the Style Has an Arc Radius

* Save the Text Arc Radius in Projects and Styles

* Add an Arc Radius Input to the Text Gizmo

* Include What the Emboss Tests Use

* Keep Text Straight When Its Letters Do Not Fit Inside the Circle

* Draw the Arc Radius Input in the Advanced Column and Process Every Edit

The input used the helper of the Height and Depth rows, which draws in
the main column, so in the Advanced section it sat on top of its own
label. It is now drawn in the Advanced column like the sliders around
it, and the Height and Depth helpers are back to what they were.

The saved style's radius is shown at the same scale as the value, so on
a scaled object the label is not marked as changed and Revert goes back
to the style's radius.

Every edit now starts a job. Skipping the job when the volume already
had the typed radius lost the value while a job for an earlier keystroke
was still running: typing 25 over 25 passes through 2, and the 2 landed.

* Keep the Arc Radius Exact on Revert and Skip Edits That Change Nothing

Revert handed the style's radius back through the shown unit, which in
inches or on a scaled object can miss it by a rounding: the style stayed
marked as changed and picking another style asked about discarding it.
The radius now stays in mm and is converted only for the field.

An edit that changes neither the last request nor the volume starts no
job, so holding + at the limit no longer adds undo steps. An edit that
returns to the volume's radius while an earlier keystroke's job is still
running starts one, as before.

"*1e39" typed into a field showing zero gave a radius that is not a
number. It now counts as no radius.

* Name the Arc Radius Before the Edit for What It Is

It is the radius before this frame's edit, not always what the last job
was started with.

* Give the Smallest Radius a Text Fits On

* Bend Text With a Curve Slider and a Linked Radius

* Apply a Typed Radius Equal to the One Shown

* Space Letters Along Their Tops When the Text Bends Inward

* Let Short Text Close Into a Ring With the Curve Slider

* Hide the Curve Tooltip While the Slider Is Dragged
2026-11-30 18:31:21 +08:00
HanifKoh 083297d9a5 Suggest a Cheaper Preview Drag Mode When the Preview Stays Slow, and Add the Drag Modes to the View Menu (#17890) 2026-11-30 15:34:21 +08:00
Hanif Koh 95893d3b20 Size a Two-Nozzle Type 2 Tower From What It Purges
The prime tower estimate added a cylinder of filament, the filament change length
times its cross-section, to the purge of every two-nozzle printer. Only the Type 1
tower purges that length, and it sizes itself from its own plan, so the term only
ever reached Type 2 towers, which never purge it. On the FELIX Food Double, whose
syringes are 31 mm wide, the tower placeholder was about 167 mm across with its
brim, for a tower that prints at about 16 mm.

The term also hid that a Type 2 change purges at least the filament's minimal
purge, which can be more than the prime volume. Each change is now counted at the
larger of the two, as the Type 2 planner does, so the estimate does not fall
below the printed tower.
2026-11-29 03:16:55 +08:00
Hanif Koh dac25fd5b0 Give the Solid Drag Model's Flat Faces the Top and Bottom Surface Colours 2026-11-29 03:10:00 +08:00
yw4zandKris Austin ac24df6c16 Use labeled MultiSwitch for ortho controls in painting tools and add missing ones (#17883)
* init

* use helper for control on PainterBase

* fix tidy

* update

* update

* simplify changes and apply min width for switch buttons

* match design colors

* add tooltip for control

* add mcp and test cased for control

* update comment

* Update ImGuiWrapper.hpp

* Update test_imgui_wrapper.cpp

* Update src/slic3r/GUI/ImGuiWrapper.cpp

Co-authored-by: Kris Austin <kris.austin@gmail.com>

* remove unrelated comment

Co-Authored-By: Kris Austin <kris.austin@gmail.com>

---------

Co-authored-by: Kris Austin <kris.austin@gmail.com>
2026-11-28 17:12:25 +03:00
Hanif Koh fd94324edb Let ORCA_SOURCE_DATE_EPOCH Fix the Clock and random() Seed of Custom G-code
Custom G-code that prints the time or calls random() gives different
output on every export, so two slices of the same input cannot be
compared. With ORCA_SOURCE_DATE_EPOCH set to a number of seconds since
the Unix epoch, the time variables hold that time in UTC and random()
starts from the same seed. Without it nothing changes.

The standard SOURCE_DATE_EPOCH is not used: packaging shells export it
for every program they start, and it would freeze {timestamp} in the
output file names of anyone launching the slicer from one.
2026-11-28 22:08:47 +08:00
Avery Bloom cefc5e474e Fix a crash when a Bambu Lab H3C connects (#17974)
In the H3C's status messages, the device.extruder.info entries had no
"filam_bak" key, both while idle and while printing. ParseV2_0 read
njon["filam_bak"] on a const json. With the key missing, that is
undefined behaviour: a debug build asserts, and a release build either
crashed with EXC_BAD_ACCESS or kept running with no extruder data.

Read filam_bak only when the key is there. DeviceManager.cpp already
checks for the key on single-extruder printers, and Bambu Studio added
the same check in bambulab/BambuStudio@d1f121d.
2026-11-28 18:48:55 +08:00
RrrrobertB1992andyw4z 9c0d948575 Add co-extruded colors to the color picker (#17541)
* Add co-extruded colors to the color picker

The color picker could make solid colors and gradients, but co-extruded
filaments (colors side by side along the strand, like dual color silk)
could only be kept, not created or edited.

Solid mode now works like Gradient where multi-color is allowed: its
colors show as blocks with the same - and + buttons. Two or more blocks
are a co-extruded color, one block is a plain solid. The Solid/Gradient
switch is unchanged. Co-extruded colors are saved as the existing
multicolor type (filament_colour_type 1, AMS ctype 1), which the
swatches already draw as segments.

Made with help from Claude

* Start a new solid from the selected gradient color

Made with help from Claude

* Carry colors over when switching between Solid and Gradient

Made with help from Claude

* Convert colors only on the first Solid/Gradient switch

Switching between Solid and Gradient used to copy colors across on every
switch, so edits made in one mode overwrote the other. Now the first
switch to a mode converts the other mode's colors, and after that each
mode keeps its own.

Gradient support now also allows co-extruded colors, so the separate
allow_coextruded option is removed.

Made with help from Claude

* Skip invalid favorites when loading instead of dropping all of them

Made with help from Claude

* Fix ColorPickerOptions initializer after removing allow_coextruded

Made with help from Claude

* Restore the original picker options at the project color call sites

With allow_coextruded gone, {true, true} already allows gradients and
co-extruded colors, so these two call sites no longer need to change.

Made with help from Claude

* Update the color picker design doc for the Solid/Gradient behavior

Made with help from Claude

* Merge gradient and co-extruded picker types into ColorMulti

Replace ColorGradient and ColorCoextruded with one ColorMulti
{colors, gradient} in ColorSelection = variant<ColorRGBA, ColorMulti>,
as suggested in review. This also collapses the duplicated gradient and
co-extruded branches in normalize, JSON load/save and the AMS conversion.

Made with help from Claude

---------

Co-authored-by: yw4z <ywsyildiz@gmail.com>
2026-11-28 17:52:03 +08:00
HanifKoh 1044ef4407 Setup MQTT for OrcaSonar (#17951)
Add OrcaMqttConnection, the MQTT 3.1.1 client the OrcaSonar printer
connections use, over a Boost.Beast WebSocket (ws:// and wss://). The
MQTT protocol is async_mqtt's I/O-independent connection; async_mqtt is
added as a header-only dependency. Tests run the class against an
in-process mock broker.
2026-11-28 09:57:03 +08:00
Hammam Shakarchi d887c707b7 Speed up finding the connected bodies of assemblies with large islands (#17967)
connected_bodies() now intersects two islands on adjacent layers only inside the overlap of their boxes, and checks the pairs of layers in parallel. A large island, such as a sheet with thousands of holes, was intersected whole with every small island inside its box, so slicing such assemblies has taken 30 minutes or more since #16291. The bodies found are unchanged.

Fixes #17966
2026-11-27 17:26:30 -06:00
Kris Austin 28a6a8463c Keep a process's compatible printers when a project stores no list (#17833)
A project saves the edited process's compatible printers as print_compatible_printers only when the list isn't empty. When the key was missing, loading the project applied an empty list over the local process preset, so its compatible printers reset to All.

Now the load leaves compatible_printers alone when the project stores no list, and the local process keeps its own list. A project that stores a list still applies it. If the kept list leaves out the project's printer, the load clears it as before, so the process stays compatible.
2026-11-27 17:22:39 -06:00
HanifKoh fe6da0040c Start the Last Fill Role Empty So a Top-Only Lift Never Lifts the First Travel (#17949)
With Lift Z enforcement set to Top Only, a retraction lifts when the last fill was top solid infill or ironing. `m_last_notgapfill_extrusion_role` had no initial value, and the first travel of a print comes before any fill, so it read whatever was left in memory, often the previous slice's last role. Slicing the same project twice could lift the first travel one time and not the next. It now starts as `erNone`.

The new fff_print test fills new memory with the top solid infill role on glibc, so it fails without the fix on every Linux run.
2026-11-27 17:15:01 -06:00