mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-27 09:59:48 -07: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:
parent
f391070cb7
commit
8a6a7a0d7d
2 changed files with 18 additions and 0 deletions
|
|
@ -347,6 +347,22 @@ bool PartPlate::get_spiral_vase_mode() const
|
|||
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)
|
||||
{
|
||||
std::string key = "spiral_mode";
|
||||
|
|
|
|||
|
|
@ -264,6 +264,8 @@ public:
|
|||
bool get_spiral_vase_mode() const;
|
||||
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 double plate_x_gap = 0.2;
|
||||
ThumbnailData thumbnail_data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue