Sudo spirals using line segments of arbitrary length are very simple with polar coordinates. Here is a small g-code with anl o-sub that make one:
g20 g64 g90 s3400 m3 g0 z1 g0 x2 y0 g1 z-.1 f24 o100 repeat [800] g91 g1 @-.0025 ^4.5 o100 endrepeat g90 g0 z1 m2 Todd Zuercher P. Graham Dunn Inc. 630 Henry Street Dalton, Ohio 44618 Phone: (330)828-2105ext. 2031 -----Original Message----- From: Chris Albertson <albertson.ch...@gmail.com> Sent: Wednesday, April 10, 2024 4:26 PM To: Enhanced Machine Controller (EMC) <emc-users@lists.sourceforge.net> Subject: Re: [Emc-users] Carving a spiral [EXTERNAL EMAIL] Be sure links are safe. > 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 _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users