Commit Graph

30263 Commits

Author SHA1 Message Date
Ian Chua
b585d9f3d9 feat: add new profiles over ota & updater url via app config 2026-08-31 17:45:29 +08:00
Ian Chua
c4fea8ad24 gate workflow with enable_ota flag in app config 2026-08-31 15:48:13 +08:00
Ian Chua
d9fa43f1d7 fix: add opc support for ota workflow 2026-08-28 19:40:31 +08:00
Kris Austin
db29f570bd build: clear 50 warnings - pessimizing moves and null checks that cannot fail (#15408)
* build: remove std::move that blocks copy elision

std::move wrapped around a temporary, or around a local being returned,
stops the compiler constructing it in place. Each edit is the fix clang
suggests, which is to delete the std::move call and keep its argument.

Three of the 39 sites save a move, the two return std::move(local) in
Print.cpp and TreeSupport.cpp:2749. The rest are equivalent either way
and match how the codebase already writes this elsewhere.

Clears 39 -Wpessimizing-move warnings.

* build: drop null checks on references and this

A reference cannot be bound to null and this cannot be null, so the
compiler folds these conditions to true and drops the guard. Seven are
if (&bitmap && bitmap.IsOk()), where IsOk() already does the work; two
test this directly. The guarded code runs either way, so removing the
dead operand changes nothing.

Clears 11 -Wundefined-bool-conversion warnings.
2026-08-28 08:05:59 -03:00
Gabriel Monteiro
cc390f11ee feat(build): build the missing dependencies from the main CMake configure (#15373)
* fix(deps): build the dependencies from scratch with clang-cl

Six dependencies fail once the superbuild compiles them with clang-cl instead
of cl:

- OpenSSL never goes through CMake. Its VC-WIN64A makefile only works with cl,
  and an unquoted clang-cl path with spaces produces no .obj files at all, so
  the lib step dies with LNK1181. Pin the upstream toolchain.
- Boost.Container's bundled dlmalloc passes int* to the Interlocked API. cl
  warns, clang rejects it.
- curl 7.75's configure probes rely on C laxness clang rejects. The results
  flip and nonblock.c ends up in the AmigaOS IoctlSocket branch.
- OCCT installs RelWithDebInfo into bini/libi while find_package looks in lib.
  It also prepends -Wl,-s to the shared linker flags for every Clang build,
  which the MSVC-style linker gets as an argument it does not know. Both
  patched hunks sit inside if (MSVC) in the OCCT sources.
- wxWidgets lands in lib/clang_x64_lib, so wxWidgetsConfig.cmake falls back to
  the layout that exists instead of assuming vc_x64_lib. It tries the derived
  path first, so a cl-built tree consumed by clang-cl keeps resolving the way
  it does today. The patch step also resets the one file it touches, so it can
  run again after an interrupted build or after the patch itself changed.
- wxInspector goes through FindwxWidgets, which only searches lib/vc*_lib
  because _WX_TOOL is hardcoded to vc. It now gets the root and lib dir
  derived the same way wxWidgetsConfig.cmake derives them.

Eigen is the seventh, and it breaks on the generator rather than the compiler.
Its test, lapack and blas/testing subdirectories all call
enable_language(Fortran), and they default to ON because the dependency
configures as its own top-level project. Whether that hurts depends on what
CMake finds: the Visual Studio generator supports no Fortran and finds nothing,
clang-cl sits next to the LLVM toolset's flang and works, while MSVC with Ninja
finds Strawberry Perl's MinGW gfortran, which this build already requires for
OpenSSL, and hands it the MSVC-style /machine:x64 that MinGW's ld reads as a
missing input file. The configure dies there and takes every dependency still
in flight with it. Only the headers are consumed here, so the three subprojects
are off.

* fix(deps): honor the superbuild's generator and compiler in sub-builds

orcaslicer_add_cmake_project pinned every dependency sub-build to the Visual
Studio generator whenever MSVC was true, which is also true for clang-cl. That
generator selects its compiler by toolset and ignores the CMAKE_C_COMPILER and
CMAKE_CXX_COMPILER this file already forwards, so the dependencies were built
with cl.exe no matter which generator or compiler the superbuild was given.

Key the three affected decisions on the generator instead: which generator the
sub-builds use, whether CMAKE_BUILD_TYPE is forwarded, and /m versus -j. A
Visual Studio superbuild is unchanged, so the default path and CI behave
exactly as they do today.

build_release_vs.bat now accepts -l to select clang-cl, alongside the existing
-x for Ninja, so the generator and the compiler can be chosen independently. On
the Visual Studio generator -l reaches the slicer only, through the ClangCL
toolset, because the dependency sub-builds have no toolset to inherit; a deps
build in that combination says so rather than quietly using MSVC.

* fix(deps): use upstream wxWidgets compiler layout fix

The compiler-prefix layout fix now comes from SoftFever/Orca-deps-wxWidgets#7, so remove the duplicated local patch and apply step.

* fix(deps): stop Assimp enabling ccache on the RC rule

ASSIMP_BUILD_USE_CCACHE defaults on and applies the launcher through the
global RULE_LAUNCH_COMPILE property, so it wraps the resource-compiler rule
as well. Under Ninja that rule goes through cmcldeps, which does not survive
being launched by ccache, and the build fails with clang-cl reporting /fo as
a missing file.

The superbuild already forwards CMAKE_<LANG>_COMPILER_LAUNCHER, which CMake
applies per language and so keeps clear of the RC rule.

---------

Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
Co-authored-by: raistlin7447 <kris.austin@gmail.com>
2026-08-28 18:13:14 +08:00
Kris Austin
6d1584844e fix: STEP part names with accented characters import as numbers (clears 6 warnings) (#15406) 2026-08-27 19:06:06 -03:00
schneider007
6fdd4945c1 Fix bug: centroid calculation (#15399) 2026-08-27 08:16:34 -03:00
Kris Austin
cbd1bf2c37 build: clear 295 more -Woverloaded-virtual warnings in GUI widgets (#15394)
build: clear 295 -Woverloaded-virtual warnings in GUI widgets

Turns three hidden base virtuals into real overrides, clearing 295 of
the 553 -Woverloaded-virtual warnings and taking a full clang-cl build
from 1,264 to 969. Part of #15374.

Search.hpp: SearchDialog::Popup and SearchObjectDialog::Popup took a
wxPoint that neither body ever read, hiding the virtual
wxPopupTransientWindow::Popup(wxWindow*). Both bodies clear the input,
call the base, set focus and refill the list, and SearchObjectDialog
also guards re-entry, so hiding meant none of that ran when the window
was popped through a base pointer. They now override and forward focus.

LabeledStaticBox::SetFont and ScrolledWindow::SetBackgroundColour hid
their base virtuals the same way, so the label metrics recompute and
the child colour propagation only ran for callers holding the concrete
type. Both now override.

Marking a member override makes clang flag every other unmarked
override in the same class, so seven sibling declarations needed the
keyword too. Left unmarked they were worth 481 warnings, which would
have made this a net loss.

MSWDismissUnfocusedPopup is declared only inside #ifdef __WXMSW__ in
wx/popupwin.h, so off Windows there is no base virtual to override and
the keyword would not compile. Both the declarations and the definitions
are guarded, which is how wxWidgets itself declares MSWWindowProc in
wx/nativewin.h and how this repo already handles it in BBLTopbar,
MainFrame, Button, ComboBox and TabCtrl.

ScrolledWindow's constructor left m_userPanel and m_scroll_win
uninitialised unless the style requested a vertical scrollbar, while
SetBackgroundColour dereferences both. No caller hits that today since
every instantiation passes wxVSCROLL, but the override widens who can
reach them, so they are now initialised alongside their siblings.

Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
2026-08-27 08:06:50 -03:00
Ian Chua
4c71ec4770 feat(plugin): storage API (#14923)
# Description

Exposes the filepath for the current plugin's directory via
```python
orca.host.plugin.storage
```
Tested with:

[test_storage_api_any.py](https://github.com/user-attachments/files/30333105/test_storage_api_any.py)

<!--
> 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-08-27 14:52:09 +08:00
Ian Chua
3ab5157a49 Merge branch 'main' into feat/plugin-storage-api 2026-08-27 14:52:00 +08:00
Kris Austin
142c63ab0e build: clear 143 -Woverloaded-virtual warnings in GUI widgets (#15377) 2026-08-26 19:14:30 -03:00
SoftFever
5552ed6cf1 Keep mixed-color filaments intact when the extruder count changes (#15385)
* Keep mixed-color filaments intact when the extruder count changes

The extruder-count spinner resized the filament arrays in bulk at the tail,
which is where mixed-color slots live, so a new filament landed behind the
mix and the sidebar skipped a slot number. It now adds and removes one slot
at a time through the same calls the sidebar's +/- buttons use, so a new
slot opens ahead of the mixed tail and a removal renumbers object filament
ids, painted facets, custom g-code and mixed components rather than
clamping them away.

Drops the vector overload of set_num_filaments(), which this leaves without
callers.
2026-08-26 19:06:33 +08:00
Ian Bassi
9dc9b42475 Pass closure state to fuzzy skin (#15378)
Update perimeter traversal to pass each extrusion's closed/open state into `apply_fuzzy_skin`. This lets fuzzy skin logic distinguish contours from closed loops when processing perimeters.

Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
2026-08-26 07:39:23 -03:00
Kris Austin
1e4b48c548 build: clear 227 warnings - dead private fields, malformed comments (#15376)
build: drop dead private fields, close malformed comments (227 warnings)

Clears 227 of the clang-cl warnings tracked in #15374, taking a full
Windows build from 1,491 to 1,264. Five of the six changes are in
headers, which are re-diagnosed in every translation unit that includes
them, so the count is large for a 14-line diff.

Tabbook.hpp: delete two private fields, unread since the 2022 import.
m_parent also shadowed wxWindowBase::m_parent.

GUI_Utils.hpp: the wxEVT_SYS_COLOUR_CHANGED lambda body is empty on
Windows, so its `this` capture is unused there. (void) this; leaves the
handler bound, which is what stops the event propagating.

DevFirmware.h: mark m_owner [[maybe_unused]]. The class is never
instantiated, and the file tracks BambuStudio, so this is the smallest
divergence.

Eight DeviceTab/ files, AMSItem.cpp and SelectMachine.cpp: block
comments malformed so that they read as a nested /*.

No behavior change. -Wcomment goes to zero, and only the three intended
categories move.
2026-08-26 07:38:52 -03:00
Valerii Bokhan
24967b543a Fix contour cleanup across coplanar triangles (#15366)
* Fix contour cleanup across coplanar triangles

Avoid generic collinear simplification after slicing. Skip only junctions created by shared edges between coplanar faces so contours stay stable without altering shallow geometry.

Fixes #15364

* Fix contour cleanup across coplanar triangles (code review fixes)

---------

Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
2026-08-25 19:31:09 -03:00
Ian Bassi
ea4a4a60f1 Refresh dynamic filament list on mixed slot changes (#15375)
Call update_dynamic_filament_list() alongside update_mixed_filament_list() in two places: after editing a mixed filament slot and when the filament count doesn't change (e.g., adding a mixed/virtual slot). This ensures per-feature filament lists reflect the updated blended colour and type without requiring a full filament count change.
2026-08-25 16:18:45 -03:00
Ian Bassi
a5223279ac Fix uneven corner rounding in multiline infill (#15352)
* Skip straight-run splits in corner smoothing

Teach `CornerSmoother` to treat vertices that only continue a straight segment as part of the same leg instead of rounding them as corners. The smoother now keeps a three-point window so it can emit a corner only once both adjoining legs are known, which avoids unnecessary corner processing while preserving real turns such as hairpins.

* Add regression test for split-leg smoothing

Adds a FillCornerSmoothing regression test covering polylines with an extra collinear vertex in a straight run. The test ensures corner smoothing treats split and unsplit geometry identically, preventing inconsistent rounding radii in triangular/grid infill paths.
2026-08-25 12:46:34 -03:00
Kris Austin
265ae16160 chore: ignore CMakeUserPresets.json (#15354)
CMake reads CMakeUserPresets.json for developer-local presets, and its
documentation states the file should not be checked into version control:
https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#introduction

It is the preset equivalent of CMakeLists.txt.user, ignored on the line
above.
2026-08-25 12:13:45 -03:00
SoftFever
9e34dde632 Color mixing feature (#15347)
# Description

This PR ports the color mixing feature from BambuStudio.
The port is based on the previous work by @ianalexis in #15231.
This PR completes the port and fixes various bugs.

Several improvements were also made during the porting process.

WIP


# Screenshots/Recordings/Graphs

<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->

## Tests

<!--
> Please describe the tests that you have conducted to verify the
changes made in this PR.
-->

<!--
> A guide for users on how to download the artifacts from this PR.
-->

[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
2026-08-25 22:10:49 +08:00
SoftFever
bfe5f7e63c fix text error 2026-08-25 21:35:43 +08:00
Kris Austin
56f9edc572 build: mark missing overrides and drop unused lambda captures (1,156 clang warnings) (#15334)
* chore: mark every declaration that overrides a base virtual

clang-cl reports 42 member functions across 28 files that override a
base virtual without being marked `override`, inside classes that
already mark their other overrides. That is every occurrence of
-Winconsistent-missing-override in the tree, so the category drops to
zero and -Werror=inconsistent-missing-override becomes available as a
guard against it coming back.

Behaviour is unchanged. Each keyword goes only where clang had already
resolved the declaration to a base virtual, so it records what the
compiler already worked out and cannot affect overload resolution or
dispatch. If any of these signatures had not really overridden a base
method, the build would have failed rather than warned.

Where a declaration already carried `virtual` it is left alone and the
keyword appended, matching the surrounding declarations. Plain
`override` is used rather than the wxWidgets `wxOVERRIDE` macro, which
wx/defs.h defines as `override` beneath a comment marking it obsolete,
and which the rest of src/slic3r already avoids by 1742 occurrences to
113.

A full clang-cl build takes -Winconsistent-missing-override from 1,146
warning lines to 0. Those 42 declarations produce that many lines
because a header is re-diagnosed in every translation unit that
includes it. CalibrationWizardStartPage.hpp alone accounts for 336 of
them from 4 declarations.

* chore: drop unused lambda captures in GUI/Widgets

clang-cl reports 10 lambda captures in src/slic3r/GUI/Widgets that are
never read. Removing them changes nothing at runtime.

Every capture removed is `this` or a raw pointer. clang does not report
a capture whose type has a non-trivial destructor, since such a capture
can be held purely for its effect on an object's lifetime, so nothing
that owns or extends a lifetime is touched. The std::weak_ptr captured
beside the removed `this` in MultiNozzleSync.cpp stays.

This clears the category in GUI/Widgets only. A full clang-cl build
takes -Wunused-lambda-capture from 312 warning lines to 302, leaving
235 sites in other directories for a follow-up.
2026-08-25 08:18:48 -03:00
Ian Chua
390e47a8c6 Merge branch 'main' into feat/plugin-storage-api 2026-08-25 13:49:04 +08:00
yw4z
2f9ef86e97 match style of dialog buttons 2026-08-25 00:04:14 +03:00
yw4z
fbe4cdff23 fix mixed filaments area cannot be hidden 2026-08-24 23:07:11 +03:00
yw4z
a3231aa723 rebuild menus from scratch to remove duplicate item check and match "delete" item order 2026-08-24 22:02:47 +03:00
yw4z
ce75a66e7c fix duplicate decompose menu item 2026-08-24 21:38:51 +03:00
Valerii Bokhan
524fd5e9c0 Fix: resolve 23 MSVC compiler warnings (#15280)
* fix: resolve MSVC compiler warnings and build error

C4101 - unreferenced local variables:
  - STEP.cpp, FilamentGroup.cpp: remove unused catch variable 'e'
  - GLGizmoMeasure.cpp: remove unused 'direction_on_model'
  - PartPlate.cpp: remove unused 'origin1, origin2'
  - DevStatus.cpp: suppress unused 'e' via (void)e

C4005 - macro redefinition:
  - Wrap NOMINMAX defines in #ifndef guards (OrcaSlicer.cpp, Preset.cpp,
    SupportTreeBuilder.cpp, OpenVDBUtils.cpp, GUI.cpp)
  - Remove conflicting DESIGN_INPUT_SIZE redefine in DownloadProgressDialog.cpp

C4172 - return address of local/temporary:
  - Config.cpp: return static const double instead of temporary 0

C4996 - deprecated API usage:
  - ImGuiWrapper.cpp: use GetText().Length() instead of GetTextLength()
  - OrcaCloudServiceAgent.cpp: replace deprecated wxPATH_NORM_ALL with
    explicit flags matching old default behavior
  - ASCIIFolding.cpp: replace deprecated std::wstring_convert/codecvt_utf8
    with boost::locale::conv::utf_to_utf (already used in same function)

C2440 - build error from deprecated wxTipWindow constructor:
  - Button.hpp/cpp: replace raw wxTipWindow* with wxTipWindow::Ref (weak
    reference). Ref auto-nulls when the tip window closes, eliminating
    the manual Bind(wxEVT_DESTROY) handler. delete uses operator->() to
    access the raw pointer since Ref is non-owning

* fix: avoid duplicate GetText() call in ImGuiWrapper clipboard handler

Capture wxTextDataObject::GetText() result in a local variable instead
of calling it twice (for .Length() check and into_u8()). GetText()
returns wxString by value, so this avoids an extra allocation/copy.

* fix: resolve MSVC compiler warnings (code review fixes)

* fix: resolve MSVC compiler warnings (code review fixes)
2026-08-24 15:37:47 -03:00
SoftFever
0fa25acda8 Match OrcaSlicer's color theme in the color-mixing UI 2026-08-25 00:47:25 +08:00
SoftFever
1631d3cf01 fix flatpak build 2026-08-24 17:30:39 +08:00
SoftFever
55812a7a8d Merge branch 'main' into color-mixing 2026-08-24 16:26:33 +08:00
SoftFever
e342698d8e Update sublayer option check. Add validation warning for gradient mixed filament without sublayer mixing 2026-08-24 15:30:02 +08:00
Kris Austin
d61e0cb7bf build: unify the warning policy across compilers (clang-cl: 124k warnings -> 2.7k, 21% faster) (#15328) 2026-08-23 19:55:48 -03:00
TheLegendTubaGuy
07b81cfdc9 Fix Qidi X-Max 4 chamber heating profiles (#15244) 2026-08-23 13:10:41 -03:00
Valentin
d7fed95390 Fix Ukrainian translation typo (#15333) 2026-08-23 12:42:30 -03:00
GlauTech
c72908e377 Update OrcaSlicer_tr.po (#15309)
* Update OrcaSlicer_tr.po

* Update OrcaSlicer_tr.po

Fixed inaccurate AI-generated text and updated missing translations.

* REmoive # AI Translated

* Update OrcaSlicer_tr.po

The following changes were made in this version:
- The term "Instance" was changed to "Eş kopya".
- The term "Jerk" was changed to "sarsıntı".
- Semantic discrepancies regarding certain words were corrected.

* Update OrcaSlicer_tr.po

The necessary arrangements have been made.

* Update OrcaSlicer_tr.po

* Update OrcaSlicer_tr.po

The necessary updates have been made.

* G-kodu to G-code

---------

Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
2026-08-23 12:34:51 -03:00
Ian Bassi
ea376e858c Show move length in Previewr panel (#15326)
Adds a new "Length" row to the sequential marker position popup in GCodeViewer and updates row capacity accordingly.
For arc commands (G2/G3) that are split into multiple vertices, it now sums segment distances across vertices with the same gcode_id so the displayed value reflects the full move length instead of a single chord.
2026-08-23 12:18:22 -03:00
Ian Bassi
877180829c Unify colinear simplify tolerance in Arachne (#15314)
Introduced a shared `colinear_vertex_tolerance()` helper in `ExtrusionLine.hpp` and updated both simplify paths (`ExtrusionLine.cpp` and `WallToolPaths.cpp`) to use it instead of duplicated hardcoded `0.005` scaled thresholds. This keeps the near-colinear early-out tied to `SCALED_EPSILON` (rounding-noise scale) and avoids unintended curve decimation from larger tolerances, while documenting the geometric impact in code.
2026-08-23 12:18:06 -03:00
SoftFever
2b1499a087 clean up comments 2026-08-23 22:43:41 +08:00
SoftFever
7934814077 fix wrong size of the last swatch of each row in Mixing Recommendations 2026-08-23 22:11:49 +08:00
SoftFever
4a32a9e066 Match mixed filament swatches to the editor's gradient preview
The sidebar Mixed Filament list, the extruder icons, the color painting
gizmo and the canvas filament bar now show the same bottom-to-top fade the
Edit Mixed Filament preview shows, custom gradient curves included, instead
of a horizontal fade between the two component colours. Ordinary and vendor
multi-colour filaments are drawn exactly as before.
2026-08-23 22:11:49 +08:00
SoftFever
ff35dacf4c Fix UI hanging on Mac 2026-08-23 22:11:49 +08:00
SoftFever
6f32d59997 Fixed an issue that gradient color button in color painting gizmo don't have number 2026-08-23 22:11:49 +08:00
SoftFever
f02423074c Warn about mixed color sublayer when adding height ranges 2026-08-23 22:11:49 +08:00
SoftFever
38d51783ae Refresh the mixed filament list when a component preset changes 2026-08-23 22:11:49 +08:00
SoftFever
af5397d678 Close the single-extruder mixed filament warning by type 2026-08-23 22:11:49 +08:00
SoftFever
9985688b5b Blend mixed slots in the machine-send and AMS-sync thumbnails 2026-08-23 22:11:49 +08:00
SoftFever
d27766aff0 Reject a mixed filament as the wipe tower filament 2026-08-23 22:11:49 +08:00
SoftFever
cfeca9b9ff Hide mixed slots from the support and wipe tower filament dropdowns 2026-08-23 22:11:49 +08:00
SoftFever
716bba53df Refuse to slice a broken mixed filament 2026-08-23 22:11:49 +08:00
SoftFever
8965b0be21 Skip mixed slots in flush volume auto-calculation
Mixed-colour slots are virtual and never flushed. Guard auto_calc_flushing_volumes_internal against them as BambuStudio does, and make the flushing dialog's default matrix and the sidebar 'modified' comparison physical-only so the untouched mixed rows no longer count as a user edit and the Re-calculate result matches the physical-only table.
2026-08-23 22:11:49 +08:00