ENH: add filament cluster algorithm

1.Add new KMediods algorithm
2.Consider physical and geometric printables
3.Refine code structure

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I1412835c3c6380f9cedb44ff6914004365bba889
(cherry picked from commit c53a35856d8d1cbd3a632a8510f1ddfdf9117106)
This commit is contained in:
xun.zhang
2024-09-02 21:10:01 +08:00
committed by Noisyfox
parent 8eb0a59723
commit 7bd16a3ca7
6 changed files with 536 additions and 358 deletions

View File

@@ -956,6 +956,13 @@ public:
// get the group label of filament
size_t get_extruder_id(unsigned int filament_id) const;
// 1 based ids
const std::vector<std::vector<int>>& get_unprintable_filament_ids() const { return m_unprintable_filament_ids; }
void set_unprintable_filament_ids(const std::vector<std::vector<int>> &filament_ids) { m_unprintable_filament_ids = filament_ids; }
std::vector<Vec2d> get_printable_area();
std::vector<std::vector<Vec2d>> get_extruder_printable_area();
bool enable_timelapse_print() const;
std::string output_filename(const std::string &filename_base = std::string()) const override;