ENH: refine check logic for filament mix printing

jira: NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I199462cee6284e13e58f829b7972dd3124bfc385
(cherry picked from commit 22834b23586d2230e94e9dffd8b09146e5342246)
This commit is contained in:
xun.zhang
2025-04-08 17:01:40 +08:00
committed by Noisyfox
parent 86f16d9c8b
commit fa05f107ab
5 changed files with 53 additions and 16 deletions

View File

@@ -870,6 +870,14 @@ enum FilamentTempType {
HighLowCompatible,
Undefine
};
enum FilamentCompatibilityType {
Compatible,
HighLowMixed,
HighMidMixed,
LowMidMixed
};
// The complete print tray with possibly multiple objects.
class Print : public PrintBaseWithState<PrintStep, psCount>
{
@@ -1072,7 +1080,7 @@ public:
Vec2d translate_to_print_space(const Point &point) const;
static FilamentTempType get_filament_temp_type(const std::string& filament_type);
static int get_hrc_by_nozzle_type(const NozzleType& type);
static bool check_multi_filaments_compatibility(const std::vector<std::string>& filament_types);
static FilamentCompatibilityType check_multi_filaments_compatibility(const std::vector<std::string>& filament_types);
// 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