mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-11 07:48:47 -07:00
Code optimisation
This commit is contained in:
parent
03c644f4c4
commit
3f8cfa74ea
1 changed files with 40 additions and 38 deletions
|
|
@ -306,8 +306,9 @@ public:
|
||||||
const ExtendedPoint &curr = extended_points[i];
|
const ExtendedPoint &curr = extended_points[i];
|
||||||
const ExtendedPoint &next = extended_points[i + 1 < extended_points.size() ? i + 1 : i];
|
const ExtendedPoint &next = extended_points[i + 1 < extended_points.size() ? i + 1 : i];
|
||||||
|
|
||||||
// The following code artifically increases the distance to provide slowdown for extrusions that are over curled lines
|
|
||||||
float artificial_distance_to_curled_lines = 0.0;
|
float artificial_distance_to_curled_lines = 0.0;
|
||||||
|
if(slowdown_for_curled_edges) {
|
||||||
|
// The following code artifically increases the distance to provide slowdown for extrusions that are over curled lines
|
||||||
const double dist_limit = 10.0 * path.width;
|
const double dist_limit = 10.0 * path.width;
|
||||||
{
|
{
|
||||||
Vec2d middle = 0.5 * (curr.position + next.position);
|
Vec2d middle = 0.5 * (curr.position + next.position);
|
||||||
|
|
@ -353,6 +354,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto calculate_speed = [&speed_sections, &original_speed](float distance) {
|
auto calculate_speed = [&speed_sections, &original_speed](float distance) {
|
||||||
float final_speed;
|
float final_speed;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue