Commit Graph

17642 Commits

Author SHA1 Message Date
pedrosland
22e121f4e4 Fix unreadable overlay elements in 3D view on XWayland/Intel (#11557)
Fix unreadable overlay elements in 3D view on XWayland/Intel - closes #10287
2026-07-11 22:19:12 +08:00
Kris Austin
4b7182b048 fix: guard against stale instance ids in PartPlate instance scans (#14523)
Deleting an object's instance leaves a stale (obj_id, instance_id) pair in
PartPlate::obj_to_instance_set until it is pruned. object_list_changed() runs
during the delete path and calls has_printable_instances(), which guarded only
obj_id and then indexed object->instances[instance_id] on the now-shorter
vector, dereferencing a garbage ModelInstance* and crashing with SIGSEGV. The
reported fault address (0x12a) matches a member read on that bad pointer.

Reuse the existing valid_instance() helper, which bounds-checks both obj_id and
instance_id, at every obj_to_instance_set scan that was missing the instance-id
check: has_printable_instances(), printable_instance_size(),
is_all_instances_unprintable(), get_extruders_under_cli(),
duplicate_all_instance() and set_pos_and_size() (the last had no bounds check at
all). valid_instance() is made const so the const CLI scan can call it.

Fixes #14159
2026-07-11 17:41:22 +08:00
nvs1_cinci
e56cdd707f fix: use bambu's network plugin (#14688)
Fixes a regression where Timelapse and SD Card media failed to load on Bambu devices. 

During the dual-cloud-agent refactor, NetworkAgent was updated to require an explicit provider argument. The call site in MediaFilePanel::fetchUrl() was missing this argument, causing it to silently fall back to the default Orca stub instead of routing to the Bambu network plugin. 

This explicitly passes wxGetApp().get_printer_cloud_provider() to get_camera_url to correctly route the request and restore functionality.
2026-07-10 15:23:30 +08:00
Robert J Audas
79d51b31b5 Disable prime tower width for rib walls (#14625)
* Disable prime tower width for rib walls

Only enable the prime tower Width field when the selected wall type uses the standard tower shape. Rib towers use the rib-specific settings instead, so leaving Width editable suggests it changes rib geometry when it does not.

Fixes #14537

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Simplify prime tower width toggle

Use the existing rib-wall helper when disabling the prime tower width control for rib wall towers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-09 22:48:17 +08:00
SoftFever
05ed2e4dfa Fixed a rare crash on app startup caused by ENOTSUP (errno 45) on Mac (#14686)
fix: prevent startup crash when preset-sync directory scan hits a transient FS error

On startup the user-preset sync thread scans the preset folder for orphaned
.info files (scan_orphaned_info_files). It iterated the directory with a
throwing boost::filesystem::directory_iterator while running on a background
thread that has no exception guard. On macOS, readdir() can intermittently
fail with ENOTSUP (errno 45); boost then throws filesystem_error, which --
uncaught on the sync thread -- calls std::terminate and aborts the whole
application on startup.

- Iterate with the error_code-based directory_iterator so a transient read
  failure is logged and skipped instead of thrown. The orphan scan is
  best-effort and re-runs on the next sync, so skipping a cycle is harmless.
  This mirrors the existing pattern in has_json_presets() and the plugin scan.
- Wrap the entire sync-thread body in try/catch as defense-in-depth, so no
  future uncaught exception on that otherwise-unguarded thread can abort the
  app.
2026-07-09 21:57:59 +08:00
Kris Austin
6fda82476d fix: out-of-bounds read computing tool-ordering max layer height (#14665)
* fix: out-of-bounds read computing tool-ordering max layer height

calc_max_layer_height() loops over the extruder count (nozzle_diameter)
but indexes max_layer_height with the same counter, reading past the end
when that array is shorter. Silent on release builds, aborts under a
bounds-checked STL (_GLIBCXX_ASSERTIONS).

Read via get_at(), which falls back to the first entry when the index is
out of range, as Slicing.cpp already does for this option.

Add a fff_print regression test slicing a two-extruder printer with a
single-entry max_layer_height.

* docs: clarify how max_layer_height ends up short in the regression test

Normalization sizes it to the filament count under single_extruder_multi_material,
not "a mismatch a profile can ship" as the earlier comment guessed.
2026-07-09 15:47:57 +08:00
Kris Austin
7d17400443 fix: dangling static lambda crashes support G-code export on repeated slices (#14677)
GCode::extrude_support declared its per-path speed helper as a function-local
static lambda that captures `this` by reference. The closure is built once, on
the first extrude_support call, and reused for the rest of the process, so a
second G-code export in the same process runs the helper against a `this` from
the first export's stack frame, which has already returned.

The stale `this` flows through NOZZLE_CONFIG(...) -> cur_extruder_index() ->
GCodeWriter::filament(), reading a garbage current-extruder id and indexing
with it. It is silent whenever the reused stack still holds a usable pointer,
and an order-dependent SIGSEGV otherwise; AddressSanitizer reports it as a
stack-use-after-return in GCodeWriter::filament(). It is the only static
capturing lambda in libslic3r.

Drop static so the closure is rebuilt each call against the live frame. Add an
fff_print regression test that slices a support object twice in one process; it
fails without the fix (stack-use-after-return under ASan) and passes with it.
2026-07-09 08:56:03 +08:00
π²
bc6ffcfb31 Anisotropic surfaces + Separated Infills (remake) (#11682)
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
2026-07-08 15:40:19 -03:00
Ian Bassi
378843a4da Remove unused variable (#14670) 2026-07-08 15:15:50 -03:00
Ian Bassi
20a66fa99b Top Surface Expansion (#14296)
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
2026-07-08 14:20:40 -03:00
Ian Bassi
da149ee75a Add toolchange ordering option (Standard/Cyclic). (#13582) 2026-07-08 14:18:41 -03:00
Kris Austin
b58025575d fix: isolate calibration temp paths per user (#14619)
* fix: isolate calibration temp paths per user

The calibration temp files under <temp>/calib were file-scope statics
initialized before set_temporary_dir() runs at startup, so they kept
using the shared system temp root and missed the per-user isolation
added in #14607. On Linux every account shares /tmp, so the first user
to calibrate owns /tmp/calib and later users fail to write there, the
same cross-user collision #14607 fixed for model backups, STEP import,
and part skip.

Build the paths lazily from temporary_dir() instead, through a
calib_temp_dir() accessor and a calib_temp_file() join helper. The base
becomes <temp>/orcaslicer_<uid>/calib on Linux and is unchanged on
Windows, where the temp dir is already per user.

Also make StoreParams::path a std::string rather than a non-owning
const char*. The calibration code had to keep a std::string alive
solely to feed that pointer, and the field was uninitialized by
default; owning the string removes the lifetime hazard for all three
callers and makes the entry guard a reliable empty() check. Confined to
the 3mf project exporter (three callers, two internal reads); no
on-disk, format, or ABI impact.

Follows up on #14607 per @Noisyfox's review suggestion.
2026-07-08 21:14:05 +08:00
Kris Austin
dec67345be fix: prevent out-of-bounds crash in Arachne beading interpolation (#14656)
* fix: prevent out-of-bounds crash in Arachne beading interpolation

SkeletalTrapezoidation::interpolate() derives an inset index from `left` but
uses it to index the merged beading, which follows the thicker of left/right.
When the thicker side has fewer insets, the index runs past the end and the
slicer crashes during "Generating walls".

Skip the adjustment when the index is out of range, as the adjacent guards
already do. interpolate() uses no instance state, so make it static and add a
regression test that exercises it directly.

Fixes #14584
2026-07-08 20:58:39 +08:00
anjis
cf86f20ae1 Improve filament change time estimation for CC & CC2 printers and add purge length statistics. (#14663)
* Improve filament change time estimation for CC & CC2 printers and add purge length statistics.

* fix(gcode): route elegoo M6211 handling
2026-07-08 20:48:32 +08:00
anjis
cab62070b5 Fix garbled Chinese filenames when importing ZIP files. (#14633)
* Fix garbled Chinese filenames when importing ZIP files.

* fix: avoid repeated ZIP path CRC calculation
2026-07-08 20:24:55 +08:00
Ian Bassi
12b63ebe36 Localization context (verb noun adjective adverb) (#14646)
* Torre de purga capitalization

* Russian navigation back

* Inches

* verb noun adjective adverb

* Posterior

* Fix atras for camera view

* Camera view
2026-07-08 09:16:00 -03:00
mlugo-apx
1d61962ea7 Add Vertical/Horizontal axis-lock checkboxes to Support Painting (#14262)
* Support Painting: add Vertical/Horizontal axis-lock checkboxes

Adds the Vertical and Horizontal axis-lock checkboxes to the Support
Painting gizmo, matching the UI in the MMU Segmentation and Seam
Painter gizmos. The underlying constraint logic has lived in
GLGizmoPainterBase since #2424 and already applies to any
ToolType::BRUSH action — the Support gizmo was the only painter
without the UI to enable it.

The Circle and Sphere brush arms are consolidated into a single
"if (Circle || Sphere)" block matching the structure of
GLGizmoMmuSegmentation::on_render_input_window, eliminating
duplicate cursor-radius and axis-lock UI code.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* Support Painting: keep Circle/Sphere as separate tool arms per review

Reviewer requested keeping a separate condition per tool for future
extensibility rather than merging Circle and Sphere into one branch.
This restores the upstream Circle/Sphere arm structure and adds the
Vertical/Horizontal axis-lock options to each arm, making the change
purely additive over upstream.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: yw4z <ywsyildiz@gmail.com>
2026-07-08 04:11:47 +03:00
Kris Austin
4188ed2e00 feat: add regex_replace() string transform to placeholder templates (#14650)
feat: add regex_replace() string transform to filename templates

The filename template language could test strings (=~, !~, one_of) but
never rewrite one, so there was no supported way to reshape a placeholder
value, such as dropping a file extension from {first_object_name}.

Add regex_replace(subject, /pattern/, replacement), reusing the existing
regex-literal syntax and boost::regex engine. Every placeholder keeps
returning its exact value and the template does the transform explicitly:

  {regex_replace(first_object_name, /\.[^.]*$/, "")}   strip any extension

The replacement may reference capture groups ($1, $2, ...). It is one
grammar function mirroring digits(), with the name registered as a keyword
so it is not parsed as a variable.
2026-07-08 08:58:51 +08:00
Ian Bassi
bec1ce706c Fix localization context (#14642)
Co-authored-by: Alexandre Folle de Menezes <afmenez@terra.com.br>
2026-07-07 12:15:37 -03:00
yw4z
b2adfb5c13 Fix minimize & wrapped text issue on shared profiles notification (#14604)
Update NotificationManager.cpp
2026-07-07 14:24:55 +03:00
Robert J Audas
1717c0f263 Fix brim first layer speed (#14616)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-06 19:04:32 -03:00
Ian Bassi
3bee58fcab Spanish Fuzzy Skin standarized (#14622) 2026-07-06 14:14:34 -03:00
Ian Bassi
6b7cfd71b1 Spanish update + Gettext for all (#14620) 2026-07-06 13:32:47 -03:00
raistlin7447
29f31b9b38 fff_print: a maintainable testing framework (proposal + coverage) (#14426)
* fix: initialize Print::m_isBBLPrinter

Built outside the GUI/CLI (headless tests, embedded use) the member was read
uninitialized: is_BBL_printer()/wipe_tower_type() feed it into ToolOrdering,
which then non-deterministically dropped per-feature filament assignments.
Default it to false, the value the GUI and CLI already assign for non-Bambu
printers.

* docs(test): add the fff_print testing contract

tests/fff_print/README.md codifies how the suite is organized: one file per
subsystem (each owning both in-memory and emitted-G-code assertions), flat
behavioral test names with a single [Subsystem] tag, a robust-tests guide,
the shared helpers, and an add-a-test checklist. Linked from tests/CLAUDE.md.

* test(fff_print): reorganize the suite to the contract and add coverage

Bring every subsystem into one file per the README: rename the test_data
harness to test_helpers; consolidate skirt/brim; split multi-filament and
cooling into their own files; disperse the test_printgcode grab-bag and the
end-to-end smoke scenario into focused tests; fold test_gcode into
test_gcodewriter. Standardize names and tags, align cube tests on the cube()
helper, and de-qualify the flagship files.

New coverage: multi-filament per-feature and per-object routing; a skirt/brim
behavior matrix (the #14333 rework, including brim ears, with regression
coverage for #14319 and #14366); resolved extrusion-width and config
comments; custom-G-code placeholders; fan control and speed-marker
consumption.

Re-enable three slice tests previously tagged [NotWorking]: the clipper
"Coordinate outside allowed range" error that disabled them was specific to a
past CI runner environment and no longer reproduces.

* test(fff_print): tag arm64-flaky skirt/brim tests NotWorking

Four skirt/brim slice tests intermittently throw ClipperLib's "Coordinate
outside allowed range" on the macOS and Windows arm64 CI toolchains (an FP
divergence, not a slicing bug; see PR #14207). Linux x86_64 and aarch64 are
unaffected. Tag them [NotWorking] so ctest -LE NotWorking skips them.

* test(fff_print): re-enable the arm64 skirt/brim tests

These were tagged [NotWorking] as a stopgap when myfork's daily-driver build
combined them with the cross-platform CI on a base that predated upstream's
m_origin fix (99dea01cc3). With upstream merged in, Print::m_origin is
initialized and the "Coordinate outside allowed range" throw is gone, so the
tests pass on macOS/Windows arm64. Drop the tags.
2026-07-06 22:24:24 +08:00
SoftFever
a1ff45284c Fix version was not properly updated on non windows OS (#14617)
Fixed an issue where on non-Windows systems, the version was not properly written to the appconfig.
2026-07-06 22:16:28 +08:00
yw4z
cc89416055 Improve layout of transform gizmos (#14410)
* init

* add tooltips
2026-07-06 14:34:36 +03:00
Gabriel Monteiro
fd80ded5a8 fix(gui): startup crash in clang/LLVM builds, null pointer UB in create_scaled_bitmap (#14521)
fix(gui): avoid null-pointer UB in create_scaled_bitmap with win == nullptr

create_scaled_bitmap() documents that win may be nullptr, but called
win->FromDIP() on it. Calling a member function through a null pointer
is undefined behavior: clang assumes `this` is non-null and deletes the
subsequent `win ?` null check added in #13117, turning the fallback
branch into an unconditional virtual call through a null vtable.
This crashed LLVM/clang-cl builds at startup (access violation reading
0x0 in BBLTopbar creation); MSVC builds were unaffected by luck.

Use the static, null-safe wxWindow::FromDIP(x, win) overload instead,
which falls back to the primary display DPI. Behavior is unchanged for
non-null windows.
2026-07-06 11:28:03 +08:00
Kiss Lorand
db2f861a11 Fix painted mouse-ear brims snapping to wrong location (#14606)
Fix painted mouse-ear brims moving to incorrect locations when Brim follows compensated outline is enabled.
2026-07-06 09:28:41 +08:00
raistlin7447
2860353b9f fix: multi-user slicing crash on shared temp dir (#14607)
On Linux every account shares /tmp, but slicing builds temp paths there under
fixed, app-owned names via temporary_dir() (model backups, STEP import,
part-skip). The first user to slice creates and owns those dirs, so the next
user cannot write under them and slicing crashes with "No such file or
directory".

Tag the app temp root with the user id at startup (<temp>/orcaslicer_<uid>)
so every temporary_dir() consumer is isolated at once. The id stays at the
top level of the world-writable system temp so each user's dir is created
directly there; a shared parent dir would be owned by whichever user made it
first. The root is pre-created because STEP import writes into it directly.
Windows keeps the plain temp dir since it is already per-user.

Fixes #10108. Same root cause as #5969.
2026-07-06 09:18:04 +08:00
SoftFever
8747605930 Fixes invalid inherits/compatible_printers/compatible_prints references that point at a deleted or renamed preset. (#14595)
* fix profile reference for Creality

* fix profile reference for Blocks

* fix profile reference for OrcaArena

* fix profile reference for re3D

* fix profile reference for Chuanying

* fix profile reference for Prusa

* fix profile reference for Wanhao France

* fix profile reference for MagicMaker

* fix profile reference for Afinia

Remove the ABS/ABS+/PLA/TPU/Value ABS/Value PLA filament presets that referenced the non-existent "Afinia H400 Pro" printer. The real printer is "Afinia H+1(HS)", already served by the @HS filament variants.

* fix profile reference for Comgrow

Remove the orphaned "0.20mm Standard @Comgrow T500 1.0" process preset and its process_list entry. Its only compatible printer "Comgrow T500 1.0 nozzle" never existed (the T500 model defines nozzle diameters 0.4/0.6/0.8 only).

* always run check_preset_references
2026-07-05 20:26:36 +08:00
SoftFever
ee1f4ef1d6 Show preset name in cloud sync conflict and error messages (#14592)
The 409 conflict notification, the force-push confirmation dialog, and the payload-too-large (413) dialog now name the affected preset. The name was already parsed from the conflict body but never surfaced. The account-level preset-limit message stays generic since it isn't about one specific preset.
2026-07-05 17:05:41 +08:00
SoftFever
5ba5c6672d Fix reload from disk for STEP models after reopening a project (#12992) (#14591)
* Fix reload from disk for STEP models after reopening a project (#12992)

reload_from_disk matched reloaded source volumes with an exact
source.input_file string comparison. After a project is saved and
reopened, the stored source path is only the filename (the default,
non-full-path save) while a freshly re-imported volume carries a full
path, so the comparison never matched: reload fell into fail_list and
the "locate file" dialog was effectively useless for STEP models.

Fall back to a case-insensitive filename comparison when the exact
paths differ, so the existing same-folder source lookup (and the
locate dialog) can reload the model. Projects that stored absolute
source paths still match exactly as before; no 3mf format change.

* Add Preferences option to store full source paths in projects

Expose the existing export_sources_full_pathnames setting (previously
only editable in the config file) as a checkbox under Preferences >
General > Project. Enabling it stores absolute source paths in saved
projects, so "Reload from disk" works when the source file is kept in
a different folder than the project (companion to #12992).
2026-07-05 16:40:00 +08:00
Florian
2d4f7a7437 added option to limit polyhole edges (#12349)
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
2026-07-04 23:03:36 -03:00
SoftFever
dd99549d20 fix gcode time estimiation error (#14573)
fix gcode estimiation error
2026-07-04 15:29:19 +08:00
ExPikaPaka
b3a0c8bd40 Preserve disabled filament overrides (nil) through cloud sync (#14550) 2026-07-04 10:42:48 +08:00
Valerii Bokhan
1882861a98 Feature: Small perimeters speed for supports (#13459) 2026-07-03 17:27:57 -03:00
yw4z
65a9e655cf Add wireframe toggle to canvas menu and fix keyboard shortcut (#14469) 2026-07-03 17:27:30 -03:00
Ian Bassi
61168cdb6f Do not reduce speed for calibrations (#13658) 2026-07-03 17:27:18 -03:00
Ian Bassi
a6dd002fe7 Top and Bottom layer directions (#13631)
* Top layer direction

* Bottom layer direction

* comSimple
2026-07-03 17:27:05 -03:00
Ian Bassi
8309a9e8ee Exposing STEP import values (#14484)
Co-authored-by: yw4z <ywsyildiz@gmail.com>
2026-07-03 17:19:24 -03:00
yw4z
5a629c0199 Add OrcaSlicer Badge to Handy Models (#14487) 2026-07-03 16:54:26 -03:00
Wegerich
f33bf459ba Update adaptive pressure advance option labels and tooltips (#14411)
Co-authored-by: yw4z <ywsyildiz@gmail.com>
Co-authored-by: Ioannis Giannakas <59056762+igiannakas@users.noreply.github.com>
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
2026-07-03 11:42:23 -03:00
Ian Chua
aa7986b8d0 fix: add logging for refresh token flow and use local os keychain as source of truth. (#14531) 2026-07-03 22:27:17 +08:00
TheLegendTubaGuy
a564a01013 fix: preserve PA batch speed and accel overrides (#14540)
* fix: preserve PA batch speed and accel overrides

* Remove broken ModelConfig set_config_values
2026-07-03 16:28:57 +08:00
raistlin7447
adc8763099 fix: crash in Measure tool when a plain edge is the first selection (#14538)
* fix: crash in Measure tool when a plain edge is the first selection

The SPHERE_2 gripper raycaster called get_feature_offset() on
.first.feature instead of .second.feature (copy-pasted from the SPHERE_1
block). Plain planar-border edges store no extra point, so the Edge
branch dereferenced an empty optional behind a release-stripped assert,
aborting on Flatpak and undefined behavior elsewhere.

Point the SPHERE_2 raycaster at .second.feature and fall the Edge branch
back to the edge midpoint.

Fixes #14018
2026-07-03 11:29:28 +08:00
raistlin7447
036bd7bcec feat: add {first_object_name} filename placeholder (#14497)
{input_filename_base} is meant to be the saved project's file name. Before
#13753 a bug made it fall back to the first object's name when a project was
saved; #13753 fixed it to use the project name. Some users relied on the old
behavior to get the part name into their output file name and had no
placeholder to recover it ({model_name} is the 3mf designer metadata, blank
for plain STL imports).

Add {first_object_name} as a dedicated placeholder for the first printable
object on the current plate, populated in update_object_placeholders()
independently of {input_filename_base}.

Closes #14493
2026-07-03 00:14:32 +08:00
raistlin7447
d24e7f75ef fix: crash when rotating the prime tower (#14499)
Selecting the prime tower and rotating it (PageUp/PageDown) crashed.
Selection::notify_instance_update() indexed m_model->objects with the
wipe tower's synthetic id (>= 1000), which is not a ModelObject index,
so the lookup returned garbage and dereferencing it segfaulted.

do_rotate/do_scale/do_mirror already skip the wipe tower in their own
loops but all call this shared helper, so scale and mirror hit the same
fault. Selection::drop() had the same latent bug via a direct index.
Guard both with the >= 1000 check already used throughout the file.

Fixes #14498
2026-07-03 00:08:15 +08:00
Noisyfox
464a81d585 Support accessing coFloatsOrPercents values in gcode template (#14526)
* Support accessing `coFloatsOrPercents` values in gcode template (OrcaSlicer/OrcaSlicer#14522)

* Vector option values are separated by comma

* Fix wrong cast used for checking nullability
2026-07-02 23:51:20 +08:00
Gabriel Monteiro
dbe99d0d6f feat(log): enable console logging in RelWithDebInfo builds (#14439)
* feat(log): enable console logging in RelWithDebInfo builds

* perf(log): make console logging async to avoid blocking startup

* fix(log): gate console sink to RelWithDebInfo builds

---------

Co-authored-by: Gabriel <bielpaess912@gmail.com>
2026-07-02 21:49:51 +08:00
ExPikaPaka
5bccc25705 Fix "plug-in file may be in use" install failure when migrating from older versions (#14373) (#14528)
Fix network plug-in install failing when the plug-in DLL is in use (#14373)

Switching or reinstalling the Bambu network plug-in from a running
OrcaSlicer failed with "The plug-in file may be in use". install_plugin()
deleted each existing file before extracting the new one, and on Windows a
currently-loaded DLL (BambuSource.dll, or the legacy networking library)
cannot be removed or overwritten in place, so the whole install aborted.

Rename an in-use file aside to "<name>.old" before writing the new one: the
running module keeps mapping the renamed file while the new version is
extracted, so the install succeeds without having to unload the plug-in
first. Stale ".old" files are cleaned up at the start of on_init_network(),
before the plug-in is (re)loaded, so they do not accumulate.
2026-07-02 18:58:23 +08:00