Files
linuxcnc/nc_files/HEMS/HEMS-0003.ngc
Thaddeus Hughes ad1f8719d6 big overhaul
2026-04-05 20:51:43 -05:00

95 lines
2.4 KiB
Plaintext
Executable File

#<_z_clearance> = 0.5
#<_rampang> = 5
;#<_stepover> = 0.08
;#<_overlap> = 0
; +1: Conventional milling
; +2: Both-ways milling
; +4: Plunge entry
; +8: Outside
G20 ; G21 mm / G20 inch
G10 L1 P1 Z0.0 R.125 ; set tool
T1 ; set tool to T1
M06 ; manual toolchange
G54 ; absolute coordinates
;F5 ; inch or mm/min (300 mm/min = about 1 ft/min)
#<prog> = 1
#<b> = .952
#<w> = 4.0
#<bolt_r> = [2]
o10 if [#<prog> EQ 1]
F3
o<drill_man> call [#<w>/2][-#<w>/2] [0.1][-0.5]
o<drill_man> call [#<w>/2+#<bolt_r>/SQRT[2]][-#<w>/2+#<bolt_r>/SQRT[2]] [0.1][-0.5]
o<drill_man> call [#<w>/2+#<bolt_r>/SQRT[2]][-#<w>/2-#<bolt_r>/SQRT[2]] [0.1][-0.5]
o<drill_man> call [#<w>/2-#<bolt_r>/SQRT[2]][-#<w>/2-#<bolt_r>/SQRT[2]] [0.1][-0.5]
o<drill_man> call [#<w>/2-#<bolt_r>/SQRT[2]][-#<w>/2+#<bolt_r>/SQRT[2]] [0.1][-0.5]
o10 elseif [#<prog> EQ 2]
F12
; exterior
#<_z_top> = 0.02
#<_z_bot> = -0.002
o<pocket_circ> call [0] [#<w>/2][-#<w>/2] [3.0]
F8
o<spquircle_boss> call [#<w>/2][-#<w>/2] [#<w>][2.8125] [0.02] [-0.125] [0.01]
; ream the holes
#<_z_top> = 0.1
#<_z_bot> = -0.6
o<pocket_circ> call [+4] [#<w>/2+#<bolt_r>/SQRT[2]][-#<w>/2+#<bolt_r>/SQRT[2]] [.45] [0]
#<_z_top> = 0.1
#<_z_bot> = -0.6
o<pocket_circ> call [+4] [#<w>/2+#<bolt_r>/SQRT[2]][-#<w>/2-#<bolt_r>/SQRT[2]] [.45] [0]
#<_z_top> = 0.1
#<_z_bot> = -0.6
o<pocket_circ> call [+4] [#<w>/2-#<bolt_r>/SQRT[2]][-#<w>/2-#<bolt_r>/SQRT[2]] [.45] [0]
#<_z_top> = 0.1
#<_z_bot> = -0.6
o<pocket_circ> call [+4] [#<w>/2-#<bolt_r>/SQRT[2]][-#<w>/2+#<bolt_r>/SQRT[2]] [.45] [0]
; center pocket
o<spquircle_pocket> call [#<w>/2][-#<w>/2] [.95] [0.02][-.18] [0]
o<spquircle_pocket> call [#<w>/2][-#<w>/2] [.95] [-.18][-.36] [0]
o<spquircle_pocket> call [#<w>/2][-#<w>/2] [.95] [-.36][-.55] [0]
; cleanup the corners
#<_z_top> = 0.02
#<_z_bot> = -0.6
o<drill> call [#<w>/2+.38][-#<w>/2+.38]
#<_z_top> = 0.02
#<_z_bot> = -0.6
o<drill> call [#<w>/2-.38][-#<w>/2+.38]
#<_z_top> = 0.02
#<_z_bot> = -0.6
o<drill> call [#<w>/2-.38][-#<w>/2-.38]
#<_z_top> = 0.02
#<_z_bot> = -0.6
o<drill> call [#<w>/2+.38][-#<w>/2-.38]
#<_z_top> = 0.02
#<_z_bot> = -.55
o<frame_rect> call [0] [#<w>/2+#<b>/2][-#<w>/2+#<b>/2] [#<w>/2-#<b>/2][-#<w>/2-#<b>/2]
o10 elseif [#<prog> EQ 3]
F8
#<_z_top> = 0.02
#<_z_bot> = -.55
o<frame_rect> call [0] [#<w>/2+#<b>/2][-#<w>/2+#<b>/2] [#<w>/2-#<b>/2][-#<w>/2-#<b>/2]
o10 endif
M2 ; end program