mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-01-31 16:08:43 +03:00
Add bed exclude area
This commit is contained in:
@@ -30,7 +30,10 @@ struct BedShape
|
||||
enum class Parameter {
|
||||
RectSize,
|
||||
RectOrigin,
|
||||
Diameter
|
||||
Diameter,
|
||||
//Y20
|
||||
ExcludeMax,
|
||||
ExcludeMin
|
||||
};
|
||||
|
||||
BedShape(const ConfigOptionPoints& points);
|
||||
@@ -44,6 +47,8 @@ struct BedShape
|
||||
|
||||
wxString get_full_name_with_params();
|
||||
void apply_optgroup_values(ConfigOptionsGroupShp optgroup);
|
||||
//Y20
|
||||
void apply_exclude_values(ConfigOptionsGroupShp optgroup);
|
||||
|
||||
private:
|
||||
BuildVolume m_build_volume;
|
||||
@@ -57,25 +62,34 @@ class BedShapePanel : public wxPanel
|
||||
Bed_2D* m_canvas;
|
||||
std::vector<Vec2d> m_shape;
|
||||
std::vector<Vec2d> m_loaded_shape;
|
||||
//Y20
|
||||
std::vector<Vec2d> m_exclude_area;
|
||||
std::string m_custom_texture;
|
||||
std::string m_custom_model;
|
||||
|
||||
public:
|
||||
BedShapePanel(wxWindow* parent) : wxPanel(parent, wxID_ANY), m_custom_texture(NONE), m_custom_model(NONE) {}
|
||||
|
||||
void build_panel(const ConfigOptionPoints& default_pt, const ConfigOptionString& custom_texture, const ConfigOptionString& custom_model);
|
||||
//Y20
|
||||
void build_panel(const ConfigOptionPoints& default_pt, const ConfigOptionPoints& exclude_area, const ConfigOptionString& custom_texture, const ConfigOptionString& custom_model);
|
||||
|
||||
// Returns the resulting bed shape polygon. This value will be stored to the ini file.
|
||||
const std::vector<Vec2d>& get_shape() const { return m_shape; }
|
||||
//Y20
|
||||
const std::vector<Vec2d>& get_exclude_area() const { return m_exclude_area; }
|
||||
const std::string& get_custom_texture() const { return (m_custom_texture != NONE) ? m_custom_texture : EMPTY_STRING; }
|
||||
const std::string& get_custom_model() const { return (m_custom_model != NONE) ? m_custom_model : EMPTY_STRING; }
|
||||
|
||||
private:
|
||||
ConfigOptionsGroupShp init_shape_options_page(const wxString& title);
|
||||
void activate_options_page(ConfigOptionsGroupShp options_group);
|
||||
//Y20
|
||||
wxPanel* init_exclude_panel();
|
||||
ConfigOptionsGroupShp exclude_optgroup;
|
||||
wxPanel* init_texture_panel();
|
||||
wxPanel* init_model_panel();
|
||||
void set_shape(const ConfigOptionPoints& points);
|
||||
//Y20
|
||||
void set_exclude_area(const ConfigOptionPoints& points);
|
||||
void update_preview();
|
||||
void update_shape();
|
||||
void load_stl();
|
||||
@@ -93,10 +107,12 @@ class BedShapeDialog : public DPIDialog
|
||||
BedShapePanel* m_panel;
|
||||
public:
|
||||
BedShapeDialog(wxWindow* parent);
|
||||
|
||||
void build_dialog(const ConfigOptionPoints& default_pt, const ConfigOptionString& custom_texture, const ConfigOptionString& custom_model);
|
||||
//Y20
|
||||
void build_dialog(const ConfigOptionPoints& default_pt, const ConfigOptionPoints& exclude_area, const ConfigOptionString& custom_texture, const ConfigOptionString& custom_model);
|
||||
|
||||
const std::vector<Vec2d>& get_shape() const { return m_panel->get_shape(); }
|
||||
//Y20
|
||||
const std::vector<Vec2d>& get_exclude_area() const { return m_panel->get_exclude_area(); }
|
||||
const std::string& get_custom_texture() const { return m_panel->get_custom_texture(); }
|
||||
const std::string& get_custom_model() const { return m_panel->get_custom_model(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user