Commit Graph
14807 Commits
Author SHA1 Message Date
yw4z 2f251bc9d8 Assembly View fixes & improvements (#14431)
* init

* Update GLCanvas3D.cpp

* Update GLCanvas3D.cpp

* Update GLCanvas3D.cpp

* update

* update

* simplify solution

* fix hit test

* correct variable name

* simplify arrow implementation

* Update GLCanvas3D.cpp
2026-12-01 17:59:05 +03:00
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 2aeb1488bd Keep brush paint of mirrored parts when the object list merges them
ObjectList::boolean() still flipped the saved mesh of a mirrored part,
and moved it onto each instance without marking a mirrored instance, so
its strokes landed in the wrong place or were dropped. Move it the way
the cut and the mesh boolean tool now do, and start each instance from
the part's own inside out flag, since the loop reuses the saved mesh.
2026-11-30 17:03:38 -03: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 80ddae6d3b Take one undo snapshot per groove count edit, and restore grooves across modes
The groove count took an undo snapshot on every step: each keystroke and
each auto-repeat tick of a held +/- button, up to 99 for one edit. Take
one when the edit starts, and the next once the field is no longer
active.

Undo restored the groove values only when the cut mode was the same
before and after, so an undo that also changed the mode kept the
current depth, width, angles, tolerances, count and gap. Restore them
before the mode switch, which rebuilds the groove anyway.
2026-11-30 17:03:38 -03:00
Ian Bassiandjinghao.guo 6749aab029 Leave support filaments out of the PLA and PETG mixture warning
A support filament such as Support for PLA/PETG inherits the type of
its base filament, so a PETG model with it as support was warned about
mixing PLA and PETG, the combination that support is made for.

Ported from bambulab/BambuStudio@df0c52fd34

Co-authored-by: jinghao.guo <jinghao.guo@bambulab.com>
2026-11-30 17:03:38 -03:00
Ian BassiandBastien Nocera 8653ad48cc Name the SpaceMouse Wireless Bluetooth receiver
The device was supported but had no name, so it showed as UNKNOWN and
shared its settings with every other unnamed device.

Ported from bambulab/BambuStudio@7ad8fb6b46

Co-authored-by: Bastien Nocera <hadess@hadess.net>
2026-11-30 17:03:38 -03:00
Ian BassiandBenJule fe5a648214 Open the bed, certificate and replace dialogs in a useful folder
The bed shape STL, texture and model dialogs and the CA certificate
dialog gave wxWidgets no start folder, so on Linux they opened in the
working directory of the process. Start them in the last folder used.
Replace with STL and Reload from disk now start in the folder of the
original file, or the last folder used.

Ported from bambulab/BambuStudio@ba4f27b169

Co-authored-by: BenJule <benjamin.luetker@gmail.com>
2026-11-30 17:03:38 -03:00
Ian BassiandBenJule 1f7d580592 Center the Edit filament dialog on its parent
The dialog was centered before its size was known, so it opened off
center.

Ported from bambulab/BambuStudio@3ebd41f951

Co-authored-by: BenJule <benjamin.luetker@gmail.com>
2026-11-30 17:03:38 -03:00
Ian Bassiandteng.ye 8d575a0b2d Number the copies Fill bed places on a grid
When Fill bed with copies has to place more copies than its arrange
step handles, it places them on a grid, which did not number them, so
every copy was named "<name> -1". Number them as the arranged copies
are.

Ported from bambulab/BambuStudio@78aa0a5a31

Co-authored-by: teng.ye <teng.ye@bambulab.com>
2026-11-30 17:03:38 -03:00
Ian Bassiandteng.ye cafe08aa1b Keep the size of a part pasted into an object with another scale
A part copied from one object and pasted into another kept its matrix
relative to the object. When the two objects had different scales or
rotations, the pasted part took on the second object's on top of its
own, so a part copied at 100% into an object scaled to 200% came out
twice as large. Correct the part's matrix by the difference between the
two objects.

Ported from bambulab/BambuStudio@0e8b34088f

Co-authored-by: teng.ye <teng.ye@bambulab.com>
2026-11-30 17:03:38 -03:00
Ian BassiandMax Paperno c420df7661 Pick the switch board side from the click position in the control
The two-option switch of the Bambu device dialogs compared the click in
screen coordinates with 0. On a monitor to the left of the main one,
screen coordinates are negative, so every click picked the right
option. Compare the position within the control instead.

Ported from bambulab/BambuStudio@6a3e8bb388

Co-authored-by: Max Paperno <max@wdg.us>
2026-11-30 17:03:38 -03:00
Ian BassiandJoyx 8da14859ac Pass the app path to wxWidgets in UTF-16 on Windows
GUI_Run() gave wxEntry() the UTF-8 argv[0], which wxWidgets decodes with
the ANSI code page. When OrcaSlicer is installed in a folder with
non-ASCII characters, such as a Chinese user name, the conversion fails
and wxWidgets warns at startup that command line argument 0 couldn't
be converted to Unicode. Pass the same app path to the UTF-16 overload.

Ported from Snapmaker/OrcaSlicer@722e8d8444

Co-authored-by: Joyx <48636909+iesteem@users.noreply.github.com>
2026-11-30 17:03:38 -03:00
Ian Bassiandjohnson.yzs cbda0ba057 Don't ask GTK for negative widget sizes
The spin input, the scrolled window and full width setting fields size
their inner controls by subtracting labels, buttons and margins from
their own size. Before the first layout, or when a label is wider than
the control, that size is negative, and GTK rejects it with a
gtk_widget_set_size_request assertion and keeps the old geometry. At
startup this logged hundreds of assertions on Linux. Clamp these sizes
to zero.

Ported from Snapmaker/OrcaSlicer@14221150a4

Co-authored-by: johnson.yzs <yinzhaosheng@snapmaker.com>
2026-11-30 17:03:38 -03:00
Ian Bassiandkenshin627 7500d9cc72 Show the preview when the loaded G-code is opened again
Dropping a G-code on the window first switched to the Prepare tab.
When the G-code was the one already open, load_gcode() returned before
switching to the preview, so the user was left on an empty Prepare
page and the G-code seemed to be gone. Show the preview in that case,
and keep the preview when a G-code is dropped in G-code preview mode.

Ported from Snapmaker/OrcaSlicer@21a68ae945
and Snapmaker/OrcaSlicer@c5ed6c1098

Co-authored-by: kenshin627 <87zhaoxiaobo@163.com>
2026-11-30 17:03:38 -03:00
Ian Bassiandwudi901 e1f04e551e Clear the Slice all state when slicing ends
Slice all set a flag that nothing cleared when it finished, failed, was
cancelled or stopped at a plate it could not slice. A later slice
started without going through the Slice buttons, such as the automatic
slice after a change, was then taken for the next step of Slice all:
after a cancelled Slice all or a new plate it went on to slice and
select the following plates.

Ported from Snapmaker/OrcaSlicer@0d85ce65ee

Co-authored-by: wudi901 <wudi@snapmaker.com>
2026-11-30 17:03:38 -03:00
16cc702d8d Renumber the filaments of a part on the part when a filament is deleted
When a filament was deleted, a part's support, support interface or
brim filament was renumbered into the config of its object instead of
the part's, overwriting the object's own value. A part that used the
deleted filament was switched to the replacement filament, but the
object list kept showing the object's filament for it.

Ported from Snapmaker/OrcaSlicer@d4947f3cbe
and Snapmaker/OrcaSlicer@e89263e51a

Co-authored-by: Rad <radugheorghiu96@gmail.com>
Co-authored-by: xiaoyeliu <xyliu_leo@163.com>
2026-11-30 17:03:38 -03:00
Ian Bassiandmwz-iot f157d89350 Keep mirrored parts right side out in mesh booleans
The mesh boolean tool transformed both meshes into object space without
fixing the winding of a mirrored part, so mcut got an inside-out mesh
and the union, difference or intersection failed or came out wrong.
Flip the triangles of a mirrored mesh, as the other transforms do.

Ported from Snapmaker/OrcaSlicer@c7a5bb6ffa

Co-authored-by: mwz-iot <2952410757@qq.com>
2026-11-30 17:03:38 -03:00
Ian Bassiandchenpenggui c2f81a2766 Keep the slicing progress shown when the presets are reloaded
Every preset reload calls set_printer_technology(), which hid the
slicing progress even when the technology stayed the same. A reload
that does not invalidate the print, such as a preset sync from a
connected printer, left the slice running with no progress and no
cancel button until it ended. Hide it only when the technology changes;
an invalidated slice is still hidden by the background process update.

Ported from Snapmaker/OrcaSlicer@99e66ae171

Co-authored-by: chenpenggui <155463329+gushanji@users.noreply.github.com>
2026-11-30 17:03:38 -03:00
Ian Bassiandjianglinfeng ab4c87ed45 Subdivide every selected object, and only its printed parts
With several objects selected, the menu checked all of them but only
the first was subdivided. Subdividing an object also rounded its
modifiers, negative parts and support blockers, which changes what they
cover. And for selected parts, the open edges were taken from the whole
object instead of from the parts. Subdivide every selected object, only
its model parts, and check the meshes that are actually subdivided.

Ported from Snapmaker/OrcaSlicer@b070bcfaff

Co-authored-by: jianglinfeng <jianglinfeng@snapmaker.com>
2026-11-30 17:03:38 -03:00
Ian Bassiandmwz-iot fd9f2d8450 Undo changes to the dovetail count and gap
The cut tool's undo state held the dovetail shape but not the number of
dovetails or the gap between them, so undo left both as they were.
Changing the count with its buttons did not take a snapshot either.
Save both in the state and take a snapshot when the count changes.

Ported from Snapmaker/OrcaSlicer@b070bcfaff

Co-authored-by: mwz-iot <mawenzhi@snapmaker>
2026-11-30 17:03:38 -03:00
Ian Bassiandmwz-iot d929ad71b0 Draw every dovetail of a multi-dovetail cut at its own size
The preview built all dovetails from one set of slot coordinates, and the
back face of each dovetail shifted them in place. The second dovetail and
the ones after it started from the shifted values, so they drifted
deeper and wider, and so did the vertices that decide whether the groove
is valid. Start each dovetail from its own copy.

Ported from Snapmaker/OrcaSlicer@b070bcfaff

Co-authored-by: mwz-iot <mawenzhi@snapmaker>
2026-11-30 17:03:38 -03:00
Ian Bassiandjohnson.yzs 54248a8820 Leave broken volumes out of the camera box of the assembly view
Outside the assembly view, volumes far from the plates are already left
out of the box the camera fits to. The assembly view merged every
volume, so a single non-finite or absurdly distant transformation, as
some projects saved by other slicers carry, blew the box up and left the
view blank. Skip volumes whose box is not finite or lies beyond 100 km.

Ported from Snapmaker/OrcaSlicer@fd6e55e734

Co-authored-by: johnson.yzs <yinzhaosheng@snapmaker.com>
2026-11-30 17:03:38 -03:00
Ian Bassiandjohnson.yzs c687fdf261 Keep picking in step with visibility around the measure and assemble tools
These tools hide the unselected volumes while they are open and show
them again when they close, but only changed the volumes' active flag.
A scene reload while a tool was open, after an assembly move for
example, registered the hidden volumes' raycasters as inactive, so the
other objects could not be picked after the tool closed. Update the
volume raycasters together with the flag, as the other visibility
toggles do.

Ported from Snapmaker/OrcaSlicer@fd6e55e734

Co-authored-by: johnson.yzs <yinzhaosheng@snapmaker.com>
2026-11-30 17:03:38 -03:00
Ian BassiandChangwei 1a1d77ac93 Fill the filament length and weight of a G-code opened for preview
Opening a G-code file filled in only the cost of the print statistics.
The preview legend then showed 0 for the total filament and a negative
model filament, because it subtracts the support and tower filament from
those totals. Compute the length and weight from the processed volumes
as well.

Ported from Snapmaker/OrcaSlicer@b070bcfaff

Co-authored-by: Changwei <yanchangwei@snapmaker.com>
2026-11-30 17:03:38 -03:00
Rodrigo Faselli 8dec6c7bcb Rescale the UI when the GTK text scaling changes (#17806) 2026-11-30 15:35:39 -03:00
Ian Bassiandzhou.xu d3ab7b3e67 Don't read an object index from a selection of several objects
With a painting tool open, Ctrl+clicking another object in the object
list updated the tool before closing it. The selection then spanned two
objects, its object index was -1, and reading the model object at that
index crashed.

Ported from bambulab/BambuStudio@b7d083bf65

Co-authored-by: zhou.xu <zhou.xu@bambulab.com>
2026-11-30 14:12:40 -03:00
Ian Bassiandandrew hunt 9fb3425c1a Read the dragged volume again on every step of a surface drag
Dragging text or an SVG over a surface kept a pointer to its GLVolume
from the start of the drag. A "use surface" job finished between two
drags rebuilds the volume, and the next drag read the freed one and
could crash. Look the volume up again on each step.

Ported from bambulab/BambuStudio@c3b0156127

Co-authored-by: andrew hunt <andrew@hunt.codes>
2026-11-30 14:12:40 -03:00
Ian Bassiandzhenze.xu ba3d7d6e33 Release the macOS drive observer when the GUI shuts down
Rebuilding the GUI, after a language change for example, shuts the
removable drive manager down and starts it again. Shutting down did not
release the macOS observer of mounted drives, so each rebuild left one
behind that kept reporting drives, and builds with asserts aborted.
Release it, and start its pointer as null, which registering asserts:
it was null only because the manager is created with make_unique.

Ported from bambulab/BambuStudio@406cac36e7

Co-authored-by: zhenze.xu <zhenze.xu@bambulab.com>
2026-11-30 14:12:40 -03:00
Ian Bassiandbaijie 5cdf5bf8fa Keep the preset sync thread away from the app while it shuts down
Closing Orca while the startup sync of presets and plugins was running
crashed on exit. The threads only saw their cancel flag once
~PresetUpdater ran, after the main window with its plater and the app
config were gone, and the sync thread checked it in a few places only,
so it went on to call into them. Read the app settings it needs before
starting the thread, make the flag atomic and check it at each step,
and stop and join the threads when the main window closes, and again in
GUI_App::OnExit().

Ported from bambulab/BambuStudio@fc560922da

Co-authored-by: baijie <tonghao.yuan@bambulab.com>
2026-11-30 14:12:40 -03:00
Ian Bassiandzhou.xu 9b8eeb1a40 Skip drawing the Move, Rotate and Scale tools with nothing selected
The tools read the selection's bounding box when they draw, which an
empty selection doesn't have. Shift clicking empty space now closes
them, but other paths can still empty the selection while one is open.

Ported from bambulab/BambuStudio@1f3e6bd71a

Co-authored-by: zhou.xu <zhou.xu@bambulab.com>
2026-11-30 14:12:40 -03:00
Ian Bassi 5e72572227 Deselect through the canvas when a Shift click selects nothing
A Shift click, or a Shift rectangle, on empty space removed the
selection directly. The Move, Rotate or Scale tool stayed open and read
the empty selection on the next frame, which crashed with a part
selected, and the object list kept showing the old selection. Deselect
the way a plain click on empty space does, which also closes the tool.

Bambu Studio fixes the same crash by guarding the tools instead, in
bambulab/BambuStudio@1f3e6bd71a, which the
next commit ports.
2026-11-30 14:12:40 -03:00
Ian Bassiandzackaree-shen 2801aec81c Decode the last folder of the open dialogs from UTF-8
The Open project, Open G-code and Load profile dialogs passed the
remembered folder, a UTF-8 string, to wxWidgets as if it were in the
local code page. On Windows a folder with non-ASCII characters in its
name was mangled, and opening the dialog could crash. The other file
dialogs already convert it with from_u8().

Ported from Snapmaker/OrcaSlicer@7f4e64294a

Co-authored-by: zackaree-shen <zackary_shen@qq.com>
2026-11-30 14:12:40 -03:00
Ian Bassiandfire2wind dc9ef93046 Don't divide by zero when hints.ini has no hints
HintDatabase::init() picks a random hint with rand() % the number of
loaded hints. When hints.ini is empty or can't be read, that number is
zero and the app crashes at startup. get_hint() already returns nothing
in that case, but only after init() has run.

Ported from Snapmaker/OrcaSlicer@05acbec702

Co-authored-by: fire2wind <1229725087@qq.com>
2026-11-30 14:12:40 -03:00
Ian BassiandXieJiajun 039b8c4ed9 Fix a crash in the object list after arranging
Arranging rebuilds the plates in arrange order, which re-sorts the model
objects. The object list then synced its selection from GLVolumes that
still carried the old object indices, and with a part or modifier
selected it read past the end of another object's volumes. Reload the
scene before syncing the object list, and skip indices that are out of
range.

Ported from Snapmaker/OrcaSlicer@fd6e55e734

Co-authored-by: XieJiajun <68017138+PILIPALA030@users.noreply.github.com>
2026-11-30 14:12:40 -03:00
Ian Bassi a28a42dc17 Label each overhang speed with the overhang it applies at (#18038) 2026-11-30 14:06:23 -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 5131f4fc8e Work Out the Solid Model's Flat Face Cut-Off From Each Object's Layer Height and Walls 2026-11-29 03:10:00 +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
Rodrigo Faselliandyw4z 7f9bd80ebd Add vertical gap between setting rows on Linux (#17801)
Co-authored-by: yw4z <yw4z@outlook.com>
2026-11-28 15:27:04 -03:00
yw4z 6dae9c26cf Log bed exclude area status at the right level instead of a false error (#17870)
* Update PartPlate.cpp

* cover all scenarios

* Update PartPlate.cpp
2026-11-28 17:13:02 +03: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
Noisyfox 432b205d91 Mixed filament UI Fixes / Improvements (#17594)
# Mixed Filament List
• Moved Remove all button to left and added wide spacing after it to
prevent accidental clicks. also remove/add order matches with other
section now
• Removed unequal spacing on bottom. so parameter section 8px taller now
• Aligned side margins of mixed filament header with filament comboboxes

**Before**
<img width="401" height="245" alt="20261116_034038_Screenshot"
src="https://github.com/user-attachments/assets/66484308-c2df-495a-b936-cc41f6ab1881"
/>

**After**
<img width="400" height="238" alt="20261116_032653_Screenshot"
src="https://github.com/user-attachments/assets/d1f04b3d-dbd8-433f-aea0-5aa242a6f87e"
/>

# Mixed Filament Dialog
• Matched font colors/sizes
• Matched dialog buttons order (OK/Cancel) with other sections of UI
• Moved add / remove buttons to mixed materials titlebar
• Fixed dialog position while content changes. this keeps UI controls on
screen at same position like add/remove buttons and makes UI more
predictable
• Matched gradient graph background with window background
• Removed leading "Filament .." from rows. combo boxes wider and able
show longer profile names now

**Before**
<img width="425" height="573" alt="20261116_032530_Screenshot"
src="https://github.com/user-attachments/assets/82427c40-7557-4db2-98fd-2e47d196f276"
/>

**After**
<img width="425" height="554" alt="20261116_032521_Screenshot"
src="https://github.com/user-attachments/assets/c7018372-8749-4ce7-ba11-e88489a171e9"
/>

**Before-After: Gradient graph background**
<img width="769" height="222" alt="20261116_034239_Screenshot"
src="https://github.com/user-attachments/assets/46c8b89b-fb50-46ed-b4f0-fc638871c032"
/>

**Before-After: More predictable window sizing and positiioning**

<img width="866" height="816" alt="20261116_034739_Recording"
src="https://github.com/user-attachments/assets/cdc1b81a-37ca-4764-aeda-10a5afa77cdc"
/>

<img width="866" height="816" alt="20261116_034832_Recording"
src="https://github.com/user-attachments/assets/3594a373-6987-4740-b24f-0b9073c60175"
/>

# Decompose Dialog
• Matched font colors/sizes
• Matched dialog buttons order (OK/Cancel) with other sections of UI
• Moved matching color preview to bottom side of target color preview to
make comparisons easier
• Switched to vertical layout for decomposition methods. this fixes
condensed UI and clipping "Material list" text

**Before**
<img width="549" height="403" alt="20261116_032437_Screenshot"
src="https://github.com/user-attachments/assets/3d624b29-c323-4446-89c9-a3abda9d3ffe"
/>

**After**
<img width="463" height="568" alt="20261116_032448_Screenshot"
src="https://github.com/user-attachments/assets/f1e6fa26-91e9-4ca2-ab1f-29ca79bd7ebc"
/>

**Before-After: Card size and clipping "Material list" text**
<img width="355" height="118" alt="20261116_033620_Screenshot"
src="https://github.com/user-attachments/assets/f659a7de-c87a-4880-96eb-141b32ccfd27"
/>

<!--
> 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)
2026-11-28 21:41:26 +08:00
Fawwaz Lawal deaa63591e fix: stop macOS text replacement rewriting multiline settings fields (#17976)
OSXDisableAllSmartSubstitutions() clears quote and dash substitution
only, so a system text replacement such as <= to ≤ could rewrite a
multiline settings field once it was shown, leaving start G-code that
no longer slices.

Add textctrl_disable_text_replacement() beside the other macOS helpers
in GUI_UtilsMac.mm and call it from TextCtrl::BUILD right after
OSXDisableAllSmartSubstitutions().

Fixes #17914
2026-11-28 19:09:15 +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
yw4z 85f85eb983 fix dialog clipping on linux 2026-11-28 05:40:29 +03:00
yw4z 24c08503fe cleanup 2026-11-28 05:14:51 +03:00