From d1e4237e1ddd89b081c297154bcfd2551c924a4f Mon Sep 17 00:00:00 2001 From: Aldert Date: Sat, 4 Oct 2014 09:24:09 +0200 Subject: [PATCH] Update motion_control.cpp G03 Full circle did not work (G02 is working correct) --- Marlin/motion_control.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Marlin/motion_control.cpp b/Marlin/motion_control.cpp index 76609054ff..b26cbafc8d 100644 --- a/Marlin/motion_control.cpp +++ b/Marlin/motion_control.cpp @@ -44,6 +44,14 @@ void mc_arc(float *position, float *target, float *offset, uint8_t axis_0, uint8 if (angular_travel < 0) { angular_travel += 2*M_PI; } if (isclockwise) { angular_travel -= 2*M_PI; } + //20141002:full circle for G03 did not work, e.g. G03 X80 Y80 I20 J0 F2000 is giving an Angle of zero so head is not moving + //to compensate when start pos = target pos && angle is zero -> angle = 2Pi + if (position[axis_0] == target[axis_0] && position[axis_1] == target[axis_1] && angular_travel == 0) + { + angular_travel += 2*M_PI; + } + //end fix G03 + float millimeters_of_travel = hypot(angular_travel*radius, fabs(linear_travel)); if (millimeters_of_travel < 0.001) { return; } uint16_t segments = floor(millimeters_of_travel/MM_PER_ARC_SEGMENT);