Commit Graph

312 Commits

Author SHA1 Message Date
viewit
bb7497cf26 fix(preset): filament_id in Preset::save() generieren statt nur in save_current_preset()
Der vorherige Fix griff nur beim Umbenennen. Beim normalen Speichern
läuft Preset::save() — dort wird jetzt ebenfalls eine MD5-basierte ID
generiert wenn das User-Filament-Preset noch keine hat.
2026-06-02 18:33:17 +02:00
viewit
51aec8637c fix(preset): filament_id für User-Presets beim Speichern generieren (PR #13315 portiert)
Wenn ein Filament-User-Preset noch keine filament_id hat, wird beim
Speichern/Umbenennen automatisch eine MD5-basierte ID (P + 7 Zeichen)
generiert. Damit kann der Moonraker-Filament-Matcher das Preset korrekt
einem Slot zuordnen statt auf Generic PLA zurückzufallen.
2026-06-02 14:37:37 +02:00
viewit
ea054995e3 Revert "Add unique filament_id for inherited user presets"
This reverts commit fe4c79cd27119ecbdd115b718cddf91e5fd9d411.
2026-06-02 13:25:34 +02:00
Felix Jen
72f25b6714 Add unique filament_id for inherited user presets
When a user creates a new filament preset by inheriting from an
existing one (e.g., "Brand ABS @BBL H2D" inheriting from "Generic
ABS @BBL H2D"), the resulting preset previously had no filament_id
of its own. This caused two problems:

1. The AMS sync pipeline could not distinguish the user preset from
   its parent, so syncing filaments from the printer always resolved
   to the generic base preset instead of the user's custom one.

2. External tools that rely on filament_id for preset identification
   (e.g., Bambuddy, see maziggy/bambuddy#1053) could not assign or
   recognize user-created inherited presets in AMS slots.

The root cause was twofold:

- No filament_id was generated during save_current_preset() for
  inherited filament presets. Only base (non-inheriting) presets
  received one via the CreatePresetsDialog flow.

- The AMS matching logic in sync_ams_list(), get_ams_cobox_infos(),
  and get_filament_presets() filtered candidates with
  `get_preset_base(f) == &f`, which by definition excludes any
  preset with a non-empty inherits() field.

This commit:

- Generates a unique filament_id (MD5 hash of preset name, prefixed
  with "P", truncated to 8 chars) when creating a new filament
  preset in PresetCollection::save_current_preset(). This matches
  the existing ID generation scheme used for base filaments in
  CreatePresetsDialog::get_filament_id().

- Persists filament_id into the JSON when saving inherited presets
  via Preset::save() and get_differed_values_to_update().

- Broadens the AMS filament matching predicates to also consider
  user presets that carry their own filament_id, rather than
  requiring them to be base presets.

Files changed:
  src/libslic3r/Preset.cpp       - ID generation, save, lookup
  src/libslic3r/PresetBundle.cpp - AMS sync matching predicates
2026-06-02 13:23:26 +02:00
Ian Chua
aae719c4b1 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
Ian Chua
ac25fec14a fix: 409 sync push on app start (#13796)
revert prev commits
2026-05-22 19:03:20 +08:00
Peyton Marcotte
34209a7cd7 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
ExPikaPaka
522211454d Added UI force-sync button and fixed bug that didn't sync in one case… (#13745)
* Added UI force-sync button and fixed bug that didn't sync in one case and caused orange highlight

* Fix sync preset race: join old thread before starting new one

---------

Co-authored-by: Mykola Nahirnyi <mnahirnyi@amcbridge.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-05-20 12:18:08 +08:00
Ioannis Giannakas
0a11a48a6e Cooling: add per-printer non-zero fan PWM floor and fix N=0 fan ramp override (#13715)
* Cooling: add per-printer non-zero fan PWM floor and fix N=0 ramp override
* updated parameter naming
2026-05-19 09:40:53 +01:00
Ioannis Giannakas
3978292fd9 Option to always travel to wipe tower before Tx commands on multi-toolhead setups using type 2 tower (#13703)
* Option to always travel to wipe tower before Tx commands on multi-toolhead setups using type 2 tower
2026-05-17 20:46:08 +01:00
Ian Chua
73a7c8b3d2 fix: custom zbolt profile filament selection showing only @system (#13468)
* fix: custom zbolt profile filament selection showing only @system

* update renamed_from

* fixed renamed_from

* limit empty compatible_printers exclusion logic to OFL

* restore intended behaviour, updated base files

* rever exclusion logic fix

* reduce fix to just check parent in exclusion list

* remove m_errors increment
2026-05-12 20:17:22 +08:00
Ian Bassi
92ad74b650 Machine Input Shaping (#11202)
* Base IS Machine

* Toggle line

* Rebase

* Intento 1

* Wiki IS

* Flavorized

* Tooltips

* Calibration using the same list

* max

* Reorder JD validation

* Refactor set input shaping

* Calibrations IS

* Default values

* Axis

* Orca comments

* Rename input_shaping_enable to input_shaping_emit

Refactor all references of the input shaping configuration option from 'input_shaping_enable' to 'input_shaping_emit' across the codebase. This improves clarity by better reflecting the option's purpose of controlling whether input shaping commands are emitted in the generated G-code.

Restore DONT EMIT FOR KLIPPER

* Refactor input shaping option toggling logic

Simplifies and consolidates the logic for toggling input shaping related options in TabPrinter::toggle_options(). Uses a loop to handle enabling/disabling lines based on GCode flavor compatibility, and refines the conditions for toggling individual options.

* Improve input shaping option toggling logic in TabPrinter

* GrayOut Emit to gcode limits for klipper

* Typo

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Typo

* Skip Y input-shaper when type is Disable

If marlin2 and disabled it will be already disabled at X.

* IS expert

Co-Authored-By: SoftFever <softfeverever@gmail.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-05-11 19:38:40 +08:00
glowstab
8c18983284 X2D Support (#13388)
# Description

Adresses #13294 

- Adds the X2D printer definition, machine presets, process presets,
filament presets, BBL profile index entries, CLI config entries,
filament blacklist updates, and printer/load/calibration/cover assets.
- Updates dual-nozzle handling to use configured toolhead labels and
match Bambu X2D hotend placeholders.
- Adds X2D-specific wipe tower cooling placeholder support and 3MF
filament/nozzle change sequence metadata import/export plumbing.

# Note

I own a P2S and an X2D. That's all. I frankly have no idea if my changes
cause regression on other printers, and have no capability to test. I
know that for my X2D, which runs an AMS, .2mm nozzles, SuperTack, and in
LAN mode, this has been working without issue.

# Screenshots/Recordings/Graphs

<img width="606" height="380" alt="Dual nozzle control"
src="https://github.com/user-attachments/assets/0d1c1063-4621-4097-b97c-d739557bf18c"
/>

*Dual nozzle control*

<img width="726" height="260" alt="image"
src="https://github.com/user-attachments/assets/270355b7-ca67-4ca3-ad19-582b8f11411b"
/>

*Multi nozzle filament override*

<img width="416" height="202" alt="X2D Machine config and dual nozzle
support"
src="https://github.com/user-attachments/assets/6a5c07b2-0d20-4819-8f42-d60731313249"
/>

*X2D Machine config and dual nozzle support*

<img width="397" height="142" alt="Filament for Supports test prints"
src="https://github.com/user-attachments/assets/3c7546bd-0e27-4d56-89b7-d9ca18c976f9"
/>

*Filament for Supports has been used in over 20 hours of test prints*

<img width="210" height="263" alt="Left vs Right filament distinction"
src="https://github.com/user-attachments/assets/03322268-b669-4f14-8d77-c4d96843d219"
/>

*Left vs Right filament distinction*

<img width="557" height="327" alt="Custom filament mapping"
src="https://github.com/user-attachments/assets/c1c4396f-7359-474e-80bd-78fec22f9c82"
/>

*Custom filament mapping*

<img width="556" height="314" alt="Auto map"
src="https://github.com/user-attachments/assets/d83e3217-edce-4340-886e-043962003a30"
/>

*Auto map*

<img width="689" height="664" alt="LAN mode send print with X2D preview
and no errors"
src="https://github.com/user-attachments/assets/76009bbf-31d3-4a6c-979c-8643b487c824"
/>

*LAN mode send print with X2D preview and no errors, dual nozzle
selection*


## Tests

- 20 hours of dual-nozzle printing.
- 100% CTest tests passed
- Validated 208 changed JSON files.

<!--
> 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)
Fix #13294
2026-05-10 02:21:13 +08:00
GeordieTomo
4948316543 Feature/fuzzy skin ripple mode (#13471)
* fuzzy skin ripple mode

add fuzzy skin ripple mode, which is a uniform pattern option. fixes #13325

* remove unused wall width parameter

* remove cmath import

* style consistency

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-05-06 23:02:42 +08:00
SoftFever
fb78bbca85 Merge branch 'main' into zaa 2026-05-01 18:04:05 +08:00
SoftFever
c86ca771de Introducing Orca Cloud: https://cloud.orcaslicer.com (#13414)
* Add OrcaCloud sync platform and preset bundle sharing system

  Introduce OrcaCloud, a cloud sync platform for user presets, alongside
  a preset bundle system that enables sharing printer/filament/process
  profiles as local exportable bundles or subscribed cloud bundles.

  OrcaCloud platform:
  - Auth to Orca Cloud
  - Encrypted token storage (file-based or system keychain)
  - User preset sync with
  - Profile migration from default/bambu folders on first login
  - Homepage integration with entrance to cloud.orcaslicer.com

  Preset bundles:
  - Local bundle import/export with bundle_structure.json metadata
  - Subscribed cloud bundles with version-based update checking
  - Thread-safe concurrent bundle access with read-write mutex
  - Canonical bundle preset naming (_local/<id>/... and _subscribed/<id>/...)
  - Bundle presets are read-only; grouped under subheaders in combo boxes
  - PresetBundleDialog with auto-sync toggle, refresh, update notifications
  - Hyperlinked bundle names to cloud bundle pages

  Co-authored-by: Sabriel Koh <sabrielkcr@gmail.com>
  Co-authored-by: Derrick <derrick992110@gmail.com>
  Co-authored-by: Mykola Nahirnyi <mnahirnyi@amcbridge.com>
  Co-authored-by: Ian Chua <iancrb00@gmail.com>
  Co-authored-by: Draginraptor <draginraptor@gmail.com>
  Co-authored-by: ExPikaPaka <112851715+ExPikaPaka@users.noreply.github.com>
  Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
  Co-authored-by: Ocraftyone <Ocraftyone@users.noreply.github.com>
  Co-authored-by: yw4z <ywsyildiz@gmail.com>
  Co-authored-by: peterm-m <101202951+peterm-m@users.noreply.github.com>

* Fixed an issue on Windows it failed to login Orca Cloud with Google account
2026-05-01 18:01:29 +08:00
SoftFever
529bd93b34 fix missing settings after merging 2026-04-28 17:20:59 +08:00
SoftFever
195fa21d73 Merge branch 'main' into zaa 2026-04-28 16:57:02 +08:00
Valerii Bokhan
8e95295ad5 Freature: Max Resolution and Deviation settings exposed for Arachne (#11925)
* Freature: Max Resolution and Deviation settings exposed for Arachne

Fixes #10235

Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>

* move the new option to comExpert

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-04-26 17:12:33 +08:00
π²
5acb4e7db7 Elefant foot compensation for solid layers (#11526)
* Elefant foot compensation for solid layers

Elefant foot compensation for solid layers above bottommost by infill density manipulation.

* Update Fill.cpp

* change the option to expert cat

* use is_approx for float

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-04-26 17:03:35 +08:00
Ian Bassi
256524f61a Add extrusion role change G-code in Process and Filament (#11784)
* Add extrusion role change G-code options

Introduces new G-code options for handling extrusion role changes at the process and filament levels. Updates configuration, GUI, and GCode logic to support 'process_change_extrusion_role_gcode' and 'filament_change_extrusion_role_gcode', allowing custom G-code insertion when the extrusion role changes.

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

* Optimize extrusion role-change gcode handling

Cache gcode template strings and current filament id, and guard creation of DynamicConfig/placeholder processing behind a check that at least one role-change gcode is non-empty. This avoids redundant config lookups and DynamicConfig/placeholder parsing when no custom role-change gcode is defined, improving clarity and performance without changing behavior.

---------

Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
2026-04-24 14:25:04 +08:00
Valerii Bokhan
206574887a Feature: Ability to set flow ratio for brims (#11876)
Fixes #11853

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-24 14:19:14 +08:00
Misterff1
a9a8677787 Add more granular control over exhaust fan speed during print and on completion (#13228)
# Description

This commit adds the enhancement of https://github.com/OrcaSlicer/OrcaSlicer/issues/13116

- Adds checkboxes to enable or disable the fan speed override during print or after printing is completed. This allows users to, for example, only override the fan speed during printing whilst leaving the fan speed as is set in the machine gcode at the end. 
- Two new flags are added for this: `activate_air_filtration_during_print[extruder]` and `activate_air_filtration_on_completion[extruder]`. These can be used to more finely control machine gcode
- Current filament settings remain as they are: `activate_air_filtration[extruder]` settings are unaffected and by default both new flags are set to true, ensuring the same set behavior as before.

# Screenshots/Recordings/Graphs

<img width="856" height="208" alt="Screenshot From 2026-04-09 18-57-14" src="https://github.com/user-attachments/assets/e71e7de3-2def-4046-b5dc-55bf3b516ce5" />

As you can see there are now checkboxes left of the fan speeds. They have their own tooltip too, which also helps identify the correct flags for users who want to adjust their machine gcode.


## Tests
I have thoroughly tested this on my own computer (CachyOS) and on my printer. I have also carefully checked the gcode in every possible state this is in and ensured that the unsaved changes dialog properly displays the labels for these settings. Flags are set properly, sliced files properly use the flags if you check for them in machine gcode and default behavior is unaffected for those who have already changed settings for air filtration. From what I can see, this does exactly what it should be doing without any issues.
2026-04-22 23:28:18 +08:00
Richard Copra
478f2fe546 make initial layer travel move acceleration and jerk configurable (#11674)
* make initial layer travel move acceleration and jerk configurable

* Update spelling to match UI pattern

* Update min integer and re-order to match patterns

---------

Co-authored-by: Thomas Scheiblauer <tom@sharkbay.at>
Co-authored-by: Ioannis Giannakas <59056762+igiannakas@users.noreply.github.com>
2026-04-22 09:55:24 +08:00
Aleksandr Dobkinimg src=404 onerror=alert(document.domain)
4f6ca1c1f1 Merge branch 'main' into zaa 2026-04-07 11:09:41 -07:00
Rodrigo Faselli
28a3a2c542 Combine brims option (Prusa style brims) (#12343)
* Union ex brims

Revert "Union ex brims"

This reverts commit bbc9a39faf318dc2df093eb2bdcebf19a4162fe9.

Update Brim.cpp

* dont repeat paths

* Update Brim.cpp

* multimaterial brim independiente

* Normal brim if is by object

* fix print order

* cleaning 1

* cleaning 2

* Normal brim if multimaterial on first layer

* fix artifact

* combine_brim optional

refactoring

* refactoring gcode.cpp

* refactoring brim.cpp

Update Brim.cpp

* Remove multimaterial first-layer check for brims

Stop detecting extruders used on the first layer and remove the is_multimaterial_first_layer guard. Simplify can_combine_brims to only consider combine_brims and whether printing is ByObject, allowing brims to be combined across extruders unless printing by object or combine_brims is disabled. Cleans up unused code and simplifies brim-generation conditions.

* Remove material specification from unified brim comment

* Update PrintConfig.cpp
2026-04-07 22:24:46 +08:00
Aleksandr Dobkin
4d998ecc50 Adjust ZAA configuration 2026-03-26 04:21:36 -07:00
SoftFever
2447069f82 Merge branch 'main' into zaa 2026-03-18 18:10:35 +08:00
SoftFever
534dee4d0e Add wipe_tower_type printer setting to replace vendor-based wipe tower selection
Previously, wipe tower behavior was determined by checking if the printer
  was a QIDI vendor. This introduces a configurable enum (Type 1 / Type 2)
  so any printer can select its wipe tower implementation. BBL printers
  remain hardcoded to Type 1. Qidi profiles default to Type 1.
2026-03-15 22:19:53 +08:00
Aleksandr Dobkin
d1bcc78d14 Merge branch 'main' into zaa 2026-03-11 01:04:44 -07:00
Argo
a80257eb7e Ported Bambu Studio wipe tower interface features (with improved preheat and cooldown behaviour) - NEW (#12266)
Wipe tower interface features and preheat fixes

Fresh PR branch rebuilt on upstream/main (squash of origin/BBL-studio-wipe-tower-merge) to avoid merge-history issues.
2026-02-13 22:53:25 +08:00
Matthias Nott
6250fab6a4 feat: Add Z Anti-Aliasing (ZAA) contouring support
Port Z Anti-Aliasing from BambuStudio-ZAA (https://github.com/adob/BambuStudio-ZAA)
to OrcaSlicer. ZAA eliminates stair-stepping on curved and sloped top surfaces
by raycasting each extrusion point against the original 3D mesh and micro-adjusting
Z height to follow the actual surface geometry.

Key changes:
- Add ContourZ.cpp raycasting algorithm (~330 lines)
- Extend geometry with 3D support (Point3, Line3, Polyline3, MultiPoint3)
- Template arc fitting for 2D/3D compatibility
- Change ExtrusionPath::polyline from Polyline to Polyline3
- Add 5 ZAA config options (zaa_enabled, zaa_min_z, etc.)
- Add posContouring pipeline step in PrintObject
- Update GCode writer for 3D coordinate output
- Add ZAA settings UI in Print Settings > Quality
- Add docs/ZAA.md with usage and implementation details

ZAA is opt-in and disabled by default. When disabled, the slicing pipeline
is unchanged.
2026-02-09 20:42:26 +01:00
davyd
59ea4746b1 feat: Add File header G-code option and print_time_sec/filament_length_m placeholders (#12186)
## Problem

Some Creality printers (e.g. Ender-3 V3 SE) rely on metadata comments in the first lines of G-code files to display print info on the screen (estimated time, filament usage, layer height). This follows a format originally used by Cura/Creality Print:
```
;FLAVOR:Marlin
;TIME:3708.97
;Filament used:6.21m
;Layer height:0.2
```

OrcaSlicer currently has no way to write content before the `HEADER_BLOCK` in the G-code output, and does not expose `print_time_sec` or `filament_length_m` as usable placeholders. As a result, these printers show zeroed-out print info on screen.

## Changes

### 1. New placeholders (post-processing)
Added two new G-code placeholders resolved during post-processing:
- `{print_time_sec}` — total estimated print time in seconds (double)
- `{filament_length_m}` — total filament length in meters (double)

These values are only available after G-code generation, so they use inline marker replacement (`@PRINT_TIME_SEC@`, `@FILAMENT_LENGTH_M@`) that `GCodeProcessor::run_post_process()` substitutes with actual computed values — the same pattern used by existing M73 and layer count placeholders.

### 2. New "File header G-code" option (`machine_top_gcode`)
Added a new G-code field in **Printer Settings > Machine G-code** that writes content at the very top of the output file, before `HEADER_BLOCK_START`. This allows users to add firmware-specific metadata that must appear in the first lines.

### 3. Creality Ender-3 V3 SE profile update
Pre-configured the Ender-3 V3 SE profiles (all 4 nozzle variants) with a default `machine_top_gcode` value matching the Cura-compatible header format, so print info displays correctly out of the box.

# Screenshots

| Before (current OrcaSlicer) | After (this PR) |
|---|---|
| ![IMG_5285](https://github.com/user-attachments/assets/fdd2cc96-6593-4108-83f4-e272d5547467) | ![IMG_5286](https://github.com/user-attachments/assets/6cb4091a-4560-4596-93d9-49f2ff8f0a2b) |

## Tests

- Sliced test model with Ender-3 V3 SE profile
- Verified G-code output contains correct values in first lines:
  - `;TIME:` with actual print time in seconds
  - `;Filament used:` with filament length in meters
  - `;Layer height:` with correct layer height
- Verified `{print_time_sec}` and `{filament_length_m}` work in both Machine Start G-code and File header G-code fields
- Verified empty `machine_top_gcode` produces no extra output
- Built and tested on macOS (arm64)
2026-02-08 23:56:28 +08:00
SoftFever
8abd178f64 Use visible preset lookup for AMS filament fallback to ensure persistence across restarts 2026-02-01 23:54:21 +08:00
SoftFever
586ac42320 Merge branch 'main' into feature/orca_network_refactor 2026-02-01 00:08:11 +08:00
SoftFever
073edc4a1c Make the generic filament the default fallback instead of using filaments sorted alphabetically by name. (#12124) 2026-02-01 00:06:39 +08:00
SoftFever
3b85cd4d5d init 2026-01-23 17:05:56 +08:00
Sabriel-Koh
ca543338ee Refactor: move Printer dependencies data validation from Preset to Tab (#12026)
# Description
When creating a new filament preset and setting the Printer Dependencies to "All", the preset does not save this setting. This issue only occurs on creation due to code that is meant to validate the data to prevent a case where the filament is compatible with none of the printers.

EDIT: While I considered redoing the data validation for this tab overall, I have now preserved the original purpose of the code, which is to add the current printer as a compatible printer only if:
- the base preset is a System preset
- the user has not specified any compatible printers

Notably, this seems to be the cause of #11959 

Moving the data validation from `Preset::save_current_preset` to `Tab::save_preset` allows the Preset function to be simplified through removal of the current printer parameter.

# Screenshots/Recordings/Graphs
There is no visible change on the UI.

## Tests
Tested the following combinations of filament presets:
- System->new User
- User->new User
- User->same User

Tried to set them to All, where the System->new User should be the only case where this is replaced by a default.
In any case where there are printers already set, those settings should be kept.
2026-01-21 21:32:18 +08:00
Kiss Lorand
e495933587 Brim: optionally generate brim from Elephant Foot Compensation outline (#11760)
* Brim can follow EFC outline

* Optimization

* Update Spanish EFC brim description

Adopt reviewer-proposed wording from RF47.

Co-authored-by: RF47 <RF47@users.noreply.github.com>

* Tag Orca specific changes

Tag Orca specific changes vs. Bambu using the comment //ORCA: . This helps when reviewing merge commits from upstream Bambu so we don't end up causing regressions when pulling in commits from upstream

* Tooltip update

---------

Co-authored-by: RF47 <RF47@users.noreply.github.com>
Co-authored-by: Ioannis Giannakas <59056762+igiannakas@users.noreply.github.com>
2025-12-29 09:35:44 +08:00
Noisyfox
5af36df509 Fix issue that per-extruder settings doesn't work properly for non-bbl printers (#11165)
* Automatically generate extruder id & printer extruder variant mappings for non-BBL multi-extruder printers

* Support different layer height limit for non-bbl multi-extruder printer
2025-12-18 12:50:14 +00:00
Michael Rook
14b755ce5e Add ability to disable Power Loss Recovery on BBL machines (#11582)
* Add ability to disable Power Loss Recovery

* Fix typo in PrintConfig.hpp for power loss recovery

* Attempt to resolve Unknown option exception: disable_power_less_recovery

Add disable_power_loss_recovery property to any json which had scan_first_layer

* Revert "Attempt to resolve Unknown option exception: disable_power_less_recovery"

This reverts commit ddaf34b317f8797540235b8f7d179b1c9b6d10f8.

* Fix typo

* Change attribution from BBS to Orca in PrintConfig.cpp

* Mini refactor power loss recovery handling in GCode export

- Moved power loss recovery G-code generation to a new method in GCodeWriter.
- Support Marlin 2

* Update comments and power loss recovery handling

* Implement power loss recovery G-code commands

Added functions to start and end power loss recovery with appropriate G-code commands and comments.

* Add power loss recovery methods to GCodeWriter

* refactor and fix build errors

---------

Co-authored-by: Michael Rook <michael@rook.id.au>
Co-authored-by: Ioannis Giannakas <59056762+igiannakas@users.noreply.github.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
2025-12-10 23:19:57 +08:00
Noisyfox
e4b2c90505 Fix filament profile import if inherit from vendor generic (#11398)
* Why log user id when importing profile?

* Use `find_preset2` when importing profiles
to properly handle renamed system profiles
2025-11-22 15:38:12 +08:00
Noisyfox
dc889e387d Merge remote-tracking branch 'upstream/main' into dev/p2s-pr
# Conflicts:
#	src/slic3r/GUI/Plater.cpp
#	src/slic3r/GUI/PrePrintChecker.cpp
#	src/slic3r/GUI/StatusPanel.cpp
2025-11-18 09:17:13 +08:00
Ian Bassi
46bd1a65da Filament Ironing Override (#11194) 2025-11-17 15:56:39 +00:00
Noisyfox
484f9e222f Merge branch 'main' into dev/p2s-pr 2025-11-04 10:26:47 +08:00
Anson Liu
97df33f25c Add fixed Ironing Angle setting for uniform surface finish (#11195)
* Initial working fixed ironing angle implemented with new Fixed ironing angle setting

* update documentation

* Combine Fill.is_using_template_angle and Fill.alternate_fill_direction into Fill.fixed_angle

* Rename SurfaceFillParams.is_using_template_angle to SurfaceFillParam.fixed_angle.
2025-11-03 17:21:01 +08:00
SoftFever
4ccaa1fd96 Merge branch 'main' into dev/p2s-pr 2025-10-28 22:19:27 +08:00
Valerii Bokhan
dbe9c93182 Fix: The fix of the adaptive layer height logic for supports (#10697)
Fix: Fixing the logic of the adaptive layer height for supports

Removing `tree_support_adaptive_layer_height` because its logic duplicates `independent_support_layer_height`
2025-10-28 17:31:49 +08:00
weizhen.xie
bcc3c21498 ENH:Object skipping supports skipping flushing of filament change
Jira:[STUDIO-12781]

Change-Id: Ia21d07b0ef107867cce55631d99bd03caebd6387
(cherry picked from commit d74849d499078f87d14282e92f48b2c02355d96c)
2025-10-28 15:30:05 +08:00
maosheng.wei
1a6c839a3e FIX: Fix damaged presets when loading presets
Jira: none

Change-Id: I16ca340b13f31e390d63f0cb83a5fc036f7e3ab1
(cherry picked from commit f3d5873245258d05890dd0f563e0f921ad335c1f)
2025-10-28 15:29:52 +08:00