Skip to content

Fix machine envelope G-code emitting wrong limits due to broken extruder_id indexing#12414

Merged
SoftFever merged 1 commit into
mainfrom
feature/estimation_time
Feb 22, 2026
Merged

Fix machine envelope G-code emitting wrong limits due to broken extruder_id indexing#12414
SoftFever merged 1 commit into
mainfrom
feature/estimation_time

Conversation

@SoftFever

@SoftFever SoftFever commented Feb 22, 2026

Copy link
Copy Markdown
Collaborator

Description

Follow-up to #12411. print_machine_envelope() had the same extruder_id * 2 indexing bug on the G-code writer side:

  • get_extruder_id(extruder_id) * 2 was used to index machine limit arrays that only hold 2 entries [Normal, Stealth]. For multi-extruder setups this went out-of-bounds, causing wrong M201/M203 values to be emitted into the G-code, which the time estimator then reads and uses to override its initially-correct limits.
  • Removed the unused extruder_id parameter and switched to .values.front() (Normal mode), consistent with M204/M205 in the same function.
  • Changed get_option_value() fallback from .back() (Stealth) to .front() (Normal) so any future out-of-bounds index defaults to Normal mode instead of silently using Stealth values.

Screenshots/Recordings/Graphs

N/A — no UI changes.

Tests

…der_id indexing

print_machine_envelope() used get_extruder_id(extruder_id)*2 to index
machine limit arrays that only hold [Normal, Stealth] (2 entries).
For multi-extruder setups this went out-of-bounds, causing wrong M201/M203
values in the G-code which then override the estimator's correct limits.

Same class of bug as c6d1c11 but on the G-code writer side.

Changes:
- Remove unused extruder_id param from print_machine_envelope()
- Use .values.front() for M201/M203, matching M204/M205 in same function
- Change get_option_value() fallback from .back() to .front() so any
  future out-of-bounds index returns Normal mode instead of Stealth
Copilot AI review requested due to automatic review settings February 22, 2026 08:12
@SoftFever SoftFever merged commit c085eb8 into main Feb 22, 2026
13 checks passed
@SoftFever SoftFever deleted the feature/estimation_time branch February 22, 2026 08:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical bug in the G-code writer side where print_machine_envelope() was using incorrect array indexing to access machine limit values. The function was using get_extruder_id(extruder_id) * 2 to index machine limit arrays that only hold 2 entries [Normal, Stealth], causing out-of-bounds access in multi-extruder setups and emitting wrong M201/M203 values into G-code.

Changes:

  • Removed unused extruder_id parameter from print_machine_envelope() and its function signature
  • Changed all machine limit accesses to use .values.front() (Normal mode) instead of invalid extruder-based indexing
  • Modified get_option_value() fallback from .back() (Stealth) to .front() (Normal) for safer default behavior

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/libslic3r/GCode/GCodeProcessor.cpp Fixed fallback behavior in get_option_value() to return Normal mode instead of Stealth mode when index is out-of-bounds
src/libslic3r/GCode.hpp Removed unused extruder_id parameter from print_machine_envelope() declaration
src/libslic3r/GCode.cpp Removed extruder_id parameter from print_machine_envelope(), eliminated invalid matched_machine_limit_idx calculation, and changed all machine limit accesses to use Normal mode values

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

SoftFever added a commit to mlugo-apx/OrcaSlicer that referenced this pull request Feb 23, 2026
…der_id indexing (OrcaSlicer#12414)

print_machine_envelope() used get_extruder_id(extruder_id)*2 to index
machine limit arrays that only hold [Normal, Stealth] (2 entries).
For multi-extruder setups this went out-of-bounds, causing wrong M201/M203
values in the G-code which then override the estimator's correct limits.

Same class of bug as c6d1c11 but on the G-code writer side.

Changes:
- Remove unused extruder_id param from print_machine_envelope()
- Use .values.front() for M201/M203, matching M204/M205 in same function
- Change get_option_value() fallback from .back() to .front() so any
  future out-of-bounds index returns Normal mode instead of Stealth
SoftFever added a commit that referenced this pull request Feb 23, 2026
* Add Elegoo filament profiles to OrcaFilamentLibrary

Add 7 Elegoo filament profiles based on manufacturer specifications:
- Elegoo Rapid PETG (high-speed PETG, 240-270°C, 30-600mm/s)
- Elegoo PETG Pro (standard PETG, 230-260°C, 30-270mm/s)
- Elegoo PETG-CF (carbon fiber PETG, 240-270°C, 30-220mm/s)
- Elegoo PLA (standard PLA, 190-230°C, 30-280mm/s)
- Elegoo Rapid PLA+ (high-speed PLA, 190-230°C, 30-600mm/s)
- Elegoo ASA (ASA, 250-280°C, 30-270mm/s)
- Elegoo TPU 95A (flexible TPU, 220-240°C, 30-60mm/s)

All settings sourced from Elegoo's official product specifications.

* Fix dual seam fuzzy painted rev 2 (#11923)

* 2 seam fuzzy 2nd attempt

* Update FuzzySkin.cpp

* Fix debug SVG

* solve bump artifact in extrusion junction joint

* minor fixes

* cleaning

Update FuzzySkin.cpp

* Fix filament override changes not appearing in Unsaved Changes and showing as “Undef category” in preset comparison (#12298)

* Fix an issue that on Windows the Bambu legacy plugin is 01.10.01.09 (#12380)

* tweak legacy library migration from rename to copy in BBLNetworkPlugin (#12400)

* tweak legacy library migration from rename to copy in BBLNetworkPlugin

* Add Pressure Advance visualization support (#11673)

* Add Pressure Advance visualization support

Signed-off-by: minicx <[email protected]>

* Port Pressure Advance visualization to libvgcode architecture

Adapt PA visualization (originally in commit e3a7725) to work with
the new libvgcode library introduced by upstream PR #10735.

Changes across the libvgcode stack:
- PathVertex: add pressure_advance field
- Types.hpp: add PressureAdvance to EViewType enum
- ViewerImpl: add ColorRange, color mapping, range updates for PA
- LibVGCodeWrapper: pass pressure_advance from MoveVertex to PathVertex

GCodeViewer UI integration:
- Add "Pressure Advance" to view type dropdown
- Add PA color range in legend (3 decimal places)
- Add PA value display in sequential view marker tooltip
- Add PA row in position properties table

The GCodeProcessor PA parsing (M900, M572, SET_PRESSURE_ADVANCE)
is preserved from the original implementation.

* Tag Pressure Advance visualization changes with ORCA comments

Signed-off-by: minicx <[email protected]>

---------

Signed-off-by: minicx <[email protected]>
Co-authored-by: Ioannis Giannakas <[email protected]>
Co-authored-by: Claude <[email protected]>

* Fix time estimation using wrong machine limits due to broken extruder_id indexing (#12411)

The extruder_id*2 offset in get_axis_max_feedrate/get_axis_max_acceleration
was cherry-picked from BambuStudio's per-nozzle limit system, which OrcaSlicer
never ported. Without that system the limit arrays only have 2 values
([0]=Normal, [1]=Stealth), so any extruder_id > 0 or the uninitialized
value (255) would overshoot the array and fall back to values.back(),
always returning stealth-mode limits and producing incorrect time estimates.

Revert to indexing by time mode only (matching v2.3.1 behavior) and simplify
the M201/M203 handlers to write only the two mode slots they actually use.

* Fix machine envelope G-code emitting wrong limits due to broken extruder_id indexing (#12414)

print_machine_envelope() used get_extruder_id(extruder_id)*2 to index
machine limit arrays that only hold [Normal, Stealth] (2 entries).
For multi-extruder setups this went out-of-bounds, causing wrong M201/M203
values in the G-code which then override the estimator's correct limits.

Same class of bug as c6d1c11 but on the G-code writer side.

Changes:
- Remove unused extruder_id param from print_machine_envelope()
- Use .values.front() for M201/M203, matching M204/M205 in same function
- Change get_option_value() fallback from .back() to .front() so any
  future out-of-bounds index returns Normal mode instead of Stealth

* update error message when plugin upgrade failed

* Add and update pt-BR translations (#12409)

* Add preference for filament area height to reduce scrolling while using 16+ filaments (#12317)

Fixes #12284

Adds a preference for filaments area height since every user has different amount of MM units and external filaments
so users can set a value that fits their setups this way

we might see 3 or 6 filaments for each unit on future. thats why i set value as int

used 10 as default value. its good for 2 multimaterial units ( 8 filaments ) and 1 external filament

min value is 8.  might be good when no external filaments in use

max value is 99. UI works same as 2.3.1 version

<img width="562" height="122" alt="Screenshot-20260215194149" src="https://github.com/user-attachments/assets/309cec36-8b83-48f3-875f-d5f22a9631e7" />

**BEFORE**
Scrollable area fixed for 10 items. that causes a lot of scrolling whe user has 3 or 4 ams units

<img width="411" height="237" alt="Screenshot-20260215194816" src="https://github.com/user-attachments/assets/fc7823c0-d82a-4d1f-bb5b-56e8dd47abd2" />

**AFTER**
value 10. - 2 multimaterial units ( 8 filaments ) and 1 external filament
<img width="1002" height="250" alt="Screenshot-20260215195243" src="https://github.com/user-attachments/assets/e3238cd1-788e-4ed2-b048-89c63bd323db" />

value 18  - 4 multimaterial units ( 16 filaments ) and 1 external filament
<img width="1001" height="355" alt="Screenshot-20260215195127" src="https://github.com/user-attachments/assets/afe0305e-fcb4-4a51-b8dc-e70a063aa391" />

* Fix: Correct range checking for int and float Config Options + QoL changes in tooltips (#11915)

* Fix float number not working properly for option min/max (#11211)

* ConfigOptionDef: min/max values type are changed from INT to FLOAT.

(cherry picked from commit f277bc8)

* Fix infinite loop and crash when `fuzzy_skin_point_distance` = 0 (#11069)

* Fix Linux build issue

* Fix float comparison due to precision loss

* Fix: Range check added for coInt options; Ranges and defaults added in tooltips

---------

Co-authored-by: Noisyfox <[email protected]>
Co-authored-by: SoftFever <[email protected]>

* Update machine profile for OpenEYE Peacock V2 (#12333)

* OpenEYE Peacock V2 machine profile: Add printer_agent key to enable AMS filament synchronization (Klipper/Moonraker)

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

* Optimize retraction settings in printer profiles to reduce stringing and improve print quality

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

---------

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

* Fix preheat regression bugs  (#12438)

Fix preheat regression bugs
revert 769fc13

* Fix the issue where `resources/profiles/OrcaFilamentLibrary.json` is not updated accordingly.

---------

Signed-off-by: minicx <[email protected]>
Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>
Co-authored-by: Rodrigo Faselli <[email protected]>
Co-authored-by: Kiss Lorand <[email protected]>
Co-authored-by: SoftFever <[email protected]>
Co-authored-by: minicx <[email protected]>
Co-authored-by: Ioannis Giannakas <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Alexandre Folle de Menezes <[email protected]>
Co-authored-by: yw4z <[email protected]>
Co-authored-by: Valerii Bokhan <[email protected]>
Co-authored-by: Noisyfox <[email protected]>
Co-authored-by: Sezgin AÇIKGÖZ <[email protected]>
tome9111991 pushed a commit to tome9111991/OrcaSlicer that referenced this pull request Feb 24, 2026
…der_id indexing (OrcaSlicer#12414)

print_machine_envelope() used get_extruder_id(extruder_id)*2 to index
machine limit arrays that only hold [Normal, Stealth] (2 entries).
For multi-extruder setups this went out-of-bounds, causing wrong M201/M203
values in the G-code which then override the estimator's correct limits.

Same class of bug as c6d1c11 but on the G-code writer side.

Changes:
- Remove unused extruder_id param from print_machine_envelope()
- Use .values.front() for M201/M203, matching M204/M205 in same function
- Change get_option_value() fallback from .back() to .front() so any
  future out-of-bounds index returns Normal mode instead of Stealth
tome9111991 pushed a commit to tome9111991/OrcaSlicer that referenced this pull request Feb 24, 2026
* Add Elegoo filament profiles to OrcaFilamentLibrary

Add 7 Elegoo filament profiles based on manufacturer specifications:
- Elegoo Rapid PETG (high-speed PETG, 240-270°C, 30-600mm/s)
- Elegoo PETG Pro (standard PETG, 230-260°C, 30-270mm/s)
- Elegoo PETG-CF (carbon fiber PETG, 240-270°C, 30-220mm/s)
- Elegoo PLA (standard PLA, 190-230°C, 30-280mm/s)
- Elegoo Rapid PLA+ (high-speed PLA, 190-230°C, 30-600mm/s)
- Elegoo ASA (ASA, 250-280°C, 30-270mm/s)
- Elegoo TPU 95A (flexible TPU, 220-240°C, 30-60mm/s)

All settings sourced from Elegoo's official product specifications.

* Fix dual seam fuzzy painted rev 2 (OrcaSlicer#11923)

* 2 seam fuzzy 2nd attempt

* Update FuzzySkin.cpp

* Fix debug SVG

* solve bump artifact in extrusion junction joint

* minor fixes

* cleaning

Update FuzzySkin.cpp

* Fix filament override changes not appearing in Unsaved Changes and showing as “Undef category” in preset comparison (OrcaSlicer#12298)

* Fix an issue that on Windows the Bambu legacy plugin is 01.10.01.09 (OrcaSlicer#12380)

* tweak legacy library migration from rename to copy in BBLNetworkPlugin (OrcaSlicer#12400)

* tweak legacy library migration from rename to copy in BBLNetworkPlugin

* Add Pressure Advance visualization support (OrcaSlicer#11673)

* Add Pressure Advance visualization support

Signed-off-by: minicx <[email protected]>

* Port Pressure Advance visualization to libvgcode architecture

Adapt PA visualization (originally in commit e3a7725) to work with
the new libvgcode library introduced by upstream PR OrcaSlicer#10735.

Changes across the libvgcode stack:
- PathVertex: add pressure_advance field
- Types.hpp: add PressureAdvance to EViewType enum
- ViewerImpl: add ColorRange, color mapping, range updates for PA
- LibVGCodeWrapper: pass pressure_advance from MoveVertex to PathVertex

GCodeViewer UI integration:
- Add "Pressure Advance" to view type dropdown
- Add PA color range in legend (3 decimal places)
- Add PA value display in sequential view marker tooltip
- Add PA row in position properties table

The GCodeProcessor PA parsing (M900, M572, SET_PRESSURE_ADVANCE)
is preserved from the original implementation.

* Tag Pressure Advance visualization changes with ORCA comments

Signed-off-by: minicx <[email protected]>

---------

Signed-off-by: minicx <[email protected]>
Co-authored-by: Ioannis Giannakas <[email protected]>
Co-authored-by: Claude <[email protected]>

* Fix time estimation using wrong machine limits due to broken extruder_id indexing (OrcaSlicer#12411)

The extruder_id*2 offset in get_axis_max_feedrate/get_axis_max_acceleration
was cherry-picked from BambuStudio's per-nozzle limit system, which OrcaSlicer
never ported. Without that system the limit arrays only have 2 values
([0]=Normal, [1]=Stealth), so any extruder_id > 0 or the uninitialized
value (255) would overshoot the array and fall back to values.back(),
always returning stealth-mode limits and producing incorrect time estimates.

Revert to indexing by time mode only (matching v2.3.1 behavior) and simplify
the M201/M203 handlers to write only the two mode slots they actually use.

* Fix machine envelope G-code emitting wrong limits due to broken extruder_id indexing (OrcaSlicer#12414)

print_machine_envelope() used get_extruder_id(extruder_id)*2 to index
machine limit arrays that only hold [Normal, Stealth] (2 entries).
For multi-extruder setups this went out-of-bounds, causing wrong M201/M203
values in the G-code which then override the estimator's correct limits.

Same class of bug as c6d1c11 but on the G-code writer side.

Changes:
- Remove unused extruder_id param from print_machine_envelope()
- Use .values.front() for M201/M203, matching M204/M205 in same function
- Change get_option_value() fallback from .back() to .front() so any
  future out-of-bounds index returns Normal mode instead of Stealth

* update error message when plugin upgrade failed

* Add and update pt-BR translations (OrcaSlicer#12409)

* Add preference for filament area height to reduce scrolling while using 16+ filaments (OrcaSlicer#12317)

Fixes OrcaSlicer#12284

Adds a preference for filaments area height since every user has different amount of MM units and external filaments
so users can set a value that fits their setups this way

we might see 3 or 6 filaments for each unit on future. thats why i set value as int

used 10 as default value. its good for 2 multimaterial units ( 8 filaments ) and 1 external filament

min value is 8.  might be good when no external filaments in use

max value is 99. UI works same as 2.3.1 version

<img width="562" height="122" alt="Screenshot-20260215194149" src="https://github.com/user-attachments/assets/309cec36-8b83-48f3-875f-d5f22a9631e7" />

**BEFORE**
Scrollable area fixed for 10 items. that causes a lot of scrolling whe user has 3 or 4 ams units

<img width="411" height="237" alt="Screenshot-20260215194816" src="https://github.com/user-attachments/assets/fc7823c0-d82a-4d1f-bb5b-56e8dd47abd2" />

**AFTER**
value 10. - 2 multimaterial units ( 8 filaments ) and 1 external filament
<img width="1002" height="250" alt="Screenshot-20260215195243" src="https://github.com/user-attachments/assets/e3238cd1-788e-4ed2-b048-89c63bd323db" />

value 18  - 4 multimaterial units ( 16 filaments ) and 1 external filament
<img width="1001" height="355" alt="Screenshot-20260215195127" src="https://github.com/user-attachments/assets/afe0305e-fcb4-4a51-b8dc-e70a063aa391" />

* Fix: Correct range checking for int and float Config Options + QoL changes in tooltips (OrcaSlicer#11915)

* Fix float number not working properly for option min/max (OrcaSlicer#11211)

* ConfigOptionDef: min/max values type are changed from INT to FLOAT.

(cherry picked from commit f277bc8)

* Fix infinite loop and crash when `fuzzy_skin_point_distance` = 0 (OrcaSlicer#11069)

* Fix Linux build issue

* Fix float comparison due to precision loss

* Fix: Range check added for coInt options; Ranges and defaults added in tooltips

---------

Co-authored-by: Noisyfox <[email protected]>
Co-authored-by: SoftFever <[email protected]>

* Update machine profile for OpenEYE Peacock V2 (OrcaSlicer#12333)

* OpenEYE Peacock V2 machine profile: Add printer_agent key to enable AMS filament synchronization (Klipper/Moonraker)

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

* Optimize retraction settings in printer profiles to reduce stringing and improve print quality

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

---------

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

* Fix preheat regression bugs  (OrcaSlicer#12438)

Fix preheat regression bugs
revert 769fc13

* Fix the issue where `resources/profiles/OrcaFilamentLibrary.json` is not updated accordingly.

---------

Signed-off-by: minicx <[email protected]>
Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>
Co-authored-by: Rodrigo Faselli <[email protected]>
Co-authored-by: Kiss Lorand <[email protected]>
Co-authored-by: SoftFever <[email protected]>
Co-authored-by: minicx <[email protected]>
Co-authored-by: Ioannis Giannakas <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Alexandre Folle de Menezes <[email protected]>
Co-authored-by: yw4z <[email protected]>
Co-authored-by: Valerii Bokhan <[email protected]>
Co-authored-by: Noisyfox <[email protected]>
Co-authored-by: Sezgin AÇIKGÖZ <[email protected]>
SoftFever added a commit that referenced this pull request Mar 1, 2026
…der_id indexing (#12414)

print_machine_envelope() used get_extruder_id(extruder_id)*2 to index
machine limit arrays that only hold [Normal, Stealth] (2 entries).
For multi-extruder setups this went out-of-bounds, causing wrong M201/M203
values in the G-code which then override the estimator's correct limits.

Same class of bug as c6d1c11 but on the G-code writer side.

Changes:
- Remove unused extruder_id param from print_machine_envelope()
- Use .values.front() for M201/M203, matching M204/M205 in same function
- Change get_option_value() fallback from .back() to .front() so any
  future out-of-bounds index returns Normal mode instead of Stealth
SoftFever added a commit that referenced this pull request Mar 1, 2026
* Add Elegoo filament profiles to OrcaFilamentLibrary

Add 7 Elegoo filament profiles based on manufacturer specifications:
- Elegoo Rapid PETG (high-speed PETG, 240-270°C, 30-600mm/s)
- Elegoo PETG Pro (standard PETG, 230-260°C, 30-270mm/s)
- Elegoo PETG-CF (carbon fiber PETG, 240-270°C, 30-220mm/s)
- Elegoo PLA (standard PLA, 190-230°C, 30-280mm/s)
- Elegoo Rapid PLA+ (high-speed PLA, 190-230°C, 30-600mm/s)
- Elegoo ASA (ASA, 250-280°C, 30-270mm/s)
- Elegoo TPU 95A (flexible TPU, 220-240°C, 30-60mm/s)

All settings sourced from Elegoo's official product specifications.

* Fix dual seam fuzzy painted rev 2 (#11923)

* 2 seam fuzzy 2nd attempt

* Update FuzzySkin.cpp

* Fix debug SVG

* solve bump artifact in extrusion junction joint

* minor fixes

* cleaning

Update FuzzySkin.cpp

* Fix filament override changes not appearing in Unsaved Changes and showing as “Undef category” in preset comparison (#12298)

* Fix an issue that on Windows the Bambu legacy plugin is 01.10.01.09 (#12380)

* tweak legacy library migration from rename to copy in BBLNetworkPlugin (#12400)

* tweak legacy library migration from rename to copy in BBLNetworkPlugin

* Add Pressure Advance visualization support (#11673)

* Add Pressure Advance visualization support

Signed-off-by: minicx <[email protected]>

* Port Pressure Advance visualization to libvgcode architecture

Adapt PA visualization (originally in commit e3a7725) to work with
the new libvgcode library introduced by upstream PR #10735.

Changes across the libvgcode stack:
- PathVertex: add pressure_advance field
- Types.hpp: add PressureAdvance to EViewType enum
- ViewerImpl: add ColorRange, color mapping, range updates for PA
- LibVGCodeWrapper: pass pressure_advance from MoveVertex to PathVertex

GCodeViewer UI integration:
- Add "Pressure Advance" to view type dropdown
- Add PA color range in legend (3 decimal places)
- Add PA value display in sequential view marker tooltip
- Add PA row in position properties table

The GCodeProcessor PA parsing (M900, M572, SET_PRESSURE_ADVANCE)
is preserved from the original implementation.

* Tag Pressure Advance visualization changes with ORCA comments

Signed-off-by: minicx <[email protected]>

---------

Signed-off-by: minicx <[email protected]>
Co-authored-by: Ioannis Giannakas <[email protected]>
Co-authored-by: Claude <[email protected]>

* Fix time estimation using wrong machine limits due to broken extruder_id indexing (#12411)

The extruder_id*2 offset in get_axis_max_feedrate/get_axis_max_acceleration
was cherry-picked from BambuStudio's per-nozzle limit system, which OrcaSlicer
never ported. Without that system the limit arrays only have 2 values
([0]=Normal, [1]=Stealth), so any extruder_id > 0 or the uninitialized
value (255) would overshoot the array and fall back to values.back(),
always returning stealth-mode limits and producing incorrect time estimates.

Revert to indexing by time mode only (matching v2.3.1 behavior) and simplify
the M201/M203 handlers to write only the two mode slots they actually use.

* Fix machine envelope G-code emitting wrong limits due to broken extruder_id indexing (#12414)

print_machine_envelope() used get_extruder_id(extruder_id)*2 to index
machine limit arrays that only hold [Normal, Stealth] (2 entries).
For multi-extruder setups this went out-of-bounds, causing wrong M201/M203
values in the G-code which then override the estimator's correct limits.

Same class of bug as c6d1c11 but on the G-code writer side.

Changes:
- Remove unused extruder_id param from print_machine_envelope()
- Use .values.front() for M201/M203, matching M204/M205 in same function
- Change get_option_value() fallback from .back() to .front() so any
  future out-of-bounds index returns Normal mode instead of Stealth

* update error message when plugin upgrade failed

* Add and update pt-BR translations (#12409)

* Add preference for filament area height to reduce scrolling while using 16+ filaments (#12317)

Fixes #12284

Adds a preference for filaments area height since every user has different amount of MM units and external filaments
so users can set a value that fits their setups this way

we might see 3 or 6 filaments for each unit on future. thats why i set value as int

used 10 as default value. its good for 2 multimaterial units ( 8 filaments ) and 1 external filament

min value is 8.  might be good when no external filaments in use

max value is 99. UI works same as 2.3.1 version

<img width="562" height="122" alt="Screenshot-20260215194149" src="https://github.com/user-attachments/assets/309cec36-8b83-48f3-875f-d5f22a9631e7" />

**BEFORE**
Scrollable area fixed for 10 items. that causes a lot of scrolling whe user has 3 or 4 ams units

<img width="411" height="237" alt="Screenshot-20260215194816" src="https://github.com/user-attachments/assets/fc7823c0-d82a-4d1f-bb5b-56e8dd47abd2" />

**AFTER**
value 10. - 2 multimaterial units ( 8 filaments ) and 1 external filament
<img width="1002" height="250" alt="Screenshot-20260215195243" src="https://github.com/user-attachments/assets/e3238cd1-788e-4ed2-b048-89c63bd323db" />

value 18  - 4 multimaterial units ( 16 filaments ) and 1 external filament
<img width="1001" height="355" alt="Screenshot-20260215195127" src="https://github.com/user-attachments/assets/afe0305e-fcb4-4a51-b8dc-e70a063aa391" />

* Fix: Correct range checking for int and float Config Options + QoL changes in tooltips (#11915)

* Fix float number not working properly for option min/max (#11211)

* ConfigOptionDef: min/max values type are changed from INT to FLOAT.

(cherry picked from commit f277bc8)

* Fix infinite loop and crash when `fuzzy_skin_point_distance` = 0 (#11069)

* Fix Linux build issue

* Fix float comparison due to precision loss

* Fix: Range check added for coInt options; Ranges and defaults added in tooltips

---------

Co-authored-by: Noisyfox <[email protected]>
Co-authored-by: SoftFever <[email protected]>

* Update machine profile for OpenEYE Peacock V2 (#12333)

* OpenEYE Peacock V2 machine profile: Add printer_agent key to enable AMS filament synchronization (Klipper/Moonraker)

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

* Optimize retraction settings in printer profiles to reduce stringing and improve print quality

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

---------

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

* Fix preheat regression bugs  (#12438)

Fix preheat regression bugs
revert 769fc13

* Fix the issue where `resources/profiles/OrcaFilamentLibrary.json` is not updated accordingly.

---------

Signed-off-by: minicx <[email protected]>
Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>
Co-authored-by: Rodrigo Faselli <[email protected]>
Co-authored-by: Kiss Lorand <[email protected]>
Co-authored-by: SoftFever <[email protected]>
Co-authored-by: minicx <[email protected]>
Co-authored-by: Ioannis Giannakas <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Alexandre Folle de Menezes <[email protected]>
Co-authored-by: yw4z <[email protected]>
Co-authored-by: Valerii Bokhan <[email protected]>
Co-authored-by: Noisyfox <[email protected]>
Co-authored-by: Sezgin AÇIKGÖZ <[email protected]>
Xipit pushed a commit to Xipit/OrcaSlicer that referenced this pull request Mar 16, 2026
…der_id indexing (OrcaSlicer#12414)

print_machine_envelope() used get_extruder_id(extruder_id)*2 to index
machine limit arrays that only hold [Normal, Stealth] (2 entries).
For multi-extruder setups this went out-of-bounds, causing wrong M201/M203
values in the G-code which then override the estimator's correct limits.

Same class of bug as c6d1c11 but on the G-code writer side.

Changes:
- Remove unused extruder_id param from print_machine_envelope()
- Use .values.front() for M201/M203, matching M204/M205 in same function
- Change get_option_value() fallback from .back() to .front() so any
  future out-of-bounds index returns Normal mode instead of Stealth
Xipit pushed a commit to Xipit/OrcaSlicer that referenced this pull request Mar 16, 2026
* Add Elegoo filament profiles to OrcaFilamentLibrary

Add 7 Elegoo filament profiles based on manufacturer specifications:
- Elegoo Rapid PETG (high-speed PETG, 240-270°C, 30-600mm/s)
- Elegoo PETG Pro (standard PETG, 230-260°C, 30-270mm/s)
- Elegoo PETG-CF (carbon fiber PETG, 240-270°C, 30-220mm/s)
- Elegoo PLA (standard PLA, 190-230°C, 30-280mm/s)
- Elegoo Rapid PLA+ (high-speed PLA, 190-230°C, 30-600mm/s)
- Elegoo ASA (ASA, 250-280°C, 30-270mm/s)
- Elegoo TPU 95A (flexible TPU, 220-240°C, 30-60mm/s)

All settings sourced from Elegoo's official product specifications.

* Fix dual seam fuzzy painted rev 2 (OrcaSlicer#11923)

* 2 seam fuzzy 2nd attempt

* Update FuzzySkin.cpp

* Fix debug SVG

* solve bump artifact in extrusion junction joint

* minor fixes

* cleaning

Update FuzzySkin.cpp

* Fix filament override changes not appearing in Unsaved Changes and showing as “Undef category” in preset comparison (OrcaSlicer#12298)

* Fix an issue that on Windows the Bambu legacy plugin is 01.10.01.09 (OrcaSlicer#12380)

* tweak legacy library migration from rename to copy in BBLNetworkPlugin (OrcaSlicer#12400)

* tweak legacy library migration from rename to copy in BBLNetworkPlugin

* Add Pressure Advance visualization support (OrcaSlicer#11673)

* Add Pressure Advance visualization support

Signed-off-by: minicx <[email protected]>

* Port Pressure Advance visualization to libvgcode architecture

Adapt PA visualization (originally in commit e3a7725) to work with
the new libvgcode library introduced by upstream PR OrcaSlicer#10735.

Changes across the libvgcode stack:
- PathVertex: add pressure_advance field
- Types.hpp: add PressureAdvance to EViewType enum
- ViewerImpl: add ColorRange, color mapping, range updates for PA
- LibVGCodeWrapper: pass pressure_advance from MoveVertex to PathVertex

GCodeViewer UI integration:
- Add "Pressure Advance" to view type dropdown
- Add PA color range in legend (3 decimal places)
- Add PA value display in sequential view marker tooltip
- Add PA row in position properties table

The GCodeProcessor PA parsing (M900, M572, SET_PRESSURE_ADVANCE)
is preserved from the original implementation.

* Tag Pressure Advance visualization changes with ORCA comments

Signed-off-by: minicx <[email protected]>

---------

Signed-off-by: minicx <[email protected]>
Co-authored-by: Ioannis Giannakas <[email protected]>
Co-authored-by: Claude <[email protected]>

* Fix time estimation using wrong machine limits due to broken extruder_id indexing (OrcaSlicer#12411)

The extruder_id*2 offset in get_axis_max_feedrate/get_axis_max_acceleration
was cherry-picked from BambuStudio's per-nozzle limit system, which OrcaSlicer
never ported. Without that system the limit arrays only have 2 values
([0]=Normal, [1]=Stealth), so any extruder_id > 0 or the uninitialized
value (255) would overshoot the array and fall back to values.back(),
always returning stealth-mode limits and producing incorrect time estimates.

Revert to indexing by time mode only (matching v2.3.1 behavior) and simplify
the M201/M203 handlers to write only the two mode slots they actually use.

* Fix machine envelope G-code emitting wrong limits due to broken extruder_id indexing (OrcaSlicer#12414)

print_machine_envelope() used get_extruder_id(extruder_id)*2 to index
machine limit arrays that only hold [Normal, Stealth] (2 entries).
For multi-extruder setups this went out-of-bounds, causing wrong M201/M203
values in the G-code which then override the estimator's correct limits.

Same class of bug as c6d1c11 but on the G-code writer side.

Changes:
- Remove unused extruder_id param from print_machine_envelope()
- Use .values.front() for M201/M203, matching M204/M205 in same function
- Change get_option_value() fallback from .back() to .front() so any
  future out-of-bounds index returns Normal mode instead of Stealth

* update error message when plugin upgrade failed

* Add and update pt-BR translations (OrcaSlicer#12409)

* Add preference for filament area height to reduce scrolling while using 16+ filaments (OrcaSlicer#12317)

Fixes OrcaSlicer#12284

Adds a preference for filaments area height since every user has different amount of MM units and external filaments
so users can set a value that fits their setups this way

we might see 3 or 6 filaments for each unit on future. thats why i set value as int

used 10 as default value. its good for 2 multimaterial units ( 8 filaments ) and 1 external filament

min value is 8.  might be good when no external filaments in use

max value is 99. UI works same as 2.3.1 version

<img width="562" height="122" alt="Screenshot-20260215194149" src="https://github.com/user-attachments/assets/309cec36-8b83-48f3-875f-d5f22a9631e7" />

**BEFORE**
Scrollable area fixed for 10 items. that causes a lot of scrolling whe user has 3 or 4 ams units

<img width="411" height="237" alt="Screenshot-20260215194816" src="https://github.com/user-attachments/assets/fc7823c0-d82a-4d1f-bb5b-56e8dd47abd2" />

**AFTER**
value 10. - 2 multimaterial units ( 8 filaments ) and 1 external filament
<img width="1002" height="250" alt="Screenshot-20260215195243" src="https://github.com/user-attachments/assets/e3238cd1-788e-4ed2-b048-89c63bd323db" />

value 18  - 4 multimaterial units ( 16 filaments ) and 1 external filament
<img width="1001" height="355" alt="Screenshot-20260215195127" src="https://github.com/user-attachments/assets/afe0305e-fcb4-4a51-b8dc-e70a063aa391" />

* Fix: Correct range checking for int and float Config Options + QoL changes in tooltips (OrcaSlicer#11915)

* Fix float number not working properly for option min/max (OrcaSlicer#11211)

* ConfigOptionDef: min/max values type are changed from INT to FLOAT.

(cherry picked from commit f277bc8)

* Fix infinite loop and crash when `fuzzy_skin_point_distance` = 0 (OrcaSlicer#11069)

* Fix Linux build issue

* Fix float comparison due to precision loss

* Fix: Range check added for coInt options; Ranges and defaults added in tooltips

---------

Co-authored-by: Noisyfox <[email protected]>
Co-authored-by: SoftFever <[email protected]>

* Update machine profile for OpenEYE Peacock V2 (OrcaSlicer#12333)

* OpenEYE Peacock V2 machine profile: Add printer_agent key to enable AMS filament synchronization (Klipper/Moonraker)

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

* Optimize retraction settings in printer profiles to reduce stringing and improve print quality

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

---------

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

* Fix preheat regression bugs  (OrcaSlicer#12438)

Fix preheat regression bugs
revert 769fc13

* Fix the issue where `resources/profiles/OrcaFilamentLibrary.json` is not updated accordingly.

---------

Signed-off-by: minicx <[email protected]>
Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>
Co-authored-by: Rodrigo Faselli <[email protected]>
Co-authored-by: Kiss Lorand <[email protected]>
Co-authored-by: SoftFever <[email protected]>
Co-authored-by: minicx <[email protected]>
Co-authored-by: Ioannis Giannakas <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Alexandre Folle de Menezes <[email protected]>
Co-authored-by: yw4z <[email protected]>
Co-authored-by: Valerii Bokhan <[email protected]>
Co-authored-by: Noisyfox <[email protected]>
Co-authored-by: Sezgin AÇIKGÖZ <[email protected]>
davidjdixon pushed a commit to davidjdixon/OrcaSlicer that referenced this pull request Mar 21, 2026
* Add Elegoo filament profiles to OrcaFilamentLibrary

Add 7 Elegoo filament profiles based on manufacturer specifications:
- Elegoo Rapid PETG (high-speed PETG, 240-270°C, 30-600mm/s)
- Elegoo PETG Pro (standard PETG, 230-260°C, 30-270mm/s)
- Elegoo PETG-CF (carbon fiber PETG, 240-270°C, 30-220mm/s)
- Elegoo PLA (standard PLA, 190-230°C, 30-280mm/s)
- Elegoo Rapid PLA+ (high-speed PLA, 190-230°C, 30-600mm/s)
- Elegoo ASA (ASA, 250-280°C, 30-270mm/s)
- Elegoo TPU 95A (flexible TPU, 220-240°C, 30-60mm/s)

All settings sourced from Elegoo's official product specifications.

* Fix dual seam fuzzy painted rev 2 (OrcaSlicer#11923)

* 2 seam fuzzy 2nd attempt

* Update FuzzySkin.cpp

* Fix debug SVG

* solve bump artifact in extrusion junction joint

* minor fixes

* cleaning

Update FuzzySkin.cpp

* Fix filament override changes not appearing in Unsaved Changes and showing as “Undef category” in preset comparison (OrcaSlicer#12298)

* Fix an issue that on Windows the Bambu legacy plugin is 01.10.01.09 (OrcaSlicer#12380)

* tweak legacy library migration from rename to copy in BBLNetworkPlugin (OrcaSlicer#12400)

* tweak legacy library migration from rename to copy in BBLNetworkPlugin

* Add Pressure Advance visualization support (OrcaSlicer#11673)

* Add Pressure Advance visualization support

Signed-off-by: minicx <[email protected]>

* Port Pressure Advance visualization to libvgcode architecture

Adapt PA visualization (originally in commit e3a7725) to work with
the new libvgcode library introduced by upstream PR OrcaSlicer#10735.

Changes across the libvgcode stack:
- PathVertex: add pressure_advance field
- Types.hpp: add PressureAdvance to EViewType enum
- ViewerImpl: add ColorRange, color mapping, range updates for PA
- LibVGCodeWrapper: pass pressure_advance from MoveVertex to PathVertex

GCodeViewer UI integration:
- Add "Pressure Advance" to view type dropdown
- Add PA color range in legend (3 decimal places)
- Add PA value display in sequential view marker tooltip
- Add PA row in position properties table

The GCodeProcessor PA parsing (M900, M572, SET_PRESSURE_ADVANCE)
is preserved from the original implementation.

* Tag Pressure Advance visualization changes with ORCA comments

Signed-off-by: minicx <[email protected]>

---------

Signed-off-by: minicx <[email protected]>
Co-authored-by: Ioannis Giannakas <[email protected]>
Co-authored-by: Claude <[email protected]>

* Fix time estimation using wrong machine limits due to broken extruder_id indexing (OrcaSlicer#12411)

The extruder_id*2 offset in get_axis_max_feedrate/get_axis_max_acceleration
was cherry-picked from BambuStudio's per-nozzle limit system, which OrcaSlicer
never ported. Without that system the limit arrays only have 2 values
([0]=Normal, [1]=Stealth), so any extruder_id > 0 or the uninitialized
value (255) would overshoot the array and fall back to values.back(),
always returning stealth-mode limits and producing incorrect time estimates.

Revert to indexing by time mode only (matching v2.3.1 behavior) and simplify
the M201/M203 handlers to write only the two mode slots they actually use.

* Fix machine envelope G-code emitting wrong limits due to broken extruder_id indexing (OrcaSlicer#12414)

print_machine_envelope() used get_extruder_id(extruder_id)*2 to index
machine limit arrays that only hold [Normal, Stealth] (2 entries).
For multi-extruder setups this went out-of-bounds, causing wrong M201/M203
values in the G-code which then override the estimator's correct limits.

Same class of bug as c6d1c11 but on the G-code writer side.

Changes:
- Remove unused extruder_id param from print_machine_envelope()
- Use .values.front() for M201/M203, matching M204/M205 in same function
- Change get_option_value() fallback from .back() to .front() so any
  future out-of-bounds index returns Normal mode instead of Stealth

* update error message when plugin upgrade failed

* Add and update pt-BR translations (OrcaSlicer#12409)

* Add preference for filament area height to reduce scrolling while using 16+ filaments (OrcaSlicer#12317)

Fixes OrcaSlicer#12284

Adds a preference for filaments area height since every user has different amount of MM units and external filaments
so users can set a value that fits their setups this way

we might see 3 or 6 filaments for each unit on future. thats why i set value as int

used 10 as default value. its good for 2 multimaterial units ( 8 filaments ) and 1 external filament

min value is 8.  might be good when no external filaments in use

max value is 99. UI works same as 2.3.1 version

<img width="562" height="122" alt="Screenshot-20260215194149" src="https://github.com/user-attachments/assets/309cec36-8b83-48f3-875f-d5f22a9631e7" />

**BEFORE**
Scrollable area fixed for 10 items. that causes a lot of scrolling whe user has 3 or 4 ams units

<img width="411" height="237" alt="Screenshot-20260215194816" src="https://github.com/user-attachments/assets/fc7823c0-d82a-4d1f-bb5b-56e8dd47abd2" />

**AFTER**
value 10. - 2 multimaterial units ( 8 filaments ) and 1 external filament
<img width="1002" height="250" alt="Screenshot-20260215195243" src="https://github.com/user-attachments/assets/e3238cd1-788e-4ed2-b048-89c63bd323db" />

value 18  - 4 multimaterial units ( 16 filaments ) and 1 external filament
<img width="1001" height="355" alt="Screenshot-20260215195127" src="https://github.com/user-attachments/assets/afe0305e-fcb4-4a51-b8dc-e70a063aa391" />

* Fix: Correct range checking for int and float Config Options + QoL changes in tooltips (OrcaSlicer#11915)

* Fix float number not working properly for option min/max (OrcaSlicer#11211)

* ConfigOptionDef: min/max values type are changed from INT to FLOAT.

(cherry picked from commit f277bc8)

* Fix infinite loop and crash when `fuzzy_skin_point_distance` = 0 (OrcaSlicer#11069)

* Fix Linux build issue

* Fix float comparison due to precision loss

* Fix: Range check added for coInt options; Ranges and defaults added in tooltips

---------

Co-authored-by: Noisyfox <[email protected]>
Co-authored-by: SoftFever <[email protected]>

* Update machine profile for OpenEYE Peacock V2 (OrcaSlicer#12333)

* OpenEYE Peacock V2 machine profile: Add printer_agent key to enable AMS filament synchronization (Klipper/Moonraker)

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

* Optimize retraction settings in printer profiles to reduce stringing and improve print quality

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

---------

Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>

* Fix preheat regression bugs  (OrcaSlicer#12438)

Fix preheat regression bugs
revert 769fc13

* Fix the issue where `resources/profiles/OrcaFilamentLibrary.json` is not updated accordingly.

---------

Signed-off-by: minicx <[email protected]>
Signed-off-by: Sezgin AÇIKGÖZ <[email protected]>
Co-authored-by: Rodrigo Faselli <[email protected]>
Co-authored-by: Kiss Lorand <[email protected]>
Co-authored-by: SoftFever <[email protected]>
Co-authored-by: minicx <[email protected]>
Co-authored-by: Ioannis Giannakas <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Alexandre Folle de Menezes <[email protected]>
Co-authored-by: yw4z <[email protected]>
Co-authored-by: Valerii Bokhan <[email protected]>
Co-authored-by: Noisyfox <[email protected]>
Co-authored-by: Sezgin AÇIKGÖZ <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants