Commit Graph

283 Commits

Author SHA1 Message Date
Aleksandr Dobkin
b945c957d8 Merge branch 'main' into zaa 2026-03-11 01:04:44 -07:00
Argo
769fc137c7 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
963f8d86b7 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
2f2f0df6af 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
86421c6378 Use visible preset lookup for AMS filament fallback to ensure persistence across restarts 2026-02-01 23:54:21 +08:00
SoftFever
1e1ffe72f6 Merge branch 'main' into feature/orca_network_refactor 2026-02-01 00:08:11 +08:00
SoftFever
c37132768a 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
9703a6b4d7 init 2026-01-23 17:05:56 +08:00
Sabriel-Koh
5ce5e8df37 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
3dc80593bd 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
e4f6499663 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
5c547ea4a1 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 ddaf34b317.

* 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
61931d23a4 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
760f66d3d7 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
c0c1ddfda0 Filament Ironing Override (#11194) 2025-11-17 15:56:39 +00:00
Noisyfox
4efaee4c98 Merge branch 'main' into dev/p2s-pr 2025-11-04 10:26:47 +08:00
Anson Liu
c6e4ac1c4d 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
0767d3a363 Merge branch 'main' into dev/p2s-pr 2025-10-28 22:19:27 +08:00
Valerii Bokhan
790bb39783 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
ca34800cad 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
3b2da3451a 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
Noisyfox
972026f0a5 Merge branch 'main' into dev/h2d 2025-10-20 23:15:29 +08:00
Valerii Bokhan
e6a4ddf32d Feature: Ability to change flow ratios by extrusion path types (Code + Docs) (#10641)
This new feature allows users to override flow ratios for the following extrusion path types:

* First layer (excluding Brims and Skirts)
* Outer walls
* Inner walls
* Overhang perimeters
* Sparse infill
* Internal solid infill
* Gap fill
* Support
* Support interfaces
2025-10-20 21:45:52 +08:00
Noisyfox
da2934d02a Revert "ENH:instead of prime_volume by filament_prime_volume"
This reverts commit e7e6405ad3.
2025-10-05 19:16:05 +08:00
weizhen.xie
7bc01c625d ENH: Add a button to control whether to enable volumetric-speed fitting
Jira: None
Change-Id: I8d9fd3468dbfb8904d164b289f9d5223e476145c
(cherry picked from commit 3acf97f1b3cf12d34a3679eef550cc26e03eb86c)
2025-10-03 23:28:58 +08:00
weizhen.xie
38a18dc086 ENH: Polynomial fitting via Gaussian regression for determining the filament_max_volumetric_speed
Jira: none
Change-Id: Iab1ef65f0546884c60d2a9e39213a07d76a1f483
(cherry picked from commit 186948cc91b12d547b7168104ba629d40c333d1b)
2025-10-03 23:08:54 +08:00
Noisyfox
a932821168 Rename wipe tower ribs related options 2025-10-02 22:56:54 +08:00
zhimin.zeng
e987a6bf82 FIX: should not show enable_wrapping_detection in printer preset
jira: STUDIO-13848
Change-Id: I9d3c6b911721992e448b74e63b2b598f0240fa6e
(cherry picked from commit 849723d6ebce7c342e56d7e8bb4b932db5bc42aa)
2025-10-02 17:07:21 +08:00
zhimin.zeng
89c58fb4d9 FIX: add clumping detect area parameter
1. add wrapping detect area parameter
2. fix spiral retract bug
3. modify the enable parameter to print config
4. close clumping detect for manual cali mode
jira: STUDIO-13761 & STUDIO-13766

Change-Id: Ib597ca48a0342a8ae3930f5e790085987f252374
(cherry picked from commit 698a5e6bc0b281ba77fc1fd7692daec09cb440b4)
2025-10-02 17:07:17 +08:00
maosheng.wei
0581fac6e6 FIX: Update the alias of imported presets
Jira: STUDIO-12801

Change-Id: I7583a2022a0f565103953ee0ca742593769da81f
(cherry picked from commit cb470ae21279a555c7f4718673d83e3818b46bf0)
2025-10-02 09:54:18 +08:00
weiting.ji
e8ae3d1753 FIX: Client uses default preset when reopening from project with non-local printer
Change-Id: Ieded9d63338d74ca841e89aca16a9510355ee417
Jira: STUDIO-13490
(cherry picked from commit df2ee1cc533e2a7f5f71b4d880b08a6665b028ee)
2025-10-02 09:43:28 +08:00
zhimin.zeng
1ccdf7b43b ENH: add wrapping detection
jira: STUDIO-13192
Change-Id: I0fb5692b18cdb3b7af624a831dcfb0f635b165f0
(cherry picked from commit 89a8b6ea5e34340cba3750416ce3100dcc39f5c2)
(cherry picked from commit 50bc8c10a7b4ddc0b2dfe9cbab438b9d307b7fc0)
2025-09-30 15:32:44 +08:00
maosheng.wei
8d8630241a ENH: Record the preset compatibile_printer field for cloning
Jira: STUDIO-12167

Change-Id: Iaf66bf48f892d32c77103ee7c8dbf3ccaabc2e09
(cherry picked from commit f4abad029e01c597b91bc14c60e6bb9a30f2d477)
2025-09-30 09:33:38 +08:00
xun.zhang
bc02e48dc0 FIX: display the minimum flush data
1. Use the minimum flush between nozzle volume and flush in datalist
2. Add a new param to decide the datalist to use

github:7445

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Id87c98ca5069e7b328974d641d7a81dfbf9c50a0
(cherry picked from commit 2be29b784727330732170b5c2ff0ba9d5e79d82f)
2025-09-29 20:38:38 +08:00
chunmao.guo
013d2d8d6e FIX: filament variant index & override nil value
Change-Id: I828fff09df39a60d59af516c969466d9b09e503f
Jira: none
(cherry picked from commit 1745657e222b8e9d7c96fcca16581b2deac526c6)
2025-09-28 16:46:34 +08:00
xun.zhang
e1626c26b1 FIX: add protection when sync presets from other printers
jira:STUDIO-12575

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I5a22129fe12a3600dcc4e3f387374122e349e38c
(cherry picked from commit 21863f925db1eeb1db79ba5859840aa23f852180)
2025-09-25 09:03:58 +08:00
xun.zhang
3c051f4180 FIX: invalid params in user preset load
jira: NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I7e9cdabb2d9c285db841c810f32aee5943b4db82
(cherry picked from commit ff8d764e7256cec1e7cd1d4d3d034590eb846f45)
(cherry picked from commit fb0461f3459afcfc80165442277ba8c54e232a39)
2025-09-24 14:37:18 +08:00
lane.wei
8c64808ae5 ENH: config: remove unused custome_defined logic
also improve project_embedded
1. remove unused is_custom_defined
2. improve project_embedded to support multi-extruder diff

jira: no-jira

Change-Id: I1db28c3cfd59ccc31c6855af30305396c71c4e9a
(cherry picked from commit 0434853bf32b063f7850fd4e0c9c3a6045375225)
2025-09-24 14:33:37 +08:00
lane.wei
d691e2c2ed ENH: config: add some miss codes
previous commit 'ENH: config: add nill load/save logic for user config' jira: no-jira

Change-Id: I91ab326e533d54846518d11b457db0b0afe4d499
(cherry picked from commit 4086ec60c2b14bfb8ab12aa97842d563f71739ab)
2025-09-24 14:23:52 +08:00
lane.wei
ae72d3345f ENH: config: add nill load/save logic for user config
Change-Id: I8da6c5b345cc088862f2c720aeb742b9617ff3e7
(cherry picked from commit 603f93d97f0ad70e01e120854887142ab05ee089)
2025-09-24 14:17:53 +08:00
xun.zhang
7bd4f85a96 ENH: add params for filament retract when extruder change
jira: STUDIO-11965

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: Id175e9dbce419d43cf45d6116ed4fa4fd556f606
(cherry picked from commit c7964441719f521d1a20dc9f084a7598bd01a9a5)
2025-09-23 16:38:50 +08:00
xun.zhang
cdf66984dd ENH: add flush params for multi filament
jira: STUDIO-11965

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I2245f22a03c65b570bc60a2792daf4c1683f1ebd
(cherry picked from commit ffe2653341bffd5aee42436e236d45e0b87b56aa)
2025-09-23 14:16:03 +08:00
chunmao.guo
d31c4427aa ENH: printer nozzle diameter select
Change-Id: Ibf8b74e1f93a7c387db3f0fb5e6e733165322322
Jira: STUDIO-9140
(cherry picked from commit c990314567383d3bfff72ac11df6471e0a10f315)
2025-09-21 14:37:37 +08:00
zhimin.zeng
119f16c565 ENH: add filament_printable and delete unprintable and printable list
jira: none

Change-Id: I643ab11831ceac1fe0793510f64b288cbd16415a
(cherry picked from commit 3dd5a601547485bfcc4188727343a52c30bb6a73)
2025-09-21 13:48:08 +08:00
zhimin.zeng
0926dc46fb ENH: add printable filament types for extruder
jira: none

Change-Id: Ie6ada223bc11a53b975c8c20b4a41e7cdc2d524c
(cherry picked from commit c64270f506a4d004f66aef3ff31760f793eca489)
2025-09-21 13:48:07 +08:00
jiangkai.zhao
8e616ce892 ENH:add flat_irong as print preset
jira: none
Change-Id: Ic29634780e1ece2d0cffddd0c2cf7cafb1318fa2
(cherry picked from commit 2acd313f72d5e9531cf1394c218dc3bc6b8d9521)
2025-09-21 13:48:03 +08:00
zhimin.zeng
b9063c9484 FIX: the master extruder id is incorrect for custom printer preset
jira: none
Change-Id: I4ea27ada6f976f1030acc88f131e77a382ca5199
(cherry picked from commit ecb6aff6c98d7a6222d9ec1b7855709208f55e79)
2025-09-17 21:55:59 +08:00
xun.zhang
6f5ea725dc ENH: add new way to set bed temperature
jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I99a9f67e9b13b2137ad371b22cf0999ccf9c096d
(cherry picked from commit 69c2947daf66eb0a6732b1b980c9b87f597c8da7)
2025-09-17 16:22:05 +08:00
zhimin.zeng
a0b5cdfbb2 ENH: generate framework for all layers
jira: none
Change-Id: I95f35ba45fe9f544c53bdf0c5a52a70bd45ee7a9
(cherry picked from commit 3e0b6eb2289eab383c6e616d37559b0c6619eca1)
2025-09-17 10:07:27 +08:00
lane.wei
b08fe2cf0c ENH: config: allow invisible preset to be selected
when switch printer, we found some filament preset not visible
and we need to allow it to be selected
jira: STUDIO-9979

Change-Id: I9613747a755f449c2f48563082b6893e426f37ea
(cherry picked from commit bc5514bbabbbaddefb33ade556a0f15c051aed7e)
2025-09-17 09:47:00 +08:00