# Re: [Emc-users] arcgenm18.py or lcnc's math or my brain has blown a fuse

```G91 (incremental distances for arc)

G91.1 (incremental distances for IJK in arcs, normal IOW)```
```
( draw a semi-circle in climb mode, ccw from 90 to 270 degrees)
( this runs y .12", .06 up to .06 down )
G3 X-0.0000 Y-0.0600 I-0.0000 J-0.0600
G90 (back to absolute distances )

I haven't programmed a g3 in a while. It looks to me like the end point and
center are the same.

G3 X-0.0000 Y-0.0600 I-0.0000 J-0.0300 ?

John Figie

On Fri, Apr 6, 2018, 3:03 PM Gene Heskett <ghesk...@shentel.net> wrote:

> Greetings;
>
> Trying to cut a short trench in the "tap hat" to put that m4 (7mm
> diameter) screw head into.
>
> Machine is touched off just out of end of workpiece.
>
> Code, with G3 line copy/pasted from arcgenm18.py.
> ===================================================
> g20g7
> #<_pocket_width>        =       0.27900 (about 7mm's)
> #<_tool_dia>            =       0.24900 (let dull tool flex .0005")
> ( assumes mill is 1/4" thru, so circle diameter is .0300")
> #<_circle_dia>          =       [#<_pocket_width> - #<_tool_dia>]
> #<_wobble>              =       [#<_circle_dia> / .5000000] ( .015" Y
> trades sign at
> circle)
> (debug,wobble=#<_wobble>)
> ( x stop, draw semi circle to other side of wobble )
> #<_x_minus>                     =       -0.3000000 (depth of circle center
> from ends of arc)
> #<_x_safe>                      =       0.1500000 (out of workpiece)
> #<_y_center>                    =       0.0000000 (for reference)
> #<_z_top>                       =       0.28000000  (top surface of jig)
> #<_z_final>                     =       -0.0780000 (depth into jig to cut
> 2mm into brass)
> #<_z_dec>                       =       [0.3580000 /20] (establish cut
> decrement)
> (debug, zdec=#<_z_dec>)
> s600
> #<_z_tmp>                       =       #<_z_top>
> m6t10 (tool image small enough I can see past it in Z view)
> m3
>
> o100 WHILE [#<_z_tmp> gt #<_z_final>] (do depth loop)
>
> #<_z_tmp>                       =       [#<_z_tmp> - #<_z_dec>] (decr
> depth till done)
>
> G90 (absolute distance mode for depth)
>
> (G1 F10 z#<_z_tmp>)
>
> G0 z0.3 (cut air)
>
> G1 F5 x#<_x_safe> ( put x out of workpiece)
>
> G1 F10 y#<_wobble> (now put Y at plus offset location)
>
> G1 F5 x#<_x_minus> (drive x to start of 180 degree arc)
>
> G91 (incremental distances for arc)
>
> G91.1 (incremental distances for IJK in arcs, normal IOW)
>
> ( draw a semi-circle in climb mode, ccw from 90 to 270 degrees)
> ( this runs y .12", .06 up to .06 down )
> G3 X-0.0000 Y-0.0600 I-0.0000 J-0.0600
> G90 (back to absolute distances )
>
> G1 F5 y-#<_wobble> (should already be here)
> (should be back to -wobble)
>
> G1 F5 x#<_x_safe> ( cut other edge of trench back out of workpiece)
>
> o100 ENDWHILE
> m5
> m2
> %
> ==================================================
> And nothing I adjust can keep me from huge G3 errors, or zero radius
> errors.
>
> This is, or sure looks like, errors like I was getting when I attempted
> to carve the pillows. There I asked for help but got crickets, so I
> finally wound up digging the trenchs with a SIN[#<_deg>] and a
> COS[#<_deg>] for the starting XZ position of a cut nearly 4" long on the
> Y axis. Worked a treat but took a while since I was only incrementing
> #<_deg> by 1 degree at a time.
>
> What error(s) are there in the above code?
>
> --
> Cheers, Gene Heskett
> --
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> Genes Web page <http://geneslinuxbox.net:6309/gene>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users
```