Skip to content

fix: use raw filament_type in sw_GetFileFilamentMapping to prevent PLA-S remapping#420

Open
kbaker827 wants to merge 1 commit into
Snapmaker:mainfrom
kbaker827:fix/sswcp-generic-support-filament-type
Open

fix: use raw filament_type in sw_GetFileFilamentMapping to prevent PLA-S remapping#420
kbaker827 wants to merge 1 commit into
Snapmaker:mainfrom
kbaker827:fix/sswcp-generic-support-filament-type

Conversation

@kbaker827
Copy link
Copy Markdown

Summary

sw_GetFileFilamentMapping() was calling full_config.get_filament_type() to populate the filament type list sent to the web UI. That function remaps "Generic Support For PLA" to "PLA-S" for display purposes — but the web UI's filament matcher expects the raw stored value, causing filament matching to fail silently for support filaments.

Closes / supersedes #413.

Changes

  • src/slic3r/GUI/SSWCP.cpp: cache filament_type option pointer; use filament_type_opt->get_at(i) instead of get_filament_type() to read the raw stored type without display remapping

Test plan

  • Slice a model with Generic Support For PLA as filament 2
  • Open Print Preprocessing — verify the filament type shows "Support PLA" (or equivalent raw value) rather than "PLA-S"
  • Verify filament matching succeeds in the web UI

…g to prevent PLA-S remapping

get_filament_type() remaps 'Generic Support For PLA' to 'PLA-S' for display
purposes. Using it in sw_GetFileFilamentMapping caused the web UI filament
matcher to fail for support filaments because the raw type value was expected.

Use filament_type_opt->get_at() directly to read the stored filament type
without the display remapping.
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