Skip to content

fix: apply mixed-filament gradient ratios across model height - #12008

Open
mvanhorn wants to merge 1 commit into
bambulab:masterfrom
mvanhorn:fix/11851-gradient-effect-sublayer
Open

fix: apply mixed-filament gradient ratios across model height#12008
mvanhorn wants to merge 1 commit into
bambulab:masterfrom
mvanhorn:fix/11851-gradient-effect-sublayer

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Summary

In src/libslic3r/GCode/ToolOrdering.cpp, derive the effective sublayer-resolution mode from either the existing mixed-color sublayer print option or the presence of an enabled, valid two-component gradient slot. This makes Gradient Effect honor its height-dependent range or custom curve even when the independent mixed-color sublayer setting remains at its default, and it covers newly created as well as loaded project configurations without coupling slicer correctness to a GUI side effect. Keep non-gradient mixed filaments on the current deficit round-robin path when the print option is off, and retain the existing first-layer adhesion behavior and component-order handling.

Test plan

  • Configure a two-component mixed slot with Gradient Effect enabled, a bottom-to-top ratio curve, and enable_mixed_color_sublayer=false; after slicing/tool ordering, layers above the first contain mixed sublayer groups whose component heights change from the lower layers to the upper layers according to the gradient direction.
  • Configure the same two-component mixed slot with Gradient Effect disabled and enable_mixed_color_sublayer=false; each layer continues to resolve to one physical component through deficit round-robin and does not gain a mixed sublayer group.
  • Verify the first layer retains the existing no-split adhesion behavior while subsequent gradient layers use both physical components, and ensure the resolved sublayer heights remain bounded by and sum to the source layer height.

Why

Mixed filaments with Gradient Effect enabled are sliced using an approximately constant alternating-layer mix instead of following the configured ratio curve from the bottom to the top of the model. The report provides concrete reproduction steps, and three additional users confirm the behavior on current Bambu Studio versions across macOS and Windows. In ToolOrdering::resolve_mixed_filaments, gradient metadata is parsed regardless of the print setting, but gradient ratios are used only inside the enable_mixed_color_sublayer branch; that setting defaults to false, leaving the fixed-layer deficit round-robin path to use the static mix ratios. The issue has no assignee, claim, competing PR, or prior closed PR attempt in the supplied bundle.

Closes #11851

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.

Gradient Effect prints a uniform mixed color instead of a height-based gradient

1 participant