When the OrcaSlicer window is on an inactive Hyprland (or any Wayland
compositor that keeps surfaces mapped while hidden) workspace, GTK
keeps delivering synthetic leave-notify events to the printer-preset
row. The wxEVT_LEAVE_WINDOW handler at Plater.cpp:1855 calls
wxFindWindowAtPoint(), which walks the entire wxWidgets window tree
calling IsShown() / gtk_widget_get_child_visible() on each widget,
then Hide()s the edit button and triggers a Layout() of the parent
panel. The Hide()+Layout() re-fires more leave events, creating a
feedback loop that pegs a CPU core at 100% indefinitely.
GDB attached to a frozen process confirmed the main thread stuck in:
wxFindWindowAtPoint (recursing through widget tree)
-> wxWindow::IsShown
-> gtk_widget_get_child_visible
...
Sidebar::Sidebar(Plater*)::$_14 <- the leave handler lambda
wxEvtHandler::SafelyProcessEvent
wxGTKImpl::WindowLeaveCallback
gtk_main_do_event
...
IsShownOnScreen() can't be used as a guard here because GTK on Wayland
reports widgets as visible even when the toplevel surface is on an
inactive workspace (see existing comment at Plater.cpp:9304).
Fix: state-based short-circuit. If btn_edit_printer is already hidden,
the handler has no transition to perform - skip the expensive tree walk
and the Hide()+Layout() that would re-trigger the feedback loop. After
the first leave event, every subsequent leave event is O(1).
Refs:
- #12387 (open issue with matching setup: Arch + Hyprland + RTX 3060 + Bambu A1)
- #11196 (introduced the hover-edit-button feature in Nov 2025)
* Update/add re:3D profiles.
* Fix encoding issue with UTF-8 BOM
* Change spaces to tabs.
* Fix alignment-based space indentation issues.
* Test: rename_from property
* Test 2: rename_from property
* Test 3: use 'renamed' instead of 'rename'
* Add renamed property for each conflicting profile.
* Revert to optimized assets improved on [#13149](https://github.com/OrcaSlicer/OrcaSlicer/pull/13149)
# Description
Resolves https://github.com/OrcaSlicer/OrcaSlicer/issues/13830
The issue was that when OrcaSlicer was open with a 3mf file, the project
is first loaded, then when the sync finishes, it overrides the project
settings. This occurs when are working on a 3mf file and you click the
sync presets button as well.
The fix was to snapshot the current state of the settings, and then
restore whatever was marked as dirty to it's original state, preserving
the 3mf project settings.
[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
* Add Flashforge AD5X local send dialog, IFS mapping, and LAN discovery
* Refine Flashforge AD5X IFS dialog behavior
* Refine Flashforge IFS slot selection dialog
* Fix Flashforge printer selection and print mapping
* Use 3MF for Flashforge local uploads
* Generalize Flashforge local API handling
* Handle Flashforge local API IFS support more robustly
* Use selected plate filament info for Flashforge IFS mapping
* Fix Flashforge current-plate mapping and widget sizing
* Improve Flashforge IFS contrast and color matching
* Fix Flashforge legacy plate export and upload naming
Resolve PLATE_CURRENT_IDX before the legacy send-to-printhost path calls send_gcode so single-plate Flashforge 3MF exports target the selected plate instead of leaking the sentinel into export_3mf.
Sanitize Flashforge upload names in one shared utility reused by both the dialog and the backend client. This keeps the UI-visible filename and the actual uploaded filename consistent and replaces printer-problematic characters such as '=' without scattering Flashforge-specific logic through the generic Plater flow.
* Keep Flashforge upload filename sanitization in the backend only
Drop the PrintHostSendDialog API changes and keep filename sanitization inside the Flashforge backend paths that actually talk to the printer. This keeps the generic send dialog flow untouched while still normalizing problematic upload names for both serial and local API uploads.
* Only use the Flashforge IFS dialog for local API uploads
* Use reported Flashforge IFS support without model fallback
* Remove unused Flashforge slot uniqueness tracking
* Include <array> for Flashforge discovery message
* Sync Elegoo profiles from ElegooSlicer
Update vendor Elegoo.json, filament/machine/process trees, and OrcaFilamentLibrary
Elegoo entries. Align machine default material names with existing filament preset names.
* feat: expose filament_name for G-code export filename format
Derive from filament_settings_id for the first active extruder and strip the suffix after @, matching ElegooSlicer so filename_format can use {filament_name}.
* chore: reorder Elegoo entries in OrcaFilamentLibrary
Group Elegoo @base profiles and bump library version to 02.03.02.62.
* sync OrcaFilamentLibrary.json with Elegoo filament profiles
* fix: clean up Elegoo process renamed_from for profile validation
Add single renamed_from only where preset names changed from legacy Orca
names; remove duplicate Rapid @System library entries that conflicted with
ECC2 vendor presets.
* fix(profiles): add missing Elegoo renamed_from for profile validation
CI custom-preset tests still inherit legacy Orca preset names that no
longer exist after the Elegoo bundle update. Add renamed_from on process,
Neptune 4 machines, OrcaFilamentLibrary filaments, and Giga profiles so
inherits resolve again, without changing print parameters.
Update Snapmaker U1 (0.4 nozzle).json
Updated Snapmaker U1 0.4 nozzle "change_filament_gcode" and "machine_end_gcode" to fix the issue of collisions when using "Print by Object"
Fix compile error in Debug mode. Adds getters for Point3 types in ExtrusionEntity
ZAA changed ExtrusionPath::polyline from Polyline to Polyline3, preserving the existing interfaces by converting first_point and last_point to return a Point copy constructed from the underlying Point3 type.
ExtrusionLoop::validate function was not updated and is broken in debug configurations as it's currently comparing Point to Point3
This change promotes ExtrusionPath::first_point3/last_point3 to the ExtrusionEntity base class as a pure virtual function, implements them on derived classes, and fixes ExtrusionLoop::validate
Fix nozzle diameter guards for printers that don't report nozzle info (#13236)
PR #12814 changed DevNozzle::m_diameter default from 0.4f to 0.0f to
mean "unknown" when firmware doesn't push nozzle info, and guarded two
call sites in SelectMachine.cpp. PR #13330 introduced
DevExtderSystem::NozzleDiameterMatchesOrUnknown() and adopted it in
get_printer_preset / CalibUtils / CalibrationWizardPresetPage. A few
reachable sites were still left out and now report "mismatch" / fail
silently for every non-BBL printer (Klipper/Moonraker, RRF, Marlin,
etc.) that doesn't push BBL nozzle data.
The most visible symptom: the "Sync filament colors from AMS" button on
Moonraker printers with AMS/AFC silently does nothing, because
get_printer_preset() couldn't find a matching system preset (fixed in
#13330, but the lookup-string sites below kept the bug visible
elsewhere).
Apply NozzleDiameterMatchesOrUnknown at the two remaining comparison
sites:
src/slic3r/GUI/Plater.cpp
- file-load printer-mismatch dialog — don't prompt on every load
- on_select_preset sync_extruder_list gate — skip 0.0 extruders
For the three filament-lookup string-builder sites, fall back to the
currently-selected printer preset's nozzle diameter so the dropdown
isn't empty when firmware hasn't reported a diameter:
src/slic3r/GUI/AMSMaterialsSetting.cpp (Popup + on_select_filament)
src/slic3r/GUI/CaliHistoryDialog.cpp (get_all_filaments)
Also remove the dead SyncAmsInfoDialog::is_same_nozzle_diameters method
surfaced while auditing the affected sites — it was introduced
2024-12-30 in commit ad79ed6d93 ("ENH:add SyncAmsInfoDialog",
cherry-picked from Bambu's internal branch) but a caller was never
wired up on the OrcaSlicer side. Dead since introduction.
Fixes#13236
Refs #12814#13330
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
* Fix data race in extra bridge layer generation causing spurious bridges on top surfaces
* Guard second bridge layer against top most surfaces
* CoPilot review comments & lighting infill threading fix.
* Fix overhang preview not using fallbacks when angle is 0
The overhang visualization in Preview ("show overhangs based on support settings")
used the raw `support_threshold_angle` value from the configuration.
When `support_threshold_angle` was set to 0, Orca internally falls back to:
- 30° for tree supports
- an angle derived from `support_threshold_overlap` for normal supports
However, the preview logic ignored these fallbacks and used the raw value (0°),
leading to incorrect overhang highlighting that did not match the actual
support generation behavior.
This patch computes the effective overhang threshold used for preview:
• If `support_threshold_angle > 0`, use it directly
• If `support_threshold_angle == 0` and tree supports are used, fall back to 30°
• If `support_threshold_angle == 0` and normal supports are used, derive the
equivalent angle from `support_threshold_overlap`, `layer_height`, and the
external perimeter width.
The function now returns `normal_z` directly so the preview uses the same
effective slope threshold as the support generator.
As a result, the overhang highlight in Preview now correctly matches the
supports that will actually be generated.
* Apply Copilot suggestions
PR #13388 added resources/printers/N6.json for X2D support but did not
bump resources/printers/version.txt. PresetUpdater only copies files
from the install's resources/printers/ to the user's data_dir/printers/
when the resources version is newer than the user's stored version, so
every existing install stays at 02.00.00.29 and never receives N6.json.
At runtime, json_diff::load_compatible_settings("N6", "") reads from
data_dir/printers/N6.json; the silent file-missing failure leaves
is_support_bed_leveling, is_support_pa_calibration, and
SupportCalibrationNozzleOffset at their defaults, hiding the Bed
Leveling and Nozzle Offset Calibration checkboxes in the Send Print
Job dialog for the X2D.
Bumping the patch version triggers the existing propagation logic on
next startup.
Fixes#13780Fixes#13794
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Ignore SIGPIPE at startup to prevent crash on dropped printer connection
Writing to a closed printer network socket raised SIGPIPE, whose default
action terminated the whole process (exit 141, no crash report). Set
SIGPIPE to SIG_IGN once at main() entry (POSIX only) so such writes return
EPIPE to the existing networking error handling instead of killing the app.
Fixes#13787
- Added missing translations for various UI elements and messages.
- Improved existing translations for clarity and accuracy.
- Ensured consistency in terminology across the localization file.
After pulling the latest presets from the cloud, changed values such as Layer height kept showing the old value until the user switched tabs. Refresh the active settings tab on sync so updates appear immediately.
The Emboss text-cut workflow can crash with SIGBUS at a stack-guard page
on macOS (and equivalent on Linux) when CGAL's
Polygon_mesh_processing::corefine falls back from filtered interval
arithmetic (Epick) to exact rational arithmetic (Epeck / mpq_class).
On near-degenerate inputs -- coplanar triangles in the projection
footprint, very thin font stems, sharp edges or seams under the text --
CGAL's Filtered_predicate_with_state cascade ends up inside
Triangulation_2<Projection_traits_3<Epeck>>::march_locate_2D, whose
recursive walk plus mpq_class arithmetic frames overflows the worker's
4MB default stack. The fault address sits exactly inside the next
thread's guard page, which is the textbook macOS signature.
Crash trace (BambuStudio v02.07.00.55, macOS 26.4.1 arm64, embossing
text into a model):
__gmpn_mul_1
__gmpz_mul / __gmpq_mul
CGAL::determinant<mpq_class>
Projected_orientation_with_normal_3
Filtered_predicate_with_state::operator()
Triangulation_2<...>::orientation
Triangulation_2<...>::march_locate_2D
Surface_intersection_visitor::triangulate_intersected_faces
Polygon_mesh_processing::corefine
Slic3r::cut_surface
Emboss::cut_surface_to_its
Emboss::GenerateTextJob::get_text_mesh
PlaterWorker::PlaterJob::process
The thread's stack region in the report was exactly 4128K -- the
default 4MB plus a small TLS overhead -- and the faulting address hit
the adjacent guard page. We have one observed reproducer; the 16 MB
value is chosen as 4x defensive headroom over that, not as a measured
upper bound. Future heavier emboss inputs may need more.
Cumulative cost on a 64-bit target. Slic3r::create_thread has 22
callsites across the codebase. Realistic peak concurrent live count is
on the order of 10-15 workers (Plater UI worker, slicing process, FDM-
support gizmo, STEP loader, network sync helpers, per-task sender
threads in TaskManager up to MaxSendingAtSameTime, per-machine info
threads in device-list dialogs, long-lived sync helpers in GUI_App).
At 16 MB reserve x ~15 = ~240 MB of address-space commitment in the
worst case, which is bounded on any 64-bit target.
Resident memory remains proportional to actual stack depth on all three
platforms: macOS / Linux mmap the thread stack and defer-commit pages on
touch, and Boost.Thread on Win32 passes STACK_SIZE_PARAM_IS_A_RESERVATION
to _beginthreadex (verified at libs/thread/src/win32/thread.cpp), so on
Windows the bumped value is the reserve, not the initial commit.
The 32-bit branch of the previous (sizeof(void*) == 4) ternary is
removed: BambuStudio doesn't ship a 32-bit build today, and the literal
makes the value easier to read at the callsite.
(cherry picked from commit e150b502b3d2afc98b83dcc9e5720e998f9eb79a)
Co-authored-by: Abdel Gomez-Perez <nabdel07@icloud.com>
* feat(viewer): Display travel distance and move count in G-code summary
This commit introduces a new feature that enhances the G-code viewer by displaying the total travel distance and the total number of travel moves in the 'Line Type' summary.
This provides users with more detailed statistics about their prints, helping them to better understand the printer's behavior and identify opportunities to optimize travel moves for faster print times.
This commit also fixes a critical bug in the G-code processor where the travel distance was being calculated incorrectly. The distance variable was not being updated for non-extruding travel moves, leading to inaccurate statistics. The calculation has been corrected to ensure it is performed for all relevant move types, resulting in accurate travel distance reporting.
* Subfix segments
kilo mega giga tera peta exa
* Add missing values
* Grams to Kilos and tons
* add distance
* Fix tool view
* Record and display seam distances
Track seam-related distances in print statistics and show them in the GCode viewer. Added total_seam_gap_distance and total_seam_scarf_distance to PrintEstimatedStatistics (with initialization). In GCode::extrude_loop the code now computes seam gap and scarf distances and accumulates them for external perimeters. GCodeViewer uses the summed seam distance when the Seams option is selected in the legend.
* Fix travel / wipe distances
* Update GCode.cpp
* Filament changes estimated time
---------
Co-authored-by: Steve Scargall <37674041+sscargal@users.noreply.github.com>
Handle user_ticket_login
Legacy Bambu network plugins completed embedded login with
user_login, which the WebView dialog already handled.
Newer Bambu login flows can complete with user_ticket_login and
return only a short-lived ticket. The external browser path already
worked because the local HTTP callback server exchanges that ticket
for tokens, fetches the user profile, and passes the resulting session
payload to change_user.
Mirror that ticket exchange path for embedded WebView login so the
dialog can handle user_ticket_login instead of silently ignoring it
after verification-code submission.