Skip to content

Feature filament sync v2#527

Merged
LiuLikeQian merged 82 commits into
mainfrom
feature_filament_sync_v2
Jun 22, 2026
Merged

Feature filament sync v2#527
LiuLikeQian merged 82 commits into
mainfrom
feature_filament_sync_v2

Conversation

@zhouzengping

Copy link
Copy Markdown

Filament synchronization

zhouzengping and others added 30 commits May 29, 2026 14:50
…atching, each design filament independently finds the closest color. Inner loop uses squared Euclidean distance (skips sqrt), only relative comparison of sizes is needed; compute_direct_override performs no color calculation, purely positional 1:1 mapping. Excess parts are designed as unmatched for now.
@
Refactor filament sync: preview rendering, wipe tower color, and code quality

- Preview: Use OpenGL FBO reference approach (render_plate_thumbnail) instead of pixel math blending, so preview matches the main 3D view style
- Wipe tower: Add GLWipeTowerVolume::set_colors() and update force_filament_colors_update() to refresh wipe tower colors after sync
- Slice pipeline: Call update_filament_colors_in_full_config() after sync to propagate colors to p->config for GCode generation
- Code quality: Move FilamentSyncAlgorithm to filamentsync/, rename constants to k_ prefix, simplify compute_color_match API to accept list<FilamentData> directly
@
This reverts commit 48b1c5f.
- Move algorithm files from libslic3r/ to GUI/filamentsync/
- Rename constants to k_snake_case convention
- Simplify compute_color_match to accept FilamentData structs directly
- Restore generateCoverPreview branch blending logic
- Add plate thumbnail refresh before cover preview rendering
… box to prevent the original thumbnail from having a black background.
… error in the setting of m_index of FilamentData. It should be consistent with the serial number of the machine consumables.
…zed consumable quantity is inconsistent with the original consumable quantity.
…t overwrite is performed during the switching process.
… the Label to a class-preceding declaration.
…ng mode logic

- Add SegmentedToggle widget for "Match Mapping" / "Direct Overwrite" mode switching
- Split SyncFilamentColorDialog into 4 independent blocks (mode toggle, filament mapping, preview+hints, action buttons) with dialog background showing through gaps
- Add setVisibleCount() to FilamentColorMapBoxGroup for dynamic card visibility when switching modes
- Simplify compute_direct_override in FilamentSyncAlgorithm to use i % machine_count
- Inject dialog-generated filament_id_remap in overwrite mode sync flow (Plater.cpp)
- Populate filament_type field from device data in SSWCP.cpp
- Add i18n entries for new labels (Design Filament, Machine Filament, Match Mapping, Direct Overwrite, etc.)
- build_design_filament_list: use preset label for m_name and config filament_type for m_type
- build_machine_filament_list: use filament_info for m_name and filament_type for m_type
- Remove filament_type assignments from SSWCP update_filament_info
- Adjust dialog size to 620x665 and fix cover preview callback null check
zhouzengping and others added 28 commits June 15, 2026 15:38
…hed and need to be reverted to the official consumables.
@
refactor: extract drawArrowBitmap helper to eliminate duplicate arrow paint logic
@
…g the consumables, the super 4-color colors used in the looping mode were not deleted.
@
fix: use non-NONE filament count for modulo in overwrite mapping

compute_direct_override now filters NONE slots and cycles through valid
machine filaments only. Remap building in onCoverMatch uses valid count
for modulo. getSyncDataList skips NONE when adding unused machine filaments.
@
…Also, in the direct overlay mode, remove all color blending effects directly.
# Conflicts:
#	src/slic3r/GUI/SSWCP.cpp
@LiuLikeQian LiuLikeQian merged commit 9a8f728 into main Jun 22, 2026
1 check passed
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.

3 participants