I am trying to cut a quarter-toroidal pocket (center is open, so tool clearance isn't an issue there.)
The idea was to run a G18 XZ arc through 90 degrees, then G68 a small amount, then loop that all the way around. Almost works too, but the arc flips to convex on the way to 180degrees and then flips back heading toward 360 degrees.
Why? Shouldn't the arc solve identically in a rotated coordinate system?
I also tried setting up the arc in G91 incremental and using the IJK definition -- different inputs to get the first arc to solve correctly, of course, but had the same behavior in the G68 loop regardless.
I've already programmed an alternative toolpath that stays in G17 and just spirals down. It is a better toolpath but it was also a lot more complicated to construct. I'd just like to understand why the first approach didn't work as expected.
Any ideas?
Code: Select all
%
O0125; RING GROOVE
;
;
#101=4.; RING INNER RADIUS
#102=.5 ; GROOVE RADIUS
#103=.25 ; BALL MILL RADIUS
#104=1. ; ANGULAR STEP
;
;*********************
;
G00 G17 G20 G40 G49 G80 G90;
G54 M25;
T1 M6;
;
X[#101+#102-#103] Y0. S2500 M3; START POINT
G43 H1 Z2.;
G1 F25. Z.1;
F5. Z0.;
;
#105=0; START ANGLE
;
N100
G17 G90;
G68 X0. Y0. R[#105]; ROTATE
G00 G90 X[#101+#102-#103] Y0.; MOVE TO POINT ON RIM
G1 Z0. F5.; FEED DOWN
G18 G03 X[#101-#102+#103] Z[-#102] R[#102] F25.; CUT ARC
G1 G91 X-.1; MOVE OFF
G00 G90 Z.1; RETRACT
#105=[#105+#104]; INCREMENT ANGLE
IF [#105 LT 360] GOTO100; GO FULL CIRCLE
;
G00 G90 Z2.;
G69 M5;
M25;
G53 Y0;
M30;
%