diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index ecc30a6812..ea2bb8ef35 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -347,6 +347,22 @@ bool PartPlate::get_spiral_vase_mode() const return false; } +std::vector PartPlate::get_plate_wrapping_detection_area() const +{ + DynamicPrintConfig gconfig = wxGetApp().preset_bundle->printers.get_edited_preset().config; + ConfigOptionPoints *wrapping_path_opt = gconfig.option("wrapping_detection_path"); + ConfigOptionFloat *clearance_max_radius_opt = gconfig.option("extruder_clearance_radius"); + if (wrapping_path_opt && clearance_max_radius_opt) { + std::vector wrapping_area = get_wrapping_detection_area(wrapping_path_opt->values, clearance_max_radius_opt->value / 2); + for (Vec2d &pt : wrapping_area) { + pt += Vec2d(m_origin.x(), m_origin.y()); + } + return wrapping_area; + } + + return std::vector(); +} + void PartPlate::set_spiral_vase_mode(bool spiral_mode, bool as_global) { std::string key = "spiral_mode"; diff --git a/src/slic3r/GUI/PartPlate.hpp b/src/slic3r/GUI/PartPlate.hpp index b82d4219f5..9a40927ba4 100644 --- a/src/slic3r/GUI/PartPlate.hpp +++ b/src/slic3r/GUI/PartPlate.hpp @@ -264,6 +264,8 @@ public: bool get_spiral_vase_mode() const; void set_spiral_vase_mode(bool spiral_mode, bool as_global); + std::vector get_plate_wrapping_detection_area() const; + //static const int plate_x_offset = 20; //mm //static const double plate_x_gap = 0.2; ThumbnailData thumbnail_data;