Skip to content

fix(mixed): normalize incomplete mixed metadata before adding filaments (Orca #15728 adapt) - #49

Draft
aceRage wants to merge 1 commit into
mainfrom
cursor/mixed-incomplete-metadata-919e
Draft

aceRage wants to merge 1 commit into
mainfrom
cursor/mixed-incomplete-metadata-919e

Conversation

@aceRage

@aceRage aceRage commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Description

Adapt OrcaSlicer#15728 (fixes Orca OrcaSlicer#15717) onto Edge’s MixedFilamentManager path. Not a blind port — Edge does not use Orca filament_is_mixed parallel arrays.

Projects with stale, short, or missing mixed_filament_definitions could break “add filament” by resurrecting orphan mixed rows once a new physical slot made those IDs valid. Slot count is now taken from filament_colour / physical presets, not mixed defs.

Affected files:

  • src/libslic3r/MixedFilament.hpp / .cppclamp_serialized_entries_to_physical_count
  • src/libslic3r/PresetBundle.hpp / .cppnum_physical_filaments, load normalize, grow clamp
  • src/slic3r/GUI/Plater.cpp — add-filament physical count
  • tests/libslic3r/test_mixed_filament.cpp — incomplete metadata 0 / 1 / oversized cases

No filament_is_mixed discriminator is introduced. No API, profile, or dependency changes.

Screenshots/Recordings/Graphs

This is load/grow metadata repair, not a UI layout change. GUI add-filament with a truncated 3MF still needs a desktop build; this environment does not run the wxWidgets app.

Tests

Open in Web Open in Cursor 

…ts (Orca OrcaSlicer#15728 adapt)

Count physical slots from filament_colour, clamp mixed_filament_definitions
to that count on load and before grow, and keep valid custom mixed rows
while discarding orphan tails. Compatible with the already-merged Snapmaker#866
physical-to-mixed remap path; does not introduce filament_is_mixed.

Co-authored-by: aceRage <aceRage@users.noreply.github.com>
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.

2 participants