Skip to content

Feat:mix filament - #375

Merged
LiuLikeQian merged 238 commits into
mainfrom
feature_mix_filament_sm
May 26, 2026
Merged

Feat:mix filament#375
LiuLikeQian merged 238 commits into
mainfrom
feature_mix_filament_sm

Conversation

@LuckZAE

@LuckZAE LuckZAE commented May 25, 2026

Copy link
Copy Markdown

Description

Feature mix filament

ratdoux and others added 30 commits February 9, 2026 22:35
…Manager classes for layer-based color mixing. Update CLI to handle downward_check option. Enhance GUI to display mixed filaments and integrate with existing filament management.
…in README, add mixed filament management enhancements including filament removal and layer height adjustments for dithering in the MixedFilamentManager. Introduce new configuration options for dithering in the PrintConfig and GUI, and ensure proper handling of mixed filament states during filament deletion.
…blending for improved color mixing accuracy. Add RGB to RYB and RYB to RGB conversion functions, and update blend_color method to utilize the new blending approach. Improve error handling in hex color parsing.
… mixed filaments, including height-weighted cadence and custom filament definitions. Enhance MixedFilamentManager to support custom rows and apply gradient settings during filament generation. Update PrintConfig and GUI to accommodate new configuration options for mixed filament management.
…and clipping for extrusion paths. Introduce new configuration options for local Z dithering in PrintConfig and GUI, enhancing mixed filament management. Update MixedFilamentManager to support height-weighted cadence and integrate local Z settings into the printing process.
…ption instances by including type comparison. Update related methods in ConfigBase, DynamicConfig, and Preset classes to ensure accurate configuration diffs and equality assessments. Improve logging in MixedFilamentManager for better tracking of custom entry loading and processing.
…or mixed filaments, allowing users to define custom layer patterns using '1' and '2' for component selection. Update parsing logic to accommodate new pattern definitions and ensure backward compatibility. Improve GUI to facilitate pattern entry and display, enhancing user experience in mixed filament configurations.
…component IDs and weights in mixed filaments, allowing for more complex color mixing configurations. Update parsing logic to accommodate new gradient definitions and ensure backward compatibility. Implement pointillism distribution mode for same-layer mixing, enhancing user control over filament blending. Improve GUI elements to facilitate gradient weight adjustments and multi-color previews, enriching the user experience in mixed filament management.
…ures including Local Z reliability improvements, manual pattern mixed filaments, selective expansion/contraction controls, and a refreshed UI for mixed filaments. Enhance configuration options with surface indentation for mixed filament behavior tuning. Update PrintConfig and GUI components to support new features and improve user experience.
… with FilamentMixer for improved accuracy. Update blend_color method to utilize new lerp functionality and enhance display color computation. Retain legacy RYB conversion functions for reference.
…ream

Replace RYB mixing with FilamentMixer integration
…curacy improvements, and installation instructions. Update README to include support for development. Enhance AboutDialog with updated application name and links.
…unplanned tool changes in the WipeTowerIntegration class. Update tool_change method to accommodate an additional parameter for local_z_unplanned, allowing for more flexible tool change management during Local-Z phase-b operations. Adjust related logic in process_layer to ensure proper synchronization with wipe tower planning.
…the MixedFilament structure and update related parsing, serialization, and management functions to handle the visibility of mixed filaments in the UI. Adjust logic in the MixedFilamentManager to ensure proper handling of enabled states based on the deleted flag.
…e blend_from_sequence method to handle empty color and sequence inputs, optimize counting of color occurrences, and enhance the blending process. Introduce new helper functions for building entry preview sequences and computing display colors for mixed filaments, ensuring accurate color representation in the UI.
…ng with wxString() for improved clarity in preview data handling. Update instance_shift type to Vec3d for better type consistency in Selection class during object pasting.
…ling

