feat(libslic3r): multi-nozzle slicing engine for H2C/A2L

Port BambuStudio's dual-nozzle slicing core: H2C-era config keys, filament-to-nozzle grouping with per-layer dynamic regrouping, filament/nozzle/hotend gcode placeholder vocabulary, multi-nozzle wipe tower pre-heat/pre-cool, the two-pass pre-cooling injector, and corexy farthest-point timelapse.
This commit is contained in:
SoftFever
2026-07-09 00:06:26 +08:00
parent 781ecdc2c1
commit 237ef41b06
36 changed files with 7622 additions and 708 deletions

View File

@@ -66,6 +66,9 @@ public:
bool need_toolchange(unsigned int filament_id) const;
std::string set_extruder(unsigned int filament_id);
void init_extruder(unsigned int filament_id);
// Current parked-retract length of a filament's extruder (share-aware). Used for the
// new_extruder_retracted_length change-filament placeholder. Returns 0 if the filament is unknown.
double get_extruder_retracted_length(const int filament_id);
// Prefix of the toolchange G-code line, to be used by the CoolingBuffer to separate sections of the G-code
// printed with the same extruder.
std::string toolchange_prefix() const;
@@ -83,7 +86,9 @@ public:
std::string extrude_to_xyz(const Vec3d &point, double dE, const std::string &comment = std::string(), bool force_no_extrusion = false);
std::string retract(bool before_wipe = false, double retract_length = 0);
std::string retract_for_toolchange(bool before_wipe = false, double retract_length = 0);
std::string unretract();
// extra_retract adds a small over-extrusion to the deretract move (PETG pre-extrusion).
// Default 0 -> byte-identical to the plain deretract.
std::string unretract(float extra_retract = 0.f);
// do lift instantly
std::string eager_lift(const LiftType type);
// record a lift request, do realy lift in next travel