🐛 Use G2/G3 arc length for move time estimates (#4581)

This commit is contained in:
Kestin Goforth authored and GitHub committed 2022-08-01 11:36:16 +02:00
1 parent 7824d0e58c
commit 037ca04122
2 files changed
+7 -1

No files matched your search

+1
View File
@@ -167,6 +167,7 @@ date of first contribution):
* [Zack Lewis](https://github.com/lima3w)
* [Billy Richardson](https://github.com/richardsondev)
* [Christian Bianchini](https://github.com/max246)
* [Kestin Goforth](https://github.com/kforth)
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
[Daid Braam](https://github.com/daid). Parts of its communication layer and
+6 -1
View File
@@ -587,8 +587,13 @@ class gcode:
else:
e = 0
# calculate 3d arc length
arcLengthXYZ = math.sqrt(
(oldPos.z - pos.z) ** 2 + ((endAngle - startAngle) * r) ** 2
)
# move time in x, y, z, will be 0 if no movement happened
moveTimeXYZ = abs((oldPos - pos).length / feedrate)
moveTimeXYZ = abs(arcLengthXYZ / feedrate)
# time needed for extruding, will be 0 if no extrusion happened
extrudeTime = abs(e / feedrate)