mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-05 23:01:17 +00:00
* Ignore Clipper, libpng, mcut and Boost.Polygon Internals in clang-tidy Each only works through a wrapper or umbrella header: libslic3r/clipper.hpp or clipper_z.hpp configure Clipper before including it, png.h pulls in libpng's config headers, and Boost.Polygon's headers only compile through polygon.hpp or voronoi.hpp. * Ignore minilzo's Config Headers in clang-tidy lzoconf.h and lzodefs.h are internal to minilzo.h, which is what the code includes. * Add Missing Includes Across the Remaining Sources and Tests Covers src/slic3r/Utils, src/slic3r/plugin, src/slic3r/Config, src/libvgcode, src/dev-utils, src/OrcaSlicer.cpp and tests/, the directories left after src/slic3r/GUI and src/libslic3r. Generated with clang-tidy misc-include-cleaner. libvgcode's own headers are included by relative path as in the rest of that library, and Catch2 and pybind11 with angle brackets as elsewhere in the repo. * Make the GUI and Test Headers Compile on Their Own Each now includes, or forward-declares, what it uses instead of relying on what its includers happened to include first. Headers that only compile on one platform, or that nothing built includes, are left alone. * Keep Windows and nanosvg Setup Ahead of the Added Includes OrcaSlicer.cpp and several tests set _WIN32_WINNT, WIN32_LEAN_AND_MEAN or NOMINMAX before including Windows.h, and the profile validator defines NANOSVG_IMPLEMENTATION before any libslic3r header. The added includes had landed above those blocks, which broke the Windows build. * Add the GUI Includes the First Pass Missed Covers headers that only became editable once they compiled on their own, and wx symbols whose suggested header changed as the clang-tidy ignore list grew after the src/slic3r/GUI pass. * Keep the Added Test Includes Below the NOMINMAX Guard test_marchingsquares.cpp and test_texture_displacement.cpp had includes inside #ifndef NOMINMAX, which the tests inherit as defined on Windows from libslic3r, so those were skipped there. .clang-tidy also ignores the MSVC STL and UCRT internals, Boost.Multiprecision's fwd.hpp and CPython's Windows include directory, as in #16068.
83 lines
2.5 KiB
C++
83 lines
2.5 KiB
C++
#ifndef _WIPE_TOWER_DIALOG_H_
|
|
#define _WIPE_TOWER_DIALOG_H_
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <wx/colour.h>
|
|
#include <cstddef>
|
|
#include <wx/dialog.h>
|
|
#include <wx/panel.h>
|
|
#include <wx/event.h>
|
|
#include <wx/string.h>
|
|
#include <wx/webview.h>
|
|
#include "libslic3r/FlushVolCalc.hpp"
|
|
#include "libslic3r/PrintConfig.hpp"
|
|
#include "Widgets/SpinInput.hpp"
|
|
|
|
#include "RammingChart.hpp"
|
|
|
|
|
|
class RammingPanel : public wxPanel {
|
|
public:
|
|
RammingPanel(wxWindow* parent);
|
|
RammingPanel(wxWindow* parent,const std::string& data);
|
|
std::string get_parameters();
|
|
|
|
private:
|
|
Chart* m_chart = nullptr;
|
|
SpinInput* m_widget_volume = nullptr;
|
|
SpinInput* m_widget_ramming_line_width_multiplicator = nullptr;
|
|
SpinInput* m_widget_ramming_step_multiplicator = nullptr;
|
|
SpinInput* m_widget_time = nullptr;
|
|
int m_ramming_step_multiplicator;
|
|
int m_ramming_line_width_multiplicator;
|
|
|
|
void line_parameters_changed();
|
|
};
|
|
|
|
|
|
class RammingDialog : public wxDialog {
|
|
public:
|
|
RammingDialog(wxWindow* parent,const std::string& parameters);
|
|
std::string get_parameters() { return m_output_data; }
|
|
private:
|
|
RammingPanel* m_panel_ramming = nullptr;
|
|
std::string m_output_data;
|
|
};
|
|
|
|
|
|
|
|
bool is_flush_config_modified();
|
|
void open_flushing_dialog(wxEvtHandler *parent, const wxEvent &event);
|
|
|
|
class WipingDialog : public wxDialog
|
|
{
|
|
public:
|
|
using VolumeMatrix = std::vector<std::vector<double>>;
|
|
|
|
WipingDialog(wxWindow* parent, const int max_flush_volume = Slic3r::g_max_flush_volume);
|
|
static VolumeMatrix CalcFlushingVolumes(int extruder_id);
|
|
std::vector<double> GetFlattenMatrix()const;
|
|
std::vector<double> GetMultipliers()const;
|
|
bool GetSubmitFlag() const { return m_submit_flag; }
|
|
|
|
private:
|
|
static int CalcFlushingVolume(const wxColour& from_, const wxColour& to_, int min_flush_volume, int nozzle_flush_dataset);
|
|
wxString BuildTableObjStr();
|
|
wxString BuildTextObjStr(bool multi_language = true);
|
|
void StoreFlushData(int extruder_num, const std::vector<std::vector<double>>& flush_volume_vecs, const std::vector<double>& flush_multipliers);
|
|
// Maps the physical-only matrix shown in the table back onto the full config-indexed matrix.
|
|
std::vector<double> ExpandToFullMatrix(const std::vector<double>& sub_matrix, int nozzle_idx) const;
|
|
|
|
wxWebView* m_webview;
|
|
int m_max_flush_volume;
|
|
|
|
VolumeMatrix m_raw_matrixs;
|
|
std::vector<double> m_flush_multipliers;
|
|
// Config indices of the physical (non-mixed) filaments, in table order.
|
|
std::vector<size_t> m_physical_indices;
|
|
bool m_submit_flag{ false };
|
|
};
|
|
|
|
#endif // _WIPE_TOWER_DIALOG_H_
|