Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/slic3r/GUI/BedShapeDialog.hpp')
-rw-r--r--src/slic3r/GUI/BedShapeDialog.hpp40
1 files changed, 10 insertions, 30 deletions
diff --git a/src/slic3r/GUI/BedShapeDialog.hpp b/src/slic3r/GUI/BedShapeDialog.hpp
index af84ffb95..032aa2880 100644
--- a/src/slic3r/GUI/BedShapeDialog.hpp
+++ b/src/slic3r/GUI/BedShapeDialog.hpp
@@ -5,11 +5,10 @@
#include "GUI_Utils.hpp"
#include "2DBed.hpp"
-#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
-#include "3DBed.hpp"
-#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
#include "I18N.hpp"
+#include <libslic3r/BuildVolume.hpp>
+
#include <wx/dialog.h>
#include <wx/choicebk.h>
@@ -22,14 +21,11 @@ using ConfigOptionsGroupShp = std::shared_ptr<ConfigOptionsGroup>;
struct BedShape
{
-#if !ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
- enum class Type {
- Rectangular = 0,
- Circular,
- Custom,
- Invalid
+ enum class PageType {
+ Rectangle,
+ Circle,
+ Custom
};
-#endif // !ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
enum class Parameter {
RectSize,
@@ -39,34 +35,18 @@ struct BedShape
BedShape(const ConfigOptionPoints& points);
-#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
- bool is_custom() { return m_type == Bed3D::EShapeType::Custom; }
-#else
- bool is_custom() { return m_type == Type::Custom; }
-#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
+ bool is_custom() { return m_build_volume.type() == BuildVolume::Type::Convex || m_build_volume.type() == BuildVolume::Type::Custom; }
static void append_option_line(ConfigOptionsGroupShp optgroup, Parameter param);
-#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
- static wxString get_name(Bed3D::EShapeType type);
-#else
- static wxString get_name(Type type);
-#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
+ static wxString get_name(PageType type);
- // convert Type to size_t
- size_t get_type();
+ PageType get_page_type();
wxString get_full_name_with_params();
void apply_optgroup_values(ConfigOptionsGroupShp optgroup);
private:
-#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
- Bed3D::EShapeType m_type{ Bed3D::EShapeType::Invalid };
-#else
- Type m_type {Type::Invalid};
-#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
- Vec2d m_rectSize {200, 200};
- Vec2d m_rectOrigin {0, 0};
- double m_diameter {0};
+ BuildVolume m_build_volume;
};
class BedShapePanel : public wxPanel