mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-28 20:01:16 -07:00
bugfix for Invalid speed "G1 F-2147483648" (#10944)
added non zero safety check for feedrate calculation
This commit is contained in:
parent
abe3cd48f9
commit
6feb99bd2d
1 changed files with 4 additions and 2 deletions
|
|
@ -153,7 +153,8 @@ struct PerExtruderAdjustments
|
|||
assert(line.time_max >= 0.f && line.time_max < FLT_MAX);
|
||||
line.slowdown = true;
|
||||
line.time = line.time_max;
|
||||
line.feedrate = line.length / line.time;
|
||||
if (line.time > 0.f)
|
||||
line.feedrate = line.length / line.time;
|
||||
}
|
||||
time_total += line.time;
|
||||
}
|
||||
|
|
@ -169,7 +170,8 @@ struct PerExtruderAdjustments
|
|||
if (line.adjustable(slowdown_external_perimeters)) {
|
||||
line.slowdown = true;
|
||||
line.time = std::min(line.time_max, line.time * factor);
|
||||
line.feedrate = line.length / line.time;
|
||||
if (line.time > 0.f)
|
||||
line.feedrate = line.length / line.time;
|
||||
}
|
||||
time_total += line.time;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue