Files
bambuddy/backend
MartinNYHC 112e58e5b9 Match slicer presets on what they declare, not what they are named (issue #2982)
The internal slicer picked PETG for a PLA plate and an A1 process for a
    P1S. Both come from the sidecar's bundled-profile listing, fixed in the
    sidecar repo; this is the consuming half plus the hardening that keeps an
    older sidecar degrading rather than breaking.

    Standard-tier presets now carry the compatible_printers the sidecar
    reports. That list is the only truthful account of which printer a preset
    belongs to, because the bundle ships no process preset named after a P1S,
    an X1, an X1E or an H2D Pro -- all ten of the P1S's are named "@BBL X1C"
    and name the P1S only in that list. Reading the printer out of the preset
    NAME therefore made a P1S look like it had no compatible process at all:
    all 198 hid behind "Show all" and the auto-pick fell through to an
    alphabetically-first 0.06mm Fine @BBL A1 0.2 nozzle the CLI refused. A
    P1S now gets 0.20mm Standard @BBL X1C and 73 filaments instead of 4. An
    older sidecar reports nothing here, which leaves the name matcher in
    place -- degraded as before, not broken.

    Material is now a hard partition in the filament pre-pick rather than a
    +10 bonus. A preset stating a different material than the plate asks for
    is the wrong preset, not a worse one: wrong nozzle temperature, wrong bed
    temperature, wrong flow. A preset stating NO material stays eligible --
    unknown is not wrong, and 32 shipped profiles genuinely have none. The
    same rule reaches the retain path, which held a slot on
    printer-compatibility alone and so cemented a wrong-material pick through
    every re-pick. A preset the user chose themselves is exempt: printing
    PETG on a plate a designer labelled PLA is a legitimate thing to do, and
    this rule exists to correct the auto-pick, not to overrule the user.

    Two more, both found while tracing this and neither reported:

    Among process presets equally valid for the selected printer, the one
    nearest a 0.2mm layer height now wins. Within a tier the list is
    alphabetical and Bambu's naming puts the finest height first, so every
    slice that did not name its own process silently got 0.08mm Extra Fine on
    an X1 Carbon and 0.06mm Fine on an A1 mini -- correct presets, nobody's
    default. Ties break toward the coarser, faster height; a name with no
    readable height is still pickable when it is the only candidate; a
    process the 3MF named still wins outright.

    H2DP is aliased to H2D Pro, the same shape as the A1M rename in #1649 --
    the bundle spells the model one way in preset names and another in the
    printer preset, so an H2D Pro classified all 198 processes as another
    printer's. Deliberately narrow: H2DP and a plain H2D are different
    machines and must not collapse.

    A dropdown the printer filter would empty now shows the unfiltered list
    instead. That state was reachable for four printer models and told the
    user nothing; a visible preset for the wrong printer can be changed, an
    empty dropdown cannot.

    Verified against live Orca 2.4.2 and BambuStudio 02.08.02.61 sidecars
    over the real 1156- and 1792-profile trees: every one of the eight
    printer models tested now auto-picks a 0.20mm process for its own
    printer, a PLA plate draws a PLA preset and a PETG plate a PETG one.
    Each change was confirmed to fail its tests when reverted.
2026-08-28 12:43:29 +02:00
..