prog.add(gcode_cmd.PathBlendMode(P=0.01)) roughParam = { 'fileName': fileName, 'layers': ['rough_boundary'], 'depth': roughDepth, 'startZ': startZ, 'safeZ': safeZ, 'toolDiam': toolDiam, 'direction': direction, 'cutterComp': cutterComp, 'maxCutDepth': maxCutDepth, 'startDwell': startDwell, 'startCond': startCond, } roughBoundary = cnc_dxf.DxfBoundary(roughParam) prog.add(roughBoundary) finishParam = { 'fileName': fileName, 'layers': ['boundary'], 'depth': finishDepth, 'startZ': startZ, 'safeZ': safeZ, 'toolDiam': toolDiam, 'direction': direction, 'cutterComp': cutterComp, 'maxCutDepth': maxCutDepth, 'startDwell': startDwell, 'startCond': startCond, }
'direction': direction, 'maxCutDepth': maxCutDepth, 'startDwell': startDwell, } outerCircBoundary = cnc_dxf.DxfCircBoundary(outerCircParam) prog.add(outerCircBoundary) # outer boundary outerParam = { 'fileName': fileName, 'layers': ['outer_boundary'], 'depth': depth, 'startZ': startZ, 'safeZ': safeZ, 'toolDiam': toolDiam, 'direction': direction, 'cutterComp': 'outside', 'maxCutDepth': maxCutDepth, 'startDwell': startDwell, 'startCond': startCond, } outerBoundary = cnc_dxf.DxfBoundary(outerParam) prog.add(outerBoundary) 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)
} circle = cnc_dxf.DxfCircBoundary(param) prog.add(circle) if True: param = { 'fileName': fileName, 'dxfTypes': ['LINE', 'ARC', 'CIRCLE'], 'layers': ['boundary'], 'depth': depth, 'startZ': startZ, 'safeZ': safeZ, 'toolDiam': toolDiam, 'direction': direction, 'cutterComp': 'outside', 'maxCutDepth': maxCutDepth, 'startDwell': startDwell, 'startCond': startCond, } boundary = cnc_dxf.DxfBoundary(param) prog.add(boundary) prog.add(gcode_cmd.ExactPathMode()) 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)
param = { 'fileName': fileName, 'layers': layerNames, 'depth': depth, 'startZ': startZ, 'safeZ': safeZ, 'toolDiam': toolDiam, 'direction': direction, 'cutterComp': 'inside', 'maxCutDepth': maxCutDepth, 'startDwell': startDwell, 'startCond': startCond, 'maxArcLen': maxArcLen, 'ptEquivTol': ptEquivTol, } cutout = cnc_dxf.DxfBoundary(param) prog.add(cutout) # Cut boundary layerNames = ['boundary'] param = { 'fileName': fileName, 'layers': layerNames, 'depth': depth, 'startZ': startZ, 'safeZ': safeZ, 'toolDiam': toolDiam, 'direction': direction, 'cutterComp': 'outside', 'maxCutDepth': maxCutDepth, 'startDwell': startDwell,