Files
bambuddy/backend
maziggy c5cd0dbe77 Stop an H2C refusing a multi-colour print as a hotend mismatch
The print uploaded, the printer took the command, and stopped at once with
    HMS 0500-4047 -- "the available hotend quantity or model does not match the
    sliced file". nozzle_mapping told the printer one of the plate's filaments
    went to no hotend while ams_mapping named the tray it comes from, and the
    firmware will not start a job on that contradiction.

    Each filament in a 3MF names the group it belongs to, and on every other
    dual-nozzle Bambu the group number is also the extruder index, so it was
    read as one. On a rack machine it is not: the rack carriage holds six
    hotends to the fixed carriage's one, so the slicer writes a group per
    nozzle rather than per carriage. The failing plate carried groups 0, 1 and
    2 against a two-entry physical_extruder_map, and the filament in group 2
    was dropped -- indistinguishable downstream from a slot the plate does not
    print, which is what reached the wire as -1.

    extract_nozzle_mapping_from_3mf now resolves the group through the table
    the file states for itself, the <nozzle id extruder_id> elements in
    slice_info.config. Files carrying no such table keep the direct index, so
    H2D slices are unaffected. A filament that still cannot be placed drops
    the whole mapping with a logged reason instead of half an answer: the
    firmware then picks its own nozzle, which is the pre-existing behaviour
    and far better than an answer that contradicts itself.

    Two related faults fixed in the same pass. The mapping was read across
    every plate in the file, so on a multi-plate project a slot took its
    extruder from whichever plate came last; it is now scoped to the plate
    being dispatched, in extract_filament_requirements as well. And the array
    is now one entry per filament slot, matching BambuStudio's own dispatch of
    [1, 16, 16] for a three-filament plate, rather than padded to a fixed 32.

    Verified against the file that failed: slot extruders [-1, 1, 0] became
    [0, 1, 0], and the wire [-1, 16, 1, -1 x29] became [1, 16, 1].
2026-08-15 14:58:27 +02:00
..