Commit history, logo license, full-arc fix.
- Commit history added to repo, as an easier way for people to see view the changes over time. - Grbl logo copyright license added. All rights reserved with regards to the Grbl logo. - G2/3 full circles would sometime not execute. The problem was due to numerical round-off of a trig calculation. Added a machine epsilon define to help detect and correct for this problem. Tested and should not effect general operation of arcs.
This commit is contained in:
@ -100,9 +100,9 @@
|
||||
// CCW angle between position and target from circle center. Only one atan2() trig computation required.
|
||||
float angular_travel = atan2(r_axis0*rt_axis1-r_axis1*rt_axis0, r_axis0*rt_axis0+r_axis1*rt_axis1);
|
||||
if (is_clockwise_arc) { // Correct atan2 output per direction
|
||||
if (angular_travel >= 0) { angular_travel -= 2*M_PI; }
|
||||
if (angular_travel >= -ARC_ANGULAR_TRAVEL_EPSILON) { angular_travel -= 2*M_PI; }
|
||||
} else {
|
||||
if (angular_travel <= 0) { angular_travel += 2*M_PI; }
|
||||
if (angular_travel <= ARC_ANGULAR_TRAVEL_EPSILON) { angular_travel += 2*M_PI; }
|
||||
}
|
||||
|
||||
// NOTE: Segment end points are on the arc, which can lead to the arc diameter being smaller by up to
|
||||
|
Reference in New Issue
Block a user