handle.ngc 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. %
  2. ( *************************************************************************** )
  3. ( * Replacement handle for a "third hand" helper tool. * )
  4. ( * Metrical RS274/NGC program * )
  5. ( * G54 X0/Y0 is at the hinge hole * )
  6. ( * G54 Z0 is at the surface * )
  7. ( * * )
  8. ( * Copyright 2009 Michael Buesch <mb@bu3sch.de> * )
  9. ( * Licensed under the GNU/GPL version 3 * )
  10. ( *************************************************************************** )
  11. #1 = 6 ( cutter diameter )
  12. #10 = 2000 ( min^-1 )
  13. #11 = 200 ( feed in mm/min )
  14. #12 = 20 ( Z-feed in mm/min )
  15. #20 = 3.5 ( cutting depth in Z )
  16. #21 = 0.2 ( cutting depth stepping )
  17. G17 G40 G49 G80 G90 G94 G61 G21 ( Initial modes )
  18. G0 G54 X0 Y0 S#10
  19. G0 Z20
  20. #100 = 0
  21. G0 X[9 - #1/2] Y[27.5 + #1/2]
  22. G0 Z1
  23. O901 while [#100 lt #20]
  24. #100 = [#100 + #21]
  25. O902 if [#100 gt #20] ( if [Z > depth]: Z = depth )
  26. #100 = #20
  27. O902 endif
  28. G1 Z[#100 * -1] F#12
  29. F#11
  30. G41.1 D#1
  31. G1 X10 Y27.5 ( entry move )
  32. G1 X125
  33. G1 Y26
  34. G2 X94.049 Y9.5 I-30.952 J20.780
  35. G1 X13
  36. G3 X9.290 Y6.996 I0 J-4
  37. G1 X5.565 Y-2.244
  38. G2 X-5.826 Y1.436 I-5.565 J2.244 ( tip )
  39. G1 X-1.651 Y18.372
  40. G2 X10 Y27.5 I11.651 J-2.872
  41. G40 G1 X10 Y[27.5 + #1/2]
  42. G0 Z1
  43. G0 X[9 - #1/2] Y[27.5 + #1/2]
  44. O901 endwhile
  45. G0 Z30
  46. M30
  47. %
  48. vim: syntax=rs274ngc ts=4