db25.ngc
1 (info: db25 connector -- uses iquad.ngc) 2 ; centered at origin, use offsets to relocate 3 o<db25> sub 4 #<toolno> = #1 (=1) 5 #<rpm> = #2 (=2000) 6 #<dir> = #3 (=2 2conv|3climb) 7 #<feedrate> = #4 (=10) 8 #<cutdepth> = #5 (=.1) 9 #<zincr> = #6 (=.02) 10 #<zsafe> = #7 (=0.2) 11 #<zstart> = #8 (=0) 12 #<xoff> = #9 (=0) 13 #<yoff> = #10 (=0) 14 #<rotate> = #11 (=0) 15 #<use_g43> = #12 (=1) 16 #<h_for_g43>= #13 (=0) 17 #<verbose> = #14 (=0) 18 19 ; reject tools that are too big 20 o<loadtool> call [#<toolno>][#<use_g43>][#<h_for_g43>][#<verbose>] 21 #<tooldiam> = #5410 22 o<if0> if [#<tooldiam> Gt 0.12501] 23 (debug, db25: tooldiam too big: #<tooldiam> - EXITING) 24 (print, db25: tooldiam too big: #<tooldiam> - EXITING) 25 (AXIS,notify, db25: tooldiam too big - EXITING) 26 m2 27 o<if0> endif 28 29 ; http://www.interfacebus.com/Connector_D-Sub_Mechanical_Dimensions.html 30 ; mounting hole spacing is 1.857 31 32 #<xlong> = 1.635 33 #<xlong> = 1.675 ; adjust to allow use of 0.125 cutter diameter 34 #<y> = 0.432 35 #<xshort> = [#<xlong> - 2 * #<y> * tan[10]] 36 37 ; center at origin 38 #<x1> = [0.5 * #<xlong>] 39 #<y1> = [0.5 * #<y>] 40 41 #<x2> = [ 0.5 * #<xshort>] 42 #<y2> = [-0.5 * #<y>] 43 44 #<x3> = [-0.5 * #<xshort>] 45 #<y3> = [-0.5 * #<y>] 46 47 #<x4> = [-0.5 * #<xlong>] 48 #<y4> = [ 0.5 * #<y>] 49 50 #<scale> = 1.0 51 52 o<iquad>call[#<toolno>][#<rpm>][#<dir>][#<feedrate>][#<cutdepth>][#<zincr>][#<zsafe>][#<zstart>][#<x1>][#<y1>][#<x2>][#<y2>][#<x3>][#<y3>][#<x4>][#<y4>][#<scale>][#<rotate>][#<xoff>][#<yoff>] 53 54 o<db25> endsub