Fix layer/time display in Preview legend for pause/custom G-code
The Preview legend showed incorrect layer numbers and elapsed time for pause/custom G-code entries. The issue was caused by:
• get_layer_id_at() performing a strict upper_bound search on float Z values, while custom G-code stores Z positions as doubles. Minor precision differences often pushed the lookup to return layer 0 or the last layer.
• The legend displayed the raw zero-based layer index.
Fixes included:
• Fetch layer Z values as doubles and use an epsilon-based closest-layer search.
• Display layers as 1-based values for user-facing UI.
• Accumulate time up to the beginning of the identified layer.
This aligns the legend with the vertical slider marker and provides consistent pause/custom G-code reporting.
# Description
### `src/libslic3r/PrintApply.cpp` changes (line 318)
Change `const auto` to `const auto&` for loops (simple optimization) .
### `src/slic3r/Utils/CalibUtils.cpp` changes (lines 762, 766, 779, 783/784, 814, 816, 831, 835, 837, 1001)
Define config_pattern
`const auto& config_pattern = SuggestedConfigCalibPAPattern();` (line 762 and 814)
Replace calls of `SuggestedConfigCalibPAPattern()` with `config_pattern` (lines 766, 775, 779, 783, 784, 816, 831, 835, 837)
Change `const auto` to `const auto&` for loops (simple optimization) (lines 816, 835, 837, 1001)
*Also gets rid of the five compiler warnings out of the few hundred/thousand (when building the entire project) that warn about copying loop variables*
i.e.
```/home/neo/git/OrcaSlicer-EDIT-TEMP/src/slic3r/Utils/CalibUtils.cpp:828: note: use reference type to prevent copying
/home/neo/git/OrcaSlicer-EDIT-TEMP/src/slic3r/Utils/CalibUtils.cpp:832: warning: loop variable ‘opt’ creates a copy from type ‘const std::pair<std::__cxx11::basic_string<char>, int>’ [-Wrange-loop-construct]
832 | for (const auto opt : SuggestedConfigCalibPAPattern().int_pairs) { print_config.set_key_value(opt.first, new ConfigOptionInt(opt.second)); }
```
## Tests
Should have no functional difference. Contains optimizations, calibrations appear to still function well.
### What was the issue?
The check that validates whether a filament is compatible with the selected build plate type was only executed for Bambu Lab printers.
Other printers skipped this entirely, even though they can also use multiple plate types with different temperature requirements.
This caused cases where:
- incompatible filament/plate combinations went unnoticed,
- users received no warning even when the bed type clearly couldn’t support the selected filament.
### What’s changed?
- The validation block extends beyond BambuLab printers.
- Now all printers get the same compatibility check:
- if a filament requires a bed temperature not supported by the chosen plate,
- Orca shows the same clear error message as it does for BBL printers.
- Show the selected filament preset name (alias if present) in bed/filament mismatch warnings instead of substituting the parent preset.
### Why this helps
- Consistent behavior across all printer brands.
- Prevents invalid filament/plate setups that could cause print failures.
- Makes plate presets more robust and predictable for custom and community printers.
### Notes
- No behavior changes for BBL printers — they keep the existing checks.
- Other printers now benefit from them too.
# Description
This PR introduces a new material type called **CoPE** to the system.
**Changes:**
* **New Material:** Implemented `CoPE` as a selectable material type.
* **Configuration:** Added necessary material properties and parameters specific to CoPE.
**Breaking Changes:**
* None.
# Screenshots/Recordings/Graphs
<img width="1793" height="618" alt="image" src="https://github.com/user-attachments/assets/8577be4d-9f5f-4bda-b0de-c0842857625d" />
<img width="978" height="937" alt="image" src="https://github.com/user-attachments/assets/ec2ba1a3-41d5-4792-8fea-41c282136ff2" />
## Tests
I have verified the changes with the following tests:
* **UI Validation:** Verified that `CoPE` correctly appears in the software's material selection list.
* **Preset Management:**
* Successfully **exported** a preset containing the CoPE material.
* Successfully **imported** the CoPE preset back into the software.
* Fix Gtk-Critical assertion in PresetComboBoxes
Resolve the `gtk_cell_layout_get_cells: assertion GTK_IS_CELL_LAYOUT
failed` error by switching from `gtk_cell_layout_get_cells()` to
`gtk_container_get_children()` with direct PangoLayout ellipsization
on GtkEntry widgets.
Picked from PrusaSlicer:
e855ab5d
* Add defensive guards for GTK widget sizing
Fix Gtk-CRITICAL assertions in TextInput and DropDown widgets that
occur when the widget attempt relative sizing against window size
before GTK completes the window layout.
Changes include:
- TextInput.cpp: Clamp textSize.x >= -1 to prevent
`gtk_widget_set_size_request` failures.
- Picked from Prusa Slicer:
e855ab5d
- DropDown.cpp: Guard against zero/negative dimensions during early
initialization:
- Prevent szContent.x = 0 when parent size is unavailable.
- Unique to OrcaSlicer
- Triggers during initializing DesignerPanel --> BasicInfo -->
License DropDown before a parent size is available.
- Latent bug exists in Bambu Studio, but Bambu does not have
License field enabled on this panel.
- Created global guard for future resilience.
- Clamp szContent.y >= 1 for dropdowns before content initialized.
- Bug exists in BambuStudio
- Prusa did not implement the "ENH: ComboBox Second DropDown"
* Enhance backward compatibility for filament extruder variants in 3MF project files
Fix crashes when loading old 3MF project
* QoL: add handy models directory to ignore list
This PR fixes an issue where certain characters (for example the degree symbol ° used in °C) became corrupted after opening and saving the Custom G-code editor multiple times.
#### What was the problem?
When users added symbols like ° inside Start/End G-code, the editor would show them correctly the first time, but after reopening the dialog a few times the text would slowly change into strange characters.
#### How to reproduce
- Open any Custom G-code field
- Add a line containing °C
- Save the dialog
- Reopen it several times
- The text begins to change into unreadable characters
#### What this PR changes
The Custom G-code editor now properly loads and saves text that contains symbols such as °, so these characters stay exactly as the user typed them. This keeps Custom G-code stable across editing sessions and prevents slow corruption of Unicode characters.
#### Result
- °C and similar symbols remain correct
- No more “weird characters” appearing after multiple reopen/save cycles
- Custom G-code is preserved accurately
Fixes#11502
# Description
This PR addresses the issue that WipeTower's start z position didn't consider the z_offset.
fixes#11611
# Screenshots/Recordings/Graphs
<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->
## Tests
<!--
> Please describe the tests that you have conducted to verify the changes made in this PR.
-->
# Description
Fix application freeze when Prime Tower brim is set to Auto
This PR fixes an issue where enabling Auto brim width for the Prime Tower caused the application to freeze and consume unbounded amounts of memory.
Root cause
0c5f6c9865/src/libslic3r/GCode/WipeTower2.cpp (L2036-L2039)
When Auto brim is selected, the brim width was not being computed and the raw configuration value (-1) was used directly.
This resulted in an effectively infinite loop during Prime Tower brim generation, leading to runaway memory allocation instead of a controlled failure or a crash.
Solution
The Auto brim width is now properly computed based on the Prime Tower height, matching the intended behavior and existing logic used in other slicer implementations.
* fixes: wxTimerEvent not supposed to be created by user code [-Wdeprecated-declarations]
* use wxTimerEvent instead of wxCommandEvent.
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
* ConfigOptionDef: min/max values type are changed from INT to FLOAT.
(cherry picked from commit f277bc80c22e0c9a067481a4301922e2c96aed47)
* Fix infinite loop and crash when `fuzzy_skin_point_distance` = 0 (SoftFever/OrcaSlicer#11069)
* Fix Linux build issue
* Fix float comparison due to precision loss
* Emit Disable Power Loss Recovery
Now only works if it's enabled but the goal it's to force disable it.
With this change it will always emit the command for BBL or Marlin 2.
Co-Authored-By: Michael Rook <54159303+michaelr0@users.noreply.github.com>
* Refactor power loss recovery G-code comments
* Return empty power loss recovery when no compatible printer
* Update power loss recovery comments
Update label and tooltip for power loss recovery
* Add enum for power loss recovery mode
Refactored power loss recovery configuration to use a new PowerLossRecoveryMode enum instead of a boolean. Updated GCodeWriter and related logic to handle the new enum, allowing for 'printer_configuration', 'enable', and 'disable' options. Updated config handling, legacy value conversion, and default values accordingly.
* Update PrintConfig.cpp
---------
Co-authored-by: Michael Rook <54159303+michaelr0@users.noreply.github.com>
Co-authored-by: SoftFever <softfeverever@gmail.com>
* Replace spline with PchipInterpolatorHelper in flow compensator
Swapped out the tk::spline implementation for PchipInterpolatorHelper in SmallAreaInfillFlowCompensator. Updated member types and method calls to use the new interpolator for improved flow compensation modeling.
* Enforce strictly increasing flow compensation factors
Added a check to ensure that flow compensation factors in SmallAreaInfillFlowCompensator strictly increase with extrusion length, throwing an exception if this condition is not met. This improves input validation and prevents invalid compensation models.
* Add context to Small Area Flow Compensation errors
Prefixed error messages in SmallAreaInfillFlowCompensator with 'Small Area Flow Compensation' for improved clarity and debugging. Also rethrows exceptions after logging to ensure proper error propagation.
* Remove spline library from dependencies
Eliminated the spline header-only library from the project by deleting its CMake configuration and header file, and updating documentation and build scripts to remove references to spline. This streamlines the dependencies and build process.
* 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>