mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 11:02:08 +00:00
FIX: add wrapping area API for plate
jira: none Change-Id: I574a42a6c17ded0934ae7456eb5ecfc83a5c2a01 (cherry picked from commit 0ed3f527f08808d9ec04f09b5eb114334805be29) (cherry picked from commit c81b2e8cb39400255b2cf1321d2fdb346300fdad) (cherry picked from commit 49f2ed61664c663c189db6a2c94efd6a36d53b9b)
This commit is contained in:
@@ -347,6 +347,22 @@ bool PartPlate::get_spiral_vase_mode() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<Vec2d> PartPlate::get_plate_wrapping_detection_area() const
|
||||||
|
{
|
||||||
|
DynamicPrintConfig gconfig = wxGetApp().preset_bundle->printers.get_edited_preset().config;
|
||||||
|
ConfigOptionPoints *wrapping_path_opt = gconfig.option<ConfigOptionPoints>("wrapping_detection_path");
|
||||||
|
ConfigOptionFloat *clearance_max_radius_opt = gconfig.option<ConfigOptionFloat>("extruder_clearance_radius");
|
||||||
|
if (wrapping_path_opt && clearance_max_radius_opt) {
|
||||||
|
std::vector<Vec2d> 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<Vec2d>();
|
||||||
|
}
|
||||||
|
|
||||||
void PartPlate::set_spiral_vase_mode(bool spiral_mode, bool as_global)
|
void PartPlate::set_spiral_vase_mode(bool spiral_mode, bool as_global)
|
||||||
{
|
{
|
||||||
std::string key = "spiral_mode";
|
std::string key = "spiral_mode";
|
||||||
|
|||||||
@@ -264,6 +264,8 @@ public:
|
|||||||
bool get_spiral_vase_mode() const;
|
bool get_spiral_vase_mode() const;
|
||||||
void set_spiral_vase_mode(bool spiral_mode, bool as_global);
|
void set_spiral_vase_mode(bool spiral_mode, bool as_global);
|
||||||
|
|
||||||
|
std::vector<Vec2d> get_plate_wrapping_detection_area() const;
|
||||||
|
|
||||||
//static const int plate_x_offset = 20; //mm
|
//static const int plate_x_offset = 20; //mm
|
||||||
//static const double plate_x_gap = 0.2;
|
//static const double plate_x_gap = 0.2;
|
||||||
ThumbnailData thumbnail_data;
|
ThumbnailData thumbnail_data;
|
||||||
|
|||||||
Reference in New Issue
Block a user