/ nc_files / ngcgui_lib / qpex_mm.ngc
qpex_mm.ngc
  1  (info: qpex_mm: qpocket mm examples, use a 5mm tool)
  2  ; for testing qpocket with mm system
  3  ; adapted from qpex.ngc and scaled for mm
  4  ; too small tools and/or small sos may exceed outlinepasslimit
  5  
  6  o<qpex_mm>  sub
  7  
  8       #<toolno> =  #1 (use a 5mm diam)
  9          #<rpm> =  #2 (=1000)
 10          #<dir> =  #3 (=2 2conv|3climb) ; conventional=cw, climb=ccw
 11     #<feedrate> =  #4 (=250)
 12     #<cutdepth> =  #5 (=10)
 13        #<zincr> =  #6 (=5)
 14        #<zsafe> =  #7 (=1)
 15       #<zstart> =  #8 (=0)
 16     #<stepover> =  #9 (=0.9)
 17       #<g64tol> = #10 (=0.002)
 18  #<spin_notify> = #11 (=0)
 19     #<use_g43>  = #12 (=1)
 20     #<h_for_g43>= #13 (=0)
 21     #<verbose>  = #14 (=0)
 22  
 23  ;shorthand required for call linelength:
 24  #<fr> = #<feedrate>
 25  #<cut>= #<cutdepth>
 26  #<so> = #<stepover>
 27  #<vb> = #<verbose>
 28  
 29  o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<vb>]
 30  #<tooldiam> = #5410
 31  (debug, duh #<tooldiam>)
 32  o<chk1> if [#<tooldiam> GT 10]
 33            (print, qpex_mm: tooldiam is too big #<tooldiam> - EXITING)
 34            (debug, qpex_mm: tooldiam is too big #<tooldiam> - EXITING)
 35            (AXIS,notify, qpex:_mm tooldiam is too big - EXITING)
 36            m2
 37  o<chk1> endif
 38  o<chk2> if [#<tooldiam> LT  .5]
 39            (print, qpex_mm: tooldiam is too small #<tooldiam> - EXITING)
 40            (debug, qpex_mm: tooldiam is too small #<tooldiam> - EXITING)
 41            (AXIS,notify, qpex_mm: tooldiam is too small - EXITING)
 42            m2
 43  o<chk2> endif
 44  
 45           #<x1> = [-0.5 * 25.4]
 46           #<y1> = [-0.5 * 25.4]
 47           #<x2> = [+0.5 * 25.4]
 48           #<y2> = [-0.5 * 25.4]
 49           #<x3> = [+0.5 * 25.4]
 50           #<y3> = [+0.5 * 25.4]
 51           #<x4> = [-0.5 * 25.4]
 52           #<y4> = [+0.5 * 25.4]
 53         #<xoff> = [2 * 25.4]
 54         #<yoff> = 0
 55       #<rotate> = 0
 56        #<scale> = 1
 57  M110 ; clear axis notifications
 58  (debug, square at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>)
 59  o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>][#<use_g43>][#<h_for_g43>][#<vb>]
 60           #<x1> = [-0.5 * 25.4]
 61           #<y1> = [-1.0 * 25.4]
 62           #<x2> = [+0.5 * 25.4]
 63           #<y2> = [-1.0 * 25.4]
 64           #<x3> = [+0.5 * 25.4]
 65           #<y3> = [+1.0 * 25.4]
 66           #<x4> = [-0.5 * 25.4]
 67           #<y4> = [+1.0 * 25.4]
 68         #<xoff> = [2 * 25.4]
 69         #<yoff> = [2 * 25.4]
 70       #<rotate> = 30
 71        #<scale> = 1
 72  M110 ; clear axis notifications
 73  (debug, rectangle at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>)
 74  o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>][#<vb>]
 75           #<x1> = [-1.0 * 25.4]
 76           #<y1> = [-0.5 * 25.4]
 77           #<x2> = [+0.5 * 25.4]
 78           #<y2> = [-0.5 * 25.4]
 79           #<x3> = [+1.0 * 25.4]
 80           #<y3> = [+0.5 * 25.4]
 81           #<x4> = [-0.5 * 25.4]
 82           #<y4> = [+0.5 * 25.4]
 83         #<xoff> = [0 * 25.4]
 84         #<yoff> = [2 * 25.4]
 85       #<rotate> = 0
 86       #<scale> = 1
 87  M110 ; clear axis notifications
 88  (debug, parallelogram at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>)
 89  o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>][#<vb>]
 90           #<x1> = [1 * 25.4]
 91           #<y1> = [-1 * 25.4]
 92           #<x2> = [0 * 25.4]
 93           #<y2> = [1 * 25.4]
 94           #<x3> = [-1 * 25.4]
 95           #<y3> = [-1 * 25.4]
 96           #<x4> = [0 * 25.4]
 97           #<y4> = [-0.999 * 25.4] ;disallow colinear pts in 3-sided figure
 98         #<xoff> = [-2 * 25.4]
 99         #<yoff> = 0
100       #<rotate> = 45
101        #<scale> = 1
102  M110 ; clear axis notifications
103  (debug, triangle at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>)
104  o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>]
105           #<x1> = [1 * 25.4]
106           #<y1> = [-1 * 25.4]
107           #<x2> = [0 * 25.4]
108           #<y2> = [0 * 25.4]
109           #<x3> = [-1 * 25.4]
110           #<y3> = [-1 * 25.4]
111           #<x4> = [0 * 25.4]
112           #<y4> = [-1.5 * 25.4]
113         #<xoff> = [-2 * 25.4]
114         #<yoff> = [2 * 25.4]
115       #<rotate> = 0
116        #<scale> = 1
117  M110 ; clear axis notifications
118  (debug, kite at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>)
119  o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>]
120           #<x1> = [1 * 25.4]
121           #<y1> = [-1 * 25.4]
122           #<x2> = [0 * 25.4]
123           #<y2> = [0 * 25.4]
124           #<x3> = [-1 * 25.4]
125           #<y3> = [-1 * 25.4]
126           #<x4> = [0 * 25.4]
127           #<y4> = [-.75 * 25.4]
128         #<xoff> = [0 * 25.4]
129         #<yoff> = [-1 * 25.4]
130       #<rotate> = 0
131        #<scale> = 1
132  M110 ; clear axis notifications
133  (debug, dart at #<xoff>,#<yoff> rotate=#<rotate> scale=#<scale>)
134  o<qpocket>call[#<toolno>][#<rpm>][#<dir>][#<fr>][#<cut>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>][#<so>][#<g64tol>][#<spin_notify>][#<vb>]
135  
136  o<qpex_mm> endsub