lower the speed, improve params
This commit is contained in:
parent
9d1ac71e55
commit
9d87257aec
@ -3007,7 +3007,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de
|
||||
comment = description;
|
||||
comment += description_bridge;
|
||||
}
|
||||
double last_set_speed = std::max(10.0, new_points[0].speed_factor * speed) * 60.0;
|
||||
double last_set_speed = std::max(5.0, new_points[0].speed_factor * speed) * 60.0;
|
||||
gcode += m_writer.set_speed(last_set_speed, "", comment);
|
||||
Vec2d prev = this->point_to_gcode_quantized(new_points[0].p);
|
||||
for (size_t i = 1; i < new_points.size(); i++) {
|
||||
@ -3016,7 +3016,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, const std::string_view de
|
||||
const double line_length = (p - prev).norm();
|
||||
gcode += m_writer.extrude_to_xy(p, e_per_mm * line_length, comment);
|
||||
prev = p;
|
||||
double new_speed = std::max(10.0, procesed_point.speed_factor * speed) * 60.0;
|
||||
double new_speed = std::max(5.0, procesed_point.speed_factor * speed) * 60.0;
|
||||
if (last_set_speed != new_speed) {
|
||||
gcode += m_writer.set_speed(new_speed, "", comment);
|
||||
last_set_speed = new_speed;
|
||||
|
@ -126,8 +126,8 @@ public:
|
||||
};
|
||||
|
||||
float flow_width = path.width;
|
||||
float min_malformation_dist = 0.2 * flow_width;
|
||||
float peak_malformation_dist = 0.75 * flow_width;
|
||||
float min_malformation_dist = 0.1 * flow_width;
|
||||
float peak_malformation_dist = 0.65 * flow_width;
|
||||
|
||||
const Points &original_points = path.polyline.points;
|
||||
std::vector<ExtendedPoint> points;
|
||||
@ -199,7 +199,7 @@ public:
|
||||
if (curvature > 1.0f) {
|
||||
curvature_penalty = 1.0f;
|
||||
} else if (curvature > 0.1f) {
|
||||
curvature_penalty = fmin(1.0, distance - min_malformation_dist) * curvature;
|
||||
curvature_penalty = fmin(1.0, (distance - min_malformation_dist) / flow_width) * curvature;
|
||||
}
|
||||
a.quality -= curvature_penalty;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user