|
SOME of you folks wanted to have the original G150 as a parallel path so here is G150.1 upload:rectangular_parallel_pocket_subroutine.ngc ![]() 1. Rectangular-Circular Python Pocketing Generatorsome of you may prefer a Generator also : put this file to your Nc_code folder by right clicking it and save to then open it in axis -> on some OS you may have to chmod to executable first! **This is for Generating simple Pocket Style Toolpathes with Different depth/step-over **Version 1 does only support Zero Path but you can simply edit the final path to G41 **upload:pocket_V1.py **Screenshot : * ![]() *** Written by Sammel Lothar Germany |
G150 is the Special G-code to generate multiple paths to Mill Rectangular Pockets at given center!. i will make a pythen Gui for G12/G13 G150 Haas like Milling Cycels into th Simple G-code Generator side ! for all ho like this G-code here is a Equal for Axis EMC!upload:rectangular_spiral_pocket_subroutine.ngc
--------------------------------------------------------
(Rectangular Spiral Pocket)
#1=3.0 (tooldiameter)
#2=30.0 (rectangular Pocket X length)
#3=15.0 (rectangular Pocket Y length)
#4=0.0 (centerX)
#5=0.0 (centerY)
#6=-5.0 (Final Depth)
#7=2.0 (safeZ)
#8=1.0 (stepover XY)
#9=-2.0 (stepover Z)
#10=100 (feedrateZ)
#11=200 (feedrateXY)
(calculate How many times into while)
O100 if [#2 GT #3]
#20=FIX[[[#2-#1]/#8/2.0]]
O100 else
#20=FIX[[[#3-#1]/#8/2.0]]
O100 endif
(calculate Stepover New)
#15=[[#2-#1]/[#20*2]] (New X-Stepover)
#16=[[#3-#1]/[#20*2]] (New Y-Stepover)
G17 (XY Plane)
G21 (Metric)
G90 (Absolute)
G61 (Exact Path)
(Rectangular Spiral)
G0 X#4 Y#5 (Move Center)
G0 Z#7
G1 Z0 F#10
(Depth Cycle Control)
O95 while [#6 lt 0]
O97 If [#6 lt #9]
G1 G91 Z#9
O97 else
G1 G91 Z#6
O97 endif
#6=[#6-#9]
#21=1 (start value for while)
#30=#15
#31=#16
O100 while[#21 lt #20]
F#11 G91 X#30
Y#31
#30=[#30+#15]
#31=[#31+#16]
X-#30
Y-#31
#30=[#30+#15]
#31=[#31+#16]
#21=[#21+1]
O100 endwhile
X[#30-#15]
(finish Rect)
G1 G90 X[#4+[#2/2.0]-[#1/2.0]] Y[#5+[#3/2.0]-[#1/2.0]]
X[#4-[#2/2.0]+[#1/2.0]]
Y[#5-[#3/2.0]+[#1/2.0]]
X[#4+[#2/2.0]-[#1/2.0]]
Y[#5+[#3/2.0]-[#1/2.0]]
G1 G90 X#4 Y#5
O95 endwhile
G0 G90 Z#7
M5
M30
--------------------------------------------------------------------------
SOME of you folks wanted to have the original G150 as a parallel path so here is G150.1
upload:rectangular_parallel_pocket_subroutine.ngc
some of you may prefer a Generator also : put this file to your Nc_code folder by right clicking it and save to then open it in axis -> on some OS you may have to chmod to executable first!