Skip to content

Add persistent filament-source and U1 toolhead routing model #2

Description

@physicsG

Summary

Introduce a first-class routing model that maps each logical project filament to a physical ACE source and one of the Snapmaker U1's four physical toolheads.

The U1 must remain a four-toolhead machine. ACE slots must not be represented as additional physical extruders.

Scope

  • Add structured SourceId support.
  • Add FilamentRoute and FilamentRoutingPlan domain types.
  • Store project filament, source, physical toolhead, loaded/swap state, user pins, and inventory revision.
  • Persist routing plans in 3MF projects.
  • Extend existing mapping UI and serialization rather than introducing an unrelated workflow.
  • Add compatibility validation for material, nozzle, temperature, remaining quantity, source state, and route reachability.
  • Support user pins for filament-to-source, filament-to-head, and source-to-head relationships.
  • Define stale-plan behavior after an inventory refresh.

Proposed code areas

src/libslic3r/FilamentRoutingPlan.hpp
src/libslic3r/FilamentRoutingPlan.cpp
src/libslic3r/ProjectTask.hpp
src/slic3r/GUI/AmsMappingPopup.hpp
src/slic3r/GUI/AmsMappingPopup.cpp
src/slic3r/GUI/SelectMachine.cpp
src/slic3r/GUI/filamentsync/*

Acceptance criteria

  • Every logical project filament can be mapped to a structured source ID and physical head 0..3.
  • No route can produce a physical head outside 0..3.
  • Invalid material, nozzle, temperature, state, quantity, and reachability combinations are rejected with explicit reasons.
  • User pins are preserved and conflicts are reported rather than ignored.
  • Routing plans round-trip through 3MF without losing source IDs or pins.
  • Inventory revision is stored with the routing plan.
  • A changed or missing source marks the route stale.
  • Same-head equivalent substitutions can be identified separately from changes that require reslicing.
  • Unit tests cover serialization, validation branches, pins, and stale revisions.

Dependencies

Design references

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions