LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.73k stars 1.13k forks source link

G71 introduces a circle when using the D parameter (remaining distance to stock) #2939

Open sundtek opened 3 months ago

sundtek commented 3 months ago

In Lathe mode G71 introduces a half circle when using the D parameter, it disappears when not using the D parameter. I'm using the latest linuxcnc git version (15. March 2024)

G17 G54 G40 G80 G90 G21 G54 G97 G61 g18 g64 g8 G1 F140 S700 M3 G4 P1 G0 Z14.4

<_startX>=14.3

<_startZ>=12.5

o100 sub G1 X#<_startX> Z#<_startZ> G1 X0.01 G1 Z0 X14.325 G1 X15 o100 endsub G71 Q100 X#<_startX> Z#<_startZ> D0.25 I0.2 R1 M2

that half circle is not correct.

w0lfzG

andypugh commented 2 months ago

Is D meant to be a "stock to leave" number? The docs for G71 are terrible, which annoys me as I wrote much better ones for a different implementation of the cycles.

Does it always fail? Or is is sometimes usable?

sundtek commented 2 months ago

I only tested it once and put the result here for the record until someone (or I) have more time to fix it. D should be stock to leave yes. Once the stock to leave is removed it's okay - the entire circle should not be there when stock to leave is used.