blob: b25bf3a46cf0888599f0aa7f8a67fccee349fe41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
%
( *************************************************************************** )
( * Cut a hole for a D-SUB connector * )
( * Metrical RS274/NGC program * )
( * Copyright 2009 Michael Buesch <mb@bu3sch.de> * )
( * Licensed under the GNU/GPL version 3 * )
( *************************************************************************** )
#<_cutter_dia> = 6 ( Cutter diameter )
#<_speed> = 1000 ( min^-1 )
#<_feed> = 100 ( mm/min )
#<_zfeed> = 50 ( mm/min in Z axis )
#<_depth> = 3 ( Cutting depth )
#<_depth_step> = 0.5 ( Step for cutting in depth)
( 25 pin D-SUB )
#<_width_top> = 42
#<_width_bot> = 39.5
#<_height> = 12
G17 G40 G49 G80 G90 G94 G61 G21 ( Initial modes )
(G53 G0 X0 Y0 Z0)
G54 S#<_speed> F#<_feed> M3
#<_h> = [[#<_height> / 2] - [#<_cutter_dia> / 2]]
#<_wtop> = [[#<_width_top> / 2] - [#<_cutter_dia> / 2]]
#<_wbot> = [[#<_width_bot> / 2] - [#<_cutter_dia> / 2]]
#<z> = 0
G0 X0 Y#<_h> Z1
G1 Z0
O901 while [#<z> lt #<_depth>]
#<z> = [#<z> + #<_depth_step>]
O902 if [#<z> gt #<_depth> ]
#<z> = #<_depth>
O902 endif
G1 Z[#<z> * -1] F#<_zfeed>
G1 X#<_wtop> F#<_feed>
G1 X#<_wbot> Y[-1 * #<_h>]
G1 X[-1 * #<_wbot>]
G1 X[-1 * #<_wtop>] Y#<_h>
G1 X0
O901 endwhile
G1 X1
G0 Z30
G53 G0 X0 Y0 M5
M30
%
vim: syntax=rs274ngc ts=4
|