SoftFever 7db0a59cc1 fix: H2C carousel - port BBS NozzleStatusRecorder for per-slot purge tracking (#14800)
## Problem

On H2C (carousel) printers, the wipe tower purge volume calculation in
`_make_wipe_tower()` tracks filament state **per-extruder** (2 slots).
Since H2C has up to 7 carousel nozzle slots on a single extruder, all
filaments sharing that extruder are collapsed into one tracking slot.
This causes:

Test:

[5cubes.3mf.zip](https://github.com/user-attachments/files/30092551/5cubes.3mf.zip)

- **Massive redundant AMS flushing** every filament change on the
carousel triggers a full purge against the "previous" filament, even
when the target nozzle slot already has the correct filament loaded
- **60.9g total weight** instead of ~17g (**3.5× material waste**)
- **3h09m print time** instead of ~1h57m (**60% longer**)

## Root Cause

The code uses `nozzle_cur_filament_ids[extruder_id]` (a 2-element array)
to track which filament was last used for each extruder. BambuStudio
uses `NozzleStatusRecorder`, which tracks per `group_id` (physical
carousel slot 0..6).

## Changes

| File | Change |
|---|---|
| `Print.cpp` | Replace `nozzle_cur_filament_ids` with
`NozzleStatusRecorder`. Use `get_nozzle_for_filament()` to resolve the
physical carousel slot per layer. Select `filament_prime_volume_nc` for
nozzle changes, `filament_prime_volume` for filament changes. |
| `PrintConfig.hpp` | Add `ConfigOptionFloats filament_prime_volume`
(per-filament EC prime volume, missing from upstream but present in BBS
and H2C profiles) |
| `PrintConfig.cpp` | Register `filament_prime_volume` with default
45mm³ (matching BBS) |
| `Preset.cpp` | Add `filament_prime_volume` to preset keys |

Also includes `tests/compare_analyzer/` - two standalone Python tools
for G-code slice comparison and temperature timeline analysis (stdlib
only, no dependencies).

## Test Results (5-color H2C Hybrid print, same 3mf project)

| Metric | Upstream (broken) | **Fixed** | BBS (reference) |
|---|---|---|---|
| **Total weight** | 60.90g | **16.20g**  | 17.47g |
| **Print time** | 3h09m | **1h57m**  | 1h51m |
| **Filament changes** | 105 | 105 | 140 |
| **Tool changes** | 35 | 35 | 35 |
| **Critical discrepancies vs BBS** | ⚠️ YES |  None | — |


## Analysis Tools (`tests/compare_analyzer/`)

Two standalone Python tools (stdlib only, no dependencies) for deep
G-code comparison:

- **`compare_slices.py`** - comprehensive .3mf slice comparison:
filament usage, nozzle mapping, tool change sequences, prime tower
analysis, temperature timeline, retract parameters, and automatic
critical discrepancy detection (weight/time anomalies)
- **`show_temp_plot.py`** - interactive HTML temperature timeline
plotter for visualising heater profiles during multi-nozzle prints
(supports single-file and side-by-side comparison)

Usage:
```bash
python3 tests/compare_analyzer/compare_slices.py file1.3mf file2.3mf --labels "Upstream" "Fixed"
python3 tests/compare_analyzer/show_temp_plot.py file1.3mf file2.3mf
```


## Screenshots

### OrcaSlicer Upstream (unfixed) - 60.90g, 3h09m
<img width="1512" height="982" alt="Screenshot 2026-07-16 at 15 22 58"
src="https://github.com/user-attachments/assets/3efb2bff-ff1e-43db-9669-feafa5921b51"
/>


### OrcaSlicer Fixed - 16.20g, 1h57m
<img width="1512" height="982" alt="Screenshot 2026-07-16 at 15 23 08"
src="https://github.com/user-attachments/assets/c1d36dc5-9b01-4691-80ef-7364540e1f4e"
/>

### BambuStudio Reference - 17.47g, 1h51m
<img width="1512" height="982" alt="Screenshot 2026-07-16 at 15 24 52"
src="https://github.com/user-attachments/assets/5c0b11e2-64f4-40e9-8c7c-3f42519786c3"
/>

### Temperature Timeline: Upstream vs Fixed
<img width="1511" height="829" alt="Screenshot 2026-07-16 at 15 23 35"
src="https://github.com/user-attachments/assets/926c2cb5-dfd4-4ce0-bb40-82e6165eb134"
/>


### Temperature Timeline: Fixed vs BBS

<img width="1512" height="825" alt="Screenshot 2026-07-16 at 15 23 51"
src="https://github.com/user-attachments/assets/85c72dda-e779-4aa6-8118-fb17e5f8482d"
/>


## Compatibility

Safe for non-carousel printers: when each extruder has a single nozzle,
`group_id == extruder_id`, so `NozzleStatusRecorder` behaves identically
to the original per-extruder tracking. The `filament_prime_volume`
default (45mm³) matches the existing global `prime_volume` default.

## Reference
BambuStudio `Print.cpp` `_make_wipe_tower()` L3341-3392 -
`NozzleStatusRecorder` pattern.
2026-07-22 12:59:17 +08:00
2025-11-23 20:47:07 +08:00
2026-07-02 17:49:36 +08:00
2026-07-20 09:16:06 -03:00
2024-12-12 22:21:17 +08:00
2024-03-17 23:14:43 +08:00
2025-08-22 20:02:26 +08:00
2026-06-14 18:35:56 +08:00
2023-08-20 20:02:54 +08:00
2026-07-19 00:33:53 +08:00

OrcaSlicer logo

OrcaSlicer%2FOrcaSlicer | Trendshift

GitHub Repo stars Build all

OrcaSlicer: an open source Next-Gen Slicing Software for Precision 3D Prints.
Optimize your prints with ultra-fast slicing, intelligent support generation, and seamless printer compatibility—engineered for perfection.

Official links and community

Official Website:

OrcaSlicer.com

Github Repository:

GitHub Logo

Follow us:

X Logo
YouTube Logo

Join our Discord community:

discord logo

⚠️ CAUTION:
Several clickbait and malicious websites, such as orca-slicer[.]com and orcaslicer[.]net, are pretending to be the official OrcaSlicer site. These sites may redirect you to dangerous downloads or contain misleading information.
Our only official website is www.orcaslicer.com.

If you come across any of these in search results, please report them as unsafe or phishing to help keep the community secure with:
- Google Safe Browsing
- Microsoft Security Intelligence
- IPThreat

Main features

  • Advanced Calibration Tools
    Comprehensive suite: temperature towers, flow rate, retraction & more for optimal performance.
  • Precise Wall and Seam Control
    Adjust outer wall spacing and apply scarf seams to enhance print accuracy.
  • Sandwich Mode and Polyholes Support
    Use varied infill patterns and accurate hole shapes for improved clarity.
  • Overhang and Support Optimization
    Modify geometry for printable overhangs with precise support placement.
  • Granular Controls and Customization
    Fine-tune print speed, layer height, pressure, and temperature with precision.
  • Network Printer Support
    Seamless integration with Klipper, PrusaLink, and OctoPrint for remote control.
  • Mouse Ear Brims & Adaptive Bed Mesh
    Automatic brims and adaptive mesh calibration ensure consistent adhesion.
  • User-Friendly Interface
    Intuitive drag-and-drop design with pre-made profiles for popular printers.
  • Open-Source & Community Driven
    Regular updates fueled by continuous community contributions.
  • Wide Printer Compatibility
    Supports a broad range of printers: Bambu Lab, Prusa, Creality, Voron, and more.
  • Additional features can be found in the change notes.

Wiki

The wiki aims to provide a detailed explanation of the slicer settings, including how to maximize their use and how to calibrate and set up your printer.

Download

Stable Release

📥 Download the Latest Stable Release
Visit our GitHub Releases page for the latest stable version of OrcaSlicer, recommended for most users.

Nightly Builds

🌙 Download the Latest Nightly Build
Explore the latest developments in OrcaSlicer with our nightly builds. Feedback on these versions is highly appreciated.

How to install

Windows

Download the Windows Installer exe for your preferred version from the releases page.

Windows Package Manager

winget install --id=SoftFever.OrcaSlicer -e

Mac

  1. Download the DMG for your computer: arm64 version for Apple Silicon and x86_64 for Intel CPU.

  2. Drag OrcaSlicer.app to Application folder.

  3. If you want to run a build from a PR, you also need to follow the instructions below:

    Quarantine
    • Option 1 (You only need to do this once. After that the app can be opened normally.):

      • Step 1: Hold cmd and right click the app, from the context menu choose Open.
      • Step 2: A warning window will pop up, click Open
    • Option 2: Execute this command in terminal:

      xattr -dr com.apple.quarantine /Applications/OrcaSlicer.app
      
    • Option 3:

      • Step 1: open the app, a warning window will pop up
        mac_cant_open
      • Step 2: in System Settings -> Privacy & Security, click Open Anyway:
        mac_security_setting

Linux

OrcaSlicer is available through FlatHub:

Download on Flathub

Install from the command line:

flatpak install flathub com.orcaslicer.OrcaSlicer
flatpak run com.orcaslicer.OrcaSlicer

It can also be installed through graphical software managers (KDE Discover, GNOME Software, etc.) when Flathub is enabled. Search for OrcaSlicer in your software center.

AppImage

AppImages are published for both x86_64 and aarch64 (ARM64). Pick the file matching your CPU — the ARM64 build has aarch64 in its name (e.g. OrcaSlicer_Linux_AppImage_Ubuntu2404_aarch64_*.AppImage).

  1. Download App image from the releases page.

  2. Double click the downloaded file to run it.

  3. If you run into trouble executing it, try this command in the terminal: chmod +x /path_to_appimage/OrcaSlicer_Linux.AppImage

How to Compile

All updated build instructions for Windows, macOS, and Linux are now available on the official OrcaSlicer Wiki - How to build page.

Please refer to the wiki to ensure you're following the latest and most accurate steps for your platform.

Klipper Note

If you're running Klipper, it's recommended to add the following configuration to your printer.cfg file.

# Enable object exclusion
[exclude_object]

# Enable arcs support
[gcode_arcs]
resolution: 0.1

Supports

OrcaSlicer is an open-source project and I'm deeply grateful to all my sponsors and backers.
Their generous support enables me to purchase filaments and other essential 3D printing materials for the project.
Thank you! :)

Sponsors

QIDI BIGTREE TECH

Backers:

Ko-fi supporters : Backers list

Support me



Some Background

Open-source slicing has always been built on a tradition of collaboration and attribution. Slic3r, created by Alessandro Ranellucci and the RepRap community, laid the foundation. PrusaSlicer by Prusa Research built on Slic3r and acknowledged that heritage. Bambu Studio in turn forked from PrusaSlicer, and SuperSlicer by @supermerill extended PrusaSlicer with community-driven enhancements. Each project carried the work of its predecessors forward, crediting those who came before.

OrcaSlicer began in that same spirit, drawing from BambuStudio, PrusaSlicer, and ideas inspired by CuraSlicer and SuperSlicer. But it has since grown far beyond its origins. Through relentless innovation — introducing advanced calibration tools, precise wall and seam control, tree supports, adaptive slicing, and hundreds of other features — OrcaSlicer has become the most widely used and actively developed open-source slicer in the 3D printing community. Many of its innovations have been adopted by other slicers, making it a driving force for the entire industry.

The OrcaSlicer logo was designed by community member Justin Levine.

License

  • OrcaSlicer is licensed under the GNU Affero General Public License, version 3.
  • The GNU Affero General Public License, version 3 ensures that if you use any part of this software in any way (even behind a web server), your software must be released under the same license.
  • OrcaSlicer includes a pressure advance calibration pattern test adapted from Andrew Ellis' generator, which is licensed under GNU General Public License, version 3. Ellis' generator is itself adapted from a generator developed by Sineos for Marlin, which is licensed under GNU General Public License, version 3.
  • The Bambu networking plugin is based on non-free libraries from BambuLab. It is optional to the OrcaSlicer and provides extended functionalities for Bambulab printer users.
Description
Languages
C++ 81.2%
C 9.8%
JavaScript 5%
HTML 1.7%
CMake 0.7%
Other 1.2%