ENH: auto-arranging allows more filaments together

Auto-arranging allows more filaments to be printed on the same plate

Only HighTemp and LowTemp filaments are not allowed on the same plate.

Jira: https://jira.bambooolab.com/browse/STUDIO-4682
Change-Id: I1bd4966e6aaa55a6dd9dff05f0bd94f2795a62b0
(cherry picked from commit 965040912af0555ca190702e7c7ac92e177a2922)
This commit is contained in:
Arthur 2023-10-08 21:06:25 +08:00 committed by Lane.Wei
parent 7b93986dfa
commit d64031a054
7 changed files with 159 additions and 91 deletions

View file

@ -821,6 +821,15 @@ public:
Vec2d translate_to_print_space(const Point& point) const;
static bool 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
// Rule:
// 1. LowTemp+HighLowCompatible=LowTemp
// 2. HighTemp++HighLowCompatible=HighTemp
// 3. LowTemp+HighTemp+...=HighLowCompatible
// Unset types are just ignored.
static int get_compatible_filament_type(const std::set<int>& types);
protected:
// Invalidates the step, and its depending steps in Print.