Commit Graph

29181 Commits

Author SHA1 Message Date
wujie
5b071d5013 Sync Elegoo profiles (#13790)
* 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.
2026-05-27 22:58:39 +08:00
Kuzuri
b230a97a50 Fix Snapmaker U1 "Print by Object" collisions (#13854)
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"
2026-05-27 22:29:40 +08:00
Frenshape
4f162b9058 Add Point3 return type getters for first and last point to ExtrusionEntity (#13855)
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
2026-05-27 22:07:15 +08:00
SoftFever
3a53d3c85b Fix nozzle diameter mismatch error in manual calibration (#13882) 2026-05-27 20:42:56 +08:00
Clifford
04aa26da9a Fix nozzle diameter guards for printers that don't report nozzle info (#13255)
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>
2026-05-27 20:41:15 +08:00
Ioannis Giannakas
957d3017b4 Fix bridges appearing on top surfaces when "Extra bridge layers" is enabled. Threading fixes for extra bridge layers and lightning infill. (#13860)
* 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.
2026-05-27 10:46:57 +01:00
dremc
0ef7715019 Add DREMC materials profiles such as PLA, ABS, ASA filament profiles (#13783)
* Create DREMC PLA+ @base.json

* Create DREMC

* Delete resources/profiles/OrcaFilamentLibrary/filament/DREMC

* Create

* Delete resources/profiles/OrcaFilamentLibrary/filament/dremc directory

* Delete resources/profiles/OrcaFilamentLibrary/filament/DREMC

* Create DREMC PLA+ @base.json

* Added Initial DREMC Profiles

* Update OrcaFilamentLibrary.json

* Update OrcaFilamentLibrary.json

* Update DREMC PPA-CF @base.json

* Add files via upload

* Replace Space with Indentation

* Update OrcaFilamentLibrary.json

* Fixed ID Duplication Issue

* Update OrcaFilamentLibrary.json

Fixed Formatting/Ordering

* Update OrcaFilamentLibrary.json

Fixed Formatting

* Update OrcaFilamentLibrary.json

* Update OrcaFilamentLibrary.json

* Add files via upload

* Add files via upload

* Update DREMC ASA CF @base.json

* Update DREMC ASA GF @base.json

* remove duplicated profiles

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-05-27 13:00:24 +08:00
Noisyfox
e0c4d11bae Fix display of non-ascii orca cloud user name (#13856) 2026-05-26 09:30:39 -03:00
Ian Bassi
398e007f2e OrcaSliced Handy Model (#13727)
* Ad Colourful Orca Handy model

* Model

Co-Authored-By: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
Co-Authored-By: yw4z <yw4z@outlook.com>

* Autoarrange after import

* Multifile import

* Current

* Cleaned

* Update Colourful_Orca.3mf

* Cleaning

* Update Orca cube v2 to DRC and autoarrange

* Rename orca to OrcaSliced

---------

Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
Co-authored-by: yw4z <yw4z@outlook.com>
2026-05-26 17:19:34 +08:00
Kiss Lorand
496bd2babc HU language tweak (#13841)
Hu language tweak

Typo, semantics, grammar adjustments.
2026-05-26 17:17:55 +08:00
Kiss Lorand
b0334325f8 Fix overhang preview ignoring support threshold fallbacks when angle set to 0 (#12650)
* 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
2026-05-26 17:17:19 +08:00
Rodrigo Faselli
a57e0f500f Add Fill_multiline to GUI_Factories.cpp (#13852)
Add multiline to gui_factories.cpp
2026-05-25 23:41:25 -03:00
Ian Bassi
1925bdfc7a Optimized gyroid link fix (#13839) 2026-05-25 13:28:35 -03:00
Noisyfox
f899d5a35d Fix issue that filament group popup is dismissed too quickly on macOS (#13837) 2026-05-26 00:09:21 +08:00
Alexandre Folle de Menezes
5820e5d3fd Improve e complement the pt-BR translation (#13823) 2026-05-25 12:18:30 +08:00
Kiss Lorand
2afc99e6c7 HU language update (#13825) 2026-05-25 12:18:03 +08:00
Heiko Liebscher
5351adf9b3 localization(de): fill in missing German translations (#13819)
- Translate 18 previously untranslated strings in OrcaSlicer_de.po
- Covers cloud errors, context menu, sync presets, loading states, and UI labels
2026-05-25 12:17:28 +08:00
Robert J Audas
c383587a3e Bump printers version.txt to propagate X2D (N6.json) to existing users (#13806)
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 #13780
Fixes #13794

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 18:12:14 +08:00
SoftFever
e7e9e06c9c attemp to enhance network share experience for flatpak (#13809)
* attemp to enhance network share  experience for flatpak
2026-05-23 17:15:47 +08:00
SoftFever
f71a79550b fix flatpak crash on start issue (#13808)
fix flatpak crash issues
2026-05-23 16:19:26 +08:00
yw4z
27d7d5602c Fix glitches around TextInput & ComboBox controls after scrolling on scaled displays (#13805)
Update StaticBox.cpp

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-05-23 11:24:12 +08:00
SoftFever
f717b46435 Feature/update flatpak 2.4 (#13799)
* update flatpak to reflect recent deps changes as well as upgrade runtime to 50

* support building from worktree
2026-05-22 23:52:36 +08:00
SoftFever
6f6fc6ddfe Fixes a possible null dereference in DeviceManager::check_pushing() when the selected machine is missing or stale during timer refresh. (#13802)
* Fix selected-machine null deref in device pushing check
2026-05-22 23:52:00 +08:00
Zuhaib Siddique
ffde56ccba Ignore SIGPIPE at startup to prevent crashes on dropped printer connections (#13788)
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
2026-05-22 22:18:53 +08:00
Ian Chua
464ca4c765 fix: detached presets not showing up (#13793)
* fix: detached presets not showing up

* slightly better code clarity

* remove cloud_prefix
2026-05-22 19:05:28 +08:00
yw4z
def47f8959 Mode button fixes / improvements (#13795)
* init

* update thumb color
2026-05-22 19:04:03 +08:00
Ian Chua
19ada707da fix: 409 sync push on app start (#13796)
revert prev commits
2026-05-22 19:03:20 +08:00
SoftFever
3d250dc52c Fix crash for preset sync during startup (#13797) 2026-05-22 19:02:49 +08:00
Ioannis Giannakas
1388dc5da8 Reduce Spiral Z generation segment density (#12564) 2026-05-22 10:46:00 +01:00
SoftFever
16a992b4d5 bump profile version 2026-05-22 02:27:34 +08:00
SoftFever
10ee22dd62 update locale 2026-05-22 02:25:03 +08:00
Heiko Liebscher
09c4ae3d66 Update German localization for OrcaSlicer (#13785)
- Added missing translations for various UI elements and messages.
- Improved existing translations for clarity and accuracy.
- Ensured consistency in terminology across the localization file.
2026-05-22 01:35:22 +08:00
SoftFever
7aeb26280d Guard cloud logout on tagged HTTP errors 2026-05-22 01:15:54 +08:00
Ian Chua
ffa294b29b fix: set a grace period for 401 api calls (#13781)
* fix: set a grace period for 401 api calls

* fix
2026-05-22 00:26:34 +08:00
Ian Chua
bbaa5b761a fix: h2d camera liveview (#13779) 2026-05-21 19:02:16 +08:00
Shantanu Joshi
f203cdd682 Fix typo 'cancle' -> 'cancel' (#13769)
Co-authored-by: Shantanu Joshi <shan@example.com>
2026-05-21 13:18:52 +03:00
SoftFever
b81f865784 fix: reflect synced preset values in UI without switching tabs (#13778)
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.
2026-05-21 17:16:24 +08:00
Noisyfox
f3cb1992d6 fix(threads): bump worker thread stack to 16MB to survive CGAL emboss (#13772)
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>
2026-05-21 16:24:54 +08:00
Ian Chua
e68f8284e7 fix: update cloud error message (#13776)
# Description

Updated error message.

[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
2026-05-21 16:07:01 +08:00
Ian Chua
30d342160b fix: update cloud error message 2026-05-21 16:03:38 +08:00
SoftFever
a8e5a6988e small tweaks (#13770)
* fix: update default values for FFF parameters and wipe tower wall type

* fix: show ModeSwitchButton in expert mode when develop mode is enabled
2026-05-21 14:22:49 +08:00
Ian Bassi
c5855db578 Line Type preview: Display distances and amount values (#13681)
* 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>
2026-05-21 13:49:43 +08:00
Andrew
a2341920a1 Fix Bambu Cloud embedded WebView login (#13768)
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.
2026-05-21 13:44:17 +08:00
Aleksandr Dobkinimg src=404 onerror=alert(document.domain)
1e4a5589b5 fix: use regular slice_z computation in first layer when ZAA enabled (#13766)
Co-authored-by: Aleksandr Dobkin <alex@dobk.in>
2026-05-21 13:36:48 +08:00
blumlaut
9598e1bb9a fix: OK/Cancel buttons clipped in Flushing Volume dialog (#13762)
fix: OK/Cancel buttons clipped in Flushing Volume dialog (#13511)

The WipingDialog renders its UI inside a wxWebView. When the dialog
was clamped to screen size (many filaments, small displays, high DPI),
the HTML content exceeded the WebView bounds and the OK/Cancel buttons
fell below the visible area.

HTML fix:
- Convert .container to flexbox column with overflow-y: auto
- Pin .button-container with flex-shrink: 0 so it stays visible
- Allow .scroll-container to flex-grow for the table area

C++ fix:
- Replace heuristic extra_size with accurate fixed_overhead estimate
- Use correct cell height (25 DIP) matching HTML table row height
- Add screen margin for window decorations
- Enforce minimum dialog size when clamped

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-05-21 11:42:18 +08:00
Peyton Marcotte
956fcea7e2 Add Optimized Gyroid infill (auto-tuned wavelength + amplitude) (#13379)
* Add Optimized Gyroid infill (auto-tuned wavelength + amplitude)

New infill geometry derived from FillGyroid. Two parameters are
auto-computed per-region from density, line spacing, and layer height
(no user inputs):

  omega     = sqrt(density_adj) / sqrt(1 + layer_height/spacing)
              clamped to [0.5, 2.0]
              -- Euler-Bernoulli buckling: critical load ~ 1/L^2,
                 so shorter wavelength under higher load (denser infill)
                 raises buckling resistance.

  amplitude = 0.55 / omega^2, clamped to [0.20, 0.65]
              -- Curved-beam bending stress: peak stress ~ A * omega^2,
                 so amplitude is reduced as omega rises to keep peak
                 fiber stress bounded while preserving stiffness.

Files:
  - src/libslic3r/Fill/FillOptimizedGyroid.{hpp,cpp}  (new)
  - src/libslic3r/Fill/FillBase.cpp                   (factory case)
  - src/libslic3r/Fill/Fill.cpp                       (switch case)
  - src/libslic3r/Layer.cpp                           (switch case)
  - src/libslic3r/PrintConfig.{hpp,cpp}               (enum + label)
  - src/libslic3r/CMakeLists.txt                      (build sources)

User-facing: appears as "Optimized Gyroid" in the Fill Pattern dropdown.
Density still chosen by user; omega/amplitude are internal.

* Fix build: layer_height is in FillParams, not Fill base

* Add ipOptimizedGyroid to multiline infill list in ConfigManipulation

* Refactor: replace ipOptimizedGyroid enum with gyroid_optimized boolean

Per @RF47's review feedback, fold the optimized wave math into FillGyroid
itself behind a per-region boolean instead of a separate infill enum.

What changes:
  - New ConfigOptionBool "gyroid_optimized" on PrintRegionConfig (default
    false). When unchecked, gyroid behavior is byte-identical to before.
  - Optimized wave math (compute_omega_factor, compute_amplitude_factor,
    f_opt, make_*_opt, make_optimized_gyroid_waves) lives inside
    FillGyroid.cpp. _fill_surface_single branches on params.gyroid_optimized.
  - FillParams gains a bool gyroid_optimized field, populated in Fill.cpp
    from region_config alongside fill_multiline.
  - UI checkbox added under Strength > Infill in Tab.cpp, label
    "Optimize gyroid wave (experimental)". Toggle is hidden by
    ConfigManipulation when sparse_infill_pattern != ipGyroid.
  - "gyroid_optimized" added to s_Preset_print_options for preset I/O.

What goes away:
  - ipOptimizedGyroid enum value, factory case, switch cases, dropdown
    label, string key.
  - FillOptimizedGyroid.cpp / FillOptimizedGyroid.hpp (math moved into
    FillGyroid.cpp).
  - Net diff drops by ~250 lines.

Existing profiles using gyroid are unaffected.

* Wire gyroid_optimized through SurfaceFillParams to FillParams

Linux build failed because line 921 in Fill.cpp populates a
SurfaceFillParams (the dedup struct), not FillParams directly.
Add the field there, in operator< / operator==, and copy it to
FillParams at both conversion sites.

* Use toggle_line for gyroid_optimized: hide row when pattern != gyroid

* Account for multiline wall thickness in omega correction (per @RF47)

When fill_multiline = N, each gyroid wall is N lines thick, so the
geometric scale fed into the buckling correction term should be
spacing * N rather than spacing. Increases omega (tighter wavelength)
when multiline is enabled, consistent with the thicker wall being
more buckling-resistant.

* Optimized gyroid via marching squares on the implicit scalar field

Per @RF47 review: replace the analytical f_opt / make_one_period_opt
wave generator (which had visible kinks at vertical-horizontal
transitions) with a marching-squares iso-extraction on the gyroid
scalar field, modeled on FillTpmsFK.cpp.

  - New marchsq::GyroidField in FillGyroid.cpp evaluates
    F(x,y,z) = sin(fx*x)cos(fy*y) + sin(fy*y)cos(fz*z) + sin(fz*z)cos(fx*x)
    where fx = omega * baseline (anisotropic in x), fy = fz = baseline.
  - get_gyroid_polylines() runs marching squares at iso=0 and converts
    rings to polylines.
  - _fill_surface_single() optimized branch now builds GyroidField,
    runs marching squares, and skips the bb.min translate (field
    output is already in absolute coords).
  - Dropped: f_opt, make_one_period_opt, make_wave_opt,
    make_optimized_gyroid_waves, compute_amplitude_factor. Amplitude
    has no clean analog in iso-zero extraction.
  - Standard (non-optimized) gyroid path unchanged.

* Mass calibration: compensate period by cbrt(omega) for x-anisotropic field

Per @RF47: optimized vs standard gyroid had different masses at the
same sparse_infill_density setting. Cause: scaling fx by omega while
leaving fy=fz at the baseline raised the surface-area-to-volume ratio
by approximately omega^(1/3) (the geometric mean of the three
frequencies).

Fix: multiply the base period by cbrt(omega) so the geometric mean of
(fx, fy, fz) returns to the standard baseline. Net effect:
  fx = omega^(2/3) * baseline_orig
  fy = fz = omega^(-1/3) * baseline_orig
which preserves total mass at the same density setting while
preserving the load-direction anisotropy this PR introduces.

* Switch optimized gyroid anisotropy from X to Z (per @RF47)

Z is the typical compression-load axis for FFF parts and is not at
delamination risk under compression — so the dominant failure mode
is column buckling of the vertical strands themselves. Tightening
fz directly shortens the effective vertical strand length, which
improves Z-axis buckling resistance.

Mass calibration via cbrt(omega) period compensation still applies
(scaling exactly one of three frequencies by omega; the geometric-
mean preservation argument is symmetric across axes).

* Update src/slic3r/GUI/Tab.cpp

Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>

* Address review feedback (Copilot + @RF47)

- Fill.cpp: gate params.gyroid_optimized on (params.pattern == ipGyroid)
  so non-gyroid surfaces don't differ in SurfaceFillParams by an
  irrelevant flag (would unnecessarily split fill batching).
  [Copilot suggestion, RF47 confirmed correct]
- PrintConfig.cpp: drop "amplitude" from the tooltip; only wavelength
  is parameterized (the marching-squares iso=0 extraction is invariant
  to a uniform field scale, so amplitude has no effect).
- FillBase.hpp: shorten gyroid_optimized comment to match the actual
  carried state (no amplitude term).
- FillGyroid.cpp: shorten the marchsq namespace comment block; the
  ODR concern was overstated (FillTpmsFK uses the same pattern fine).

* Drop redundant marchsq bb expansion (Copilot)

bb is already offset by 10 * scale_(spacing) above for edge-artifact
margin; the second offset on bb_field doubled the raster area for no
geometric benefit and hurt CPU time on large parts.

* Update src/slic3r/GUI/Tab.cpp

Co-authored-by: Ian Bassi <ian.bassi@outlook.com>

* Fix density mismatch + rename to Z-buckling bias optimization

Issue (per @ianalexis): at the same sparse_infill_density setting,
the optimized branch produced denser fill than standard. Verified via
Python sim (sim_gyroid_compare.py) using marching squares on the
implicit field across multiple z slices.

Root cause: the omega formula was inverted from the buckling-physics
intent. The naive sqrt(density_adj) factor produced omega < 1 at
typical print densities (10-30%), which LENGTHENED the Z wavelength
instead of shortening it -- net loss in both mass and strength.

Fix:
  - compute_omega_factor: invert to sqrt(1 / density_adj), clamp to
    [1.0, 2.0]. Now omega = 2.0 at low density (long strands need
    most help) and clamps to 1.0 above ~30% density (no-op, since
    standard gyroid is already short enough).
  - Remove the cbrt(omega) period compensation. Empirically (sim
    table embedded in FillGyroid.cpp comment) the inverted formula
    keeps line length per area at ~1.000 of standard across all
    densities with no period scaling needed.

Predicted gains (sim, Z-axis Euler buckling proxy):
  density   line/std   strength/std
    10%      1.000        2.84x
    15%      1.000        1.89x
    20%      1.000        1.42x
    30%+     1.000        1.00x  (no-op)

Rename per @ianalexis: "Optimize gyroid wave" oversells (now no-op
above 30% density and Z-only). Renamed user-facing label to
"Z-buckling bias optimization (experimental)" with updated tooltip
that scopes to vertical compression and discloses the density cutoff.
Internal config key (gyroid_optimized) unchanged for diff size.

Real-world Instron compression tests at Brown's Prince Lab to follow.

---------

Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-05-20 23:42:32 +08:00
HYzd766
b882da99ad Modifications to the hotbed temperature of various types of printing plates (#13717) 2026-05-20 22:55:58 +08:00
ExPikaPaka
19eb9e634f Adds force sync UI button. Added missing code for previous PR (#13757) 2026-05-20 19:25:51 +08:00
Ian Chua
62d4344e59 feat: Updated UI for better distinction of orca cloud and bambu cloud (#13755)
* feat: Updated UI for better distinction of orca cloud and bambu cloud

* refined UI
2026-05-20 19:21:02 +08:00
Ian Chua
4542a15009 fix: use bambu's network plugin (#13756) 2026-05-20 19:20:09 +08:00