extrude_to_xyz() unconditionally emitted Z on every extrusion move
via emit_xyz(), even when Z hadn't changed. With ZAA enabled, this
produced ~987K redundant Z coordinates (98.2% of all Z emissions),
causing 10-20% file bloat.
Now compares quantized Z values before and after, and only emits Z
when it actually differs at export precision (0.001mm). Reduces
ZAA gcode Z emissions from 1,038,468 to 50,022 while preserving
all legitimate contouring Z changes.
* 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>
Spiral Z-Hop resolution
Use slicing resolution to determine segment count for emulated spiral Z-hop
What’s changed
The number of linear segments used to approximate a spiral Z-hop is now derived from the PrintConfig resolution value.
The segment count is clamped to a safe range (4–24) to avoid excessive G-code generation or MCU queue overflow.
Why
Previously a fixed 24 segments were always used, regardless of model resolution.
For small-radius spiral lifts this was excessive and could overwhelm some printers.
Adapting segment count to resolution ensures smooth motion where needed, but lighter G-code where possible.
Details
m_resolution is now stored via apply_print_config().
_spiral_travel_to_z() uses this value to compute segment count dynamically.
Only the linear-segment fallback path is affected; G2/G3 arc-fitting remains unchanged.
* 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>
1.Immediate do lift in eager_lift function
jira:NONE
Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I931d22e901e2123bb886c31d8d1a5788fddeed42
(cherry picked from commit 6cea772d4f3b2f7e2a43c35a2271e4bdbba9eadd)
* Enhance GCode handling for Z-axis movements
- Updated `travel_to_z` method to include a `force` parameter, allowing forced Z movements.
- Modified GCode generation logic to ensure Z position is restored after unknown last positions.
- Enforce z restoreation after tool changer
* Improve filament_multitool_ramming logic
* fix indent
1.Should get value by filament id instead of extruder id
2.Fix many other issues caused by incorrect usage
jira:NONE
Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I3278d7de0f8976a97c9e5ccef80bba4a58553f5a
(cherry picked from commit 30c51dd1171fc16ba778308745fab2eb246aedd0)
(cherry picked from commit e9027478f8948352d99d33519994b044ca18a65a)
Jira: none
if the fist print filement as same as the filament be set on start gcode
not insert filment change
Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: I0114f287fff9be276a90772537d1910df18dec61
(cherry picked from commit 276c797faff1407b2c1606d4bfafe21773901001)
* Junction Deviation Machine Limit
jd 3
JD menu 2
JD operativo
limpieza
final
* default JD print menu without warnings
* to fix multiple instances
* Only at first layer
* Calibs upgrade
* Shown on Marlin2
Shown on Marlin2
CodeCleaning
* Update Calibration.md
* set on writer
---------
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
* VFA-Calibs Wiki images
* Calib Code Fixes
Improve Settings
JD Set Precision to 3
Change damp default
Recommend 0
Fixes
* IS JD Wiki
* Updated with 9234
* IS Verbose
Avoid collisions with previous extrusions in the same layer when moving Z down in an XYZ move.
This happens for example when starting a scarf joint after another perimeter was already printed.
Fixes SoftFever#7191
Co-authored-by: SoftFever <softfeverever@gmail.com>
* Wipe retraction adjusted based on available wipe distance and retraction speed
* Wipe Improvements: Removed debug code, removed retract before wipe and made the respect retract speed an option.
* Wipe improvements: Spelling & grammar
* Revert "Wipe improvements: Spelling & grammar"
This reverts commit c8f8612b3f3755945584f69fad43b94d767e07ae.
* Revert "Wipe Improvements: Removed debug code, removed retract before wipe and made the respect retract speed an option."
This reverts commit ba515ffb628d193484c860d8f142fce66be1b985.
* Wipe improvements: Using retraction before wipe parameter to judge when to do excess retraction
* Wipe Improvements: Floating point comparison check
* Wipe Improvements: Refactoring the code
* Wipe Improvements: Updated Wipe Distance tool tip
* Wipe Improvements: Removed redundant code
* Wipe Improvements: Use unscale_
* Add "Manual filament change" option and logic
* make suggested changes
* make suggested changes
* change tag from "CHANGE_TOOL" to "MANUAL_TOOL_CHANGE"
* some tweaks
* More fixes
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
Support controlling chamebr temperature and exhaust fan for air filtration
Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I31627ce4f8acce99e132b0436ab7dcd0bcebf81d
Z hop will only come into effect when it is between retract_lift_above and retract_lift_below.
Signed-off-by: wenjie.guo <wenjie.guo@bambulab.com>
Change-Id: If43aea7024018eb8f532c6af5d8000973f2edee3
Useless for BambuPrinter. But used by third party printer
Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: Ib6a63e78816b25696c25952508f76c3d9221e363
Mark code from OrcaSlicer with same comment tag for follow easily
Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: If4db502a1b0e6d0648c73f2f383b6d1cc8e1aa01