Feat:mix filament - #375
Conversation
…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.
| @@ -1687,14 +1693,17 @@ TriangleSelector::TriangleSplittingData TriangleSelector::serialize() const { | |||
| data.used_states[n] = true; | |||
|
|
|||
| if (n >= 3) { | |||
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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); |
| Wrap(GetSize().x); | ||
| int w = GetSize().x; | ||
| if (w > 0) Wrap(w); | ||
| else wxStaticText::SetLabel(label); |
| // 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; |
|
|
||
| BOOST_LOG_TRIVIAL(info) << "Socket created. Multicast: " << multicast_address << ". Interface: " << interface_address; | ||
| } | ||
| catch (std::exception& e) { |
| if (!m_socket_usable) | ||
| return; | ||
|
|
||
| try { |
| if (dlg.ShowModal() != wxID_OK) { | ||
| MixedColorMatchRecipeResult cancelled; | ||
| cancelled.cancelled = true; | ||
| return cancelled; |
There was a problem hiding this comment.
should think about the dlg is closed and use endmodal to fress the Modal dialog.
|
❌ Documentation validation failed 🔗 Link Validation Errors📄 doc/developer-reference\Built-in-placeholders-variables.md:
📄 doc/developer-reference\How-to-wiki.md:
📄 doc/Home.md:
📄 doc/Tab.cpp:
🖼️ Image Validation Errors📄 doc/developer-reference\How-to-create-profiles.md:
|
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
|
❌ Documentation validation failed 🔗 Link Validation Errors📄 doc/developer-reference\Built-in-placeholders-variables.md:
📄 doc/developer-reference\How-to-wiki.md:
📄 doc/Home.md:
📄 doc/Tab.cpp:
🖼️ Image Validation Errors📄 doc/developer-reference\How-to-create-profiles.md:
|
…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
|
❌ Documentation validation failed 🔗 Link Validation Errors📄 doc/developer-reference\Built-in-placeholders-variables.md:
📄 doc/developer-reference\How-to-wiki.md:
📄 doc/Home.md:
📄 doc/Tab.cpp:
🖼️ Image Validation Errors📄 doc/developer-reference\How-to-create-profiles.md:
|
- 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
|
❌ Documentation validation failed 🔗 Link Validation Errors📄 doc/developer-reference\Built-in-placeholders-variables.md:
📄 doc/developer-reference\How-to-wiki.md:
📄 doc/Home.md:
📄 doc/Tab.cpp:
🖼️ Image Validation Errors📄 doc/developer-reference\How-to-create-profiles.md:
|
|
|
||
| namespace { | ||
|
|
||
| void quarantine_socket(udp::socket& socket, bool& socket_usable, const char* action, const std::exception& e) |
There was a problem hiding this comment.
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
|
❌ Documentation validation failed 🔗 Link Validation Errors📄 doc/developer-reference\Built-in-placeholders-variables.md:
📄 doc/developer-reference\How-to-wiki.md:
📄 doc/Home.md:
📄 doc/Tab.cpp:
🖼️ Image Validation Errors📄 doc/developer-reference\How-to-create-profiles.md:
|
Description
Feature mix filament