mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +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;
|
||||
}
|
||||
|
||||
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";
|
||||
|
||||
Reference in New Issue
Block a user