mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-26 15:07:33 -07:00
ENH: do not reverse wipe for supports
This might help improve the quality and strength of supports. jira: STUDIO-11985 Change-Id: I51644c84b9ede018a08a0f2b8fdca5d271d69991 (cherry picked from commit ba5dbc544b65276d772834305fcca6b5f7536d6e)
This commit is contained in:
parent
0f08d28556
commit
b965d420cf
1 changed files with 14 additions and 2 deletions
|
|
@ -5480,8 +5480,20 @@ std::string GCode::extrude_path(ExtrusionPath path, std::string description, dou
|
|||
// description += ExtrusionEntity::role_to_string(path.role());
|
||||
std::string gcode = this->_extrude(path, description, speed);
|
||||
if (m_wipe.enable && FILAMENT_CONFIG(wipe)) {
|
||||
m_wipe.path = std::move(path.polyline);
|
||||
m_wipe.path.reverse();
|
||||
m_wipe.path = path.polyline;
|
||||
if (is_tree(this->config().support_type) && (path.role() == erSupportMaterial || path.role() == erSupportMaterialInterface || path.role() == erSupportTransition)) {
|
||||
if ((m_wipe.path.first_point() - m_wipe.path.last_point()).cast<double>().norm() > scale_(0.2)) {
|
||||
double min_dist = scale_(0.2);
|
||||
int i = 0;
|
||||
for (; i < path.polyline.points.size(); i++) {
|
||||
double dist = (path.polyline.points[i] - path.last_point()).cast<double>().norm();
|
||||
if (dist < min_dist) min_dist = dist;
|
||||
if (min_dist < scale_(0.2) && dist > min_dist) break;
|
||||
}
|
||||
m_wipe.path = Polyline(Points(path.polyline.points.begin() + i - 1, path.polyline.points.end()));
|
||||
}
|
||||
} else
|
||||
m_wipe.path.reverse();
|
||||
}
|
||||
|
||||
return gcode;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue