prog = gcode_cmd.GCodeProg() prog.add(gcode_cmd.GenericStart()) prog.add(gcode_cmd.Space()) prog.add(gcode_cmd.FeedRate(feedrate)) param = { 'fileName': fileName, 'layers': ['Boundary', 'Fixture Pocket'], #'layers' : ['Boundary'], 'components': True, 'depth': depth, 'startZ': startZ, 'safeZ': safeZ, 'overlap': overlap, 'overlapFinish': overlapFinish, 'maxCutDepth': maxCutDepth, 'toolDiam': toolDiam, 'cornerCut': cornerCut, 'direction': direction, 'startDwell': startDwell, } pocket = cnc_dxf.DxfRectPocketFromExtent(param) prog.add(pocket) prog.add(gcode_cmd.Space()) prog.add(gcode_cmd.End(), comment=True) baseName, dummy = os.path.splitext(__file__) fileName = '{0}.ngc'.format(baseName) print('generating: {0}'.format(fileName)) prog.write(fileName)
roughParam = { 'fileName': fileName, 'layers': ['rough_pcb_pocket'], 'components': True, 'depth': roughDepth, 'startZ': startZ, 'safeZ': safeZ, 'overlap': overlap, 'overlapFinish': overlap, 'maxCutDepth': maxCutDepth, 'toolDiam': toolDiam, 'cornerCut': cornerCut, 'direction': direction, 'startDwell': startDwell, } roughPocket = cnc_dxf.DxfRectPocketFromExtent(roughParam) prog.add(roughPocket) wallFinishParam = { 'fileName': fileName, 'layers': ['pcb_pocket'], 'components': True, 'depth': depth, 'thickness': toolDiam, 'startZ': startZ, 'safeZ': safeZ, 'overlap': overlap, 'overlapFinish': overlap, 'maxCutDepth': maxCutDepth, 'toolDiam': toolDiam, 'cornerCut': cornerCut,