Skip to content

Commit

Permalink
Merge pull request #451 from blurfl/Fix_large_radius_G2/G3_as_in_PR_#430
Browse files Browse the repository at this point in the history
Convert arc with radius greater than 25400mm to a straight line
  • Loading branch information
MaslowCommunityGardenRobot authored May 30, 2018
2 parents 8b4d45d + 7fef62c commit 13f480a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cnc_ctrl_v1/Motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ int arc(const float& X1, const float& Y1, const float& X2, const float& Y2, co
theta -= 2*pi;
}
}
if ((sign(theta) != sign(direction)) || ((abs(chordHeight) < .01) && (abs(theta) < 0.5))) {
if ((sign(theta) != sign(direction)) || ((abs(chordHeight) < .01) && (abs(theta) < 0.5)) || (radius > 25400)) {
// There is a parameter error in this line of gcode, either in the size of the angle calculated
// or the chord height of the arc between the starting and ending points
// In either case, the gcode cut was essentially a straight line, so
Expand Down

0 comments on commit 13f480a

Please sign in to comment.