- Introduced a new `RELEASE_NOTES_v0.92.md` file detailing highlights such as gradual gradient behavior, mixed filament indexing fixes, and editable automatic mixed filaments.
- Refactored `compute_gradient_ratios` to remove the cycle layers parameter, implementing a new gradual integer cadence for gradient transitions.
- Updated `MixedFilament` structure to include an `origin_auto` flag for better management of auto-generated entries.
- Adjusted related parsing, serialization, and UI handling to reflect these changes, ensuring improved user experience and color fidelity in mixed filament rendering.
- Updated `custom_tool_changes` function to use filament IDs instead of extruder IDs, ensuring better compatibility with mixed filament configurations.
- Enhanced `MixedFilament` structure to include a `stable_id` for persistent identity across mixed filament entries, improving remapping during updates.
- Introduced new methods for stable ID allocation and normalization in `MixedFilamentManager`.
- Updated serialization and loading functions to maintain stable IDs, ensuring consistent behavior when mixed filament entries are modified.
- Added tests to verify the correct handling of tool changes and stable ID remapping in mixed filament scenarios.
- Introduced functions to calculate the physical filament count and maximum supported filament ID from project configuration, enhancing mixed filament management.
- Updated GUI components to reflect total filament counts, including mixed filaments, ensuring accurate display and interaction.
- Refactored filament initialization logic to streamline color assignment and naming for both physical and mixed filaments.
- Enhanced the sidebar update mechanism to refresh model canvas colors when mixed filaments are modified, improving visual feedback in the UI.
- Introduced a mapping mechanism for appended filament IDs to ensure correct assignment during color updates.
- Enhanced the update_filament_ids function to streamline filament ID resolution and improve handling of new filament additions.
- Updated the deal_approximate_match_btn and deal_default_strategy methods to accommodate changes in filament management logic, ensuring better integration with the UI.
- Improved overall clarity and maintainability of the filament handling code.
Comment thread src/libslic3r/Print.cpp
Comment thread src/libslic3r/PrintApply.cpp
@@ -1687,14 +1693,17 @@ TriangleSelector::TriangleSplittingData TriangleSelector::serialize() const {
data.used_states[n] = true;

if (n >= 3) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do not use magic numbers here; it's unclear what these numbers represent or why the loop repeats so many times.

++extension_count;
next_code = next_nibble();
}
return next_code + 15 * extension_count + 3;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do not use magic numbers here; it's unclear what these numbers represent or why the loop repeats so many times.

if ((GetWindowStyle() & LB_AUTO_WRAP)) {
Wrap(GetSize().x);
int w = GetSize().x;
if (w > 0) Wrap(w);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

line break;

Wrap(GetSize().x);
int w = GetSize().x;
if (w > 0) Wrap(w);
else wxStaticText::SetLabel(label);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

line break;

Comment thread src/slic3r/GUI/AboutDialog.cpp
// two sub-layers needed to realize the per-layer gradient ratio.
if (m_result.local_z_max_sublayers < 2)
m_result.local_z_max_sublayers = 2;
break;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

less default;


BOOST_LOG_TRIVIAL(info) << "Socket created. Multicast: " << multicast_address << ". Interface: " << interface_address;
}
catch (std::exception& e) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

don't use try catch.

Comment thread src/slic3r/Utils/Bonjour.cpp
if (!m_socket_usable)
return;

