mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-29 12:58:03 +00:00
fix: remove heavy includes from IPrinterAgent
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#include "boost/bimap/bimap.hpp"
|
#include "boost/bimap/bimap.hpp"
|
||||||
#include "libslic3r/calib.hpp"
|
#include "libslic3r/calib.hpp"
|
||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
|
#include "slic3r/Utils/PrinterNetworkTypes.hpp"
|
||||||
|
|
||||||
#include "DeviceCore/DevDefs.h"
|
#include "DeviceCore/DevDefs.h"
|
||||||
#include "DeviceCore/DevConfigUtil.h"
|
#include "DeviceCore/DevConfigUtil.h"
|
||||||
@@ -100,33 +101,6 @@ struct DevPrintTaskRatingInfo;
|
|||||||
// given nozzle diameter (mm), bucketed per nozzle size to mirror the printer firmware.
|
// given nozzle diameter (mm), bucketed per nozzle size to mirror the printer firmware.
|
||||||
bool is_stringing_prone_filament(const std::string& filament_id, float nozzle_diameter);
|
bool is_stringing_prone_filament(const std::string& filament_id, float nozzle_diameter);
|
||||||
|
|
||||||
enum LiveviewLocal {
|
|
||||||
LVL_None,
|
|
||||||
LVL_Disable,
|
|
||||||
LVL_Local,
|
|
||||||
LVL_Rtsps,
|
|
||||||
LVL_Rtsp
|
|
||||||
};
|
|
||||||
|
|
||||||
enum LiveviewRemote {
|
|
||||||
LVR_None,
|
|
||||||
LVR_Tutk,
|
|
||||||
LVR_Agora,
|
|
||||||
LVR_TutkAgora
|
|
||||||
};
|
|
||||||
|
|
||||||
enum FileLocal {
|
|
||||||
FL_None,
|
|
||||||
FL_Local
|
|
||||||
};
|
|
||||||
|
|
||||||
enum FileRemote {
|
|
||||||
FR_None,
|
|
||||||
FR_Tutk,
|
|
||||||
FR_Agora,
|
|
||||||
FR_TutkAgora
|
|
||||||
};
|
|
||||||
|
|
||||||
class MachineObject
|
class MachineObject
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
#define __I_PRINTER_AGENT_HPP__
|
#define __I_PRINTER_AGENT_HPP__
|
||||||
|
|
||||||
#include "bambu_networking.hpp"
|
#include "bambu_networking.hpp"
|
||||||
#include <slic3r/GUI/DeviceManager.hpp>
|
|
||||||
// why: these extend the BAMBU_NETWORK_* return space rather than opening a new one - the value
|
// why: these extend the BAMBU_NETWORK_* return space rather than opening a new one - the value
|
||||||
// flows through the same int domain callers already compare against BAMBU_NETWORK_SUCCESS.
|
// flows through the same int domain callers already compare against BAMBU_NETWORK_SUCCESS.
|
||||||
// They live here and not in bambu_networking.hpp because that file is a vendor header replaced
|
// They live here and not in bambu_networking.hpp because that file is a vendor header replaced
|
||||||
@@ -16,7 +15,7 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "NetworkAgent.hpp"
|
#include "PrinterNetworkTypes.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "libslic3r/ProjectTask.hpp"
|
#include "libslic3r/ProjectTask.hpp"
|
||||||
#include "ICloudServiceAgent.hpp"
|
#include "ICloudServiceAgent.hpp"
|
||||||
#include "slic3r/GUI/DeviceManager.hpp"
|
#include "PrinterNetworkTypes.hpp"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@@ -17,50 +17,6 @@ namespace Slic3r {
|
|||||||
class IPrinterAgent;
|
class IPrinterAgent;
|
||||||
enum class FilamentSyncMode;
|
enum class FilamentSyncMode;
|
||||||
|
|
||||||
enum URL_STATE {
|
|
||||||
URL_TCP,
|
|
||||||
URL_TUTK,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct CameraURLParams {
|
|
||||||
std::string ip_address;
|
|
||||||
std::string user;
|
|
||||||
std::string password;
|
|
||||||
LiveviewLocal protocol;
|
|
||||||
std::string device;
|
|
||||||
std::string network_version;
|
|
||||||
std::string device_version;
|
|
||||||
std::string refresh_url;
|
|
||||||
std::string client_id;
|
|
||||||
std::string client_version;
|
|
||||||
bool apply_meta{false};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct FileTransferURLParams {
|
|
||||||
URL_STATE url_state{URL_TCP};
|
|
||||||
std::string ip_address;
|
|
||||||
std::string username;
|
|
||||||
std::string password;
|
|
||||||
std::string device_id;
|
|
||||||
std::string network_version;
|
|
||||||
std::string device_version;
|
|
||||||
std::string refresh_url;
|
|
||||||
std::string client_id;
|
|
||||||
std::string client_version;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct FileTransferURLResult {
|
|
||||||
bool is_success{false};
|
|
||||||
std::string url;
|
|
||||||
int error_code{-1};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct CameraURLResult {
|
|
||||||
bool is_success{false};
|
|
||||||
std::string url;
|
|
||||||
int error_code{-1};
|
|
||||||
};
|
|
||||||
|
|
||||||
// Forward declaration
|
// Forward declaration
|
||||||
class BBLNetworkPlugin;
|
class BBLNetworkPlugin;
|
||||||
|
|
||||||
|
|||||||
78
src/slic3r/Utils/PrinterNetworkTypes.hpp
Normal file
78
src/slic3r/Utils/PrinterNetworkTypes.hpp
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace Slic3r {
|
||||||
|
|
||||||
|
enum LiveviewLocal {
|
||||||
|
LVL_None,
|
||||||
|
LVL_Disable,
|
||||||
|
LVL_Local,
|
||||||
|
LVL_Rtsps,
|
||||||
|
LVL_Rtsp
|
||||||
|
};
|
||||||
|
|
||||||
|
enum LiveviewRemote {
|
||||||
|
LVR_None,
|
||||||
|
LVR_Tutk,
|
||||||
|
LVR_Agora,
|
||||||
|
LVR_TutkAgora
|
||||||
|
};
|
||||||
|
|
||||||
|
enum FileLocal {
|
||||||
|
FL_None,
|
||||||
|
FL_Local
|
||||||
|
};
|
||||||
|
|
||||||
|
enum FileRemote {
|
||||||
|
FR_None,
|
||||||
|
FR_Tutk,
|
||||||
|
FR_Agora,
|
||||||
|
FR_TutkAgora
|
||||||
|
};
|
||||||
|
|
||||||
|
enum URL_STATE {
|
||||||
|
URL_TCP,
|
||||||
|
URL_TUTK,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CameraURLParams {
|
||||||
|
std::string ip_address;
|
||||||
|
std::string user;
|
||||||
|
std::string password;
|
||||||
|
LiveviewLocal protocol;
|
||||||
|
std::string device;
|
||||||
|
std::string network_version;
|
||||||
|
std::string device_version;
|
||||||
|
std::string refresh_url;
|
||||||
|
std::string client_id;
|
||||||
|
std::string client_version;
|
||||||
|
bool apply_meta{false};
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CameraURLResult {
|
||||||
|
bool is_success{false};
|
||||||
|
std::string url;
|
||||||
|
int error_code{-1};
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FileTransferURLParams {
|
||||||
|
URL_STATE url_state{URL_TCP};
|
||||||
|
std::string ip_address;
|
||||||
|
std::string username;
|
||||||
|
std::string password;
|
||||||
|
std::string device_id;
|
||||||
|
std::string network_version;
|
||||||
|
std::string device_version;
|
||||||
|
std::string refresh_url;
|
||||||
|
std::string client_id;
|
||||||
|
std::string client_version;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FileTransferURLResult {
|
||||||
|
bool is_success{false};
|
||||||
|
std::string url;
|
||||||
|
int error_code{-1};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Slic3r
|
||||||
@@ -1,15 +1,3 @@
|
|||||||
#ifdef ORCA_PYTHON_STUBGEN_MODULE
|
|
||||||
#ifdef _WIN32
|
|
||||||
#ifndef WIN32_LEAN_AND_MEAN
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#endif
|
|
||||||
#ifndef NOMINMAX
|
|
||||||
#define NOMINMAX
|
|
||||||
#endif
|
|
||||||
#include <Windows.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "PythonPluginBridge.hpp"
|
#include "PythonPluginBridge.hpp"
|
||||||
|
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
@@ -25,7 +13,6 @@
|
|||||||
#include <pybind11/stl.h>
|
#include <pybind11/stl.h>
|
||||||
|
|
||||||
#include "PythonInterpreter.hpp"
|
#include "PythonInterpreter.hpp"
|
||||||
#include "PluginFsUtils.hpp"
|
|
||||||
#include "PluginConfig.hpp"
|
#include "PluginConfig.hpp"
|
||||||
#include "host/PluginHost.hpp"
|
#include "host/PluginHost.hpp"
|
||||||
#include "PyPluginPackage.hpp"
|
#include "PyPluginPackage.hpp"
|
||||||
|
|||||||
Reference in New Issue
Block a user