
Implement libarea improvements for profile Implement libarea pocketing. consolidate occ and libarea pocketing operation into one with algorithm switch consolidate occ aand libarea profile op into one with algorithm switch add basic engraving operation. Add rough UI for profile holding tags implement holding tags for libarea profile. implement basic defaults for depth settings. First move in Drilling is rapid to clearance height. UI needs lots of work but is usable.
35 lines
1.6 KiB
Python
35 lines
1.6 KiB
Python
def tool_defn(self, id, params):
|
|
self.write('(TOOL/')
|
|
type = params['type']
|
|
if type == 0:#eDrill = 0,
|
|
#;TOOL/DRILL, Diameter, Point Angle, Height
|
|
self.write('DRILL, ' + str(params['diameter']))
|
|
self.write(', ' + str(params['cutting edge angle'] * 2.0))
|
|
self.write(', ' + str(params['cutting edge height']))
|
|
elif type == 1:#eCentreDrill,
|
|
#;TOOL/CDRILL, D1, A1, L, D2, A2, H (see Fig. below)
|
|
self.write('CDRILL, ' + str(params['flat radius'] * 2))
|
|
self.write(', ' + str(params['cutting edge angle']))
|
|
self.write(', ' + str(params['flat radius'] * 2))
|
|
self.write(', ' + str(params['diameter']))
|
|
self.write(', ' + str(params['cutting edge angle'] * 2.0))
|
|
self.write(', ' + str(params['cutting edge height']))
|
|
elif type == 2 or type == 3 or type == 4:#eSlotCutter,#eEndmill,#eBallEndMill,
|
|
#TOOL/MILL, Diameter, Corner radius, Height, Taper Angle
|
|
self.write('MILL, ' + str(params['diameter']))
|
|
self.write(', ' + str(params['corner radius']))
|
|
self.write(', ' + str(params['cutting edge height']))
|
|
self.write(', ' + str(params['cutting edge angle']))
|
|
elif type == 5 or type == 6:#eChamfer,#eEngravingTool,
|
|
#;TOOL/CHAMFER, Diameter, Point Angle, Height
|
|
#;TOOL/CHAMFER, Diameter, Point Angle, Height, Chamfer Length
|
|
self.write('CHAMFER, ' + str(params['diameter']))
|
|
self.write(', ' + str(params['cutting edge angle']))
|
|
self.write(', ' + str(params['cutting edge height']))
|
|
else:#eUndefinedToolType
|
|
pass
|
|
self.write(')\n')
|
|
|
|
# to do
|
|
#;TOOL/CRMILL, Diameter1, Diameter2, Radius, Height, Length
|