There have been a few attempts made to add these cycles. I did one myself as a remap as a test of a type-2 algorithm. https://github.com/LinuxCNC/linuxcnc/tree/andypugh/g71type2remap
Mine is in C++ and is integrated into linuxcnc. The hope was that someone else who was working on this at the time would combine the two to give a built-in version. The reason that I feel it should be built-in is so that cutter compensation is done in only one place. I am away from home at the moment so can't easily check if this is the case with your version. Yes it uses the cutter compensation already in linuxcnc. The other stuff such as allowing the use of X[#<name>+3] and Oxxx REPEAT and so on is also re-use of the code already in linuxcnc. What I do is to inject an "Oxxx CALL" line into the interpreter and then take whatever it feeds me back until the subroutine is finished. The main reason, though, that I mention my experimental branch is that I did document the cycles, with explanatory images. This might be re-usable, if your version of the G71 cycles behaves the same way. https://github.com/LinuxCNC/linuxcnc/blob/andypugh/g71type2remap/docs/src/gcode/g-code.txt#g71-lathe-roughing-cycle-turning It is at least very similar. I see you're using straight sections to follow the final shape at a distance, while my method uses round and straight sections as required to maintain a fixed distance. Unfortunately I use different letters for almost everything :-( I've taken the Fanuc Series 0/00/0-Mate for Lathe operator's manual section 13.2.1 to 13.2.2 as a guide. There is however no limit (unless you exhaust the memory of your computer) on the number of pockes. Pockets may also be nested in other pockets. My cycle also does not have to start beyond the end of the path. I do this to allow boring and finishing the bottom of that bore using the same path. A comparison of the parameters: You Me P Q The Q kind of looks like an O to me, and I wanted to use P to give the number of passes for the G70 cycle D I I used I for increment. R R A perfect match :-) (but it is used) J W It adds to the distance specified with D in my cycle L U This is also added to D, U and W are simply an extra displacement added to the resulting profile. I/K Not implemented, the finishing pass starts at a distance D from the final profile and ends at distance E. Each pass the distance is decreased with (D-E)/P. Both numbers E and D may be positive or negative. The distances can be quite large until further extension of the distance would make the curve non-monotonic (Currently I just remove the non-monotonic parts, but maybe I should give an error). This large distance allows G70 to be used almost like a Fanuc G73 cycle. F Specify this in advance, just like the T, S and G43. If you want to use cutter compensation you also have to specify the G41/G42 before starting G70. It is an error to start G71/G72 when G41 or G42 is active. D This is used to specify a distance to keep from the final profile during G71/G72. This letter is used to specify the initial distance in the G70 cycle E The final distance during the G70 cycle, this is usually 0 but may be positive to make it oversized, or negative to make it undersized. P The number of passes used in the G70 cycle to go from the initial distance to the final distance. X used as an initial postition, a rapid is done to the location. Z also initial position My default method is also type 2. If you require type 1, you also need to specify G71.1/G72.1. There is an additional G71.2/G72.2 which can be used after the .1 cycle to finish the path. This for example allows you to use a CCMT roughing tool and use VCMT for the pocketing/finishing. I don't do gouge detection, but linuxcnc does it when cutter compensation is used. My cycle only works in the G18 plane, it's for a lathe after all. It also doen't work if G91 is active, but I can fix that when necessary. I've included 3 demo/test files: lathe_g70_71_demo.ngc The lathe pawn, using G71.1/G71.2 and G70. lathe_g7x_quadrants.ngc This shows the 8 ways in which the cycles can be used. lathe_g7x_face_boring.ngc Shows the use of variables and a "O REPEAT". regards, Mark. _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers