Welcome to ModelEngineMaker !If you have problems registering or logging in, please use the contact menu option to request assistance.
Most machines are too dumb to know the A360 and A0 are the same place, so will unwind back to A0. Need a way to reset A360 to A0 without actually moving
See attached fileI believe I have shaken the bugs out of the LinuxCNC version. When I run it with debug statements the Z values at A=0,90,and 180 look correct.The program assumes Z0 is the centerline of the bar and that Y0 is the top of the bar at A0. I don't know why there is a move in X, so I'd just remove it, and position the X axis along the bar where a pin will be located. No other X moves are generated.The starting value of Z should be the radius of the bar. The first Z move will thus be a plunge to the value needed for A0, and the rest of the Z moves are coordinated with A and Y axes.Program logic is fairly easy to follow if you you visualize a circle representing the Pin turning around the A axis with a constant radius equal to the PCD. Then the position of the top of the PIN is the position of its center with its Z value incremented by its radius.Using the example values, the top of the pin at A0 is the sum of the pin and PCD radii or 12.5. At A180 it's the PCD radius minus the pin radius or 2.5. At A90 and A270 its the pin radius or 5.The program allows specification of passes; each pass increases the DOC. In the example the excess material at A0 is 2.5mm, so 18 passes means removal of .139mm, probably an excessive pass count.
Regarding depth of cut and number of passes. We need to remember that at the A180 position, 20mm of material needs to be removed. Therefore 20 passes, each removing 1 mm of material is not unreasonable. I would expect the toolpath to show an outer circle of 30 mm less the depth of cut, followed by 19 more concentric circles of deminishing diameter until the final 10 mm diameter is achieved.