try {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

don't use chinese.

Comment thread src/slic3r/GUI/Plater.cpp
if (dlg.ShowModal() != wxID_OK) {
MixedColorMatchRecipeResult cancelled;
cancelled.cancelled = true;
return cancelled;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should think about the dlg is closed and use endmodal to fress the Modal dialog.

@github-actions

Copy link
Copy Markdown

Documentation validation failed

🔗 Link Validation Errors

📄 doc/developer-reference\Built-in-placeholders-variables.md:

  • Line 93: home#process-settings - Fragment does not exist
  • Line 93: home#material-settings - Fragment does not exist

📄 doc/developer-reference\How-to-wiki.md:

  • Line 44: home#material-settings - Fragment does not exist
  • Line 45: home#process-settings - Fragment does not exist
  • Line 46: home#prepare - Fragment does not exist
  • Line 47: home#calibrations - Fragment does not exist
  • Line 50: home#process-settings - Fragment does not exist
  • Line 50: home#support-settings - Fragment does not exist
  • Line 50: home#others-settings - Fragment does not exist

📄 doc/Home.md:

  • Line 14: Precise-wall.md - File does not exist
  • Line 17: extrusion-rate-smoothing.md - File does not exist
  • Line 33: adaptive-pressure-advance.md - File does not exist

📄 doc/Tab.cpp:

  • Line 2348: fill-patterns - File does not exist
  • Line 2351: fill-patterns - File does not exist
  • Line 2538: multimaterial_settings_prime_tower#brim-chamfer - Fragment does not exist
  • Line 2539: multimaterial_settings_prime_tower#brim-chamfer-max-width - Fragment does not exist
  • Line 2563: multimaterial_settings_ooze_prevention#delta-temperature - Fragment does not exist

🖼️ Image Validation Errors

📄 doc/developer-reference\How-to-create-profiles.md:

  • Line 142: [Markdown] Alt text "Help menu" ≠ filename "go-to-configuration-folder"
  • Line 144: [Markdown] Alt text "Delete system folder" ≠ filename "profile-delete-system-folder"

LuckZAE and others added 10 commits May 26, 2026 18:42
refactor: improve readability of 3MF config parsing and related code
chore: remove Chinese text from source comments and UI strings
… filaments

The add button was only checking against the mode maximum (3 for ratio)
but not against the number of physical filaments. With only 2 physical
filaments and 2 rows already, the button stayed enabled but should be
disabled since there is no third filament to add. Split Show/Enable so
the button remains visible but greyed out when unavailable.
Reword 'Invalid token in pattern' to 'Unrecognized pattern format' for clarity. Add Chinese translation for 'Swap filaments'.
fix: Add missing Chinese translation for "Swap filaments"
…time issues

- Convert throw RuntimeError/InvalidArgument to log + safe return in
  WipeTower2::tool_change, LayerRegion::flow, and GUI::change_opt_value
  to avoid crashes on unexpected edge cases
- Fix use-after-free risk in MixedFilamentDialog CallAfter callbacks
  by using wxWeakRef to guard against destroyed windows
- Bind wxEVT_CLOSE_WINDOW to EndModal(wxID_CANCEL) in
  MixedFilamentDialog and Plater anonymous dialogs so the title-bar
  close button works correctly
fix: replace fatal exceptions with graceful fallbacks and fix UI lifetime issues
@github-actions

Copy link
Copy Markdown

Documentation validation failed

🔗 Link Validation Errors

📄 doc/developer-reference\Built-in-placeholders-variables.md:

  • Line 93: home#process-settings - Fragment does not exist
  • Line 93: home#material-settings - Fragment does not exist

📄 doc/developer-reference\How-to-wiki.md:

  • Line 44: home#material-settings - Fragment does not exist
  • Line 45: home#process-settings - Fragment does not exist
  • Line 46: home#prepare - Fragment does not exist
  • Line 47: home#calibrations - Fragment does not exist
  • Line 50: home#process-settings - Fragment does not exist
  • Line 50: home#support-settings - Fragment does not exist
  • Line 50: home#others-settings - Fragment does not exist

📄 doc/Home.md:

  • Line 14: Precise-wall.md - File does not exist
  • Line 17: extrusion-rate-smoothing.md - File does not exist
  • Line 33: adaptive-pressure-advance.md - File does not exist

📄 doc/Tab.cpp:

  • Line 2348: fill-patterns - File does not exist
  • Line 2351: fill-patterns - File does not exist
  • Line 2538: multimaterial_settings_prime_tower#brim-chamfer - Fragment does not exist
  • Line 2539: multimaterial_settings_prime_tower#brim-chamfer-max-width - Fragment does not exist
  • Line 2563: multimaterial_settings_ooze_prevention#delta-temperature - Fragment does not exist

🖼️ Image Validation Errors

📄 doc/developer-reference\How-to-create-profiles.md:

  • Line 142: [Markdown] Alt text "Help menu" ≠ filename "go-to-configuration-folder"
  • Line 144: [Markdown] Alt text "Delete system folder" ≠ filename "profile-delete-system-folder"

PILIPALA030 and others added 3 commits May 26, 2026 21:01
…font

- Min Mix Ratio slider thumb now fills with hard-coded #FFFFFF in dark
  mode instead of going through darkModeColorFor which mapped it to
  #2D2D31, making it invisible against the dark track background
- Gradient mode "Mix Effect" card title font changed from Body_12 to
  Body_14 for consistency with all other card titles in the dialog
…able

fix: disable add-filament button in ratio mode when no spare physical
@github-actions

Copy link
Copy Markdown

Documentation validation failed

🔗 Link Validation Errors

📄 doc/developer-reference\Built-in-placeholders-variables.md:

  • Line 93: home#process-settings - Fragment does not exist
  • Line 93: home#material-settings - Fragment does not exist

📄 doc/developer-reference\How-to-wiki.md:

  • Line 44: home#material-settings - Fragment does not exist
  • Line 45: home#process-settings - Fragment does not exist
  • Line 46: home#prepare - Fragment does not exist
  • Line 47: home#calibrations - Fragment does not exist
  • Line 50: home#process-settings - Fragment does not exist
  • Line 50: home#support-settings - Fragment does not exist
  • Line 50: home#others-settings - Fragment does not exist

📄 doc/Home.md:

  • Line 14: Precise-wall.md - File does not exist
  • Line 17: extrusion-rate-smoothing.md - File does not exist
  • Line 33: adaptive-pressure-advance.md - File does not exist

📄 doc/Tab.cpp:

  • Line 2348: fill-patterns - File does not exist
  • Line 2351: fill-patterns - File does not exist
  • Line 2538: multimaterial_settings_prime_tower#brim-chamfer - Fragment does not exist
  • Line 2539: multimaterial_settings_prime_tower#brim-chamfer-max-width - Fragment does not exist
  • Line 2563: multimaterial_settings_ooze_prevention#delta-temperature - Fragment does not exist

🖼️ Image Validation Errors

📄 doc/developer-reference\How-to-create-profiles.md:

  • Line 142: [Markdown] Alt text "Help menu" ≠ filename "go-to-configuration-folder"
  • Line 144: [Markdown] Alt text "Delete system folder" ≠ filename "profile-delete-system-folder"

- Change "Snapmaker Orca needs an upgrade" to "The Snapmaker Orca needs an upgrade"
- Shorten "Append all" to "Append"
- Clean up orphaned translations in ja.po and zh_TW.po
chore: refine UI string wording and sync i18n
@github-actions

Copy link
Copy Markdown

Documentation validation failed

🔗 Link Validation Errors

📄 doc/developer-reference\Built-in-placeholders-variables.md:

  • Line 93: home#process-settings - Fragment does not exist
  • Line 93: home#material-settings - Fragment does not exist

📄 doc/developer-reference\How-to-wiki.md:

  • Line 44: home#material-settings - Fragment does not exist
  • Line 45: home#process-settings - Fragment does not exist
  • Line 46: home#prepare - Fragment does not exist
  • Line 47: home#calibrations - Fragment does not exist
  • Line 50: home#process-settings - Fragment does not exist
  • Line 50: home#support-settings - Fragment does not exist
  • Line 50: home#others-settings - Fragment does not exist

📄 doc/Home.md:

  • Line 14: Precise-wall.md - File does not exist
  • Line 17: extrusion-rate-smoothing.md - File does not exist
  • Line 33: adaptive-pressure-advance.md - File does not exist

📄 doc/Tab.cpp:

  • Line 2348: fill-patterns - File does not exist
  • Line 2351: fill-patterns - File does not exist
  • Line 2538: multimaterial_settings_prime_tower#brim-chamfer - Fragment does not exist
  • Line 2539: multimaterial_settings_prime_tower#brim-chamfer-max-width - Fragment does not exist
  • Line 2563: multimaterial_settings_ooze_prevention#delta-temperature - Fragment does not exist

🖼️ Image Validation Errors

📄 doc/developer-reference\How-to-create-profiles.md:

  • Line 142: [Markdown] Alt text "Help menu" ≠ filename "go-to-configuration-folder"
  • Line 144: [Markdown] Alt text "Delete system folder" ≠ filename "profile-delete-system-folder"

Comment thread src/slic3r/Utils/Bonjour.cpp Outdated

namespace {

void quarantine_socket(udp::socket& socket, bool& socket_usable, const char* action, const std::exception& e)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do nothing to remote" try catch"

(Revert to SHA-1: e89263e)

Replace m_socket_usable flag and quarantine/retain helpers with simple
error logging. Sockets are no longer closed and discarded on exception;
they always remain in the socket vector. Simplify destructor with
try-catch instead of error_code handling.
refactor: remove socket quarantine pattern from UdpSocket
@LiuLikeQian
LiuLikeQian merged commit ac3dafe into main May 26, 2026
1 of 3 checks passed
@github-actions

Copy link
Copy Markdown

Documentation validation failed

🔗 Link Validation Errors

📄 doc/developer-reference\Built-in-placeholders-variables.md:

  • Line 93: home#process-settings - Fragment does not exist
  • Line 93: home#material-settings - Fragment does not exist

📄 doc/developer-reference\How-to-wiki.md:

  • Line 44: home#material-settings - Fragment does not exist
  • Line 45: home#process-settings - Fragment does not exist
  • Line 46: home#prepare - Fragment does not exist
  • Line 47: home#calibrations - Fragment does not exist
  • Line 50: home#process-settings - Fragment does not exist
  • Line 50: home#support-settings - Fragment does not exist
  • Line 50: home#others-settings - Fragment does not exist

📄 doc/Home.md:

  • Line 14: Precise-wall.md - File does not exist
  • Line 17: extrusion-rate-smoothing.md - File does not exist
  • Line 33: adaptive-pressure-advance.md - File does not exist

📄 doc/Tab.cpp:

  • Line 2348: fill-patterns - File does not exist
  • Line 2351: fill-patterns - File does not exist
  • Line 2538: multimaterial_settings_prime_tower#brim-chamfer - Fragment does not exist
  • Line 2539: multimaterial_settings_prime_tower#brim-chamfer-max-width - Fragment does not exist
  • Line 2563: multimaterial_settings_ooze_prevention#delta-temperature - Fragment does not exist

🖼️ Image Validation Errors

📄 doc/developer-reference\How-to-create-profiles.md:

  • Line 142: [Markdown] Alt text "Help menu" ≠ filename "go-to-configuration-folder"
  • Line 144: [Markdown] Alt text "Delete system folder" ≠ filename "profile-delete-system-folder"

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.

10 participants