Make filament compatibility temperature-aware (#13522)

* Make filament compatibility temperature-aware

Extend filament compatibility checks to consider actual nozzle temperatures and temperature ranges.
Print::check_multi_filaments_compatibility now accepts nozzle temperatures and range lows/highs; it resolves missing ranges from material defaults, computes per-filament effective temperatures, and checks pairwise compatibility (including high/low/mid mixed cases).
Updated callers in Print::check_multi_filament_valid and CalibrationWizardPresetPage to pass nozzle settings, consolidated user-facing warning strings, and fixed extruder index handling and minor logic/path improvements.

Clarify incompatible nozzle temperature warnings

* Update Print.cpp

* Remove json usage

* Reduce messages
This commit is contained in:
Ian Bassi
2026-05-09 03:30:24 -03:00
committed by GitHub
parent 16fc3c1b14
commit 635d96183d
3 changed files with 150 additions and 92 deletions

View File

@@ -877,8 +877,9 @@ enum FilamentTempType {
enum FilamentCompatibilityType {
Compatible,
HighLowMixed,
HighMidMixed,
LowMidMixed
//HighLowMixed,
//HighMidMixed,
InvalidTemperatureRange
};
// The complete print tray with possibly multiple objects.
@@ -1087,7 +1088,11 @@ public:
static FilamentTempType get_filament_temp_type(const std::string& filament_type);
static int get_hrc_by_nozzle_type(const NozzleType& type);
static std::vector<std::string> get_incompatible_filaments_by_nozzle(const float nozzle_diameter, const std::optional<NozzleVolumeType> nozzle_volume_type = std::nullopt);
static FilamentCompatibilityType check_multi_filaments_compatibility(const std::vector<std::string>& filament_types);
static FilamentCompatibilityType check_multi_filaments_compatibility(
const std::vector<std::string>& filament_types,
const std::vector<int>& nozzle_temperatures,
const std::vector<int>& nozzle_temperature_range_lows,
const std::vector<int>& nozzle_temperature_range_highs);
// similar to check_multi_filaments_compatibility, but the input is int, and may be negative (means unset)
static bool is_filaments_compatible(const std::vector<int>& types);
// get the compatible filament type of a multi-material object