[
  {
    "ID": 0,
    "MachineID": 0,
    "CompanyID": 813,
    "Name": "极东六面mpr(可配置)",
    "Type": 5,
    "Setting": {
      "templateName": "",
      "encodingName": "",
      "fileA": "",
      "fileB": "",
      "fileCreateType": "",
      "codeContent": ""
    },
    "Remark": "品牌:极东 备注:可配置参数-2020.12.08"
  }
]

[
  {
    "ID": 0,
    "MachineID": 5347,
    "CompanyID": 0,
    "Name": "nc通用(通用配置模式)",
    "Type": 5,
    "Setting": "{\"templateName\":\"nc通用\",\"encodingName\":\"\",\"fileA\":\"\",\"fileB\":\"\",\"fileCreateType\":\"\",\"codeContent\":\"//2022-3-7 lrx 纯铣边不出文件问题处理\\n//2022-1-6 lrx 文件头尾 修改成函数.  \\n//2021-12-27 sqy 工位头尾定义修正，空行(调刀、停刀、文件头尾、工位头尾)不显示\\n//2021-12-2 sqy 增加板件编号自定义函数\\n//Gcode PTP函数 支持双工位\\n\\nif (order == null || helper == null) return getArgList();\\n\\nfunction getArgList()  /*初始化 配置列表****************************************************************************/\\n{\\n    let strfnKnifes = `\\n\\tlet knifes = [];\\n\\taddKnife('左右',0,5,4,'M33','T23T2200\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('左右',0,4,5,'M33','T24T2900\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('上下',0,5,4,'M33','T23T2400\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('上下',0,4,5,'M33','T22T2900\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('单',0,7.5,0,'M33','T2100\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('单',0,4,0,'M33','T2200\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('单',0,5,0,'M33','T2300\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('单',0,0,0,'M33','T2400\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('单',0,17.5,0,'M33','T2500\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('单',0,2.5,0,'M33','T2600\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('单',0,0,0,'M33','T2700\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('单',0,10,0,'M33','T2800\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('单',0,0,0,'M33','T2900\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('左',0,4,0,'M33','T6100\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('右',0,4,0,'M33','T6200\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('上',0,4,3,'M33','T66T6400\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('上',0,3,4,'M33','T68T6600\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('上',0,4,0,'M33','T6600\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('上',0,3,0,'M33','T6800\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('下',0,4,3,'M33','T65T6300\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('下',0,3,4,'M33','T67T6500\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('下',0,4,0,'M33','T6500\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\taddKnife('下',0,3,0,'M33','T6700\\\\\\\\r\\\\\\\\nM63','','T0\\\\\\\\r\\\\\\\\nM35');\\n\\treturn knifes\\n\\tfunction addKnife(type,z,r1,r2,zStart,kStart,kEnd,zEnd)\\n\\t{   //类型,轴号,半径1,半径2,轴启动,刀启动,刀停止,轴停止\\n\\t\\tlet knife = {t:type,z:z,r1:r1,r2:r2,zsc:zStart,sc:kStart,ec:kEnd,zec:zEnd};\\n\\t\\tknifes.push(knife);\\n\\t\\treturn knife;\\n\\t}`;\\n\\n    let args = { list: [], add(name, value, remark) { this.list.push({ name, value, remark }); return this; } };\\n    return args\\n        .add('roleNum', 1, '加工模式(1=CNC全加工 2=CNC少加工 3=CNC多加工)')\\n        .add('fileNameA', '{0}A.nc', '正面文件名')\\n        .add('fileNameB', '{0}B.nc', '反面文件名')\\n        .add('gb2312', true, '文件编码(false：utf8 true：gb2312)')\\n        .add('bitNum', 2, '小数点位数')\\n        .add('isPlaceByLength', false, '小板加工方向(false：高方向 true：长边方向)')\\n        .add('isTurnByWidth', true, '翻板方式(true：按板宽左右翻 false：按板长上下掉头翻)')\\n        .add('cutBorder', false, '铣异形边(false：不加工 true：加工)')\\n        .add('doModel_through', false, '挖穿造型(false：不加工 true：加工)')\\n        .add('doModel_arc', true, '加工弧形造型')\\n        .add('sideHoleDepth_min', 12, '侧孔深最小值')\\n        .add('sideHoleDepth_max', 40, '侧孔深最大值')\\n        .add('holeDepth_min', 0.2, '面孔深最小值')\\n        .add('holeDepth_max', 40, '面孔深最大值')\\n        .add('DisposeHoleRadius', '', '面孔不打的半径(用空格分隔)')\\n        .add('has2WorkPanel', false, '双工位(false：单工位 true：双工位)')\\n        .add('fn_transXY', 'return {x:y,y:w-x};', '坐标XY函数(p工位1、2\\\\r\\\\nw宽,l长\\\\r\\\\nx,y原坐标)\\\\\\\\@p,w,l,x,y')\\n        .add('fn_transZ', 'return t+z;', '坐标Z函数(p工位1、2\\\\r\\\\nt板厚,z原坐标)\\\\\\\\@t,z')\\n        .add('fn_fileBegin', 'return \\\"\\\";', '文件头(obj传参下有:helper帮助类\\\\r\\\\npt原函数,b板,f反面,p工位1、2)\\\\\\\\@obj')\\n        .add('fn_fileEnd', 'return \\\"\\\";', '文件尾(obj传参下有:helper帮助类\\\\r\\\\npt原函数,b板,f反面,p工位1、2)\\\\\\\\@obj')\\n        .add('fn_wrpBegin', 'return \\\"\\\";', '工位头(obj传参下有:helper帮助类\\\\r\\\\npt原函数,b板,f反面,p工位1、2)\\\\\\\\@obj')\\n        .add('fn_wrpEnd', 'return \\\"\\\";', '工位尾(obj传参下有:helper帮助类\\\\r\\\\npt原函数,b板,f反面,p工位1、2)\\\\\\\\@obj')\\n        .add('safeV', 30, '水平安全距离(打侧孔时)')\\n        .add('safeH', 40, '垂直安全距离(打侧孔时)')\\n        .add('speed_space', 12000, '空程速度')\\n        .add('speed_shole', 3500, '水平孔速度')\\n        .add('speed_hole', 3500, '垂直孔速度')\\n        .add('speed_model', 6000, '造型速度')\\n        .add('speed_cut', 5000, '铣边速度')\\n        .add('fn_knifes', strfnKnifes, '刀库(t：类型\\\\r\\\\n  水平排钻刀:左 右 上 下\\\\r\\\\n 垂直排钻刀:单 左右 上下\\\\r\\\\n 铣刀:铣\\\\r\\\\nr1:主刀半径\\\\r\\\\nr2:组合刀半径\\\\r\\\\nz：轴号\\\\r\\\\nsc：刀启动代码 \\\\r\\\\nec：刀停止代码 \\\\r\\\\nzsc：轴启动代码 \\\\r\\\\nzec：轴停止代码)//@')\\n        .add('fn_cutKnife', 'return t > 18 ? 4 : 3;', '异形铣边刀选择(根据板厚t选择铣刀,返回刀半径)//@t,h')\\n        .add('fn_blockNo', 'return b.BlockNo;', '板编号(b板)\\\\\\\\@b')\\n        .list;\\n}\\n\\n//开料模式 1:全加工 2:cnc少加工 3:cnc多加工\\nlet roleNum = helper.getArg('roleNum', 1);\\n\\n//文件名，编码  {0}代表板编号\\nlet fileNameA = helper.getArg('fileNameA', '{0}A.nc');\\nlet fileNameB = helper.getArg('fileNameB', '{0}B.nc');\\nlet isGb2312 = helper.getArg('gb2312', true);\\n\\n//小数位数\\nlet bitNum = helper.getArg('bitNum', 2);\\n\\n//放板方式  false:高方向  true:长边方向\\nlet isPlaceByLength = helper.getArg('isPlaceByLength', false);\\n\\n//翻面方式  false:长边翻  true:宽边翻\\nlet isTurnByWidth = helper.getArg('isTurnByWidth', true);\\n\\n//是否铣边  false:不加工  true:加工\\nlet cutBorder = helper.getArg('cutBorder', false);\\n\\n//是否加工打穿的造型  false:不加工  true:加工\\nlet doModel_through = helper.getArg('doModel_through', false);\\n\\n//是否加工有弧形的造型  false:不加工  true:加工\\nlet doModel_arc = helper.getArg('doModel_arc', true);\\n\\nlet unDoList_holeRidus;  //不处理 面孔半径\\nlet unDoRange_holeDepth;  //不处理 面孔深度\\nlet unDoRange_sideHoleDepth;  //不处理 侧孔深度\\n\\nlet has2WorkPanel = helper.getArg('has2WorkPanel', false);  //有双工位\\n\\nlet fn_blockNo = helper.newFn('板编号', 'fn_blockNo', 'return b.BlockNo;', 'b');\\n//坐标函数\\nlet fn_transXY = helper.newFn('坐标XY函数', 'fn_transXY', 'return {x:y,y:w-x};', 'p', 'w', 'l', 'x', 'y');\\nlet fn_transZ = helper.newFn('坐标Z函数', 'fn_transZ', 'return t+z;', 'p', 't', 'z');\\n//文件头尾\\nlet fn_fileBegin = helper.newFn('文件头', 'fn_fileBegin', 'return \\\"\\\";', 'obj');\\nlet fn_fileEnd = helper.newFn('文件尾', 'fn_fileEnd', 'return \\\"\\\";', 'obj');\\nlet fn_wrpBegin = helper.newFn('工位头', 'fn_wrpBegin', 'return \\\"\\\";', 'obj');\\nlet fn_wrpEnd = helper.newFn('工位尾', 'fn_wrpEnd', 'return \\\"\\\";', 'obj');\\n\\nlet safeV = helper.getArg('safeV', 30);  //水平安全距离\\nlet safeH = helper.getArg('safeH', 40);  //垂直孔安全距离\\nlet speed_space = helper.getArg('speed_space', 12000);  //空程速度\\nlet speed_shole = helper.getArg('speed_shole', 3500);  //水平孔排钻速度\\nlet speed_hole = helper.getArg('speed_hole', 3500);  //垂直孔排钻速度\\nlet speed_model = helper.getArg('speed_model', 6000);  //造型速度\\nlet speed_cut = helper.getArg('speed_cut', 5000);  //异形铣边速度\\n\\n//排钻、造型刀库\\nlet knifeList = [];\\nlet strfn_knifes = helper.getArg('fn_knifes', 'return [];');\\ntry\\n{\\n    let fn_getKnifes = new Function(strfn_knifes);\\n    knifeList = fn_getKnifes();\\n}\\ncatch\\n{\\n    console.log('创建刀库失败!请检查刀库函数');\\n    return;\\n}\\n\\n//铣边刀半径 函数\\nlet strcutKnifeFn = helper.getArg('fn_cutKnife', 'return t > 18 ? 4 : 3;');\\nlet fn_getCutKnife;\\ntry\\n{\\n    fn_getCutKnife = new Function('t', strcutKnifeFn);\\n}\\ncatch\\n{\\n    console.log('创建铣边刀函数失败!' + strcutKnifeFn);\\n    return;\\n}\\n\\nlet block = null;  //当前加工板\\nlet isFaceB = false;  //当前加工面\\nlet binfo = null;  //板信息\\nlet withSideHole = false;  //当前加工面是否包含侧孔\\nlet hasCuteBorder = false;  //是否异形铣边\\nlet theKnife;  //当前工作刀\\nlet hasDo = false;  //是否有加工项目\\n\\nlet cache = [];\\nlet text = '';\\nlet blockNo = '';\\n\\nlet placeStation = 1;  //加工工位\\n\\n//处理板件\\nfor (let b of order.BlockList)\\n{\\n    if (b.IsAdditionalBlock) continue;  //自增小板\\n    if(helper.isEmptyBlock(b) && !b.IsUnRegular) continue;  //无加工项目\\n\\n    block = b;\\n    hasCuteBorder = false;\\n\\n    blockNo = helper.exec(fn_blockNo, block);\\n\\n    //2、3模式下正反面是否处理\\n    let doFlag = helper.getDoFlag(block, roleNum);\\n\\n    if (doFlag.faceA || cutBorder) //铣边 安排在正面\\n    {\\n        isFaceB = false;\\n        withSideHole = doFlag.faceSideWithA;\\n        doFace();\\n        hasCuteBorder = true;\\n    }\\n    if (doFlag.faceB)\\n    {\\n        isFaceB = true;\\n        withSideHole = !doFlag.faceSideWithA;\\n        doFace();\\n    }\\n}\\n\\n\\nfunction doFace()  /*处理面*************************************************************************************/\\n{\\n    //清空\\n    hasDo = false;\\n    cache = [];\\n\\n    binfo = helper.getBlockInfo(block, isPlaceByLength, isFaceB, isTurnByWidth);\\n\\n    placeStation = 1;\\n\\n    let obj = { helper: helper, pt: this, b: block, f: isFaceB, p: placeStation, binfo: binfo };\\n\\n    let fileBegin = helper.exec(fn_fileBegin, obj);\\n    let fileEnd = helper.exec(fn_fileEnd, obj);\\n    let wrpBegin = helper.exec(fn_wrpBegin, obj);\\n    let wrpEnd = helper.exec(fn_wrpEnd, obj);\\n\\n    //文件头\\n    if (fileBegin) cache.push(fileBegin);\\n    //工位1头\\n    if (wrpBegin) cache.push(wrpBegin);  \\n    \\n    //工位1 铣边\\n    doBorders();\\n\\n    //工位1 造型\\n    doModels();\\n\\n    //工位1 正面孔\\n    doHoles();\\n\\n    //工位1 侧孔\\n    doHoles_z();\\n    doHoles_y();\\n    doHoles_s();\\n    doHoles_x();\\n\\n    //停当前刀\\n    changeKnife(null);\\n\\n    //工位1尾\\n    if (wrpEnd) cache.push(wrpEnd );\\n\\n    if (has2WorkPanel) //工位2\\n    {\\n        placeStation = 2;\\n        let obj = { helper: helper, pt: this, b: block, f: isFaceB, p: placeStation, binfo: binfo };\\n        let wrpBegin2 = helper.exec(fn_wrpBegin, obj);\\n        let wrpEnd2 = helper.exec(fn_wrpEnd, obj);\\n        \\n        //工位2头\\n        if (wrpBegin2) cache.push(wrpBegin2);\\n\\n        //工位2 铣边\\n        doBorders();\\n\\n        //工位2 造型\\n        doModels();\\n\\n        //工位2 正面孔\\n        doHoles();\\n\\n        //工位2 侧孔\\n        doHoles_z();\\n        doHoles_y();\\n        doHoles_s();\\n        doHoles_x();\\n\\n        //停当前刀\\n        changeKnife(null);\\n\\n        //工位2尾\\n        if (wrpEnd2) cache.push(wrpEnd2);\\n    }\\n\\n    //文件尾\\n    if (fileEnd) cache.push(fileEnd);\\n\\n    if (!hasDo) return;\\n    let fileName = helper.format(isFaceB ? fileNameB : fileNameA, blockNo);\\n    let fileText = cache.join('\\\\r\\\\n');\\n    isGb2312 ? helper.pushFile_gb2312(fileName, fileText) : helper.pushFile(fileName, fileText);\\n}\\n\\nfunction doBorders()  /*异形铣边*********************************************************************************/\\n{\\n\\tif(!cutBorder) return;\\n    if (isFaceB) return;\\n\\tif(!block.IsUnRegular) return;\\n    if (hasCuteBorder) return;\\n\\n    let kr = fn_getCutKnife(block.Thickness);\\n    let knife = getKnife_cut(kr);\\n    if (knife == null)\\n    {\\n        console.log('未发现铣边的刀');\\n        return;\\n    }\\n    let lines = helper.getCutBorders(block);\\n\\n    let hasG42 = false;\\n    for (let line of lines)\\n    {\\n        if (line.length < 2) continue;\\n\\n        let mDepth = 0;  //铣边深度\\n        //换刀\\n        changeKnife(knife);\\n\\n        //铣边起点\\n        let p_s = line[0];\\n        let np_s = helper.getXY(block, isPlaceByLength, isFaceB, isTurnByWidth, p_s.PointX + block.BorderLeft, p_s.PointY + block.BorderUnder);\\n        let rp_s = getPos(np_s.x, np_s.y);\\n        let strG42 = '';\\n        if(hasG42 == false) \\n        {\\n            strG42 = 'G42';\\n            hasG42 = true;\\n        }\\n        text = `G00 ${strG42} X${getStr(rp_s.x)} Y${getStr(rp_s.y)} Z${getStr(safeH)} F${getStr(speed_space)}`;\\n        cache.push(text);\\n\\n        //下刀\\n        text = `G01 Z${getStr(mDepth)} F${getStr(speed_cut)}`;\\n        cache.push(text);\\n\\n        //铣边中间点\\n        for (let i = 1; i < line.length; i++)\\n        {\\n            let p0 = line[i - 1];  //前一点\\n            let p1 = line[i];\\n\\n            let np1 = helper.getXY(block, isPlaceByLength, isFaceB, isTurnByWidth, p1.PointX + block.BorderLeft, p1.PointY + block.BorderUnder);\\n            let rp1 = getPos(np1.x, np1.y);\\n\\n            if (p0.Curve == 0)  //直线\\n            {\\n                text = `G01 X${getStr(rp1.x)} Y${getStr(rp1.y)} F${getStr(speed_cut)}`;\\n            }\\n            else  //圆弧\\n            {\\n                //求圆心\\n                let isG2 = p0.Curve < 0;\\n                text = `${isG2 ? 'G2' : 'G3'} X${getStr(rp1.x)} Y${getStr(rp1.y)} R${getStr(Math.abs(p0.Radius))} F${getStr(speed_cut)}`;\\n            }\\n            cache.push(text);\\n        }\\n\\n        //抬刀\\n        text = `G1 Z${getStr(safeH)} F${getStr(speed_cut)}`;\\n        cache.push(text);\\n        hasDo = true;\\n    }\\n    if(hasG42)\\n    {\\n        text = `G1 G40 Z${getStr(safeH + 1)} F${getStr(speed_cut)}`;\\n        cache.push(text);\\n    }\\t\\t\\t\\n}\\n\\nfunction doModels()  /*造型************************************************************************************/\\n{\\n    let models = helper.getModels(block, isFaceB);\\n    if (models.length == 0) return;\\n    for (let model of models)\\n    {\\n        if (model.PointList.length == 0) continue;\\n        //打穿的不加工\\n        if (doModel_through == false && helper.isThroughModel(block, model)) continue;\\n        //弧形不加工\\n        if (doModel_arc == false && helper.isArcModel(model)) continue;\\n\\n        let knife = getKnife_cut(model.KnifeRadius);\\n        if (knife == null)\\n        {\\n            console.log('未发现造型刀,半径' + model.KnifeRadius);\\n            continue;\\n        }\\n\\n        changeKnife(knife);\\n\\n        //定位\\n        let mp0 = model.PointList[0];\\n        let xp0 = helper.getXY(block, isPlaceByLength, isFaceB, isTurnByWidth, mp0.PointX, mp0.PointY);\\n        let rp0 = getPos(xp0.x, xp0.y);\\n        text = `G0 X${getStr(rp0.x)} Y${getStr(rp0.y)} Z${getStr(safeH)} F${getStr(speed_space)}`;\\n        cache.push(text);\\n\\n        //下刀\\n        let z = block.Thickness - model.Depth;\\n        text = `G1 Z${getStr(z)} F${getStr(speed_model)}`;\\n        cache.push(text);\\n\\n        //造型中间点\\n        for (let i = 1; i < model.PointList.length; i++)\\n        {\\n            let mp1 = model.PointList[i - 1];\\n            let mp2 = model.PointList[i];\\n            let xp_2 = helper.getXY(block, isPlaceByLength, isFaceB, isTurnByWidth, mp2.PointX, mp2.PointY);\\n            let rp_2 = getPos(xp_2.x, xp_2.y);\\n\\n            if (mp1.Curve == 0)  //直线\\n            {\\n                text = `G1 X${getStr(rp_2.x)} Y${getStr(rp_2.y)} F${getStr(speed_model)}`;\\n                cache.push(text);\\n            }\\n            else  //圆弧\\n            {\\n                let isG2 = (mp1.Curve < 0);\\n                if (isFaceB) isG2 = !isG2;\\n                text = `${isG2 ? 'G2' : 'G3'} X${getStr(rp_2.x)} Y${getStr(rp_2.y)} R${getStr(Math.abs(mp1.Radius))} F${getStr(speed_model)}`;\\n                cache.push(text);\\n            }\\n        }\\n\\n        //抬刀\\n        text = `G1 Z${getStr(safeH)} F${getStr(speed_model)}`;\\n        cache.push(text);\\n\\n        hasDo = true;\\n    }\\n}\\n\\nfunction doHoles()  /*正面孔************************************************************************************/\\n{\\n    let holes_F = helper.getHoles(block, isFaceB);\\n    if (holes_F.length == 0) return;\\n\\n    let holes = [];\\n    for (let hole of holes_F)\\n    {\\n        if (unDo_hole_depth(hole)) continue;\\n        if (undo_hole_radius(hole)) continue;\\n        let p = helper.getXY(block, isPlaceByLength, isFaceB, isTurnByWidth, hole.PointX, hole.PointY);\\n        holes.push({ x: p.x, y: p.y, z: p.z, r: hole.Radius, d: hole.Depth });\\n    }\\n\\n    let lx = 0, ly = 0;\\n    while (holes.length > 0)\\n    {\\n        let hole = getNextHole(holes, lx, ly);\\n        lx = hole.x;\\n        ly = hole.y;\\n        let hasGroup = getGroupHole(holes, hole);\\n\\n        let knife = hasGroup.knife;\\n        if (knife == null) continue;  //无匹配刀具，忽略孔\\n\\n        hole = hasGroup.hole;  //替换成组合孔的 左边孔 或下边孔\\n\\n        //换刀\\n        changeKnife(knife);\\n\\n        let p1 = getPos(hole.x, hole.y);\\n\\n        let z = block.Thickness - hole.d;\\n\\n        text = `G0 X${getStr(p1.x)} Y${getStr(p1.y)} Z${getStr(safeH)} F${getStr(speed_space)}`;  //首次 安全高度\\n        cache.push(text);\\n\\n        text = `G1 Z${getStr(z)} F${getStr(speed_hole)}`;  //打孔\\n        cache.push(text);\\n\\n        text = `G1 Z${getStr(safeH)} F${getStr(speed_hole)}`;  //退刀 安全高度\\n        cache.push(text);\\n\\n        hasDo = true;\\n    }\\n}\\n\\nfunction doHoles_z()  /*侧孔 左*********************************************************************************/\\n{\\n    if (!withSideHole) return;\\n    let holes_s = withSideHole ? helper.getSideHoles_Left(block, isPlaceByLength, isFaceB, isTurnByWidth) : [];\\n    if (holes_s.length == 0) return;\\n    let holes = [];\\n    for (let hole of holes_s)\\n    {\\n        if (undo_sidehole_depth(hole)) continue;\\n        let p = helper.getXY(block, isPlaceByLength, isFaceB, isTurnByWidth, hole.PointX, hole.PointY);\\n        holes.push({ x: p.x, y: p.y, z: hole.PointZ, r: hole.Radius, d: hole.Depth });\\n    }\\n\\n    //按下到到上排序 y+\\n    holes = holes.sort((a, b) => a.y - b.y);\\n\\n    text = `G00 Z${getStr(safeH)} F${getStr(speed_space)}`;  //安全高度\\n    cache.push(text);\\n\\n    for (let i = 0; i < holes.length;)\\n    {\\n        let h1 = holes[i];\\n        let h2 = i + 1 < holes.length ? holes[i + 1] : null;\\n        let r1 = h1.r;\\n        let r2 = 0; //默认单刀\\n\\n        //如果两孔位置间距32，且深度一样，则考虑组合刀\\n        if (h2 && Math.abs(h1.d - h2.d) < 0.01 && Math.abs(h1.z - h2.z) < 0.01 && Math.abs(h2.y - h1.y - 32) < 0.01) r2 = h2.r;\\n\\n        let knife = getKnife_sidehole('左', r1, r2);\\n        if (knife == null) //找不到刀，不处理\\n        {\\n            i++;\\n            continue;\\n        }\\n        changeKnife(knife);\\n\\n        let x1 = 0 - safeV;\\n        let y1 = h1.y;\\n        let x2 = h1.x + h1.d;\\n        let y2 = h1.y;\\n\\n        let p1 = getPos(x1, y1);\\n        let p2 = getPos(x2, y2);\\n\\n        let z = getZ(h1.z);\\n\\n        text = `G0 X${getStr(p1.x)} Y${getStr(p1.y)} F${getStr(speed_space)}`;  //定位\\n        cache.push(text);\\n\\n        text = `G0 Z${getStr(z)} F${getStr(speed_space)}`;  //下刀\\n\\n        cache.push(text);\\n        text = `G1 X${getStr(p2.x)} Y${getStr(p2.y)} F${getStr(speed_shole)}`;  //打孔\\n\\n        cache.push(text);\\n        text = `G1 X${getStr(p1.x)} Y${getStr(p1.y)} F${getStr(speed_shole)}`;  //退刀\\n        cache.push(text);\\n\\n        hasDo = true;\\n\\n        i = i + (knife.r2 > 0 ? 2 : 1);  //组合刀  要多跳一孔\\n    }\\n\\n    text = `G0 Z${getStr(safeH)} F${getStr(speed_space)}`;  //回到安全高度\\n    cache.push(text);\\n}\\n\\nfunction doHoles_y()  /*侧孔 右*********************************************************************************/\\n{\\n    if (!withSideHole) return;\\n    let holes_s = withSideHole ? helper.getSideHoles_Right(block, isPlaceByLength, isFaceB, isTurnByWidth) : [];\\n    if (holes_s.length == 0) return;\\n    let holes = [];\\n    for (let hole of holes_s)\\n    {\\n        if (undo_sidehole_depth(hole)) continue;\\n        let p = helper.getXY(block, isPlaceByLength, isFaceB, isTurnByWidth, hole.PointX, hole.PointY);\\n        holes.push({ x: p.x, y: p.y, z: hole.PointZ, r: hole.Radius, d: hole.Depth });\\n    }\\n\\n    //按下到到上排序 y+\\n    holes = holes.sort((a, b) => a.y - b.y);\\n\\n    text = `G0 Z${getStr(safeH)} F${getStr(speed_space)}`;  //安全高度\\n    cache.push(text);\\n\\n    for (let i = 0; i < holes.length;)\\n    {\\n        let h1 = holes[i];\\n        let h2 = i + 1 < holes.length ? holes[i + 1] : null;\\n        let r1 = h1.r;\\n        let r2 = 0;\\n        //如果  两孔位置相差 32 且深度一样 ,则考虑组合刀\\n        if (h2 && Math.abs(h1.d - h2.d) < 0.01 && Math.abs(h1.z - h2.z) < 0.01 && Math.abs(h2.y - h1.y - 32) < 0.01) r2 = h2.r;\\n        let knife = getKnife_sidehole('右', r1, r2);\\n        if (knife == null)  //找不到刀，不处理\\n        {\\n            i++;\\n            continue;\\n        }\\n        changeKnife(knife);\\n        let x1 = binfo.width + safeV;\\n        let y1 = h1.y;\\n        let x2 = h1.x - h1.d;\\n        let y2 = h1.y;\\n        let p1 = getPos(x1, y1);\\n        let p2 = getPos(x2, y2);\\n        let z = getZ(h1.z);\\n        text = `G0 X${getStr(p1.x)} Y${getStr(p1.y)} F${getStr(speed_space)}`;  //定位\\n        cache.push(text);\\n        text = `G0 Z${getStr(z)} F${getStr(speed_space)}`;  //下刀\\n        cache.push(text);\\n        text = `G1 X${getStr(p2.x)} Y${getStr(p2.y)} F${getStr(speed_shole)}`;  //打孔\\n        cache.push(text);\\n        text = `G1 X${getStr(p1.x)} Y${getStr(p1.y)} F${getStr(speed_shole)}`;  //退刀\\n        cache.push(text);\\n        hasDo = true;\\n        i = i + (knife.r2 > 0 ? 2 : 1); //组合刀  要多跳一孔\\n    }\\n\\n    //回到安全高度\\n    text = `G0 Z${getStr(safeH)} F${getStr(speed_space)}`;\\n    cache.push(text);\\n}\\n\\nfunction doHoles_s() /*侧孔 上**********************************************************************************/\\n{\\n    if (!withSideHole) return;\\n    let holes_s = withSideHole ? helper.getSideHoles_Upper(block, isPlaceByLength, isFaceB, isTurnByWidth) : [];\\n    if (holes_s.length == 0) return;\\n\\n    let holes = [];\\n    for (let h of holes_s)\\n    {\\n        if (undo_sidehole_depth(h)) continue;\\n        let p = helper.getXY(block, isPlaceByLength, isFaceB, isTurnByWidth, h.PointX, h.PointY);\\n        holes.push({ x: p.x, y: p.y, z: h.PointZ, r: h.Radius, d: h.Depth });\\n    }\\n\\n    //按左到到右排序 y+\\n    holes = holes.sort((a, b) => a.x - b.x);\\n\\n    text = `G0 Z${getStr(safeH)} F${getStr(speed_space)}`;  //安全高度\\n    cache.push(text);\\n\\n    for (let i = 0; i < holes.length;)\\n    {\\n        let h1 = holes[i];\\n        let h2 = i + 1 < holes.length ? holes[i + 1] : null;\\n        let r1 = h1.r;\\n        let r2 = 0;\\n        //如果  两孔位置相差 32 且深度一样 ,则考虑组合刀\\n        if (h2 && Math.abs(h1.d - h2.d) < 0.01 && Math.abs(h1.z - h2.z) < 0.01 && Math.abs(h2.x - h1.x - 32) < 0.01)\\n        {\\n            r2 = h2.r;\\n        }\\n        let knife = getKnife_sidehole('上', r1, r2);\\n        if (knife == null)  //找不到刀，不处理\\n        {\\n            i++;\\n            continue;\\n        }\\n        changeKnife(knife);\\n        let x1 = h1.x;\\n        let y1 = binfo.length + safeV;\\n        let x2 = h1.x;\\n        let y2 = h1.y - h1.d;\\n        let p1 = getPos(x1, y1);\\n        let p2 = getPos(x2, y2);\\n        let z = getZ(h1.z);\\n        text = `G0 X${getStr(p1.x)} Y${getStr(p1.y)} F${getStr(speed_space)}`;  //定位\\n        cache.push(text);\\n        text = `G0 Z${getStr(z)} F${getStr(speed_space)}`;  //下刀\\n        cache.push(text);\\n        text = `G1 X${getStr(p2.x)} Y${getStr(p2.y)} F${getStr(speed_shole)}`;  //打孔\\n        cache.push(text);\\n        text = `G1 X${getStr(p1.x)} Y${getStr(p1.y)} F${getStr(speed_shole)}`;  //退刀\\n        cache.push(text);\\n        hasDo = true;\\n        i = i + (knife.r2 > 0 ? 2 : 1);  //组合刀  要多跳一孔\\n    }\\n\\n    text = `G0 Z${getStr(safeH)} F${getStr(speed_space)}`;  //回到安全高度\\n    cache.push(text);\\n}\\n\\nfunction doHoles_x()  /*侧孔 下********************************************************************************/\\n{\\n    if (!withSideHole) return;\\n    let holes_x = withSideHole ? helper.getSideHoles_Under(block, isPlaceByLength, isFaceB, isTurnByWidth) : [];\\n    if (holes_x.length == 0) return;\\n    let holes = [];\\n    for (let h of holes_x)\\n    {\\n        if (undo_sidehole_depth(h)) continue;\\n        let p = helper.getXY(block, isPlaceByLength, isFaceB, isTurnByWidth, h.PointX, h.PointY);\\n        holes.push({ x: p.x, y: p.y, z: h.PointZ, r: h.Radius, d: h.Depth });\\n    }\\n\\n    //按左到到右排序 y+\\n    holes = holes.sort((a, b) => a.x - b.x);\\n\\n    text = `G0 Z${getStr(safeH)} F${getStr(speed_space)}`;  //安全高度\\n    cache.push(text);\\n\\n    for (let i = 0; i < holes.length;)\\n    {\\n        let h1 = holes[i];\\n        let h2 = i + 1 < holes.length ? holes[i + 1] : null;\\n        let r1 = h1.r;\\n        let r2 = 0;\\n        //如果  两孔位置相差 32 且深度一样 ,则考虑组合刀\\n        if (h2 && Math.abs(h1.d - h2.d) < 0.01 && Math.abs(h1.z - h2.z) < 0.01 && Math.abs(h2.x - h1.x - 32) < 0.01) r2 = h2.r;\\n\\n        let knife = getKnife_sidehole('下', r1, r2);\\n        if (knife == null)  //找不到刀，不处理\\n        {\\n            i++;\\n            continue;\\n        }\\n        changeKnife(knife);\\n        let x1 = h1.x;\\n        let y1 = -safeV;\\n        let x2 = h1.x;\\n        let y2 = h1.y + h1.d;\\n        let p1 = getPos(x1, y1);\\n        let p2 = getPos(x2, y2);\\n        let z = getZ(h1.z);\\n        text = `G0 X${getStr(p1.x)} Y${getStr(p1.y)} F${getStr(speed_space)}`;  //定位\\n        cache.push(text);\\n        text = `G0 Z${getStr(z)} F${getStr(speed_space)}`;  //下刀\\n        cache.push(text);\\n        text = `G1 X${getStr(p2.x)} Y${getStr(p2.y)} F${getStr(speed_shole)}`;  //打孔\\n        cache.push(text);\\n        text = `G1 X${getStr(p1.x)} Y${getStr(p1.y)} F${getStr(speed_shole)}`;  //退刀\\n        cache.push(text);\\n        hasDo = true;\\n        i = i + (knife.r2 > 0 ? 2 : 1);  //组合刀  要多跳一孔\\n    }\\n    text = `G0 Z${getStr(safeH)} F${getStr(speed_space)}`;  //回到安全高度\\n    cache.push(text);\\n}\\n\\nfunction getNextHole(holes, x, y)  /*获得最近孔*********************************************************************/\\n{\\n    if (holes.length == 0) return null;\\n    let nextHole;\\n    let nextIndex = 0;\\n    let mindis = Number.MAX_VALUE;\\n    for (let i = 0; i < holes.length; i++)\\n    {\\n        let h = holes[i];\\n        let d = (h.x - x) ** 2 + (h.y - y) ** 2;\\n        if (d < mindis)\\n        {\\n            mindis = d;\\n            nextHole = h;\\n            nextIndex = i;\\n        }\\n    }\\n    //移除 hole\\n    holes.splice(nextIndex, 1);\\n    return nextHole;\\n}\\n\\nfunction getGroupHole(holes, thehole)  /*找组合孔 ****************************************************************/\\n{\\n    let x = thehole.x;\\n    let y = thehole.y;\\n    let d = thehole.d;\\n\\n    let closeHole = null;\\n    let pos;\\n    let knife;\\n\\n    //左\\n    for (let i = 0; i < holes.length; i++)\\n    {\\n        let h = holes[i];\\n        if (equal(x - 32, h.x) && equal(y, h.y) && equal(d, h.d))\\n        {\\n            closeHole = h;\\n            pos = i;\\n\\n            //找刀\\n            knife = getKnife_hole('左右', closeHole.r, thehole.r);\\n            if (knife)  //有刀\\n            {\\n                holes.splice(pos, 1);  //移除 关联hole\\n                return { knife: knife, hole: closeHole };  //以左边孔为准\\n            }\\n            break;\\n        }\\n    }\\n\\n    //右\\n    closeHole = null;\\n    for (let i = 0; i < holes.length; i++)\\n    {\\n        let h = holes[i];\\n        if (equal(x + 32, h.x) && equal(y, h.y) && equal(d, h.d))\\n        {\\n            closeHole = h;\\n            pos = i;\\n\\n            //找刀\\n            knife = getKnife_hole('左右', thehole.r, closeHole.r);\\n            if (knife)  //有刀\\n            {\\n                holes.splice(pos, 1);  //移除 关联hole\\n                return { knife: knife, hole: thehole };  //以左边孔为准\\n            }\\n            break;\\n        }\\n    }\\n\\n    //上\\n    closeHole = null;\\n    for (let i = 0; i < holes.length; i++)\\n    {\\n        let h = holes[i];\\n        if (equal(x, h.x) && equal(y + 32, h.y) && equal(d, h.d))\\n        {\\n            closeHole = h;\\n            pos = i;\\n\\n            //找刀\\n            knife = getKnife_hole('上下', thehole.r, closeHole.r);\\n            if (knife)  //有刀\\n            {\\n                holes.splice(pos, 1);  //移除 关联hole\\n                return { knife: knife, hole: thehole };  //以下边孔为准\\n            }\\n            break;\\n        }\\n    }\\n\\n    //下\\n    closeHole = null;\\n    for (let i = 0; i < holes.length; i++)\\n    {\\n        let h = holes[i];\\n        if (equal(x, h.x) && equal(y - 32, h.y) && equal(thehole.d, h.d))\\n        {\\n            closeHole = h;\\n            pos = i;\\n\\n            //找刀\\n            knife = getKnife_hole('上下', closeHole.r, thehole.r);\\n            if (knife)  //有刀\\n            {\\n                holes.splice(pos, 1);  //移除 关联hole\\n                return { knife: knife, hole: closeHole };  //以下边孔为准\\n            }\\n            break;\\n        }\\n    }\\n\\n    //没找到组合孔\\n    knife = getKnife_hole('单', thehole.r, 0);\\n    return { knife: knife, hole: thehole };\\n}\\n\\nfunction getKnife_cut(r)  /*获得铣刀 按半径*************************************************************************/\\n{\\n    return knifeList.find(t => t.t == '铣' && equal(t.r1, r));\\n}\\n\\nfunction getKnife_hole(type, r1, r2)  /*面孔刀********************************************************************/\\n{\\n    return knifeList.find(t => t.t == type && equal(t.r1, r1) && equal(t.r2, r2));\\n}\\n\\nfunction getKnife_sidehole(type, r1, r2)  /*侧孔刀****************************************************************/\\n{\\n    let ks = knifeList.filter(t => t.t == type);\\n\\n    let k = ks.find(t => equal(t.r1, r1) && equal(t.r2, r2));\\n    if (k) return k;  //先找组合,后再单刀\\n    return ks.find(t => equal(t.r1, r1)); //单刀\\n}\\n\\nfunction changeKnife(knife)  /*换刀****************************************************************************/\\n{\\n    if (knife != theKnife)\\n    {\\n        if (theKnife != null)\\n        {\\n            if (theKnife.ec) cache.push(theKnife.ec);  //停刀\\n            if ((theKnife.z != (knife ? knife.z : -9999999)) && theKnife.zec) cache.push(theKnife.zec);  //停轴\\n        }\\n\\n        if (knife)\\n        {\\n            if ((knife.z != (theKnife ? theKnife.z : -9999999)) && knife.zsc) cache.push(knife.zsc);  //启动轴\\n            if (knife.sc) cache.push(knife.sc);  //启动刀\\n        }\\n        theKnife = knife;\\n    }\\n}\\n\\nfunction undo_hole_radius(hole)  /*忽略面孔, 半径过滤****************************************************************/\\n{\\n    if (!unDoList_holeRidus)\\n    {\\n        unDoList_holeRidus = [];\\n        let strDisPoseHoleRidus = helper.getArg('DisposeHoleRadius', '');\\n        let strs = strDisPoseHoleRidus.split(',');\\n        for (let s of strs)\\n        {\\n            try\\n            {\\n                let r = Number.parseFloat(s);\\n                unDoList_holeRidus.push(r);\\n            }\\n            catch\\n            {\\n\\n            }\\n        }\\n    }\\n\\n    for (let r of unDoList_holeRidus)\\n    {\\n        if (Math.abs(hole.Radius - r) < 0.01) return true;\\n    }\\n    return false;\\n}\\n\\nfunction unDo_hole_depth(hole)  /*忽略面孔,深度********************************************************************/\\n{\\n    if (!unDoRange_holeDepth)\\n    {\\n        //面孔深度\\n        let holeDepth_min = helper.getArg('holeDepth_min', 0.1);\\n        let holeDepth_max = helper.getArg('holeDepth_max', 100);\\n        unDoRange_holeDepth = { min: holeDepth_min, max: holeDepth_max };\\n    }\\n    if (hole.Depth < unDoRange_holeDepth.min) return true;\\n    if (hole.Depth > unDoRange_holeDepth.max) return true;\\n    if (hole.Depth > block.Thickness) return true;\\n    return false;\\n}\\n\\nfunction undo_sidehole_depth(hole)  /*忽略侧孔,深度****************************************************************/\\n{\\n    if (!unDoRange_sideHoleDepth)\\n    {\\n        //侧孔深度 (深度小于SideHole值)\\n        let sideHoleDepth_min = helper.getArg('sideHoleDepth_min', 0);\\n        let sideHoleDepth_max = helper.getArg('sideHoleDepth_max', 100);\\n        unDoRange_sideHoleDepth = { min: sideHoleDepth_min, max: sideHoleDepth_max };\\n    }\\n    if (hole.Depth < unDoRange_sideHoleDepth.min) return true;\\n    if (hole.Depth > unDoRange_sideHoleDepth.max) return true;\\n    return false;\\n}\\n\\nfunction getPos(x, y, hasTurnXY = true)  /*坐标系转化********************************************************************************/\\n{\\n    let x1 = x;\\n    let y1 = y;\\n    if (hasTurnXY == false)\\n    {\\n        let lp = helper.getXY(block, isPlaceByLength, isFaceB, isTurnByWidth, x, y);\\n        x1 = lp.x;\\n        y1 = lp.y;\\n    }\\n    return helper.exec(fn_transXY, placeStation, binfo.width, binfo.length, x1, y1);\\n}\\n\\nfunction getZ(z)  /*获得z**************************************************************************************/\\n{\\n    let nz = z;\\n    if (isFaceB) nz = -(block.Thickness + z);\\n    return helper.exec(fn_transZ, placeStation, block.Thickness, nz);\\n}\\n\\nfunction getStr(v)  /*格式化数字**********************************************************************************/\\n{\\n    return helper.formatNumber(v, bitNum);\\n}\\n\\nfunction equal(a, b)  /*判断a b是否相等*****************************************************************************/\\n{\\n    return Math.abs(a - b) < 0.01;\\n}\\n\\nfunction log(a)  /*浏览器控制台调试跟踪********************************************************************************/\\n{\\n    console.log(a);\\n}\\n\\n//Gcode PTP函数完成\",\"Remark\":\"\",\"cncConfig\":\"{\\\"roleNum\\\":1,\\\"fileNameA\\\":\\\"{0}5.cnc\\\",\\\"fileNameB\\\":\\\"{0}6.cnc\\\",\\\"gb2312\\\":true,\\\"bitNum\\\":2,\\\"isPlaceByLength\\\":false,\\\"isTurnByWidth\\\":false,\\\"cutBorder\\\":true,\\\"doModel_through\\\":false,\\\"doModel_arc\\\":false,\\\"sideHoleDepth_min\\\":12,\\\"sideHoleDepth_max\\\":40,\\\"holeDepth_min\\\":0.2,\\\"holeDepth_max\\\":40,\\\"DisposeHoleRadius\\\":\\\"\\\",\\\"has2WorkPanel\\\":true,\\\"fn_transXY\\\":\\\"return p==1 ? {x:y,y:w-x} : {x:y-l,y:w-x};\\\\n\\\",\\\"fn_transZ\\\":\\\"return t+z;\\\",\\\"fn_fileBegin\\\":\\\"let block = obj.b;\\\\nlet strs = [];\\\\n\\\\nstrs.push(`;${block.BoxName} ${block.BlockName} ${getStr(block.Length)}*${getStr(block.Width)}*${getStr(block.Thickness)}`);\\\\nstrs.push('G600');\\\\nstrs.push('G90');\\\\nstrs.push('G80');\\\\nstrs.push('T0');\\\\nstrs.push('M82');\\\\nstrs.push('M52');\\\\nstrs.push('G40');\\\\nstrs.push('(UAO,1)');\\\\nstrs.push('\\\\\\\"START\\\\\\\"');\\\\nstrs.push('G300 A1 B5');\\\\nstrs.push('G79 Z0.');\\\\nstrs.push('(UAO,@ORG)');\\\\nstrs.push('#(GTO,B,@NEXTABL=1)');\\\\n\\\\nreturn strs.join('\\\\\\\\n');\\\\n\\\\n/*格式化数字字符串*/\\\\nfunction getStr(num, bit = 2)  //需定义acc默认精度位数\\\\n{\\\\n    return num.toFixed(bit).replace(/[.]?0+$/,\\\\\\\"\\\\\\\");\\\\n}\\\",\\\"fn_fileEnd\\\":\\\"let str = `\\\\nM15\\\\nT0\\\\nM52\\\\nM48\\\\nM5\\\\nh0\\\\n(UAO,0)\\\\nM83\\\\nG79 Z0.\\\\nG79 X2000. Y-50.\\\\nM30\\\\n`;\\\\nreturn str;\\\",\\\"fn_wrpBegin\\\":\\\"let wkp = obj.p;\\\\nlet str = '';\\\\n\\\\nif(wkp == 1)\\\\n{\\\\n    str = `\\\\n\\\\\\\"A\\\\\\\"\\\\n(UAO,1)\\\\n    `;\\\\n}\\\\n\\\\nif(wkp == 2)\\\\n{\\\\n    str = `\\\\n\\\\\\\"B\\\\\\\"\\\\n(UAO,5)\\\\n    `;\\\\n}\\\\n\\\\nreturn str;\\\",\\\"fn_wrpEnd\\\":\\\"let wkp = obj.p;\\\\nlet str = '';\\\\n\\\\nif(wkp == 1)\\\\n{\\\\n    str = `\\\\n#(GTO,START,@NEXTABL=1)\\\\n(GTO,END)\\\\n    `;\\\\n}\\\\n\\\\nif(wkp == 2)\\\\n{\\\\n    str = `\\\\n(GTO,START,@NEXTABL=0)\\\\n\\\\\\\"END\\\\\\\"\\\\n    `;\\\\n}\\\\n\\\\nreturn str;\\\",\\\"safeV\\\":30,\\\"safeH\\\":68,\\\"speed_space\\\":12000,\\\"speed_shole\\\":3500,\\\"speed_hole\\\":3500,\\\"speed_model\\\":6000,\\\"speed_cut\\\":5000,\\\"fn_knifes\\\":\\\"\\\\tlet knifes = [];\\\\n\\\\n\\\\taddKnife('单',0,5,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T11\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('单',0,4.75,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T12\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('单',0,4.75,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T13\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('单',0,4.75,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T14\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('单',0,4.75,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T15\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('单',0,10,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T16\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('单',0,4.75,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T17\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('单',0,4.75,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T18\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('单',0,7.5,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T19\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('单',0,2.5,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T20\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('单',0,2.5,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T21\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('单',0,17.5,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T22\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('单',0,2.5,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T23\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('单',0,2.5,0,'M13 S15000\\\\\\\\r\\\\\\\\nM52\\\\\\\\r\\\\\\\\nM49','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T24\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG17\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n\\\\taddKnife('下',1,4,0,'','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T37\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG19\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n    addKnife('上',1,4,0,'','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T38\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG19\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n    addKnife('左',2,4,0,'','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T32\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG18\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n    addKnife('右',2,4,0,'','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T31\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG18\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n    addKnife('左',2,4,0,'','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T34\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG18\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n    addKnife('右',2,4,0,'','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM63 T33\\\\\\\\r\\\\\\\\nG0 Z68.00\\\\\\\\r\\\\\\\\nG27\\\\\\\\r\\\\\\\\nG18\\\\\\\\r\\\\\\\\nG80','G80\\\\\\\\r\\\\\\\\nG0 Z68.00','');\\\\n    addKnife('铣',3,6,0,'','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM15\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nG79 Z0.\\\\\\\\r\\\\\\\\nM6 T5\\\\\\\\r\\\\\\\\nM3 S12000\\\\\\\\r\\\\\\\\nM53','G0 G40 Z48.00\\\\\\\\r\\\\\\\\nM5\\\\\\\\r\\\\\\\\nM52',''); \\\\n    addKnife('铣',4,4.75,0,'','G80\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nM15\\\\\\\\r\\\\\\\\nT0\\\\\\\\r\\\\\\\\nG79 Z0.\\\\\\\\r\\\\\\\\nM6 T1\\\\\\\\r\\\\\\\\nM3 S12000\\\\\\\\r\\\\\\\\nM53','G0 G40 Z48.00\\\\\\\\r\\\\\\\\nM5\\\\\\\\r\\\\\\\\nM52','');  \\\\n\\\\treturn knifes;\\\\n\\\\n\\\\tfunction addKnife(type,z,r1,r2,zStart,kStart,kEnd,zEnd)\\\\n\\\\t{\\\\n        //类型,轴号,半径1,半径2,轴启动,刀启动,刀停止,轴停止\\\\n        let knife = {t:type,z:z,r1:r1,r2:r2,zsc:zStart,sc:kStart,ec:kEnd,zec:zEnd};\\\\n        knifes.push(knife);\\\\n        return knife;\\\\n\\\\t}\\\",\\\"fn_cutKnife\\\":\\\"return 6;\\\",\\\"fn_blockNo\\\":\\\"return (''+b.BlockNo).substr(-7);\\\"}\"}",
    "Remark": "品牌:通用 备注:2022.03.09"
  }
]