Skip to content

Show unmatched machine filaments as Generic by material type - #672

Open
doutorinfamous wants to merge 1 commit into
Snapmaker:mainfrom
doutorinfamous:generic-profile-for-nomatches
Open

Show unmatched machine filaments as Generic by material type#672
doutorinfamous wants to merge 1 commit into
Snapmaker:mainfrom
doutorinfamous:generic-profile-for-nomatches

Conversation

@doutorinfamous

@doutorinfamous doutorinfamous commented Aug 6, 2026

Copy link
Copy Markdown

Description

When a filament loaded on the printer has no exact matching local profile (for example a third-party brand like Voolt3D PLA), it was previously omitted from the Machine Filament list entirely. That made it hard to pick the correct slot and, more importantly, to keep the printer-reported color.

This PR adds a fallback resolution path for Machine Filament entries:

  1. Try an exact compatible match for the machine filament name (including @U1 / nozzle variants), same as before.
  2. If that fails, fall back to a compatible Generic <filament_type> preset (e.g. PLA → Generic PLA).
  3. Keep using the color / multi-color data reported by the printer for the icon.
  4. If neither an exact nor a generic compatible preset exists, still omit the entry (no incompatible presets shown).

The matching logic is shared through a small helper used by both PlaterPresetComboBox and TabPresetComboBox, so sidebar and Filament tab stay consistent. Exact material-type checks avoid false matches such as PLA vs PLA-CF.

Motivation

Color accuracy matters a lot when mapping design filaments to machine slots. Hiding unmatched brands made that workflow worse for any filament without a dedicated Snapmaker profile.

Screenshots/Recordings/Graphs

Before: third-party filaments without a perfect profile match did not appear under Machine Filament.
image
image

After: they appear as the matching Generic material profile (e.g. Generic PLA) while preserving the printer color swatch.
image
image
image

Tests

  • Built Release slicer successfully on Windows (VS 2022)
  • Connect a printer with a third-party PLA (no dedicated profile) and confirm it appears under Machine Filament as Generic PLA with the correct color
  • Confirm filaments that already have an exact compatible profile still resolve to that profile (no unintended generic fallback)
  • Confirm other material types fall back to their own generic preset (e.g. PETG → Generic PETG)
  • Confirm nozzle-diameter filtering still hides slots for a different nozzle size
  • Confirm that if no Generic preset is compatible, the entry remains hidden (no incompatible preset shown)

- Introduced a new function `find_compatible_machine_filament_preset` to resolve filament names to local presets, enhancing the user experience by ensuring unmatched brands still appear under the correct machine filament category.
- Updated `PlaterPresetComboBox::update` and `TabPresetComboBox::update` methods to utilize the new compatibility function, streamlining the process of matching filament names with their respective presets.
- This change improves the handling of filament visibility based on machine nozzle information, ensuring a more intuitive interface for users.
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.

1 participant