> On Apr 10, 2024, at 10:44 AM, Ralph Stirling via Emc-users 
> <emc-users@lists.sourceforge.net> wrote:
> 
> Use the parametric equation of a spiral and compute it *inside* your
> g-code program.
> 
> x(t) = c1 * t * cos(t) + x0
> y(t) = c2 * t * sin(t) + y0


COnceptually that is it.  But do you really want to cut afull depth 3mm slot 
with a 3mm tool in one pass?  

There is another problem.  If you make equal increments of “t” the step size 
increases over time.  The steps are farr too small near the center so you waste 
time cutting too slowly.   You want to move in steps such that the desired arc 
and the straight line approximation is within some tolerance.   This is a hard 
problem.   I tried to solve it myself years ago.  My boss suggested a 
sollution:  Advance ’t’ is very tiny steps and co,put the error, if the error 
is small advance it advance it again, if not drop a point.  If you do this each 
point is just inside the tolerance.   It was slow.   I decided to make bigger 
jumps and if i overstepped to backup.   

A good solution is not something you can program in g-cose and every get it 
right.

Today,  any reasonable engineer would simply draw the spiral in CAD and then 
click “generate path” and the CAD system would output the gcode and it would 
handle the roughing and finishing cuts and the tool changes and handle the 
spindle speed and cutting rates.   No math or thinking is required.

But as a challenge or a student exercise, writing an OPTIMAL solution in pure 
g-code that cuts the metal at the best rate while keeping tolerances is an 
interesting problem, not simple at all.  Most people would let their CAM system 
figure this out for them.



_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to