mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Fixed conflicts after merge with master
This commit is contained in:
commit
ab60499298
37 changed files with 1441 additions and 955 deletions
|
@ -19,6 +19,8 @@ class wxMenu;
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
using namespace CustomGCode;
|
||||
|
||||
namespace DoubleSlider {
|
||||
|
||||
/* For exporting GCode in GCodeWriter is used XYZF_NUM(val) = PRECISION(val, 3) for XYZ values.
|
||||
|
@ -78,17 +80,16 @@ enum DrawMode
|
|||
#endif // ENABLE_GCODE_VIEWER
|
||||
};
|
||||
|
||||
using t_mode = CustomGCode::Mode;
|
||||
|
||||
struct TickCode
|
||||
{
|
||||
bool operator<(const TickCode& other) const { return other.tick > this->tick; }
|
||||
bool operator>(const TickCode& other) const { return other.tick < this->tick; }
|
||||
|
||||
int tick = 0;
|
||||
std::string gcode = ColorChangeCode;
|
||||
Type type = ColorChange;
|
||||
int extruder = 0;
|
||||
std::string color;
|
||||
std::string extra;
|
||||
};
|
||||
|
||||
class TickCodeInfo
|
||||
|
@ -102,27 +103,27 @@ class TickCodeInfo
|
|||
|
||||
std::vector<std::string>* m_colors {nullptr};
|
||||
|
||||
std::string get_color_for_tick(TickCode tick, const std::string& code, const int extruder);
|
||||
std::string get_color_for_tick(TickCode tick, Type type, const int extruder);
|
||||
|
||||
public:
|
||||
std::set<TickCode> ticks {};
|
||||
t_mode mode = t_mode::Undef;
|
||||
Mode mode = Undef;
|
||||
|
||||
bool empty() const { return ticks.empty(); }
|
||||
void set_pause_print_msg(const std::string& message) { pause_print_msg = message; }
|
||||
|
||||
bool add_tick(const int tick, std::string& code, int extruder, double print_z);
|
||||
bool add_tick(const int tick, Type type, int extruder, double print_z);
|
||||
bool edit_tick(std::set<TickCode>::iterator it, double print_z);
|
||||
void switch_code(const std::string& code_from, const std::string& code_to);
|
||||
bool switch_code_for_tick(std::set<TickCode>::iterator it, const std::string& code_to, const int extruder);
|
||||
void erase_all_ticks_with_code(const std::string& gcode);
|
||||
void switch_code(Type type_from, Type type_to);
|
||||
bool switch_code_for_tick(std::set<TickCode>::iterator it, Type type_to, const int extruder);
|
||||
void erase_all_ticks_with_code(Type type);
|
||||
|
||||
bool has_tick_with_code(const std::string& gcode);
|
||||
ConflictType is_conflict_tick(const TickCode& tick, t_mode out_mode, int only_extruder, double print_z);
|
||||
bool has_tick_with_code(Type type);
|
||||
ConflictType is_conflict_tick(const TickCode& tick, Mode out_mode, int only_extruder, double print_z);
|
||||
|
||||
// Get used extruders for tick.
|
||||
// Means all extruders(tools) which will be used during printing from current tick to the end
|
||||
std::set<int> get_used_extruders_for_tick(int tick, int only_extruder, double print_z, t_mode force_mode = t_mode::Undef) const;
|
||||
std::set<int> get_used_extruders_for_tick(int tick, int only_extruder, double print_z, Mode force_mode = Undef) const;
|
||||
|
||||
void suppress_plus (bool suppress) { m_suppress_plus = suppress; }
|
||||
void suppress_minus(bool suppress) { m_suppress_minus = suppress; }
|
||||
|
@ -210,16 +211,16 @@ public:
|
|||
void SetSliderValues(const std::vector<double>& values) { m_values = values; }
|
||||
void ChangeOneLayerLock();
|
||||
|
||||
CustomGCode::Info GetTicksValues() const;
|
||||
void SetTicksValues(const Slic3r::CustomGCode::Info &custom_gcode_per_print_z);
|
||||
Info GetTicksValues() const;
|
||||
void SetTicksValues(const Info &custom_gcode_per_print_z);
|
||||
|
||||
void SetDrawMode(bool is_sla_print, bool is_sequential_print);
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
void SetDrawMode(DrawMode mode) { m_draw_mode = mode; }
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
|
||||
void SetManipulationMode(t_mode mode) { m_mode = mode; }
|
||||
t_mode GetManipulationMode() const { return m_mode; }
|
||||
void SetManipulationMode(Mode mode) { m_mode = mode; }
|
||||
Mode GetManipulationMode() const { return m_mode; }
|
||||
void SetModeAndOnlyExtruder(const bool is_one_extruder_printed_model, const int only_extruder);
|
||||
void SetExtruderColors(const std::vector<std::string>& extruder_colors);
|
||||
|
||||
|
@ -243,7 +244,7 @@ public:
|
|||
void OnRightDown(wxMouseEvent& event);
|
||||
void OnRightUp(wxMouseEvent& event);
|
||||
|
||||
void add_code_as_tick(std::string code, int selected_extruder = -1);
|
||||
void add_code_as_tick(Type type, int selected_extruder = -1);
|
||||
// add default action for tick, when press "+"
|
||||
void add_current_tick(bool call_from_keyboard = false);
|
||||
// delete current tick, when press "-"
|
||||
|
@ -305,7 +306,7 @@ private:
|
|||
void get_size(int* w, int* h) const;
|
||||
double get_double_value(const SelectedSlider& selection);
|
||||
wxString get_tooltip(int tick = -1);
|
||||
int get_edited_tick_for_position(wxPoint pos, const std::string& gcode = ColorChangeCode);
|
||||
int get_edited_tick_for_position(wxPoint pos, Type type = ColorChange);
|
||||
|
||||
std::string get_color_for_tool_change_tick(std::set<TickCode>::const_iterator it) const;
|
||||
std::string get_color_for_color_change_tick(std::set<TickCode>::const_iterator it) const;
|
||||
|
@ -317,8 +318,8 @@ private:
|
|||
// Use those values to disable selection of active extruders
|
||||
std::array<int, 2> get_active_extruders_for_tick(int tick) const;
|
||||
|
||||
void post_ticks_changed_event(const std::string& gcode = "");
|
||||
bool check_ticks_changed_event(const std::string& gcode);
|
||||
void post_ticks_changed_event(Type type = Custom);
|
||||
bool check_ticks_changed_event(Type type);
|
||||
|
||||
void append_change_extruder_menu_item (wxMenu*, bool switch_current_code = false);
|
||||
void append_add_color_change_menu_item(wxMenu*, bool switch_current_code = false);
|
||||
|
@ -350,7 +351,7 @@ private:
|
|||
|
||||
DrawMode m_draw_mode = dmRegular;
|
||||
|
||||
t_mode m_mode = t_mode::SingleExtruder;
|
||||
Mode m_mode = SingleExtruder;
|
||||
int m_only_extruder = -1;
|
||||
|
||||
MouseAction m_mouse = maNone;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue