# Thread: total noob to g-code, pretty simple (i think) arc problem.

1. ## total noob to g-code, pretty simple (i think) arc problem.

I just started learning G-Code, and one of my first assignments is to do a simple design to be carved into a block of wood. I chose to do the NFL logo/crest so I could use some arcs a little more complicated than a semi-circle or quarter circle.

Unfortunately, those arcs are what's causing me all my trouble.

Here's the first bit of code giving me a problem:

Code:
N0100 G01 X0.8 Y2.9
N0110 G02 X0.5 Y1.75 I-0.595 J-0.44
The arc should be from (0.8, 2.9) to (0.5,1.75) with the arc rising 0.3 over the line drawn between those points.

The distance between the points is roughly 1.19, so by using (A^2+B^2)/2B, I got that the radius should be roughly .74.

That I think should mean the center point of that arc comes out as -0.595, and -0.44 away from the origin point.

Unfortunately, Benchman keeps giving me a bad arc error at that line. I tried using exact figures of Cx=-0.443125 from Ax, and Cy=-0.5942432162 from Ay, and it still gives me the bad arc error. What's bugging me is that if I tell it to continue with the program, it appears to draw the arc as I'd intended.

I'm assuming the center point coordinates are wrong, but what are the right ones? And how do I find them?

2. Ok a .74 raduis between points(0.8, 2.9) to (0.5,1.75)
Center point of radius x.22329 y2.43632

Try this
G01 X0.8 Y2.9
G02 X0.5 Y1.75 I-.27671 J.68632
or
G01 X0.8 Y2.9
G02 X0.5 Y1.75 R.74

3. Originally Posted by timlkallam
Ok a .74 raduis between points(0.8, 2.9) to (0.5,1.75)
Center point of radius x.22329 y2.43632

Try this
G01 X0.8 Y2.9
G02 X0.5 Y1.75 I-.27671 J.68632
or
G01 X0.8 Y2.9
G02 X0.5 Y1.75 R.74
The first one was WAY off, but just specifying the radius worked like a charm. I'm wondering why my professor didn't mention it in the first place...

4. Try this;

G00 X .8 y2.9
G02 X.5 Y1.75 I-.57671 J-.46368 F20

The math for the arc center is tricky than it might appear *. Not much fudge-factor with I's and J's.

* I cheated, cad is a wonderful thing.

5. Originally Posted by cyclestart
Try this;

G00 X .8 y2.9
G02 X.5 Y1.75 I-.57671 J-.46368 F20

The math for the arc center is tricky than it might appear *. Not much fudge-factor with I's and J's.

* I cheated, cad is a wonderful thing.
Those I's and J's worked too. Thanks. What's the "F20" for?

I'm hoping the system we use will recognize the R, as there are 3 other arcs I need to find center points for, and simply putting R.74 is way easier.

6. Originally Posted by RedSoxFox
The first one was WAY off, but just specifying the radius worked like a charm. I'm wondering why my professor didn't mention it in the first place...
Hopefully he/she did not mention it because they are aware that always using the R method is a bad habit to get into.

The problem with using R for G2,G3 is that the closer the arc gets to being a full 360° the less accurate will be the calculated center point of the arc. This is because you are limited to a resolution of 4 decimal places (on most machines anyway).
And at a full 360° the center point can not be calculated from just the starting point, ending point (they are the same), and the radius.

Say you wanted to make a 359° arc centered on X0.0, Y0.0 with a 1" radius, and a starting point of (X1.000000 Y0.000000). Then ending point would be (X0.9998477 Y0.0174524).
Now round that off to 4 decimal places (X0.9998 Y0.0175), now draw a circle thru this rounded off point and the starting point and you will find that the center of this circle is at (X0.0000036, Y-0.0026774) or 0.002677" from where you wanted it. And for many jobs that is a scrap part even before adding in real world machine errors.

You have the same problem for real short arcs but it usually does not matter much.

7. Originally Posted by Andre' B
Hopefully he/she did not mention it because they are aware that always using the R method is a bad habit to get into.

The problem with using R for G2,G3 is that the closer the arc gets to being a full 360° the less accurate will be the calculated center point of the arc. This is because you are limited to a resolution of 4 decimal places (on most machines anyway).
And at a full 360° the center point can not be calculated from just the starting point, ending point (they are the same), and the radius.

Say you wanted to make a 359° arc centered on X0.0, Y0.0 with a 1" radius, and a starting point of (X1.000000 Y0.000000). Then ending point would be (X0.9998477 Y0.0174524).
Now round that off to 4 decimal places (X0.9998 Y0.0175), now draw a circle thru this rounded off point and the starting point and you will find that the center of this circle is at (X0.0000036, Y-0.0026774) or 0.002677" from where you wanted it. And for many jobs that is a scrap part even before adding in real world machine errors.

You have the same problem for real short arcs but it usually does not matter much.
Ahh, good to know.

So basically, it's OK to use in situations where being a hundredth off isn't a big deal, but in any kind of precision situation, the exact coordinates should be found?

8. OK, apparently the machine we're using won't recognize/accept the R instructions.

Given Benchman can figure out the center point with just the two X,Y coordinates and the radius length, I'm assuming there's got to be some kind of program out there that will do the same thing and actually give me those X,Y coordinates for the center point. Either that, or what's the formula and I can work on figuring it out as I go?

9. Originally Posted by timlkallam
Ok a .74 raduis between points(0.8, 2.9) to (0.5,1.75)
Center point of radius x.22329 y2.43632

Try this
G01 X0.8 Y2.9
G02 X0.5 Y1.75 I-.27671 J.68632
or
G01 X0.8 Y2.9
G02 X0.5 Y1.75 R.74
I used cad also and still got it wrong.I don't think i ever used an I or J for cutting a raduis. I only use it to cut full circles. Tell me if this is right .The I and J is an incamental
distance from the start point of the arc? Not from the ending of the arc. After reading Andre's post I am going to start using I an Js on all my arcs.

10. Originally Posted by timlkallam
....Tell me if this is right .The I and J is an incamental distance from the start point of the arc? Not from the ending of the arc....
I have seen some people post and say that on some machines the I and J are the absolute location of the center. I program on Haas machines and they have it as the incremental distance.

11. In my experience, the I & J are vectors from the start point of the arc to the centre of the arc. Its possible that some machines may be set up to use absolute co-ordinates, so this should be checked before one hits the "Go" button!
Regards, Ian Kirby.
Wollongong NSW Australia

12. I came up with this. Slightly different than the answer above.

G1 X0.8000 Y2.9000
G2 X0.5000 Y1.7500 I-0.5743 J-0.4643

Page 1 of 2 12 Last