For those that like GCode and like a simple challenge:....

I am using Inventor to generate some GCode (Linux Post).
I am performing some calculations and seem to keep running into a weird accumulating offset on my machine. I have done some manual calculations and I can definitely see there is something that doesn't add up. It seems to be on Circular Interpolation (G17 so X&Y). I have attached the code below.

My problem is in a facing operation where I perform a series of circular interpolations. The first few go amazingly well, landing exactly on point, however when it comes to line N115 I am out by 1.
It then seems to keep getting worse from that point.

Working through line N115, I have a starting point of Y: -52.874 (N105 is the last time YAxis value changed), i then cut a circle with an offset of 1.886 in the same Y-Axis. So theoretically I should land at -58.874 + 1.886 + 1.886 = -49.102 but the GCode states that I should land at -49.101.

Now I know most of you are going to say rounding, but with this precision there is no rounding.

How is it that the GCODE calculating -49.101. This means that my next instruction is off by one and keeps accumulating errors as it proceeds.

It is absolute programming but due to the fact that it is a facing operation with only circular interpolations affecting the Y axis value; it means that there will always be an error cause I have to take either my calculated value or use the calculated value in the GCode. If I use my calculated value then it means I wont match with the next circular interpolation value and if I use the GCode Y value then it wont match with the formula for a circle/arc.

Even when I use NCViewer to model the GCode I can see that it calculates -49.102; could it be that Inventor just doesn't calculate G codes correctly?


This simple program starts at :

I have the following instructions:

%
(LINUXGCODE)
(T5 D=4. CR=0. - ZMIN=-20.49 - FLAT END MILL)
N10 G90 G94 G17 G91.1
N15 G21
N20 G53 G0 Z0.
(FACE1)
N25 M9
N30 T5 M6
N35 S5000 M3
N40 G54
N45 M8
N50 G0 X68.6 Y-64.19
N55 G43 Z15. H5
N60 G0 Z5.
N65 G1 Z-0.6 F500.
N70 G18 G3 X68.2 Z-1. I-0.4 K0.
N75 G1 X66.
N80 X-66. F1000.
N85 G17 G2 Y-60.418 I0. J1.886
N90 G1 X66.
N95 G3 Y-56.646 I0. J1.886
N100 G1 X-66.
N105 G2 Y-52.874 I0. J1.886
N110 G1 X66.
N115 G3 Y-49.101 I0. J1.886
N120 G1 X-66.
N125 G2 Y-45.329 I0. J1.886
N130 G1 X66.
N135 G3 Y-41.557 I0. J1.886
N140 G1 X-66.
N145 G2 Y-37.785 I0. J1.886
N150 G1 X66.