mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-07 07:41:06 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a5b372fd2 | ||
|
|
d8793f8353 |
+4
-9
@@ -1,15 +1,10 @@
|
||||
# clang-tidy configuration, enforced by the clang-tidy CI job on the lines a pull
|
||||
# request changes (scripts/clang_tidy_diff.py). Two things are reported.
|
||||
# Missing includes: a file should include the header for every symbol it uses, not
|
||||
# rely on the precompiled header or another header's includes. Run with --fix to
|
||||
# add them.
|
||||
# Using-directives and using-declarations in the global namespace of a header:
|
||||
# they reach every file that includes the header, and a using-declaration also
|
||||
# makes the header look like the one to include for that name. Qualify the name
|
||||
# in the header, and put the using in the source files that want it.
|
||||
# request changes (scripts/clang_tidy_diff.py). Only missing includes are reported
|
||||
# for now: a file should include the header for every symbol it uses, not rely on
|
||||
# the precompiled header or another header's includes. Run with --fix to add them.
|
||||
# Every check listed here gates pull requests, so enable a new one only once the
|
||||
# code it flags on touched lines is reasonable to fix in passing.
|
||||
Checks: '-*,misc-include-cleaner,google-global-names-in-headers'
|
||||
Checks: '-*,misc-include-cleaner'
|
||||
WarningsAsErrors: '*'
|
||||
CheckOptions:
|
||||
# Missing includes only. Builds without the precompiled header break on these.
|
||||
|
||||
@@ -311,12 +311,11 @@ def main():
|
||||
for path in fixed:
|
||||
print(f" {path}")
|
||||
if failed and fixed:
|
||||
print(f"\nclang-tidy still fails on {len(failed)} file(s); the findings above are what --fix could not fix.")
|
||||
print(f"\nclang-tidy still fails on {len(failed)} file(s); the findings above are what --fix could not add.")
|
||||
return 1
|
||||
if failed:
|
||||
print(f"\nclang-tidy failed on {len(failed)} file(s). Add the includes it names, or apply its "
|
||||
"suggestions locally with scripts/run_clang_tidy.sh --fix (scripts\\run_clang_tidy.ps1 -Fix on Windows). "
|
||||
"Other findings need a manual fix.")
|
||||
"suggestions locally with scripts/run_clang_tidy.sh --fix (scripts\\run_clang_tidy.ps1 -Fix on Windows).")
|
||||
return 1
|
||||
print("clang-tidy passed.")
|
||||
return 0
|
||||
|
||||
+5
-7
@@ -23,7 +23,6 @@
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include "libslic3r/PrintBase.hpp"
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
#include <boost/date_time/posix_time/posix_time_duration.hpp>
|
||||
#include <cerrno>
|
||||
#include <utility>
|
||||
@@ -78,12 +77,10 @@
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
#include <boost/thread.hpp>
|
||||
//add json logic
|
||||
#include "nlohmann/json.hpp"
|
||||
|
||||
using namespace nlohmann;
|
||||
#endif
|
||||
|
||||
#include "nlohmann/json.hpp"
|
||||
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/nowide/args.hpp>
|
||||
@@ -157,6 +154,7 @@ using namespace nlohmann;
|
||||
#include <stdio.h>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
using json = nlohmann::json;
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#if __has_include(<X11/Xlib.h>)
|
||||
@@ -3524,7 +3522,7 @@ int CLI::run(int argc, char **argv)
|
||||
ConfigOptionStrings *curr_variant_opt = m_print_config.option<ConfigOptionStrings>("filament_extruder_variant");
|
||||
if (!curr_variant_opt) {
|
||||
curr_variant_opt = m_print_config.option<ConfigOptionStrings>("filament_extruder_variant", true);
|
||||
std::vector<string>& filament_variants = curr_variant_opt->values;
|
||||
std::vector<std::string>& filament_variants = curr_variant_opt->values;
|
||||
filament_variants.resize(filament_count, get_extruder_variant_string(etDirectDrive, nvtStandard));
|
||||
}
|
||||
const ConfigOptionStrings *new_variant_opt = dynamic_cast<const ConfigOptionStrings*>(config.option("filament_extruder_variant", true));
|
||||
@@ -6554,7 +6552,7 @@ int CLI::run(int argc, char **argv)
|
||||
std::vector<int> result_filaments;
|
||||
//result_filaments.reserve(conflict_filaments.size());
|
||||
std::set_intersection(conflict_filament_vector.begin(), conflict_filament_vector.end(), unprintable_filament_vec[index].begin(),
|
||||
unprintable_filament_vec[index].end(), insert_iterator<vector<int>>(result_filaments, result_filaments.begin()));
|
||||
unprintable_filament_vec[index].end(), std::insert_iterator<std::vector<int>>(result_filaments, result_filaments.begin()));
|
||||
conflict_filament_vector = result_filaments;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
#include "libslic3r/Semver.hpp"
|
||||
#include "calib.hpp"
|
||||
|
||||
using namespace nlohmann;
|
||||
|
||||
#define ENV_DEV_HOST "0"
|
||||
#define ENV_QAT_HOST "1"
|
||||
#define ENV_PRE_HOST "2"
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
#include "libslic3r/GCode/Thumbnails.hpp"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
using json = nlohmann::json;
|
||||
|
||||
using boost::property_tree::ptree;
|
||||
|
||||
|
||||
@@ -87,6 +87,8 @@
|
||||
// This breaks compatibility with the upstream Slic3r if the --datadir is used to switch between the two versions.
|
||||
//#define SLIC3R_PROFILE_USE_PRESETS_SUBDIR
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
// Project-level options imported from a loaded 3MF into project_config. s_project_options_published
|
||||
|
||||
@@ -1580,7 +1580,7 @@ bool GLVolumeCollection::check_outside_state(const BuildVolume &build_volume, Mo
|
||||
{
|
||||
std::vector<int> result_filaments;
|
||||
//result_filaments.reserve(conflict_filaments.size());
|
||||
std::set_intersection (conflict_filament_vector.begin(), conflict_filament_vector.end(), unprintable_filament_vec[index].begin(), unprintable_filament_vec[index].end(), insert_iterator<vector<int>>(result_filaments, result_filaments.begin()));
|
||||
std::set_intersection (conflict_filament_vector.begin(), conflict_filament_vector.end(), unprintable_filament_vec[index].begin(), unprintable_filament_vec[index].end(), std::insert_iterator<std::vector<int>>(result_filaments, result_filaments.begin()));
|
||||
conflict_filament_vector = result_filaments;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
#include <wx/dcmemory.h>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "slic3r/GUI/Widgets/Button.hpp"
|
||||
#include "slic3r/GUI/Widgets/ComboBox.hpp"
|
||||
#include <string>
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/scrolwin.h>
|
||||
#include <wx/sizer.h>
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
void create_folder(wxString name = wxEmptyString);
|
||||
std::string replaceSpace(std::string s, std::string ts, std::string ns);
|
||||
void on_import_file(wxCommandEvent &event);
|
||||
void Reload(wxString aux_path, std::map<std::string, std::vector<json>> paths);
|
||||
void Reload(wxString aux_path, std::map<std::string, std::vector<nlohmann::json>> paths);
|
||||
|
||||
void update_all_panel();
|
||||
void update_all_cover();
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <memory>
|
||||
#include "slic3r/GUI/BBLStatusBarBind.hpp"
|
||||
#include "slic3r/GUI/Jobs/BindJob.hpp"
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/DeviceCore/DevDefs.h"
|
||||
#include "slic3r/GUI/Jobs/Worker.hpp"
|
||||
#include <utility>
|
||||
@@ -54,6 +54,8 @@
|
||||
|
||||
#include "DeviceCore/DevManager.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "slic3r/GUI/Widgets/RadioBox.hpp"
|
||||
#include <cstdio>
|
||||
#include <map>
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <cstdlib>
|
||||
#include "slic3r/GUI/GUI_Utils.hpp"
|
||||
#include "slic3r/GUI/Widgets/Label.hpp"
|
||||
@@ -91,6 +91,8 @@
|
||||
#define SELECT_ALL_OPTION_COLOUR wxColour("#009688")
|
||||
#define DEFAULT_PROMPT_TEXT_COLOUR wxColour("#ACACAC")
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#include "DevAxis.h"
|
||||
#include "DevUtil.h"
|
||||
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
#include "slic3r/GUI/DeviceCore/DevDefs.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r
|
||||
{
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include <memory>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <string>
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@@ -22,7 +21,7 @@ public:
|
||||
bool IsArchCoreXY() const;
|
||||
|
||||
public:
|
||||
void ParseAxis(const json &print_json);
|
||||
void ParseAxis(const nlohmann::json &print_json);
|
||||
|
||||
int Ctrl_GoHome();
|
||||
int Ctrl_Axis(std::string axis, double unit = 1.0f, double input_val = 1.0f, int speed = 3000); // xyz e
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#include "DevAxis.h"
|
||||
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
#include <string>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r
|
||||
{
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#include "DevBed.h"
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
void DevBed::ParseV1_0(const json &print_json, DevBed *system)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@@ -16,8 +15,8 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
static void ParseV1_0(const json &print_json, DevBed *system);
|
||||
static void ParseV2_0(const json &print_json, DevBed *system);
|
||||
static void ParseV1_0(const nlohmann::json &print_json, DevBed *system);
|
||||
static void ParseV2_0(const nlohmann::json &print_json, DevBed *system);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <algorithm>
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/GUI_App.hpp"
|
||||
#include "slic3r/GUI/I18N.hpp"
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "DevFilaSystem.h"
|
||||
#include "DevConfig.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
static float string_to_float(const std::string &str_value)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
|
||||
#include "DevDefs.h"
|
||||
@@ -86,11 +85,11 @@ public:
|
||||
std::vector<FlowRatioCalibResult> GetFlowRatioResult() const {return m_flow_ratio_results; }
|
||||
|
||||
protected:
|
||||
void ExtrusionCalibSetParse(const json &jj);
|
||||
void ExtrusionCalibSelectParse(const json &jj);
|
||||
void ExtrusionCalibGetTableParse(const json &jj);
|
||||
void ExtrusionCalibGetResultParse(const json &jj);
|
||||
void FlowrateGetResultParse(const json &jj);
|
||||
void ExtrusionCalibSetParse(const nlohmann::json &jj);
|
||||
void ExtrusionCalibSelectParse(const nlohmann::json &jj);
|
||||
void ExtrusionCalibGetTableParse(const nlohmann::json &jj);
|
||||
void ExtrusionCalibGetResultParse(const nlohmann::json &jj);
|
||||
void FlowrateGetResultParse(const nlohmann::json &jj);
|
||||
|
||||
private:
|
||||
MachineObject* m_owner{nullptr};
|
||||
@@ -119,11 +118,11 @@ private:
|
||||
bool m_calib_finished{false};
|
||||
|
||||
public:
|
||||
static void ParseCalibVersion(const json& j, DevCalib* system);
|
||||
static void ParseCalibVersion(const nlohmann::json& j, DevCalib* system);
|
||||
|
||||
static void ParseSupportNewAutoCalib(int flag, DevCalib* system);
|
||||
|
||||
static void ParseV1_0(const json& print_json, DevCalib* system, bool key_field_only);
|
||||
static void ParseV1_0(const nlohmann::json& print_json, DevCalib* system, bool key_field_only);
|
||||
};
|
||||
|
||||
} // namespace Slic3r
|
||||
@@ -3,9 +3,11 @@
|
||||
#include "DevConfig.h"
|
||||
#include "DevUtil.h"
|
||||
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
bool DevChamber::HasChamber() const { return m_owner->GetConfig()->HasChamber(); }
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@@ -25,10 +24,10 @@ public: // getter
|
||||
|
||||
public:
|
||||
// setter
|
||||
void ParseChamber(const json &print_json);
|
||||
void ParseChamber(const nlohmann::json &print_json);
|
||||
|
||||
void ParseChamberV1_0(const json& print_json);
|
||||
void ParseChamberV2_0(const json& print_json);
|
||||
void ParseChamberV1_0(const nlohmann::json& print_json);
|
||||
void ParseChamberV2_0(const nlohmann::json& print_json);
|
||||
|
||||
// control
|
||||
int CtrlSetChamberTemp(int temp);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#include "DevChamber.h"
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
#include <string>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
int DevChamber::CtrlSetChamberTemp(int temp)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include "DevConfig.h"
|
||||
#include "DevUtil.h"
|
||||
#include "json_diff.hpp"
|
||||
|
||||
using namespace nlohmann;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "libslic3r/CommonDefs.hpp"
|
||||
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <wx/string.h>
|
||||
|
||||
#include <limits>
|
||||
@@ -47,11 +47,11 @@ public:
|
||||
|
||||
public:
|
||||
/*Setters*/
|
||||
void ParseConfig(const json& print_json);
|
||||
void ParseConfig(const nlohmann::json& print_json);
|
||||
|
||||
void ParseChamberConfig(const json& print_json); // chamber
|
||||
void ParsePrintOptionsConfig(const json& print_json); // print options
|
||||
void ParseCalibrationConfig(const json& print_json); //cali
|
||||
void ParseChamberConfig(const nlohmann::json& print_json); // chamber
|
||||
void ParsePrintOptionsConfig(const nlohmann::json& print_json); // print options
|
||||
void ParseCalibrationConfig(const nlohmann::json& print_json); //cali
|
||||
|
||||
private:
|
||||
[[maybe_unused]] MachineObject* m_obj;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "DevConfigUtil.h"
|
||||
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "DevCtrl.h"
|
||||
|
||||
// TODO: remove this include
|
||||
#include "json_diff.hpp"
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
|
||||
using namespace nlohmann;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <string>
|
||||
#include <ctime>
|
||||
#include <wx/string.h>
|
||||
@@ -15,7 +15,7 @@ class DevCtrlInfo
|
||||
{
|
||||
public:
|
||||
DevCtrlInfo() {};
|
||||
DevCtrlInfo(MachineObject* obj, int sequence_id, const json& req_json, int interval_max = 3, int interval_min = 0);
|
||||
DevCtrlInfo(MachineObject* obj, int sequence_id, const nlohmann::json& req_json, int interval_max = 3, int interval_min = 0);
|
||||
|
||||
public:
|
||||
bool CheckCanUpdateData(const nlohmann::json& jj);
|
||||
@@ -32,7 +32,7 @@ private:
|
||||
|
||||
time_t m_request_time = 0;
|
||||
int m_request_seq = 0;
|
||||
json m_request_json = json();
|
||||
nlohmann::json m_request_json = nlohmann::json();
|
||||
|
||||
// check
|
||||
int m_request_interval_max = 3;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <optional>
|
||||
#include "libslic3r/CommonDefs.hpp"
|
||||
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <wx/string.h>
|
||||
|
||||
#include "DevDefs.h"
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "DevFilaSystem.h" // complete type for GetFilaSystem()->GetTrayIndexMap() in GetBackupAmsSlotInGroup
|
||||
|
||||
// TODO: remove this include
|
||||
#include "json_diff.hpp"
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
#include "slic3r/GUI/I18N.hpp"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <unordered_map>
|
||||
#include "libslic3r/CommonDefs.hpp"
|
||||
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <vector>
|
||||
#include <wx/string.h>
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <wx/app.h>
|
||||
#include "json_diff.hpp"
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
using namespace nlohmann;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include <functional>
|
||||
#include <cstdint>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
@@ -13,7 +12,7 @@ namespace Slic3r {
|
||||
class MachineObject;
|
||||
|
||||
enum AirDuctType { AIR_FAN_TYPE, AIR_DOOR_TYPE };
|
||||
typedef std::function<void(const json &)> CommandCallBack;
|
||||
typedef std::function<void(const nlohmann::json &)> CommandCallBack;
|
||||
|
||||
enum AIR_FUN : int {
|
||||
FAN_HEAT_BREAK_0_IDX = 0,
|
||||
@@ -123,14 +122,14 @@ public:
|
||||
AirDuctData GetAirDuctData() { return m_air_duct_data; };
|
||||
|
||||
void converse_to_duct(bool is_suppt_part_fun, bool is_suppt_aux_fun, bool is_suppt_cham_fun); // Convert the data to duct type to make the newand old protocols consistent
|
||||
int command_handle_response(const json &response);
|
||||
int command_handle_response(const nlohmann::json &response);
|
||||
int command_control_fan(int fan_type, int val); // Old protocol
|
||||
int command_control_fan_new(int fan_id, int val); // New protocol
|
||||
int command_control_air_duct(int mode_id, int submode, const CommandCallBack& cb);
|
||||
|
||||
void ParseV1_0(const json &print_json);
|
||||
void ParseV2_0(const json &print_json);
|
||||
void ParseV3_0(const json &print_json);
|
||||
void ParseV1_0(const nlohmann::json &print_json);
|
||||
void ParseV2_0(const nlohmann::json &print_json);
|
||||
void ParseV3_0(const nlohmann::json &print_json);
|
||||
|
||||
public:
|
||||
bool GetSupportAirduct() { return is_support_airduct; };
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#include "DevFilaAmsSetting.h"
|
||||
#include "DevFilaSystem.h"
|
||||
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
#include <string>
|
||||
#include "slic3r/GUI/DeviceCore/DevCtrl.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
int DevAmsSystemFirmwareSwitch::CrtlSwitchFirmware(int firmware_idx)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "slic3r/GUI/DeviceCore/DevDefs.h"
|
||||
|
||||
#include "DevFilaBlackList.h"
|
||||
#include "json_diff.hpp"
|
||||
#include "slic3r/Utils/NetworkAgent.hpp"
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
#include "DevFilaSystem.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <wx/string.h>
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace Slic3r
|
||||
{
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
static CheckResult check_filaments_in_blacklist(const CheckFilamentInfo& info);
|
||||
|
||||
public:
|
||||
static json filaments_blacklist;
|
||||
static nlohmann::json filaments_blacklist;
|
||||
};// class DevFilaBlacklist
|
||||
|
||||
}// namespace Slic3r
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include "DevFilaSystem.h"
|
||||
#include "json_diff.hpp"
|
||||
#include "slic3r/Utils/NetworkAgent.hpp"
|
||||
#include "DevNozzleSystem.h" // DevNozzle / DevNozzleSystem for GetNozzleFlowStringByAmsId
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "libslic3r/CommonDefs.hpp"
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "DevDefs.h"
|
||||
#include "DevFilaAmsSetting.h"
|
||||
@@ -415,9 +415,9 @@ private:
|
||||
class DevFilaSystemParser
|
||||
{
|
||||
public:
|
||||
static void ParseV1_0(const json& print_json, MachineObject* obj, DevFilaSystem* system, bool key_field_only);
|
||||
static void ParseV1_0(const nlohmann::json& print_json, MachineObject* obj, DevFilaSystem* system, bool key_field_only);
|
||||
|
||||
static void ParseAgentFilament(const json& data, MachineObject* obj, DevFilaSystem* system);
|
||||
static void ParseAgentFilament(const nlohmann::json& data, MachineObject* obj, DevFilaSystem* system);
|
||||
};
|
||||
|
||||
struct DevFilamentDryingPreset
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include <string>
|
||||
#include "DevFilaSystem.h"
|
||||
|
||||
#include "json_diff.hpp"
|
||||
#include "slic3r/GUI/DeviceManager.hpp"// TODO: remove this include
|
||||
|
||||
using namespace nlohmann;
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#pragma once
|
||||
#include "DevFirmware.h"
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <string>
|
||||
#include <wx/string.h>
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@@ -51,10 +49,10 @@ public:
|
||||
bool isCuttingModule() const { return product_name.Contains("Cutting Module"); }
|
||||
bool isRotary() const { return product_name.Contains("Rotary"); }// Rotary Attachment
|
||||
bool isExtinguishSystem() const { return product_name.Contains("Extinguishing System"); }// Auto Fire Extinguishing System
|
||||
bool isWTM() const { return name.find("wtm") != string::npos; } // nozzle
|
||||
bool isWTM() const { return name.find("wtm") != std::string::npos; } // nozzle
|
||||
bool isExhaustFan() const { return product_name.Contains("Exhaust Fan"); }
|
||||
bool isHmshub() const { return product_name.find("Filament Buffer") != string::npos; }
|
||||
bool isFilaTrackSwitch() const { return product_name.find("Filament Track") != string::npos; }
|
||||
bool isHmshub() const { return product_name.find("Filament Buffer") != std::string::npos; }
|
||||
bool isFilaTrackSwitch() const { return product_name.find("Filament Track") != std::string::npos; }
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
#include "DevHMS.h"
|
||||
#include <string>
|
||||
#include <cstdio>
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <exception>
|
||||
#include <cassert>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r
|
||||
{
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <wx/string.h>
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
DevHMS(MachineObject* obj) : m_object(obj) {}
|
||||
|
||||
public:
|
||||
void ParseHMSItems(const json& hms_json);
|
||||
void ParseHMSItems(const nlohmann::json& hms_json);
|
||||
const std::vector<DevHMSItem>& GetHMSItems() const { return m_hms_list; };
|
||||
|
||||
private:
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
bool has_read() const { return m_already_read; };
|
||||
|
||||
protected:
|
||||
friend void DevHMS::ParseHMSItems(const json& hms_json);
|
||||
friend void DevHMS::ParseHMSItems(const nlohmann::json& hms_json);
|
||||
bool parse_hms_info(unsigned attr, unsigned code);
|
||||
|
||||
private:
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "DevLamp.h"
|
||||
|
||||
// TODO: remove this include
|
||||
#include "json_diff.hpp"
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
|
||||
using namespace nlohmann;
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "DevUtil.h"
|
||||
|
||||
// TODO: remove this include
|
||||
#include "json_diff.hpp"
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
#include "slic3r/GUI/I18N.hpp"
|
||||
#include "slic3r/GUI/GUI_App.hpp"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include <mutex>
|
||||
#include "libslic3r/CommonDefs.hpp"
|
||||
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <wx/object.h>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "DevUtil.h"
|
||||
#include "DevUtilBackend.h"
|
||||
|
||||
#include "json_diff.hpp"
|
||||
#include "libslic3r/MultiNozzleUtils.hpp"
|
||||
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "libslic3r/CommonDefs.hpp"
|
||||
#include "libslic3r/MultiNozzleUtils.hpp"
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "DevNozzleSystem.h"
|
||||
#include "DevFirmware.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "DevNozzleRack.h"
|
||||
#include "DevExtruderSystem.h"
|
||||
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
#include "slic3r/GUI/MsgDialog.hpp"
|
||||
#include "slic3r/GUI/I18N.hpp"
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "slic3r/GUI/DeviceCore/DevNozzleSystem.h"
|
||||
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r
|
||||
{
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "DevNozzleSystem.h"
|
||||
#include "DevUtil.h"
|
||||
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
#include "slic3r/GUI/I18N.hpp"
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <optional>
|
||||
#include <cmath>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r
|
||||
{
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "libslic3r/CommonDefs.hpp"
|
||||
#include "libslic3r/MultiNozzleUtils.hpp"
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
#include <string>
|
||||
@@ -195,6 +195,6 @@ namespace Slic3r
|
||||
{
|
||||
public:
|
||||
static void ParseV1_0(const nlohmann::json& nozzletype_json, const nlohmann::json& diameter_json, DevNozzleSystem* system, std::optional<int> flag_e3d);
|
||||
static void ParseV2_0(const json& device_json, DevNozzleSystem* system);
|
||||
static void ParseV2_0(const nlohmann::json& device_json, DevNozzleSystem* system);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -8,9 +8,11 @@
|
||||
#include <ctime>
|
||||
#include <exception>
|
||||
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r
|
||||
{
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#include "DevStorage.h"
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <string>
|
||||
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
DevStorage::SdcardState Slic3r::DevStorage::set_sdcard_state(int state)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <string>
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@@ -27,7 +26,7 @@ public:
|
||||
SdcardState get_sdcard_state() const { return m_sdcard_state; };
|
||||
SdcardState set_sdcard_state(int state);
|
||||
|
||||
static void ParseV1_0(const json &print_json, DevStorage *system);
|
||||
static void ParseV1_0(const nlohmann::json &print_json, DevStorage *system);
|
||||
|
||||
bool is_timelapse_storage_low(const std::string& storage) const;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "DevUpgrade.h"
|
||||
#include "DevUtil.h"
|
||||
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
|
||||
#include "slic3r/GUI/GUI_App.hpp"
|
||||
@@ -13,6 +13,8 @@
|
||||
#include "slic3r/GUI/DeviceCore/DevDefs.h"
|
||||
#include <wx/string.h>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
int DevUpgrade::GetUpgradeProgressInt() const
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <string>
|
||||
#include <wx/string.h>
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
#include "DevDefs.h"
|
||||
#include "DevFirmware.h"
|
||||
@@ -47,8 +46,8 @@ public:
|
||||
int CtrlUpgradeModule(std::string url, std::string module_type, std::string version);
|
||||
|
||||
// parser
|
||||
void ParseUpgrade_V1_0(const json &print_jj);
|
||||
void ParseUpgradeDisplayState(const json &upgrade_state_jj);
|
||||
void ParseUpgrade_V1_0(const nlohmann::json &print_jj);
|
||||
void ParseUpgradeDisplayState(const nlohmann::json &upgrade_state_jj);
|
||||
|
||||
protected:
|
||||
DevUpgrade(MachineObject *owner) : m_owner(owner) {}
|
||||
@@ -90,7 +89,7 @@ public:
|
||||
public:
|
||||
int CtrlGetVersion(bool with_retry = true);
|
||||
|
||||
void ParseGetVersion(const json &print_jj);
|
||||
void ParseGetVersion(const nlohmann::json &print_jj);
|
||||
|
||||
private:
|
||||
MachineObject *m_owner;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#include "DevUpgrade.h"
|
||||
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/DeviceManager.hpp"
|
||||
#include <string>
|
||||
#include "slic3r/GUI/DeviceCore/DevFirmware.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
int DevUpgrade::CtrlUpgradeConfirm()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "PrinterNetworkTypes.hpp"
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "DeviceManager.hpp"
|
||||
#include "HMS.hpp"
|
||||
#include "I18N.hpp"
|
||||
@@ -105,6 +105,8 @@
|
||||
#include "libslic3r/PresetBundle.hpp"
|
||||
#include "slic3r/GUI/Jobs/SendJob.hpp"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
class wxWindow;
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
#define END_SEQ_ID 30000
|
||||
#define SUBSCRIBE_RETRY_COUNT 5
|
||||
|
||||
using namespace nlohmann;
|
||||
namespace Slic3r {
|
||||
|
||||
namespace GUI
|
||||
@@ -467,7 +466,7 @@ public:
|
||||
std::string get_print_error_str() const { return MachineObject::get_error_code_str(this->print_error); }
|
||||
|
||||
std::unordered_set<GUI::DeviceErrorDialog*> m_command_error_code_dlgs;
|
||||
void add_command_error_code_dlg(int command_err, json action_json=json{});
|
||||
void add_command_error_code_dlg(int command_err, nlohmann::json action_json=nlohmann::json{});
|
||||
|
||||
int curr_layer = 0;
|
||||
int total_layers = 0;
|
||||
@@ -759,9 +758,9 @@ public:
|
||||
int command_set_printer_nozzle2(int id, std::string nozzle_type, float diameter);
|
||||
int command_get_access_code();
|
||||
int command_start_camera();
|
||||
int command_ack_proceed(json& proceed);
|
||||
int command_ack_proceed(nlohmann::json& proceed);
|
||||
int command_purification_disable();
|
||||
int command_dont_remind_next_time(json& mqtt_guard_json);
|
||||
int command_dont_remind_next_time(nlohmann::json& mqtt_guard_json);
|
||||
|
||||
/* command upgrade */
|
||||
int command_upgrade_confirm();
|
||||
@@ -887,7 +886,7 @@ public:
|
||||
static bool is_in_printing_status(std::string status);
|
||||
|
||||
void set_print_state(std::string status);
|
||||
void update_print_progress(const json& value);
|
||||
void update_print_progress(const nlohmann::json& value);
|
||||
|
||||
bool is_connected();
|
||||
bool is_connecting();
|
||||
@@ -903,7 +902,7 @@ public:
|
||||
|
||||
/* Msg for display MsgFn */
|
||||
typedef std::function<void(std::string topic, std::string payload)> MsgFn;
|
||||
int publish_json(const json& json_item, int qos = 0, int flag = 0) ;
|
||||
int publish_json(const nlohmann::json& json_item, int qos = 0, int flag = 0) ;
|
||||
int publish_json(const std::string& json_str, int qos = 0, int flag = 0) = delete;
|
||||
int cloud_publish_json(std::string json_str, int qos = 0, int flag = 0);
|
||||
int local_publish_json(std::string json_str, int qos = 0, int flag = 0);
|
||||
@@ -947,16 +946,16 @@ public:
|
||||
* or scenarios where users want to bypass the AMS.
|
||||
*/
|
||||
std::vector<DevAmsTray> vt_slot;
|
||||
DevAmsTray parse_vt_tray(json vtray);
|
||||
DevAmsTray parse_vt_tray(nlohmann::json vtray);
|
||||
|
||||
/*get ams slot info*/
|
||||
bool contains_tray(const std::string &ams_id, const std::string &tray_id) const;
|
||||
DevAmsTray get_tray(const std::string &ams_id, const std::string &tray_id) const;/*use contains_tray() check first*/
|
||||
|
||||
/*for parse new info*/
|
||||
bool check_enable_np(const json& print) const;
|
||||
void parse_new_info(json print);
|
||||
void parse_new_info2(const json& info);
|
||||
bool check_enable_np(const nlohmann::json& print) const;
|
||||
void parse_new_info(nlohmann::json print);
|
||||
void parse_new_info2(const nlohmann::json& info);
|
||||
int get_flag_bits(std::string str, int start, int count = 1) const;
|
||||
uint32_t get_flag_bits_no_border(std::string str, int start_idx, int count = 1) const;
|
||||
int get_flag_bits(int num, int start, int count = 1, int base = 10) const;
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
|
||||
void on_script_message(const nlohmann::json& payload) override;
|
||||
void OnRequestPresets();
|
||||
void OnExportData(const wxString& path, const wxString& name, json data);
|
||||
void OnExportData(const wxString& path, const wxString& name, nlohmann::json data);
|
||||
|
||||
protected:
|
||||
bool m_seq_top_layer_only_changed{false};
|
||||
|
||||
@@ -2816,7 +2816,7 @@ void GCodeViewer::render_all_plates_stats(const std::vector<const GCodeProcessor
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
auto calculate_offsets = [max_width, window_padding](const std::vector<std::pair<std::string, std::vector<::string>>>& title_columns, float extra_size = 0.0f) {
|
||||
auto calculate_offsets = [max_width, window_padding](const std::vector<std::pair<std::string, std::vector<std::string>>>& title_columns, float extra_size = 0.0f) {
|
||||
const ImGuiStyle& style = ImGui::GetStyle();
|
||||
std::vector<float> offsets;
|
||||
offsets.push_back(max_width(title_columns[0].second, title_columns[0].first, extra_size) + 3.0f * style.ItemSpacing.x + style.WindowPadding.x);
|
||||
@@ -2963,7 +2963,7 @@ void GCodeViewer::render_all_plates_stats(const std::vector<const GCodeProcessor
|
||||
}
|
||||
::sprintf(buff, "%.2f", longest_str);
|
||||
|
||||
std::vector<std::pair<std::string, std::vector<::string>>> title_columns;
|
||||
std::vector<std::pair<std::string, std::vector<std::string>>> title_columns;
|
||||
if (displayed_columns & ColumnData::Model) {
|
||||
title_columns.push_back({ _u8L("Filament"), {""} });
|
||||
title_columns.push_back({ _u8L("Model"), {buff} });
|
||||
@@ -3184,7 +3184,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
float ams_item_height = 0;
|
||||
float filament_group_item_align_width = 0;
|
||||
{
|
||||
float three_words_width = imgui.calc_text_size("ABC"sv).x;
|
||||
float three_words_width = imgui.calc_text_size(std::string_view("ABC")).x;
|
||||
const int line_capacity = 4;
|
||||
|
||||
for (const auto& extruder_filaments : {m_left_extruder_filament,m_right_extruder_filament })
|
||||
@@ -3195,8 +3195,8 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
for (int j = idx; j < extruder_filaments.size() && j < idx + line_capacity; ++j) {
|
||||
auto text_info = imgui.calculate_filament_group_text_size(get_filament_display_type(extruder_filaments[j]));
|
||||
auto text_size = std::get<0>(text_info);
|
||||
filament_group_item_align_width = max(filament_group_item_align_width, text_size.x);
|
||||
text_line_height = max(text_line_height, text_size.y);
|
||||
filament_group_item_align_width = std::max(filament_group_item_align_width, text_size.x);
|
||||
text_line_height = std::max(text_line_height, text_size.y);
|
||||
}
|
||||
container_height += (three_words_width * 1.3f + text_line_height );
|
||||
}
|
||||
@@ -3589,7 +3589,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||
return ret;
|
||||
};
|
||||
|
||||
auto calculate_offsets = [max_width, this](const std::vector<std::pair<std::string, std::vector<::string>>>& title_columns, float extra_size = 0.0f) {
|
||||
auto calculate_offsets = [max_width, this](const std::vector<std::pair<std::string, std::vector<std::string>>>& title_columns, float extra_size = 0.0f) {
|
||||
const ImGuiStyle& style = ImGui::GetStyle();
|
||||
std::vector<float> offsets;
|
||||
// ORCA increase spacing for more readable format. Using direct number requires much less code change in here. GetTextLineHeight for additional spacing for icon_size
|
||||
@@ -4014,7 +4014,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||
total_filaments.push_back(buffer);
|
||||
|
||||
|
||||
std::vector<std::pair<std::string, std::vector<::string>>> title_columns;
|
||||
std::vector<std::pair<std::string, std::vector<std::string>>> title_columns;
|
||||
if (displayed_columns & ColumnData::Model) {
|
||||
title_columns.push_back({ _u8L("Filament"), {""} });
|
||||
title_columns.push_back({ _u8L("Model"), total_filaments });
|
||||
|
||||
@@ -311,6 +311,7 @@ typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS2)(
|
||||
|
||||
using namespace std::literals;
|
||||
namespace pt = boost::property_tree;
|
||||
using json = nlohmann::json;
|
||||
|
||||
struct StaticBambuLib
|
||||
{
|
||||
|
||||
@@ -3651,7 +3651,7 @@ void GLGizmoCut3D::perform_cut(const Selection& selection)
|
||||
// model_name failing reason
|
||||
std::vector<std::pair<std::string, std::string>> failed_models;
|
||||
auto plater = wxGetApp().plater();
|
||||
auto fix_and_update_progress = [keep_painting](ModelObject *model_object, const int vol_idx, const string &model_name, ProgressDialog &progress_dlg,
|
||||
auto fix_and_update_progress = [keep_painting](ModelObject *model_object, const int vol_idx, const std::string &model_name, ProgressDialog &progress_dlg,
|
||||
std::vector<std::string> &succes_models, std::vector<std::pair<std::string, std::string>> &failed_models) {
|
||||
wxString msg = _L("Repairing model object");
|
||||
msg += ": " + from_u8(model_name) + "\n";
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "DeviceCore/DevManager.h"
|
||||
#include "DeviceCore/DevUtil.h"
|
||||
#include "Http.hpp"
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "libslic3r/AppConfig.hpp"
|
||||
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <ctime>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
using json = nlohmann::json;
|
||||
|
||||
static const char* HMS_PATH = "hms";
|
||||
static const char* HMS_LOCAL_IMG_PATH = "hms/local_image";
|
||||
|
||||
@@ -1405,7 +1405,7 @@ void IMSlider::render_input_custom_gcode(std::string custom_gcode)
|
||||
}
|
||||
|
||||
void IMSlider::do_go_to_layer(size_t layer_number) {
|
||||
layer_number = clamp((int)layer_number, m_min_value, m_max_value);
|
||||
layer_number = std::clamp((int)layer_number, m_min_value, m_max_value);
|
||||
GetSelection() == ssLower ? SetLowerValue(layer_number) : SetHigherValue(layer_number);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <functional>
|
||||
#include <cstddef>
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <wx/string.h>
|
||||
#include "slic3r/GUI/PartPlate.hpp"
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "SendJob.hpp"
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "bambu_networking.hpp"
|
||||
#include "libslic3r/LifecycleEvents.hpp"
|
||||
#include "slic3r/GUI/I18N.hpp"
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "slic3r/GUI/Widgets/SideMenuPopup.hpp"
|
||||
#include <utility>
|
||||
#include "libslic3r/libslic3r.h"
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <algorithm>
|
||||
#include <wx/dirdlg.h>
|
||||
#include <exception>
|
||||
@@ -155,6 +155,8 @@
|
||||
#include <wx/window.h>
|
||||
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
#include "../Utils/MacDarkMode.hpp"
|
||||
#endif
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "slic3r/GUI/Widgets/WebView.hpp"
|
||||
#include <wx/log.h>
|
||||
#include <wx/webview.h>
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <exception>
|
||||
#include <wx/wx.h>
|
||||
#include <wx/sizer.h>
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "GUI_App.hpp"
|
||||
#include "Plater.hpp"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r::GUI { class Plater; }
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "slic3r/GUI/StatusPanel.hpp"
|
||||
#include "slic3r/GUI/UpgradePanel.hpp"
|
||||
#include "slic3r/GUI/Widgets/SideTools.hpp"
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <wx/app.h>
|
||||
#include <wx/bookctrl.h>
|
||||
#include <wx/button.h>
|
||||
@@ -57,6 +57,8 @@
|
||||
#include "slic3r/GUI/I18N.hpp"
|
||||
#include "slic3r/GUI/Widgets/Button.hpp"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
|
||||
@@ -631,8 +631,8 @@ private:
|
||||
// Aditional text after hypertext - currently not used
|
||||
std::string m_text2;
|
||||
// mark for render operation
|
||||
size_t pos_start = string::npos;
|
||||
size_t pos_end = string::npos;
|
||||
size_t pos_start = std::string::npos;
|
||||
size_t pos_end = std::string::npos;
|
||||
std::string error_start = "<Error>";
|
||||
std::string error_end = "</Error>";
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include "slic3r/GUI/GUI.hpp"
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <wx/app.h>
|
||||
#include <wx/event.h>
|
||||
#include <wx/filename.h>
|
||||
@@ -32,6 +32,9 @@
|
||||
#include <OrcaCloudServiceAgent.hpp>
|
||||
#include <wx/event.h>
|
||||
#include <wx/utils.h>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
PresetBundleDialog::PresetBundleDialog(
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
//#define PRINTER_FILE_SYSTEM_TEST
|
||||
#endif
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
std::string last_system_error() {
|
||||
return Slic3r::decode_path(std::error_code(
|
||||
#ifdef _WIN32
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
|
||||
#include "nlohmann/json_fwd.hpp"
|
||||
using nlohmann::json;
|
||||
|
||||
#include <functional>
|
||||
#include <deque>
|
||||
@@ -290,17 +289,17 @@ private:
|
||||
static void DumpLog(void* context, int level, tchar const *msg);
|
||||
|
||||
private:
|
||||
template<typename T> using Translator = std::function<int(json const &, T &, unsigned char const *)>;
|
||||
template<typename T> using Translator = std::function<int(nlohmann::json const &, T &, unsigned char const *)>;
|
||||
|
||||
typedef std::function<void(int, json const & resp)> callback_t;
|
||||
typedef std::function<void(int, nlohmann::json const & resp)> callback_t;
|
||||
|
||||
typedef std::function<int(int, json const &resp, unsigned char const *data)> callback_t2;
|
||||
typedef std::function<int(int, nlohmann::json const &resp, unsigned char const *data)> callback_t2;
|
||||
|
||||
typedef std::function<int(std::string &msg)> callback_t3;
|
||||
|
||||
template<typename T> boost::uint32_t SendRequest(int type, json const &req, Translator<T> const &translator, Callback<T> const &callback, const std::string ¶m = "")
|
||||
template<typename T> boost::uint32_t SendRequest(int type, nlohmann::json const &req, Translator<T> const &translator, Callback<T> const &callback, const std::string ¶m = "")
|
||||
{
|
||||
auto c = [translator, callback, this](int result, json const &resp, unsigned char const *data) -> int
|
||||
auto c = [translator, callback, this](int result, nlohmann::json const &resp, unsigned char const *data) -> int
|
||||
{
|
||||
T t;
|
||||
if (result == 0 || result == CONTINUE || result == FILE_EXIST) {
|
||||
@@ -323,7 +322,7 @@ private:
|
||||
template<typename T>
|
||||
void InstallNotify(int type, Translator<T> const& translator, Applier<T> const& applier)
|
||||
{
|
||||
auto c = [translator, applier, this](int result, json const &resp, unsigned char const *data) -> int
|
||||
auto c = [translator, applier, this](int result, nlohmann::json const &resp, unsigned char const *data) -> int
|
||||
{
|
||||
T t;
|
||||
if (result == 0 || result == CONTINUE) {
|
||||
@@ -345,7 +344,7 @@ private:
|
||||
InstallNotify(type, c);
|
||||
}
|
||||
|
||||
boost::uint32_t SendRequest(int type, json const &req, callback_t2 const &callback, const std::string ¶m = "");
|
||||
boost::uint32_t SendRequest(int type, nlohmann::json const &req, callback_t2 const &callback, const std::string ¶m = "");
|
||||
|
||||
void InstallNotify(int type, callback_t2 const &callback);
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/settings.h>
|
||||
#include <cstddef>
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include "slic3r/GUI/GUI.hpp"
|
||||
#include <exception>
|
||||
#include <wx/msgdlg.h>
|
||||
@@ -30,6 +29,9 @@
|
||||
|
||||
#include <sstream>
|
||||
#include <slic3r/GUI/Widgets/WebView.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
//------------------------------------------
|
||||
// PrinterCloundAuthDialog
|
||||
//------------------------------------------
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <string>
|
||||
#include "slic3r/GUI/GUI.hpp"
|
||||
#include "slic3r/GUI/Auxiliary.hpp"
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <map>
|
||||
@@ -54,7 +54,8 @@
|
||||
#include <slic3r/GUI/Widgets/WebView.hpp>
|
||||
#include "slic3r/GUI/Jobs/SendJob.hpp"
|
||||
#include "slic3r/GUI/Plater.hpp"
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
class wxWindow;
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <wx/timer.h>
|
||||
|
||||
#include "nlohmann/json.hpp"
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
#include <atomic>
|
||||
#include <map>
|
||||
@@ -109,7 +108,7 @@ public:
|
||||
void OnScriptMessage(wxWebViewEvent& evt);
|
||||
void RunScript(std::string content);
|
||||
|
||||
std::map<std::string, std::vector<json>> Reload(wxString aux_path);
|
||||
std::map<std::string, std::vector<nlohmann::json>> Reload(wxString aux_path);
|
||||
std::string formatBytes(unsigned long bytes);
|
||||
wxString to_base64(std::string path);
|
||||
};
|
||||
|
||||
@@ -74,6 +74,8 @@
|
||||
#include "slic3r/Utils/NetworkAgent.hpp"
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r::GUI { class Plater; }
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#include <cstdio>
|
||||
#include <cstddef>
|
||||
#include "libslic3r/Config.hpp"
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <exception>
|
||||
#include <cstdlib>
|
||||
#include <map>
|
||||
@@ -133,6 +133,8 @@
|
||||
#include "slic3r/Utils/NetworkAgent.hpp"
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r { class PrintBase; }
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "slic3r/GUI/DeviceCore/DevDefs.h"
|
||||
#include "slic3r/GUI/PartPlate.hpp"
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/MsgDialog.hpp"
|
||||
#include "slic3r/GUI/Widgets/Label.hpp"
|
||||
#include "slic3r/GUI/Widgets/TextInput.hpp"
|
||||
@@ -77,6 +77,7 @@
|
||||
#include <wx/dcgraph.h>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <unordered_set>
|
||||
#include "slic3r/GUI/wxMediaCtrl3.h"
|
||||
#include "slic3r/GUI/Widgets/StaticBox.hpp"
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <boost/date_time/posix_time/ptime.hpp>
|
||||
#include <map>
|
||||
#include "libslic3r/calib.hpp"
|
||||
@@ -689,7 +689,7 @@ protected:
|
||||
int m_last_vcamera = -1;
|
||||
int m_model_mall_request_count = 0;
|
||||
bool m_is_load_with_temp = false;
|
||||
json m_rating_result;
|
||||
nlohmann::json m_rating_result;
|
||||
|
||||
wxWebRequest web_request;
|
||||
bool bed_temp_input = false;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "libslic3r/Utils.hpp"
|
||||
#include <string>
|
||||
#include "slic3r/GUI/BBLStatusBarPrint.hpp"
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <cassert>
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
#include <cstdlib>
|
||||
@@ -85,6 +85,7 @@
|
||||
#include "slic3r/Utils/NetworkAgent.hpp"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
using json = nlohmann::json;
|
||||
|
||||
using namespace Slic3r;
|
||||
using namespace Slic3r::GUI;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
|
||||
using namespace nlohmann;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "UserManager.hpp"
|
||||
#include "BindDialog.hpp"
|
||||
#include "GUI_App.hpp"
|
||||
@@ -10,6 +10,8 @@
|
||||
#include <wx/string.h>
|
||||
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
UserManager::UserManager(NetworkAgent* agent)
|
||||
|
||||
@@ -9,12 +9,9 @@
|
||||
#include <chrono>
|
||||
#include <boost/thread.hpp>
|
||||
#include "nlohmann/json.hpp"
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
#include "slic3r/Utils/NetworkAgent.hpp"
|
||||
|
||||
|
||||
using namespace nlohmann;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
class NetworkAgent;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "slic3r/GUI/GUI.hpp"
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <exception>
|
||||
#include <string.h>
|
||||
#include "I18N.hpp"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "libslic3r/PresetBundle.hpp"
|
||||
#include "libslic3r/PresetCacheFormat.hpp"
|
||||
#include "slic3r/GUI/GUI_App.hpp"
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "libslic3r_version.h"
|
||||
|
||||
#include <string>
|
||||
@@ -78,7 +78,6 @@
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
#include "slic3r/Utils/NetworkAgent.hpp"
|
||||
#include "slic3r/Utils/PresetUpdater.hpp"
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
class wxWindow;
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "slic3r/GUI/HttpServer.hpp"
|
||||
#include <memory>
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include "slic3r/GUI/GUI.hpp"
|
||||
#include <exception>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <wx/filename.h>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <functional>
|
||||
#include <cstddef>
|
||||
#include <wx/dialog.h>
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <wx/infobar.h>
|
||||
|
||||
namespace pt = boost::property_tree;
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "../I18N.hpp"
|
||||
#include "../GUI_App.hpp"
|
||||
#include "../MsgDialog.hpp"
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include <wx/anybutton.h>
|
||||
#include <wx/event.h>
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/sizer.h>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
wxDEFINE_EVENT(EVT_FAN_SWITCH_ON, wxCommandEvent);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "Label.hpp"
|
||||
#include "ComboBox.hpp"
|
||||
#include "StaticBox.hpp"
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "libslic3r/PresetBundle.hpp"
|
||||
#include "libslic3r/Utils.hpp"
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
|
||||
@@ -38,11 +38,12 @@
|
||||
#include "Widgets/Label.hpp"
|
||||
#include "MainFrame.hpp"
|
||||
#include "libslic3r/PresetBundle.hpp"
|
||||
#include "slic3r/GUI/Printer/PrinterFileSystem.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/GUI/Jobs/SendJob.hpp"
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
class wxWindow;
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
@@ -453,7 +453,7 @@ wxBitmap create_scaled_bitmap( const std::string& bmp_name_in,
|
||||
const bool menu_bitmap/* = false*/,
|
||||
const bool resize/* = false*/,
|
||||
const bool bitmap2/* = false*/,
|
||||
const vector<std::string>& array_new_color/* = vector<std::string>*/)//used for semi transparent material)
|
||||
const std::vector<std::string>& array_new_color/* = vector<std::string>*/)//used for semi transparent material)
|
||||
{
|
||||
static Slic3r::GUI::BitmapCache cache;
|
||||
|
||||
@@ -501,7 +501,7 @@ wxBitmap create_scaled_bitmap( const std::string& bmp_name_in,
|
||||
|
||||
wxBitmap create_scaled_bitmap2(const std::string& bmp_name_in, Slic3r::GUI::BitmapCache& cache, wxWindow* win/* = nullptr*/ ,
|
||||
const int px_cnt/* = 16*/, const bool grayscale/* = false*/ , const bool resize/* = false*/ ,
|
||||
const vector<std::string>& array_new_color/* = vector<std::string>()*/) // color witch will used instead of orange
|
||||
const std::vector<std::string>& array_new_color/* = vector<std::string>()*/) // color witch will used instead of orange
|
||||
{
|
||||
unsigned int width = 0;
|
||||
// win may be nullptr; see create_scaled_bitmap() above.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "NetworkAgent.hpp"
|
||||
#include "../GUI/Jobs/ProgressIndicator.hpp"
|
||||
#include "../GUI/PartPlate.hpp"
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "libslic3r/CutUtils.hpp"
|
||||
#include "libslic3r/ClipperUtils.hpp"
|
||||
#include "libslic3r/Utils.hpp"
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <wx/event.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include "json_diff.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "libslic3r/format.hpp"
|
||||
#include "libslic3r/Utils.hpp"
|
||||
#include "libslic3r/PresetBundle.hpp"
|
||||
@@ -58,6 +58,8 @@
|
||||
#include "slic3r/GUI/MarkdownTip.hpp"
|
||||
#include "libslic3r/miniz_extension.hpp"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace Slic3r::GUI::Config { class Snapshot; }
|
||||
namespace Slic3r::GUI::Config { class SnapshotDB; }
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "nlohmann/json.hpp"
|
||||
|
||||
|
||||
using json = nlohmann::json;
|
||||
using namespace std;
|
||||
|
||||
class json_diff
|
||||
@@ -16,25 +15,25 @@ class json_diff
|
||||
private:
|
||||
std::string printer_type;
|
||||
std::string printer_version = "00.00.00.00";
|
||||
json settings_base;
|
||||
json full_message;
|
||||
nlohmann::json settings_base;
|
||||
nlohmann::json full_message;
|
||||
|
||||
json diff2all_base;
|
||||
json all2diff_base;
|
||||
nlohmann::json diff2all_base;
|
||||
nlohmann::json all2diff_base;
|
||||
int decode_error_count = 0;
|
||||
|
||||
int diff_objects(json const &in, json &out, json const &base);
|
||||
int restore_objects(json const &in, json &out, json const &base);
|
||||
int restore_append_objects(json const &in, json &out);
|
||||
void merge_objects(json const &in, json &out);
|
||||
int diff_objects(nlohmann::json const &in, nlohmann::json &out, nlohmann::json const &base);
|
||||
int restore_objects(nlohmann::json const &in, nlohmann::json &out, nlohmann::json const &base);
|
||||
int restore_append_objects(nlohmann::json const &in, nlohmann::json &out);
|
||||
void merge_objects(nlohmann::json const &in, nlohmann::json &out);
|
||||
|
||||
public:
|
||||
bool load_compatible_settings(std::string const &type, std::string const &version);
|
||||
int all2diff(json const &in, json &out);
|
||||
int diff2all(json const &in, json &out);
|
||||
int all2diff_base_reset(json const &base);
|
||||
int diff2all_base_reset(json &base);
|
||||
void compare_print(json &a, json &b);
|
||||
int all2diff(nlohmann::json const &in, nlohmann::json &out);
|
||||
int diff2all(nlohmann::json const &in, nlohmann::json &out);
|
||||
int all2diff_base_reset(nlohmann::json const &base);
|
||||
int diff2all_base_reset(nlohmann::json &base);
|
||||
void compare_print(nlohmann::json &a, nlohmann::json &b);
|
||||
|
||||
bool is_need_request();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user