fix: preserve smoothed variable layer height profile with raft - #638
Open
mwz-iot wants to merge 2 commits into
Open
fix: preserve smoothed variable layer height profile with raft#638mwz-iot wants to merge 2 commits into
mwz-iot wants to merge 2 commits into
Conversation
has_support_material() returns has_support() || has_raft(), which false-positively triggers the organic tree + variable layer height incompatibility check when only raft is enabled without supports. Use has_support() instead to only check when support is truly enabled.
lujiaxin001
approved these changes
Jul 29, 2026
zackaree-shen
approved these changes
Jul 29, 2026
bluetianyu
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes two variable layer height issues that occur in raft-only configurations.
Issue 1: Smoothed variable layer height profile resets with raft enabled
Problem
When raft layers are enabled, the following steps cause the variable layer height profile to reset:
The smoothed profile is displayed correctly at first, but approximately 500 ms later it is reset to the default straight profile.
Root Cause
PrintObject::update_layer_height_profile()compared the first height stored in the profile with the calculated first object layer height:layer_height_profile[1] != slicing_parameters.first_object_layer_heightWhen a raft is present, the slicing logic may adjust the calculated first object layer height.
For example:
This difference is valid because the first object layer height is not fixed when a raft is present.
However, the previous validation treated the difference as invalid profile data and rebuilt the profile with
layer_height_profile_from_ranges(). This caused the smoothed profile to be replaced by the default straight profile during the delayed background-process refresh.Fix
The first profile height mismatch is now checked only when the first object layer height is fixed:
When the first object layer height is not fixed because of a raft, the comparison is skipped and the valid variable layer height profile is preserved.
Issue 2: Incorrect Organic support incompatibility error with raft only
Problem
The following configuration incorrectly prevents the Variable Layer Height tool from opening:
The application incorrectly reports:
Root Cause
The Organic support compatibility check in
Print.cppused:has_support_material()returns true when either support or raft is enabled:has_support() || has_raft()As a result, a raft-only configuration was incorrectly treated as if Organic support were enabled.
Fix
The compatibility check now uses:
instead of:
The Organic support restriction is now applied only when support is actually enabled, not when the object only has raft layers.
Changes
Modified files:
src/libslic3r/PrintObject.cppsrc/libslic3r/Print.cpphas_support_material()withhas_support()in the Organic support compatibility check.Compatibility
Screenshots/Recordings/Graphs
Issue 1: Variable layer height profile reset
Before
With raft layers enabled, the smoothed variable layer height profile is briefly displayed and then reset to a straight line after the delayed background-process refresh.
2026-07-29.120626.mp4
After
With raft layers enabled, the smoothed variable layer height profile remains unchanged after the background-process refresh.
2026-07-29.120740.mp4
Issue 2: Incorrect Organic support error
Before
With Organic tree selected, support disabled, and raft enabled, opening the Variable Layer Height tool incorrectly displays an incompatibility error.

After
With Organic tree selected, support disabled, and raft enabled, the Variable Layer Height tool opens normally.
Tests