2023-04-23 01:04:55 +00:00
|
|
|
#pragma once
|
|
|
|
#include "libslic3r/Calib.hpp"
|
2023-05-18 01:41:50 +00:00
|
|
|
#include "../GUI/DeviceManager.hpp"
|
2023-04-23 01:04:55 +00:00
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
|
|
|
|
class ProgressIndicator;
|
2023-05-18 01:41:50 +00:00
|
|
|
class Preset;
|
2023-04-23 01:04:55 +00:00
|
|
|
|
|
|
|
namespace GUI {
|
2023-05-18 01:41:50 +00:00
|
|
|
class CalibInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Calib_Params params;
|
|
|
|
Preset* printer_prest;
|
|
|
|
Preset* filament_prest;
|
|
|
|
Preset* print_prest;
|
|
|
|
BedType bed_type;
|
|
|
|
std::string dev_id;
|
|
|
|
std::string select_ams;
|
|
|
|
std::shared_ptr<ProgressIndicator> process_bar;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2023-04-23 01:04:55 +00:00
|
|
|
class CalibUtils
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CalibUtils(){};
|
2023-05-18 01:41:50 +00:00
|
|
|
static void calib_PA(const X1CCalibInfos& calib_infos, std::string& error_message);
|
|
|
|
static void emit_get_PA_calib_results();
|
|
|
|
static bool get_PA_calib_results(std::vector<PACalibResult> &pa_calib_results);
|
|
|
|
static void emit_get_PA_calib_infos();
|
|
|
|
static bool get_PA_calib_tab(std::vector<PACalibResult> &pa_calib_infos);
|
2023-05-18 01:41:50 +00:00
|
|
|
static void set_PA_calib_result(const std::vector<PACalibResult>& pa_calib_values);
|
2023-06-05 01:25:43 +00:00
|
|
|
static void select_PA_calib_result(const PACalibIndexInfo &pa_calib_info);
|
|
|
|
static void delete_PA_calib_result(const PACalibIndexInfo &pa_calib_info);
|
2023-05-18 01:41:50 +00:00
|
|
|
|
|
|
|
static void calib_flowrate_X1C(const X1CCalibInfos& calib_infos, std::string& error_message);
|
|
|
|
static void emit_get_flow_ratio_calib_results();
|
|
|
|
static bool get_flow_ratio_calib_results(std::vector<FlowRatioCalibResult> &flow_ratio_calib_results);
|
|
|
|
static void calib_flowrate(int pass, const CalibInfo& calib_info, std::string& error_message);
|
|
|
|
|
|
|
|
static void calib_temptue(const CalibInfo& calib_info, std::string& error_message);
|
|
|
|
static void calib_max_vol_speed(const CalibInfo& calib_info, std::string& error_message);
|
|
|
|
static void calib_VFA(const CalibInfo& calib_info, std::string& error_message);
|
2023-04-23 01:04:55 +00:00
|
|
|
|
|
|
|
private:
|
2023-05-18 01:41:50 +00:00
|
|
|
static void process_and_store_3mf(Model* model, const DynamicPrintConfig& full_config, const Calib_Params& params, std::string& error_message);
|
|
|
|
static void send_to_print(const std::string& dev_id, const std::string& select_ams, std::shared_ptr<ProgressIndicator> process_bar, BedType bed_type, std::string& error_message);
|
2023-04-23 01:04:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|