diff --git a/AUTHORS.md b/AUTHORS.md index 4fe6c4cec..80e556ce3 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -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 diff --git a/src/octoprint/util/gcodeInterpreter.py b/src/octoprint/util/gcodeInterpreter.py index 5574d246f..fa217e73f 100644 --- a/src/octoprint/util/gcodeInterpreter.py +++ b/src/octoprint/util/gcodeInterpreter.py @@ -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)