////////////////////////////////////////////////////////////////////////////
// System Pre-define Functions
// 95099372-ef3e-11ea-9c81-bf848405c62e
var PICTURE_PATH;
var meshs = {
        children: [],
        methodLength: 0,
        sizeLength: 0
};
var aSpeedObj = undefined; //已添加加速度
var gravityObj = undefined; //已添加重力
var step = {
        "步骤数量": 1,
        "当前步数": 1,
        "步骤结束时间": 1,
        "自动时步": "开启",
        "定义依据": "子步",
        "初始子步": "500",
        "最小子步": "500",
        "最大子步": "1000",
        "求解器类型": "程序控制",
        "弱弹簧": "开启",
        "弹簧刚度": "程序控制",
        "求解器主元检查": "程序控制",
        "大挠曲": "开启",
        "惯性释放": "关闭",
        "准静态解": "关闭"
};
var stepTimes = [];

function InitCanvasIOEngine() {
        ui.canvas.adaptor('nastran', function(fname_nas) {
                //console.log(fname_nas);
                console.time('Nastran Import');
                model.cueline('解析并加载Nastran文件 ...');
                model.updateGeometry(ui.geometry);
                ui.canvas.db = null;
                parent.mesh.shell.ClearCache();
                parent.mesh.shell.LoadNastranToCache(fname_nas);
                console.timeEnd('Nastran Import');

                model.cueline('创建图形缓冲区 ...');
                console.time('Nastran Buffer');
                var buf = parent.mesh.shell.RenderToGLCache();
                console.timeEnd('Nastran Buffer');

                model.cueline('生成图形数据库并渲染 ...');
                return buf;
        });

        ui.canvas.adaptor('step', function(fname_step) {
                console.time('Step Import');
                model.cueline('解析并加载STEP文件 ...');
                model.updateGeometry(ui.geometry);
                ui.canvas.db = null;
                comx.occore.Clear();
                comx.occio.ImportStep(comx.occore.GetEntry(), fname_step);
                console.timeEnd('Step Import');

                model.cueline('创建图形缓冲区 ...');
                console.time('Step Buffer');
                var gl_buf = comx.occrender.RenderToBuffer(comx.occore.GetEntry());
                console.timeEnd('Step Buffer');

                model.cueline('生成图形数据库并渲染 ...');
                return gl_buf;
        });

        ui.canvas.adaptor('iges', function(fname_step) {
                console.time('Iges Import');
                model.cueline('解析并加载IGES文件 ...');
                model.updateGeometry(ui.geometry);
                ui.canvas.db = null;
                comx.occore.Clear();
                comx.occio.ImportIges(comx.occore.GetEntry(), fname_step);
                console.timeEnd('Iges Import');

                model.cueline('创建图形缓冲区 ...');
                console.time('Iges Buffer');
                var gl_buf = comx.occrender.RenderToBuffer(comx.occore.GetEntry());
                console.timeEnd('Iges Buffer');

                model.cueline('生成图形数据库并渲染 ...');
                return gl_buf;
        });
}

function OnInitializeData() {
        InitCanvasIOEngine();
        ui.canvas.sensor = GL.Sensor.Pan;
        ui.canvas.lamp = true;

        ui.mp_btn.valid = true;
        //ui.info.visible = false;
        switchBottom(false);
        ui.pb_pan.valid = true;
        ui.pb_yox.valid = true;
        ui.pb_lamp.valid = true;
        ui.pb_face.valid = true;

        PICTURE_PATH = model.GetPath();

        ui.prop.table = [
                ["属性名", "取值"]
        ];

        ui.post_table.table = [
                ["X-值", "Y-值"]
        ];

        ui.tree.tree = {
                name: "工程",
                icon: "工程",
                id: 1,
                children: [{
                        name: "模型",
                        icon: "模型",
                        id: 11,
                        children: [{
                                name: "几何结构",
                                icon: "几何结构OK",
                                id: 111,
                                children: [{
                                        name: "固体",
                                        icon: "固体NG",
                                        id: 1111,
                                        children: [{
                                                name: "惯性坐标系",
                                                icon: "坐标系OK",
                                                id: 11111
                                        }]
                                },
                                {
                                        name: "固体",
                                        icon: "固体NG",
                                        id: 1112,
                                        children: [{
                                                name: "惯性坐标系",
                                                icon: "坐标系OK",
                                                id: 11121
                                        }]
                                },
                                {
                                        name: "固体",
                                        icon: "固体NG",
                                        id: 1113
                                }
                                ]
                        },
                        {
                                name: "材料",
                                icon: "材料OK",
                                id: 112,
                                children: [{
                                        name: "铜合金",
                                        icon: "标签OK",
                                        id: 1121
                                },
                                {
                                        name: "结构钢",
                                        icon: "标签OK",
                                        id: 1122
                                }
                                ]
                        },
                        {
                                name: "坐标系",
                                icon: "坐标系OK",
                                id: 113,
                                children: [{
                                        name: "全局坐标系",
                                        icon: "坐标系OK",
                                        id: 1131
                                }]
                        },
                        {
                                name: "连接",
                                icon: "连接OK",
                                id: 114
                        },
                        {
                                name: "网格",
                                icon: "网格OK",
                                id: 115
                        },
                        {
                                name: "静态结构",
                                icon: "静态结构OK",
                                id: 116,
                                children: [{
                                        name: "分析设定",
                                        icon: "分析设定OK",
                                        id: 1161
                                },
                                {
                                        name: "旋转",
                                        icon: "旋转OK",
                                        id: 1162
                                },
                                {
                                        name: "旋转 2",
                                        icon: "旋转OK",
                                        id: 1163
                                },
                                {
                                        name: "位移",
                                        icon: "旋转OK",
                                        id: 1164
                                },
                                {
                                        name: "求解方案",
                                        icon: "方案LI",
                                        id: 1165,
                                        children: [{
                                                name: "求解方案信息",
                                                icon: "详细LI",
                                                id: 11651
                                        },
                                        {
                                                name: "总变形",
                                                icon: "变形LI",
                                                id: 11652
                                        },
                                        {
                                                name: "等效弹性应变",
                                                icon: "变形LI",
                                                id: 11653
                                        },
                                        {
                                                name: "等效应力",
                                                icon: "变形LI",
                                                id: 11654
                                        }
                                        ]
                                }
                                ]
                        }
                        ]
                }]
        };
        OnChangeTopMenu();
        setTips();
        OnTopMenu(1);

        //OnTopMenu(4);
        //ui.top_insert_box.index = 1;
        //ui.top_insert_box.visible = false;
        //ui.top_sub.index = 4;
}

function OnCloseForm() {

}

function OnException(err) {
        //ui.MessageBox('Error', '' + err, MessageBox.Icon.Critical, MessageBox.Button.Ok);
}

//////////////////////////////////////////////////////////////////////////
// Callback Functions.
// 641a254c-ef3e-11ea-bc8a-379bb908bdd7

function OnLamp() {
        ui.canvas.lamp = ui.pb_lamp.valid;
        ui.canvas.update();
}

function OnFit() {
        ui.canvas.sensor = GL.Sensor.Reset;
}

function SetNastranCanvasProp() {
        ui.canvas.filter = [1024];
        ui.canvas.view().setColor(0.0, 0.0, 0.0, 1.0);
        ui.canvas.view().setVisible(true);

        ui.canvas.filter = [1026];
        ui.canvas.view().setVisible(false);

        ui.canvas.filter = [1025];
        ui.canvas.view().setColor(1.0, 1.0, 0.0, 0.5);
        ui.canvas.view().setVisible(true);

        ui.canvas.lamp = true;
}

function OnOpenFile() {
        var fname = ui.OpenFileDialog("Import File", unit.dir + 'data/', "Step Files(*.step *.stp);;Iges Files(*.iges *.igs);;Nastran Files(*.nas)");
        if (fname) {

                //ui.canvas.lamp = true;

                var is_step = (fname.indexOf('.STEP') != -1) ||
                        (fname.indexOf('.step') != -1) ||
                        (fname.indexOf('.STP') != -1) ||
                        (fname.indexOf('.stp') != -1);

                var is_nas = (fname.indexOf('.nas') != -1) || (fname.indexOf('.NAS') != -1);

                model.wait();
                ui.canvas.db = null;
                ui.cueline.value = '文件载入中, 请稍候 ...';
                parent.setTimeout(() => {
                        if (is_step) {
                                console.time('Global Step Load');
                                ui.canvas.step = fname;
                                console.timeEnd('Global Step Load');
                        } else if (is_nas) {
                                console.time('Global Nastran Load');
                                ui.canvas.nastran = fname;
                                console.timeEnd('Global Nastran Load');

                                SetNastranCanvasProp();
                        } else {
                                console.time('Global Iges Load');
                                ui.canvas.iges = fname;
                                console.timeEnd('Global Iges Load');
                        }

                        //SetCanvasProp();
                        ui.canvas.lamp = true;
                        ui.cueline.value = "就绪";
                        model.stop();
                }, 100);
        }
}

function showMsgBox() {
        ui.msgBox.visible = !ui.msgBox.visible;
        ui.msgBox.value = "这里将显示求解状态提示信息。。。";
}

function switchBottom(visible) {
        ui.img.visible = visible;
        ui.post_table.visible = visible;
}

function OnPropChanged() {
        var obj = meshs.children[ui.tree.node.name];
        if (obj != undefined) {
                var key = objIndexKey(obj, ui.prop.row);
                obj[key] = ui.prop.value;
                if (key == "几何结构") {
                        if (obj[key] == "未选择") {
                                ui.prop.color = [ui.prop.row, 0, "#FFF000"];
                                var node = ui.tree.node;
                                if (node.icon == "方法OK") {
                                        node.icon = "方法QU";
                                        ui.tree.node = node;
                                }
                                if (node.icon == "尺寸调整OK") {
                                        node.icon = "尺寸调整QU";
                                        ui.tree.node = node;
                                }
                        } else {
                                ui.prop.color = [ui.prop.row, 0, "auto"];
                                var node = ui.tree.node;
                                if (node.icon == "方法QU") {
                                        node.icon = "方法OK";
                                        ui.tree.node = node;
                                }
                                if (node.icon == "尺寸调整QU") {
                                        node.icon = "尺寸调整OK";
                                        ui.tree.node = node;
                                }
                        }
                        var checkRes = true;
                        for (var item in meshs.children) {
                                if (meshs.children[item]["几何结构"] == "未选择") {
                                        checkRes = false;
                                }
                        }
                        var thisPosition = ui.tree.position;
                        ui.tree.position = ui.tree.parent;
                        var thisNode = ui.tree.node;
                        if (checkRes) {
                                thisNode.icon = "方块闪电";
                        } else {
                                thisNode.icon = "方块QU";
                                model.ide_info("方块QU");
                        }
                        ui.tree.node = thisNode;
                        ui.tree.position = thisPosition;
                }
                return;
        }
        if (ui.tree.position == 998) {
                //加速度
                var key = objIndexKey(aSpeedObj, ui.prop.row);
                aSpeedObj[key] = ui.prop.value;
                if (aSpeedObj["大小"] == 0 || aSpeedObj["方向"] == "未设置") {
                        var thisNode = ui.tree.node;
                        thisNode.icon = "加速度QU";
                        ui.tree.node = thisNode;
                        ui.tree.position = 116;
                        var thisNode = ui.tree.node;
                        thisNode.icon = "静态结构QU";
                        ui.tree.node = thisNode;
                        ui.tree.position = 998;
                } else {
                        var thisNode = ui.tree.node;
                        thisNode.icon = "加速度OK";
                        ui.tree.node = thisNode;
                        ui.tree.position = 116;
                        var thisNode = ui.tree.node;
                        thisNode.icon = "静态结构LI";
                        ui.tree.node = thisNode;
                        ui.tree.position = 998;
                }
                if (aSpeedObj["大小"] == "0") {
                        ui.prop.color = [2, 0, "#FFF000"];
                } else {
                        ui.prop.color = [2, 0, "auto"];
                }
                if (aSpeedObj["方向"] == "未设置") {
                        ui.prop.color = [3, 0, "#FFF000"];
                } else {
                        ui.prop.color = [3, 0, "auto"];
                }
                refleshTable("加速度");
                return;
        }
        if (ui.tree.position == 999) {
                //重力
                var key = objIndexKey(gravityObj, ui.prop.row);
                gravityObj[key] = ui.prop.value;
                return;
        }
        if (ui.tree.position == 1161) {
                var key = objIndexKey(step, ui.prop.row);
                step[key] = ui.prop.value;
                if (key == "步骤数量") {
                        var _value = parseInt(ui.prop.value);
                        stepTimes = [];
                        lastTime = 0;
                        for (var i = 0; i < _value; i++) {
                                lastTime += parseInt(step["步骤结束时间"]);
                                stepTimes.push(lastTime);
                        }
                }
                if (key == "当前步数") {
                        var _value = parseInt(step["当前步数"]) || 1;
                        ui.img.value = PICTURE_PATH + "s" + _value + ".png";
                }
                if (key == "步骤结束时间") {
                        var _index = parseInt(step["当前步数"]);
                        var _value = parseInt(ui.prop.value);
                        stepTimes[_index - 1] = _value;
                }
                refleshTable("设定");
        }
}

function refleshTable(idx) {
        switch (idx) {
        case "设定":
                var _value = parseInt(step["当前步数"]) || 1;
                var _table = [
                        ["步", "结束时间"]
                ];
                var _index = parseInt(step["步骤数量"]) || 1;
                for (var i = 0; i < _index; i++) {
                        _table.push([i + 1, stepTimes[i] || 1]);
                }
                ui.post_table.table = _table;
                ui.img.value = PICTURE_PATH + "s" + _value + ".png";
                ui.post_table.head_size = [0, 0];
                break;
        case "加速度":
                var _table = [
                        ["步", "时间", "加速度[m/s²]"]
                ];
                var _index = parseInt(step["步骤数量"]) || 1;
                _table.push([0, 0, 0]);
                for (var i = 0; i < _index; i++) {
                        _table.push([i + 1, stepTimes[i] || 1, parseInt(aSpeedObj["大小"]) || 0]);
                }
                ui.post_table.table = _table;
                ui.img.value = PICTURE_PATH + "a.png";
                ui.post_table.head_size = [0, 0, 0];
                break;
        case "重力":
                var _table = [
                        ["步", "时间", "X[m/s²]", "Y[m/s²]", "Z[m/s²]"]
                ];
                var _index = parseInt(step["步骤数量"]) || 1;
                _table.push([0, 0, 0, 0, 0]);
                for (var i = 0; i < _index; i++) {
                        _table.push([i + 1, stepTimes[i] || 1, 0, 0, -9.8066]);
                }
                ui.post_table.table = _table;
                ui.img.value = PICTURE_PATH + "g.png";
                ui.post_table.head_size = [0, 0, 0, 0, 0];
                break;
        }
}

function OnTreeContentMenu() {
        var thisNode = ui.tree.node;
        if (thisNode.children == undefined) {thisNode.children = [];}
        switch (ui.tree.content_menu) {
        case 115101: //方法
                meshs.methodLength++;
                var length = meshs.methodLength;
                thisNode.children.push({
                        name: "自动方法" + length,
                        icon: "方法QU",
                        id: 11510100 + length
                });
                thisNode.icon = "方块QU";
                ui.tree.node = thisNode;
                ui.tree.position = 11510100 + length;
                meshs.children["自动方法" + length] = {
                        "范围限定方法": "几何结构选择",
                        "几何结构": "未选择",
                        "抑制的": "否",
                        "方法": "Quadrilateral Dominant",
                        "单元的阶": "使用全局设置",
                        "自由面网格类型": "四边形/三角形"
                };
                ui.prop.table = obj2table(meshs.children["自动方法" + length]);
                ui.prop.filter = [0, 1, ["几何结构选择", "命名选择"]];
                ui.prop.filter = [1, 1, ["未选择", "1几何体", "2几何体", "3几何体"]];
                ui.prop.filter = [2, 1, ["是", "否"]];
                ui.prop.filter = [3, 1, ["Quadrilateral Dominant", "三角形"]];
                ui.prop.filter = [4, 1, ["使用全局设置", "线性的", "二次项"]];
                ui.prop.filter = [5, 1, ["四边形/三角形", "全部四边形"]];
                ui.prop.color = [1, 0, "#FFF000"];
                break;
        case 115102: //尺寸调整
                meshs.sizeLength++;
                var length = meshs.sizeLength;
                thisNode.children.push({
                        name: "尺寸调整" + length,
                        icon: "尺寸调整QU",
                        id: 11510200 + length
                });
                thisNode.icon = "方块QU";
                ui.tree.node = thisNode;
                ui.tree.position = 11510200 + length;
                meshs.children["尺寸调整" + length] = {
                        "范围限定方法": "几何结构选择",
                        "几何结构": "未选择",
                        "抑制的": "否",
                        "类型": "单元尺寸",
                        "单元尺寸": "默认(4.4198e-003 m)",
                        "特征清除尺寸": "2.2099e-005 m",
                        "行为": "柔软"
                };
                ui.prop.table = obj2table(meshs.children["尺寸调整" + length]);
                ui.prop.filter = [0, 1, ["几何结构选择", "命名选择"]];
                ui.prop.filter = [1, 1, ["未选择", "1几何体", "2几何体", "3几何体"]];
                ui.prop.filter = [2, 1, ["是", "否"]];
                ui.prop.filter = [3, 1, ["单元尺寸", "分区数量", "影响范围", "受影响的几何体", "全局尺寸因素"]];
                ui.prop.filter = [6, 1, ["柔软", "硬"]];
                ui.prop.color = [1, 0, "#FFF000"];
                break;
        case 901: //加速度
                ui.tree.position = 116;
                var tmpNode = ui.tree.node;
                tmpNode.icon = "静态结构QU";
                ui.tree.node = tmpNode;
                ui.tree.position = 1162;
                aSpeedObj = {
                        "几何结构": "全部几何体",
                        "定义依据": "矢量",
                        "大小": "0",
                        "方向": "未设置",
                        "抑制的": "否"
                };
                ui.tree.inserter = {
                        name: "加速度",
                        icon: "加速度QU",
                        id: 998
                };
                ui.tree.position = 998;
                ui.prop.table = obj2table(aSpeedObj);
                ui.prop.filter = [1, 1, ["矢量", "分量"]];
                ui.prop.filter = [3, 1, ["未设置", "左", "右", "上", "下", "内", "外"]];
                ui.prop.filter = [4, 1, ["是", "否"]];
                ui.prop.color = [2, 0, "#FFF000"];
                ui.prop.color = [3, 0, "#FFF000"];
                setReadOnly([0]);
                switchBottom(true);
                refleshTable("加速度");
                break;
        case 902: //重力
                ui.tree.position = 1162;
                gravityObj = {
                        "几何结构": "全部几何体",
                        "坐标系": "Global Coordinate System",
                        "X分量": "0. m/s² （斜坡）",
                        "Y分量": "0. m/s² （斜坡）",
                        "Z分量": "-9.8066 m/s² （斜坡）",
                        "抑制的": "否",
                        "方向": "-Z方向"
                };
                ui.tree.inserter = {
                        name: "标准地球重力",
                        icon: "标准地球重力OK",
                        id: 999
                };
                ui.tree.position = 999;
                ui.prop.table = obj2table(gravityObj);
                ui.prop.filter = [1, 1, ["Global Coordinate System"]];
                ui.prop.filter = [5, 1, ["是", "否"]];
                ui.prop.filter = [6, 1, ["+X方向", "-X方向", "+Y方向", "-Y方向", "+Z方向", "-Z方向"]];
                setReadOnly([0, 2, 3, 4]);
                switchBottom(true);
                refleshTable("重力");
                break;
        }
}

function OnTransform(idx) {
        ui.pb_pan.valid = ui.pb_rotate.valid = ui.pb_zoom.valid = ui.pb_zoom_window.valid = false;

        if (idx == 1) {
                ui.pb_pan.valid = true;
                ui.canvas.sensor = GL.Sensor.Pan;
        }

        if (idx == 2) {
                ui.canvas.sensor = GL.Sensor.Rotate;
                ui.pb_rotate.valid = true;
        }

        if (idx == 3) {
                ui.canvas.sensor = GL.Sensor.Scale;
                ui.pb_zoom.valid = true;
        }

        if (idx == 4) {
                ui.canvas.sensor = GL.Sensor.RectScale;
                ui.pb_zoom_window.valid = true;
        }
}

function On3DPosition(idx) {
        ui.pb_yox.valid = ui.pb_xoy.valid = ui.pb_zoy.valid = ui.pb_yoz.valid = ui.pb_zox.valid = ui.pb_xoz.valid = false;

        if (idx == 1) {
                ui.pb_yox.valid = true;
                ui.canvas.sensor = GL.Sensor.YOX;
        }

        if (idx == 2) {
                ui.pb_xoy.valid = true;
                ui.canvas.sensor = GL.Sensor.XOY;
        }

        if (idx == 3) {
                ui.pb_zoy.valid = true;
                ui.canvas.sensor = GL.Sensor.ZOY;
        }

        if (idx == 4) {
                ui.pb_yoz.valid = true;
                ui.canvas.sensor = GL.Sensor.YOZ;
        }

        if (idx == 5) {
                ui.pb_zox.valid = true;
                ui.canvas.sensor = GL.Sensor.ZOX;
        }

        if (idx == 6) {
                ui.pb_xoz.valid = true;
                ui.canvas.sensor = GL.Sensor.XOZ;
        }

}

function OnShowTopMenu() {
        ui.main_menu_idx.visible = true;
        ui.main_menu_idx.index = ui.main_menu_idx.index;
        ui.stack_show_hide.index = 0;

        OnTopMenu(ui.main_menu_idx.index + 1);
}

function OnSolve() {
        ui.cueline.value = " 求解中，请稍候...";

        parent.setTimeout(function() {
                model.InvokeOnestepSolver();

                ui.canvas.db = null;
                ui.canvas.db = parent.mesh.shell.RenderToGLCache();

                SetNastranCanvasProp();

                ui.canvas.view([ui.canvas.generateKey(1024, 1)]).setColor(1.0, 1.0, 1.0, 1.0);
                ui.canvas.view([ui.canvas.generateKey(1025, 1)]).setVisible(false);
                ui.canvas.view([ui.canvas.generateKey(1026, 1)]).setVisible(false);

                ui.canvas.view([ui.canvas.generateKey(1024, 0)]).setVisible(false);

                ui.canvas.plot = model.GenerateThicknessPlot();

                ui.canvas.legend = {
                        inverse: false,
                        title: "thickness",
                        unit: "mm"
                };

                ui.cueline.value = "就绪";
        }, 10);
}

function OnShowAnalysisMenu(idx) {
        var _content_menu = [{
                name: "显式动力学",
                icon: "显式动力学",
                id: 1,
                tip: getTipTemplete("显式动力学", "显式动力学.png", "插入\"显式动力学\"分析。", true)
        }, {
                name: "刚体动力学",
                icon: "刚体动力学",
                id: 2,
                tip: getTipTemplete("刚体动力学", "刚体动力学.png", "插入\"刚体动力学\"分析。", true)
        }, {
                name: "静态结构",
                icon: "静态结构",
                id: 3,
                tip: getTipTemplete("静态结构", "静态结构.png", "插入\"静态结构\"分析。", true)
        }, {
                name: "拓扑优化",
                icon: "拓扑优化",
                id: 4,
                tip: getTipTemplete("拓扑优化", "拓扑优化.png", "插入\"拓扑优化\"分析。", true)
        }, {
                name: "瞬态结构",
                icon: "瞬态结构",
                id: 5,
                tip: getTipTemplete("瞬态结构", "瞬态结构.png", "插入\"瞬态结构\"分析。", true)
        }, {
                name: "-"
        }, {
                name: "特征值屈曲",
                icon: "特征值屈曲",
                id: 6,
                tip: getTipTemplete("特征值屈曲", "特征值屈曲.png", "插入\"特征值屈曲\"分析。", true)
        }, {
                name: "谐波响应",
                icon: "谐波响应",
                id: 7,
                tip: getTipTemplete("谐波响应", "谐波响应.png", "插入\"谐波响应\"分析。", true)
        }, {
                name: "模态",
                icon: "模态",
                id: 8,
                tip: getTipTemplete("模态", "模态.png", "插入\"模态\"分析。", true)
        }, {
                name: "随机振动",
                icon: "随机振动",
                id: 9,
                tip: getTipTemplete("随机振动", "随机振动.png", "插入\"随机振动\"分析。", true)
        }, {
                name: "响应谱",
                icon: "随机振动",
                id: 10,
                tip: getTipTemplete("响应谱", "随机振动.png", "插入\"响应谱\"分析。", true)
        }, {
                name: "-"
        }, {
                name: "稳态热",
                icon: "稳态热",
                id: 11,
                tip: getTipTemplete("稳态热", "稳态热.png", "插入\"稳态热\"分析。", true)
        }, {
                name: "瞬态热",
                icon: "瞬态热",
                id: 12,
                tip: getTipTemplete("瞬态热", "瞬态热.png", "插入\"瞬态热\"分析。", true)
        }, {
                name: "-"
        }, {
                name: "静磁的",
                icon: "静磁",
                id: 13,
                enable: false,
                tip: getTipTemplete("静磁的", "静磁.png", "插入\"静磁的\"分析。", true)
        }, {
                name: "-"
        }, {
                name: "电气",
                icon: "电气",
                id: 14,
                tip: getTipTemplete("电气", "电气.png", "插入\"电气\"分析。", true)
        }, {
                name: "-"
        }, {
                name: "热-电气",
                icon: "热电气",
                id: 15,
                tip: getTipTemplete("热-电气", "热电气.png", "插入\"热-电气\"分析。", true)
        }, {
                name: "-"
        }, {
                name: "谐波声学",
                icon: "声学",
                id: 16,
                tip: getTipTemplete("谐波声学", "声学.png", "插入\"谐波声学\"分析。", true)
        }, {
                name: "模态声学",
                icon: "声学",
                id: 17,
                tip: getTipTemplete("模态声学", "声学.png", "插入\"模态声学\"分析。", true)
        }, {
                name: "静态声学",
                icon: "声学",
                id: 18,
                tip: getTipTemplete("静态声学", "声学.png", "插入\"静态声学\"分析。", true)
        }, {
                name: "-"
        }, {
                name: "耦合场静态",
                icon: "耦合场",
                id: 19,
                tip: getTipTemplete("耦合场静态", "耦合场.png", "插入\"耦合场静态\"分析。", true)
        }, {
                name: "耦合场瞬态",
                icon: "耦合场",
                id: 20,
                tip: getTipTemplete("耦合场瞬态", "耦合场.png", "插入\"耦合场瞬态\"分析。", true)
        }, {
                name: "耦合场谐波",
                icon: "耦合场",
                id: 21,
                tip: getTipTemplete("耦合场谐波", "耦合场.png", "插入\"耦合场谐波\"分析。", true)
        }, {
                name: "-"
        }, {
                name: "LS-DYNA",
                icon: "显式动力学",
                id: 22,
                enable: false,
                tip: getTipTemplete("LS-DYNA", "显式动力学.png", "插入\"LS-DYNA\"分析。", true)
        }];
        if (idx == 1) {
                ui.pb_show_analysis.content_menu = _content_menu;
        } else {
                ui.pb_show_analysis2.content_menu = _content_menu;
        }
}

function OnShowModelTreeMenu() {
        ui.pb_show_model.content_menu = [{
                name: "展开全部",
                icon: "加号",
                id: 1,
                tip: getTipTemplete("展开全部", "加号.png", "主页|大纲|模型树|全部展开", false)
        }, {
                name: "折叠全部",
                icon: "减号",
                id: 2,
                tip: getTipTemplete("折叠全部", "减号.png", "折叠全部", false)
        }, {
                name: "折叠环境",
                icon: "减号",
                id: 3,
                tip: getTipTemplete("折叠环境", "减号.png", "主页|大纲|模型树|折叠环境", false)
        }, {
                name: "-"
        }, {
                name: "刷新显示(Beta)",
                icon: "刷新闪电",
                id: 4,
                tip: getTipTemplete("刷新显示(Beta)", "刷新闪电.png", "主页|大纲|模型树|刷新显示(Beta)", false)
        }];
}

function OnShowTreeContentMenu() {
        var _content_menu;
        var sub_insert = {
                name: "插入",
                icon: "",
                id: 9,
                children: [{
                        name: "旋转速度",
                        icon: "旋转速度",
                        id: 903,
                        tip: getTipTemplete("旋转速度", "旋转速度.png", "TBD", true)
                }, {
                        name: "旋转加速度",
                        icon: "加密",
                        id: 904,
                        tip: getTipTemplete("旋转加速度", "加密.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "压力",
                        icon: "压力",
                        id: 905,
                        tip: getTipTemplete("压力", "压力.png", "TBD", true)
                }, {
                        name: "静液力压力",
                        icon: "静液力压力",
                        id: 906,
                        tip: getTipTemplete("静液力压力", "静液力压力.png", "TBD", true)
                }, {
                        name: "力",
                        icon: "力",
                        id: 907,
                        tip: getTipTemplete("力", "力.png", "TBD", true)
                }, {
                        name: "远程力",
                        icon: "远程力",
                        id: 908,
                        tip: getTipTemplete("远程力", "远程力.png", "TBD", true)
                }, {
                        name: "轴承载荷",
                        icon: "轴承载荷",
                        id: 909,
                        tip: getTipTemplete("轴承载荷", "轴承载荷.png", "TBD", true)
                }, {
                        name: "螺栓预紧力",
                        icon: "螺栓预紧力",
                        id: 910,
                        tip: getTipTemplete("螺栓预紧力", "螺栓预紧力.png", "TBD", true)
                }, {
                        name: "力矩",
                        icon: "力矩",
                        id: 911,
                        tip: getTipTemplete("力矩", "力矩.png", "TBD", true)
                }, {
                        name: "线压力",
                        icon: "线压力",
                        id: 912,
                        tip: getTipTemplete("线压力", "线压力.png", "TBD", true)
                }, {
                        name: "热条件",
                        icon: "热条件",
                        id: 913,
                        tip: getTipTemplete("热条件", "热条件.png", "TBD", true)
                }, {
                        name: "连接副载荷",
                        icon: "旋转",
                        id: 914,
                        tip: getTipTemplete("连接副载荷", "旋转.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "固定支撑",
                        icon: "固定支撑",
                        id: 915,
                        tip: getTipTemplete("固定支撑", "固定支撑.png", "TBD", true)
                }, {
                        name: "位移",
                        icon: "位移",
                        id: 916,
                        tip: getTipTemplete("位移", "位移.png", "TBD", true)
                }, {
                        name: "远程位移",
                        icon: "远程位移",
                        id: 917,
                        tip: getTipTemplete("远程位移", "远程位移.png", "TBD", true)
                }, {
                        name: "无摩擦支撑",
                        icon: "无摩擦支撑",
                        id: 918,
                        tip: getTipTemplete("无摩擦支撑", "无摩擦支撑.png", "TBD", true)
                }, {
                        name: "仅压缩支撑",
                        icon: "仅压缩支撑",
                        id: 919,
                        tip: getTipTemplete("仅压缩支撑", "仅压缩支撑.png", "TBD", true)
                }, {
                        name: "圆柱形支撑",
                        icon: "圆柱体支撑",
                        id: 920,
                        tip: getTipTemplete("圆柱体支撑", "圆柱体支撑.png", "TBD", true)
                }, {
                        name: "弹性支撑",
                        icon: "弹性支撑",
                        id: 921,
                        tip: getTipTemplete("弹性支撑", "弹性支撑.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "导入的载荷(结果文件)",
                        icon: "导入rst",
                        id: 922,
                        tip: getTipTemplete("导入的载荷(结果文件)", "导入rst.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "动态载荷...",
                        icon: "动态载荷",
                        id: 923,
                        tip: getTipTemplete("动态载荷", "动态载荷.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "流体固体截面",
                        icon: "流体固体截面",
                        id: 924,
                        tip: getTipTemplete("流体固体截面", "流体固体截面.png", "TBD", true)
                }, {
                        name: "系统耦合区域",
                        icon: "系统耦合区域",
                        id: 925,
                        tip: getTipTemplete("系统耦合区域", "系统耦合区域.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "单元生死",
                        icon: "单元生死",
                        id: 926,
                        tip: getTipTemplete("单元生死", "单元生死.png", "TBD", true)
                }, {
                        name: "接触步骤控制",
                        icon: "接触步骤控制",
                        id: 927,
                        tip: getTipTemplete("接触步骤控制", "接触步骤控制.png", "TBD", true)
                }, {
                        name: "约束方程",
                        icon: "约束方程",
                        id: 928,
                        tip: getTipTemplete("约束方程", "约束方程.png", "TBD", true)
                }, {
                        name: "耦合",
                        icon: "耦合",
                        id: 929,
                        tip: getTipTemplete("耦合", "耦合.png", "TBD", true)
                }, {
                        name: "非线性自适应方程",
                        icon: "非线性自适应区域",
                        id: 930,
                        tip: getTipTemplete("非线性自适应方程", "非线性自适应区域.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "节点力",
                        icon: "节点力",
                        id: 931,
                        tip: getTipTemplete("节点力", "节点力.png", "TBD", true)
                }, {
                        name: "节点压力",
                        icon: "节点压力",
                        id: 932,
                        tip: getTipTemplete("节点压力", "节点压力.png", "TBD", true)
                }, {
                        name: "节点位移",
                        icon: "节点位移",
                        id: 933,
                        tip: getTipTemplete("节点位移", "节点位移.png", "TBD", true)
                }, {
                        name: "节点方向",
                        icon: "节点方向",
                        id: 934,
                        tip: getTipTemplete("节点方向", "节点方向.png", "TBD", true)
                }, {
                        name: "EM转换器",
                        icon: "EM传感器",
                        id: 935,
                        tip: getTipTemplete("EM转换器", "EM转换器.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "命令",
                        icon: "命令",
                        id: 936,
                        tip: getTipTemplete("命令", "命令.png", "TBD", true)
                }]
        };
        if (gravityObj == undefined) {
                sub_insert.children.unshift({
                        name: "标准地球重力",
                        icon: "标准地球重力",
                        id: 902,
                        tip: getTipTemplete("标准地球重力", "标准地球重力.png", "TBD", true)
                });
        }
        if (aSpeedObj == undefined) {
                sub_insert.children.unshift({
                        name: "加速度",
                        icon: "加速度",
                        id: 901,
                        tip: getTipTemplete("加速度", "加速度.png", "TBD", true)
                });
        }
        switch (ui.tree.position) {
        case 1:
                _content_menu = [{
                        name: "求解",
                        icon: "闪电",
                        id: 11,
                        tip: getTipTemplete("求解", "闪电.png", "TBD", true)
                }, {
                        name: "清除生成的数据",
                        icon: "清除",
                        id: 12,
                        tip: getTipTemplete("清除生成的数据", "清除.png", "TBD", true)
                }, {
                        name: "重命名\tF2",
                        icon: "重命名",
                        id: 13,
                        tip: getTipTemplete("重命名", "重命名.png", "TBD", true)
                }, {
                        name: "导出",
                        icon: "",
                        id: 14,
                        children: [{
                                name: "网格(Beta)",
                                icon: "几何结构",
                                id: 141,
                                tip: getTipTemplete("网格(Beta)", "几何结构.png", "TBD", true)
                        }, {
                                name: "WB研究日志(Beta)",
                                icon: "工程",
                                id: 142,
                                tip: getTipTemplete("WB研究日志(Beta)", "工程.png", "TBD", true)
                        }, {
                                name: "导出伪密度(Beta)",
                                icon: "工程",
                                id: 143,
                                tip: getTipTemplete("导出伪密度(Beta)", "工程.png", "TBD", true)
                        }]
                }, {
                        name: "调试(Beta)",
                        icon: "",
                        id: 15,
                        children: [{
                                name: "导出诊断(Beta)",
                                icon: "闪电",
                                id: 151,
                                tip: getTipTemplete("导出诊断(Beta)", "闪电.png", "TBD", true)
                        }, {
                                name: "导入对象连接图(Beta)",
                                icon: "闪电",
                                id: 152,
                                tip: getTipTemplete("导入对象连接图(Beta)", "闪电.png", "TBD", true)
                        }, {
                                name: "修复对象附件(Beta)",
                                icon: "闪电",
                                id: 153,
                                tip: getTipTemplete("修复对象附件(Beta)", "闪电.png", "TBD", true)
                        }, {
                                name: "修复未使用的对象参考(Beta)",
                                icon: "闪电",
                                id: 154,
                                tip: getTipTemplete("修复未使用的对象参考(Beta)", "闪电.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "将状态设置为自动模式(Beta)",
                                icon: "自动",
                                id: 155,
                                tip: getTipTemplete("将状态设置为自动模式(Beta)", "闪电.png", "TBD", true)
                        }, {
                                name: "切换状态引擎(Beta)",
                                icon: "闪电",
                                id: 156,
                                tip: getTipTemplete("切换状态引擎(Beta)", "闪电.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "开始时间(Beta)",
                                icon: "闪电",
                                id: 157,
                                tip: getTipTemplete("开始时间(Beta)", "闪电.png", "TBD", true)
                        }, {
                                name: "停止计时(Beta)",
                                icon: "闪电",
                                id: 158,
                                tip: getTipTemplete("停止计时(Beta)", "闪电.png", "TBD", true)
                        }, {
                                name: "清除定时(Beta)",
                                icon: "闪电",
                                id: 159,
                                tip: getTipTemplete("清除定时(Beta)", "闪电.png", "TBD", true)
                        }, {
                                name: "报告时间(Beta)",
                                icon: "闪电",
                                id: 150,
                                tip: getTipTemplete("报告时间(Beta)", "闪电.png", "TBD", true)
                        }]
                }];
                break;
        case 11:
                _content_menu = [{
                        name: "插入",
                        icon: "",
                        id: 111,
                        children: [{
                                name: "命名选择",
                                icon: "命名选项",
                                id: 1401,
                                tip: getTipTemplete("命名选择", "命名选项.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "部件变换",
                                icon: "部件变换",
                                id: 1402,
                                tip: getTipTemplete("部件变换", "部件变换.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "构造几何结构",
                                icon: "构造几何结构",
                                id: 1403,
                                children: [{
                                        name: "路径",
                                        icon: "路径",
                                        id: 14031,
                                        tip: getTipTemplete("路径", "路径.png", "TBD", true)
                                }, {
                                        name: "-"
                                }, {
                                        name: "表面",
                                        icon: "表面",
                                        id: 14032,
                                        tip: getTipTemplete("表面", "表面.png", "TBD", true)
                                }, {
                                        name: "-"
                                }, {
                                        name: "固体",
                                        icon: "固体",
                                        id: 14033,
                                        tip: getTipTemplete("固体", "固体.png", "TBD", true)
                                }, {
                                        name: "-"
                                }, {
                                        name: "STL",
                                        icon: "STL",
                                        id: 14034,
                                        tip: getTipTemplete("STL", "STL.png", "TBD", true)
                                }, {
                                        name: "-"
                                }, {
                                        name: "构造线(Beta)",
                                        icon: "构造线",
                                        id: 14035,
                                        tip: getTipTemplete("构造线(Beta)", "构造线.png", "TBD", true)
                                }]
                        }, {
                                name: "-"
                        }, {
                                name: "横截面",
                                icon: "横截面",
                                id: 1404,
                                children: [{
                                        name: "I型截面",
                                        icon: "截面I",
                                        id: 14041,
                                        tip: getTipTemplete("I型截面", "截面I.png", "插入I型截面", true)
                                }, {
                                        name: "矩形截面",
                                        icon: "截面方",
                                        id: 14042,
                                        tip: getTipTemplete("矩形截面", "截面方.png", "插入矩形截面", true)
                                }, {
                                        name: "圆形截面",
                                        icon: "截面圆",
                                        id: 14043,
                                        tip: getTipTemplete("圆形截面", "截面圆.png", "插入圆形截面", true)
                                }, {
                                        name: "圆形管截面",
                                        icon: "截面O",
                                        id: 14044,
                                        tip: getTipTemplete("圆形管截面", "截面O.png", "插入圆形管截面", true)
                                }, {
                                        name: "通道截面",
                                        icon: "截面C",
                                        id: 14045,
                                        tip: getTipTemplete("通道截面", "截面C.png", "插入通道截面", true)
                                }, {
                                        name: "Z型截面",
                                        icon: "截面Z",
                                        id: 14046,
                                        tip: getTipTemplete("Z型截面", "截面Z.png", "插入Z型截面", true)
                                }, {
                                        name: "L型截面",
                                        icon: "截面L",
                                        id: 14047,
                                        tip: getTipTemplete("L型截面", "截面L.png", "插入L型截面", true)
                                }, {
                                        name: "T型截面",
                                        icon: "截面T",
                                        id: 14048,
                                        tip: getTipTemplete("T型截面", "截面T.png", "插入T型截面", true)
                                }, {
                                        name: "帽型截面",
                                        icon: "截面帽",
                                        id: 14049,
                                        tip: getTipTemplete("帽型截面", "截面帽.png", "插入帽型截面", true)
                                }, {
                                        name: "矩形管截面",
                                        icon: "截面口",
                                        id: 140410,
                                        tip: getTipTemplete("矩形管截面", "截面口.png", "插入矩形管截面", true)
                                }, {
                                        name: "用户集成部分",
                                        icon: "截面自",
                                        id: 140411,
                                        tip: getTipTemplete("用户集成部分", "截面自.png", "插入用户集成横截面", true)
                                }]
                        }, {
                                name: "-"
                        }, {
                                name: "虚拟拓扑",
                                icon: "虚拟拓扑",
                                id: 1405,
                                tip: getTipTemplete("虚拟拓扑", "虚拟拓扑.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "对称",
                                icon: "对称",
                                id: 1406,
                                tip: getTipTemplete("对称", "对称.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "远程点",
                                icon: "远程点",
                                id: 1407,
                                tip: getTipTemplete("远程点", "远程点.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "断裂",
                                icon: "断裂",
                                id: 1408,
                                tip: getTipTemplete("断裂", "断裂.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "压缩几何结构",
                                icon: "压缩几何",
                                id: 1409,
                                tip: getTipTemplete("压缩几何结构", "压缩几何.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "网格编辑",
                                icon: "网格编辑",
                                id: 1410,
                                tip: getTipTemplete("网格编辑", "网格编辑.png", "TBD", true)
                        }, {
                                name: "网格编号",
                                icon: "网格编号",
                                id: 1411,
                                tip: getTipTemplete("网格编号", "网格编号.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "AM工艺",
                                icon: "AM工艺",
                                id: 1412,
                                tip: getTipTemplete("AM工艺", "AM工艺.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "求解方案组合",
                                icon: "求解方案组合",
                                id: 1413,
                                tip: getTipTemplete("求解方案组合", "求解方案组合.png", "TBD", true)
                        }, {
                                name: "疲劳组合",
                                icon: "疲劳组合",
                                id: 1414,
                                tip: getTipTemplete("疲劳组合", "疲劳组合.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "工程模型",
                                icon: "工程模型",
                                id: 1415,
                                tip: getTipTemplete("工程模型", "工程模型.png", "TBD", true)
                        }]
                }, {
                        name: "-"
                }, {
                        name: "求解",
                        icon: "闪电",
                        id: 12,
                        tip: getTipTemplete("求解", "闪电.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "清除生成的数据",
                        icon: "清除",
                        id: 13,
                        tip: getTipTemplete("清除生成的数据", "清除.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "重命名\tF2",
                        icon: "重命名",
                        id: 14,
                        tip: getTipTemplete("重命名", "重命名.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "刷新材料",
                        icon: "刷新",
                        id: 15,
                        tip: getTipTemplete("刷新材料", "刷新.png", "TBD", true)
                }, {
                        name: "从源处更新几何结构",
                        icon: "刷新",
                        id: 16,
                        tip: getTipTemplete("从源处更新几何结构", "刷新.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "禁用过滤器",
                        icon: "过滤",
                        id: 17,
                        tip: getTipTemplete("禁用过滤器", "过滤.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "导出CAERep文件(Beta)",
                        icon: "闪电",
                        id: 18,
                        tip: getTipTemplete("导出CAERep文件(Beta)", "闪电.png", "TBD", true)
                }, {
                        name: "放弃CAERep任务(Beta)",
                        icon: "闪电",
                        id: 19,
                        tip: getTipTemplete("放弃CAERep任务(Beta)", "闪电.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "显示图形连通性(Beta)",
                        icon: "",
                        id: 10,
                        tip: getTipTemplete("显示图形连通性(Beta)", "", "TBD", true)
                }];
                break;
        case 111:
                _content_menu = [{
                        name: "插入",
                        icon: "",
                        id: 1111,
                        children: [{
                                name: "单元方向",
                                icon: "单元方向",
                                id: 11111,
                                tip: getTipTemplete("单元方向", "单元方向.png", "TBD", true)
                        }, {
                                name: "点质量",
                                icon: "点质量",
                                id: 11112,
                                tip: getTipTemplete("点质量", "点质量.png", "TBD", true)
                        }, {
                                name: "分布质量",
                                icon: "分布质量",
                                id: 11113,
                                tip: getTipTemplete("分布质量", "分布质量.png", "TBD", true)
                        }, {
                                name: "表面涂层",
                                icon: "表面涂层",
                                id: 11114,
                                tip: getTipTemplete("表面涂层", "表面涂层.png", "TBD", true)
                        }]
                }, {
                        name: "-"
                }, {
                        name: "重命名\tF2",
                        icon: "重命名",
                        id: 1112,
                        tip: getTipTemplete("重命名", "重命名.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "导出...",
                        icon: "",
                        id: 1113,
                        children: [{
                                name: "几何结构",
                                icon: "几何结构",
                                id: 11131,
                                tip: getTipTemplete("几何结构", "几何结构.png", "TBD", true)
                        }, {
                                name: "ANSYS Viewer文件(AVZ)",
                                icon: "",
                                id: 11132,
                                tip: getTipTemplete("ANSYS Viewer文件(AVZ)", "", "TBD", true)
                        }]
                }, {
                        name: "-"
                }, {
                        name: "从源处更新几何结构",
                        icon: "刷新",
                        id: 1114,
                        tip: getTipTemplete("从源处更新几何结构", "刷新.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "重置几何体颜色",
                        icon: "刷新",
                        id: 1115,
                        tip: getTipTemplete("重置几何体颜色", "刷新.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "从结果文件处更新几何结构(Beta)",
                        icon: "结构更新",
                        id: 1116,
                        tip: getTipTemplete("从结果文件处更新几何结构(Beta)", "结构更新.png", "从结果文件处更新几何结构(Beta)", false)
                }];
                break;
        case 1111:
        case 1112:
        case 1113:
                _content_menu = [{
                        name: "插入",
                        icon: "",
                        id: 111101,
                        children: [{
                                name: "单元方向",
                                icon: "单元方向",
                                id: 1111011,
                                tip: getTipTemplete("单元方向", "单元方向.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "点质量",
                                icon: "点质量",
                                id: 1111012,
                                tip: getTipTemplete("点质量", "点质量.png", "TBD", true)
                        }, {
                                name: "分布质量",
                                icon: "分布质量",
                                id: 1111013,
                                tip: getTipTemplete("分布质量", "分布质量.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "表面涂层",
                                icon: "表面涂层",
                                id: 1111014,
                                tip: getTipTemplete("表面涂层", "表面涂层.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "命令",
                                icon: "命令",
                                id: 1111015,
                                tip: getTipTemplete("命令", "命令.png", "TBD", true)
                        }]
                }, {
                        name: "-"
                }, {
                        name: "更新",
                        icon: "更新",
                        id: 111102,
                        tip: getTipTemplete("更新", "更新.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "生成网络",
                        icon: "闪电",
                        id: 111103,
                        tip: getTipTemplete("生成网络", "闪电.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "预览",
                        icon: "",
                        id: 111104,
                        children: [{
                                name: "表面网络",
                                icon: "闪电",
                                id: 1111041,
                                tip: getTipTemplete("表面网络", "闪电.png", "TBD", true)
                        }, {
                                name: "膨胀",
                                icon: "闪电",
                                id: 1111042,
                                tip: getTipTemplete("膨胀", "闪电.png", "TBD", true)
                        }]
                }, {
                        name: "-"
                }, {
                        name: "隐藏几何体",
                        icon: "灯泡",
                        id: 111105,
                        tip: getTipTemplete("隐藏几何体", "灯泡.png", "TBD", true)
                }, {
                        name: "隐藏所有其他几何体",
                        icon: "灯泡",
                        id: 111106,
                        tip: getTipTemplete("隐藏所有其他几何体", "灯泡.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "重命名",
                        icon: "重命名",
                        id: 111107,
                        tip: getTipTemplete("重命名", "重命名.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "组",
                        icon: "文件夹",
                        id: 111108,
                        tip: getTipTemplete("组", "文件夹.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "抑制几何体",
                        icon: "抑制方块",
                        id: 111109,
                        tip: getTipTemplete("抑制几何体", "抑制方块.png", "TBD", true)
                }, {
                        name: "抑制所有其他几何体",
                        icon: "抑制方块",
                        id: 111110,
                        tip: getTipTemplete("抑制所有其他几何体", "抑制方块.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "合并部件(Beta)",
                        icon: "合并",
                        id: 111111,
                        tip: getTipTemplete("合并部件(Beta)", "合并.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "创建命名选择",
                        icon: "命名选项",
                        id: 111112,
                        tip: getTipTemplete("创建命名选择", "命名选项.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "创建材料分配",
                        icon: "材料分配",
                        id: 111113,
                        tip: getTipTemplete("创建材料分配", "材料分配.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "创建材料图",
                        icon: "标签彩",
                        id: 111114,
                        tip: getTipTemplete("创建材料图", "标签彩.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "转换部件",
                        icon: "部件变换",
                        id: 111115,
                        tip: getTipTemplete("转换部件", "部件变换.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "导出...",
                        icon: "",
                        id: 111116,
                        children: [{
                                name: "几何结构",
                                icon: "几何结构",
                                id: 1111061,
                                tip: getTipTemplete("几何结构", "几何结构.png", "TBD", true)
                        }]
                }, {
                        name: "-"
                }, {
                        name: "更新所选部件",
                        icon: "",
                        id: 111117,
                        children: [{
                                name: "更新：使用几何结构参数值",
                                icon: "几何参数",
                                id: 1111171,
                                tip: getTipTemplete("更新：使用几何结构参数值", "几何参数.png", "TBD", true)
                        }, {
                                name: "从结果文件处更新几何结构(Beta)",
                                icon: "结构更新",
                                id: 1111172,
                                tip: getTipTemplete("从结果文件处更新几何结构(Beta)", "结构更新.png", "TBD", true)
                        }]
                }, {
                        name: "清除生成的数据",
                        icon: "清除",
                        id: 111118,
                        tip: getTipTemplete("清除生成的数据", "清除.png", "TBD", true)
                }];
                break;
        case 11111:
        case 11121:
                _content_menu = [{
                        name: "重命名\tF2",
                        icon: "重命名",
                        id: 111111,
                        tip: getTipTemplete("重命名", "重命名.png", "TBD", true)
                }];
                break;
        case 112:
                _content_menu = [{
                        name: "插入",
                        icon: "",
                        id: 1121,
                        children: [{
                                name: "材料分配",
                                icon: "材料分配",
                                id: 11211,
                                tip: getTipTemplete("材料分配", "材料分配.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "材料图",
                                icon: "标签彩",
                                id: 11212,
                                tip: getTipTemplete("材料图", "标签彩.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "材料组合",
                                icon: "标签组合",
                                id: 11213,
                                tip: getTipTemplete("材料组合", "标签组合.png", "TBD", true)
                        }]
                }, {
                        name: "-"
                }, {
                        name: "复制到剪贴板(Beta)",
                        icon: "复制",
                        id: 1122,
                        tip: getTipTemplete("复制到剪贴板(Beta)", "复制.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "重命名",
                        icon: "重命名",
                        id: 1123,
                        tip: getTipTemplete("重命名", "重命名.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "将所有相似子对象分组",
                        icon: "文件夹",
                        id: 1124,
                        tip: getTipTemplete("将所有相似子对象分组", "文件夹.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "刷新材料",
                        icon: "刷新",
                        id: 1125,
                        tip: getTipTemplete("刷新材料", "刷新.png", "TBD", true)
                }];
                break;
        case 1121:
        case 1122:
                _content_menu = [{
                        name: "创建材料分配",
                        icon: "材料分配",
                        id: 11211,
                        tip: getTipTemplete("创建材料分配", "材料分配.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "创建材料组合",
                        icon: "标签组合",
                        id: 11212,
                        tip: getTipTemplete("创建材料组合", "标签组合.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "组\tCtrl+G",
                        icon: "文件夹",
                        id: 11213,
                        tip: getTipTemplete("组", "文件夹.png", "TBD", true)
                }, {
                        name: "将所有相似对象分组",
                        icon: "文件夹",
                        id: 11214,
                        tip: getTipTemplete("将所有相似对象分组", "文件夹.png", "TBD", true)
                }];
                break;
        case 113:
                _content_menu = [{
                        name: "插入",
                        icon: "",
                        id: 1131,
                        children: [{
                                name: "坐标系",
                                icon: "坐标系",
                                id: 11311,
                                tip: getTipTemplete("坐标系", "坐标系.png", "TBD", true)
                        }]
                }, {
                        name: "-"
                }, {
                        name: "重命名\tF2",
                        icon: "重命名",
                        id: 1132,
                        tip: getTipTemplete("重命名", "重命名.png", "TBD", true)
                }];
                break;
        case 1131:
                _content_menu = [{
                        name: "插入",
                        icon: "",
                        id: 11311,
                        children: [{
                                name: "坐标系",
                                icon: "坐标系",
                                id: 113111,
                                tip: getTipTemplete("坐标系", "坐标系.png", "TBD", true)
                        }]
                }, {
                        name: "-"
                }, {
                        name: "创建截面",
                        icon: "截面",
                        id: 11312,
                        tip: getTipTemplete("创建截面", "截面.png", "TBD", true)
                }, {
                        name: "确定构造表面",
                        icon: "表面",
                        id: 11313,
                        tip: getTipTemplete("确定构造表面", "表面.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "复制",
                        icon: "复制",
                        id: 11314,
                        tip: getTipTemplete("复制", "复制.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "复制到剪贴板(Beta)",
                        icon: "复制",
                        id: 11315,
                        tip: getTipTemplete("复制到剪贴板(Beta)", "复制.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "重命名\tF2",
                        icon: "重命名",
                        id: 11316,
                        tip: getTipTemplete("重命名", "重命名.png", "TBD", true)
                }];
                break;
        case 114:
                _content_menu = [{
                        name: "插入",
                        icon: "",
                        id: 1141,
                        children: [{
                                name: "连接组",
                                icon: "连接组",
                                id: 11411,
                                tip: getTipTemplete("连接组", "连接组.png", "TBD", true)
                        }, {
                                name: "手动接触区域",
                                icon: "接触区域",
                                id: 11412,
                                tip: getTipTemplete("手动接触区域", "接触区域.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "焊点",
                                icon: "焊点",
                                id: 11413,
                                tip: getTipTemplete("焊点", "焊点.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "接触工具",
                                icon: "连接组",
                                id: 11414,
                                tip: getTipTemplete("接触工具", "连接组.png", "TBD", true)
                        }, {
                                name: "求解方案信息",
                                icon: "方案信息",
                                id: 11415,
                                tip: getTipTemplete("求解方案信息", "方案信息.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "连续副",
                                icon: "旋转",
                                id: 11416,
                                tip: getTipTemplete("连续副", "旋转.png", "TBD", true)
                        }, {
                                name: "弹簧",
                                icon: "弹簧",
                                id: 11417,
                                tip: getTipTemplete("弹簧", "弹簧.png", "TBD", true)
                        }, {
                                name: "轴承",
                                icon: "轴承",
                                id: 11418,
                                tip: getTipTemplete("轴承", "轴承.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "梁",
                                icon: "梁",
                                id: 11419,
                                tip: getTipTemplete("梁", "梁.png", "TBD", true)
                        }]
                }, {
                        name: "-"
                }, {
                        name: "创建自动连接",
                        icon: "闪电",
                        id: 1142,
                        tip: getTipTemplete("创建自动连接", "闪电.png", "TBD", true)
                }, {
                        name: "请检查重叠的接触区域",
                        icon: "闪电",
                        id: 1143,
                        tip: getTipTemplete("请检查重叠的接触区域", "闪电.png", "TBD", true)
                }, {
                        name: "重新生成连接网络(Beta)",
                        icon: "闪电",
                        id: 1144,
                        tip: getTipTemplete("重新生成连接网络(Beta)", "闪电.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "冗余分析",
                        icon: "旋转",
                        id: 1145,
                        tip: getTipTemplete("冗余分析", "旋转.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "禁用透明度",
                        icon: "",
                        id: 1146,
                        tip: getTipTemplete("禁用透明度", "", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "搜索重复对的连接",
                        icon: "搜索",
                        id: 1147,
                        tip: getTipTemplete("搜索重复对的连接", "搜索.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "重命名\tF2",
                        icon: "重命名",
                        id: 1148,
                        tip: getTipTemplete("重命名", "重命名.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "基于定义重命名",
                        icon: "重命名",
                        id: 1149,
                        tip: getTipTemplete("基于定义重命名", "重命名.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "打开求解器文件目录",
                        icon: "打开",
                        id: 1140,
                        tip: getTipTemplete("打开求解器文件目录", "打开.png", "TBD", true)
                }];
                break;
        case 115:
                _content_menu = [{
                        name: "插入",
                        icon: "",
                        id: 1151,
                        children: [{
                                name: "方法",
                                icon: "方法",
                                id: 115101,
                                tip: getTipTemplete("方法", "方法.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "尺寸调整",
                                icon: "尺寸调整",
                                id: 115102,
                                tip: getTipTemplete("尺寸调整", "尺寸调整.png", "TBD", true)
                        }, {
                                name: "接触尺寸",
                                icon: "接触尺寸",
                                id: 115103,
                                tip: getTipTemplete("接触尺寸", "接触尺寸.png", "TBD", true)
                        }, {
                                name: "加密",
                                icon: "加密",
                                id: 115104,
                                tip: getTipTemplete("加密", "加密.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "面网格部分",
                                icon: "面网格",
                                id: 115105,
                                tip: getTipTemplete("面网格部分", "面网格.png", "TBD", true)
                        }, {
                                name: "网格复制",
                                icon: "网格复制",
                                id: 115106,
                                tip: getTipTemplete("网格复制", "网格复制.png", "TBD", true)
                        }, {
                                name: "匹配控制",
                                icon: "匹配控制",
                                id: 115107,
                                tip: getTipTemplete("匹配控制", "匹配控制.png", "TBD", true)
                        }, {
                                name: "收缩",
                                icon: "几何结构",
                                id: 115108,
                                tip: getTipTemplete("收缩", "几何结构.png", "TBD", true)
                        }, {
                                name: "膨胀",
                                icon: "膨胀",
                                id: 115109,
                                tip: getTipTemplete("膨胀", "膨胀.png", "TBD", true)
                        }, {
                                name: "垫圈",
                                icon: "垫圈",
                                id: 115110,
                                tip: getTipTemplete("垫圈", "垫圈.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "网格编辑",
                                icon: "网格编辑",
                                id: 115111,
                                tip: getTipTemplete("网格编辑", "网格编辑.png", "TBD", true)
                        }, {
                                name: "网格编号",
                                icon: "网格编号",
                                id: 115112,
                                tip: getTipTemplete("网格编号", "网格编号.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "接触匹配组",
                                icon: "接触匹配组",
                                id: 115113,
                                tip: getTipTemplete("接触匹配组", "接触匹配组.png", "TBD", true)
                        }, {
                                name: "接触匹配",
                                icon: "接触匹配",
                                id: 115114,
                                tip: getTipTemplete("接触匹配", "接触匹配.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "节点合并组",
                                icon: "节点合并组",
                                id: 115115,
                                tip: getTipTemplete("节点合并组", "节点合并组.png", "TBD", true)
                        }, {
                                name: "节点合并",
                                icon: "节点合并",
                                id: 115116,
                                tip: getTipTemplete("节点合并", "节点合并.png", "TBD", true)
                        }, {
                                name: "节点移动",
                                icon: "节点移动",
                                id: 115117,
                                tip: getTipTemplete("节点移动", "节点移动.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "拉力(Beta)",
                                icon: "拉力",
                                id: 115118,
                                tip: getTipTemplete("拉力(Beta)", "拉力.png", "TBD", true)
                        }]
                }, {
                        name: "更新",
                        icon: "更新",
                        id: 1152,
                        tip: getTipTemplete("更新", "更新.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "生成网络",
                        icon: "闪电",
                        id: 1153,
                        tip: getTipTemplete("生成网络", "闪电.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "预览",
                        icon: "",
                        id: 1154,
                        children: [{
                                name: "表面网格",
                                icon: "闪电",
                                id: 11541,
                                tip: getTipTemplete("表面网格", "闪电.png", "TBD", true)
                        }, {
                                name: "膨胀",
                                icon: "闪电",
                                id: 11542,
                                tip: getTipTemplete("膨胀", "闪电.png", "TBD", true)
                        }]
                }, {
                        name: "显示",
                        icon: "",
                        id: 1155,
                        children: [{
                                name: "可扫描的几何体",
                                icon: "",
                                id: 11551,
                                tip: getTipTemplete("可扫描的几何体", "", "TBD", true)
                        }, {
                                name: "可映射面",
                                icon: "",
                                id: 11552,
                                tip: getTipTemplete("可映射面", "", "TBD", true)
                        }, {
                                name: "受保护的顶点(Beta)",
                                icon: "",
                                id: 11553,
                                tip: getTipTemplete("受保护的顶点(Beta)", "", "TBD", true)
                        }, {
                                name: "受保护的边缘(Beta)",
                                icon: "",
                                id: 11554,
                                tip: getTipTemplete("受保护的边缘(Beta)", "", "TBD", true)
                        }, {
                                name: "受保护的面(Beta)",
                                icon: "",
                                id: 11555,
                                tip: getTipTemplete("受保护的面(Beta)", "", "TBD", true)
                        }, {
                                name: "受抑制的顶点(Beta)",
                                icon: "",
                                id: 11556,
                                tip: getTipTemplete("受抑制的顶点(Beta)", "", "TBD", true)
                        }, {
                                name: "受抑制的边(Beta)",
                                icon: "",
                                id: 11557,
                                tip: getTipTemplete("受抑制的边(Beta)", "", "TBD", true)
                        }, {
                                name: "特征清除面(Beta)",
                                icon: "",
                                id: 11558,
                                tip: getTipTemplete("特征清除面(Beta)", "", "TBD", true)
                        }, {
                                name: "特征清除边缘(Beta)",
                                icon: "",
                                id: 11559,
                                tip: getTipTemplete("特征清除边缘(Beta)", "", "TBD", true)
                        }, {
                                name: "特征清除顶点(Beta)",
                                icon: "",
                                id: 11550,
                                tip: getTipTemplete("特征清除顶点(Beta)", "", "TBD", true)
                        }]
                }, {
                        name: "创建收缩控制",
                        icon: "闪电",
                        id: 1156,
                        tip: getTipTemplete("创建收缩控制", "闪电.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "导出...",
                        icon: "",
                        id: 1157,
                        children: [{
                                name: "STL",
                                icon: "STL",
                                id: 11571,
                                tip: getTipTemplete("STL", "STL.png", "TBD", true)
                        }, {
                                name: "ANSYS Viewer文件(AVZ)",
                                icon: "",
                                id: 11572,
                                tip: getTipTemplete("ANSYS Viewer文件(AVZ)", "", "TBD", true)
                        }]
                }, {
                        name: "-"
                }, {
                        name: "将所有相似子对象分组",
                        icon: "文件夹",
                        id: 1158,
                        tip: getTipTemplete("将所有相似子对象分组", "文件夹.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "清除生成的数据",
                        icon: "清除",
                        id: 1159,
                        tip: getTipTemplete("清除生成的数据", "清除.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "重命名\tF2",
                        icon: "重命名",
                        id: 1150,
                        tip: getTipTemplete("重命名", "重命名.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "开始录制",
                        icon: "",
                        id: 11501,
                        tip: getTipTemplete("开始录制", "", "TBD", true)
                }, {
                        name: "力更新网络状态(Beta)",
                        icon: "",
                        id: 11502,
                        tip: getTipTemplete("力更新网络状态(Beta)", "", "TBD", true)
                }];
                break;
        case 116:
                _content_menu = [sub_insert, {
                        name: "导出Nastran文件",
                        icon: "nas文件",
                        id: 1161,
                        tip: getTipTemplete("导出Nastran文件", "nas文件.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "复制",
                        icon: "复制2",
                        id: 1162,
                        tip: getTipTemplete("复制", "复制2.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "清除生成的数据",
                        icon: "清除",
                        id: 1163,
                        tip: getTipTemplete("清除生成的数据", "清除.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "删除",
                        icon: "删除",
                        id: 1164,
                        tip: getTipTemplete("删除", "删除.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "重命名\tF2",
                        icon: "重命名",
                        id: 1165,
                        tip: getTipTemplete("重命名", "重命名.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "将所有相似子对象分组",
                        icon: "文件夹",
                        id: 1166,
                        tip: getTipTemplete("将所有相似子对象分组", "文件夹.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "基于环境的过滤器(Beta)",
                        icon: "过滤2",
                        id: 1167,
                        tip: getTipTemplete("基于环境的过滤器(Beta)", "过滤2.png", "TBD", true)
                }, {
                        name: "导出CAERep文件(Beta)",
                        icon: "闪电",
                        id: 1168,
                        tip: getTipTemplete("导出CAERep文件(Beta)", "闪电.png", "TBD", true)
                }, {
                        name: "放弃RSM任务(Beta)",
                        icon: "闪电",
                        id: 1169,
                        tip: getTipTemplete("放弃RSM任务(Beta)", "闪电.png", "TBD", true)
                }];
                break;
        case 1161:
                _content_menu = [sub_insert, {
                        name: "重命名\tF2",
                        icon: "重命名",
                        id: 11611,
                        tip: getTipTemplete("重命名", "重命名.png", "TBD", true)
                }];
                break;
        case 1162:
        case 1163:
        case 1164:
                _content_menu = [sub_insert, {
                        name: "抑制",
                        icon: "抑制方块",
                        id: 11621,
                        tip: getTipTemplete("抑制", "抑制方块.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "复制",
                        icon: "复制2",
                        id: 11622,
                        tip: getTipTemplete("复制", "复制2.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "复制",
                        icon: "复制",
                        id: 11623,
                        tip: getTipTemplete("复制", "复制.png", "TBD", true)
                }, {
                        name: "剪切",
                        icon: "剪切",
                        id: 11624,
                        tip: getTipTemplete("剪切", "剪切.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "复制到剪切板",
                        icon: "复制",
                        id: 11625,
                        tip: getTipTemplete("复制到剪切板", "复制.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "删除",
                        icon: "删除",
                        id: 11626,
                        tip: getTipTemplete("删除", "删除.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "重命名\tF2",
                        icon: "重命名",
                        id: 11627,
                        tip: getTipTemplete("重命名", "重命名.png", "TBD", true)
                }, {
                        name: "-"
                }, {
                        name: "组\tCtrl+G",
                        icon: "文件夹",
                        id: 11628,
                        tip: getTipTemplete("组", "文件夹.png", "TBD", true)
                }, {
                        name: "对相似对象进行分组",
                        icon: "文件夹",
                        id: 11629,
                        tip: getTipTemplete("对相似对象进行分组", "文件夹.png", "TBD", true)
                }];
                break;
        case 1165:
                _content_menu = [{
                        name: "打开求解器文件目录",
                        icon: "打开",
                        id: 11651,
                        tip: getTipTemplete("打开求解器文件目录", "打开.png", "TBD", true)
                }];
                break;
        case 11651:
                _content_menu = [{
                        name: "插入",
                        icon: "",
                        id: 116511,
                        children: [{
                                name: "接触",
                                icon: "接触",
                                id: 1165111,
                                tip: getTipTemplete("接触", "接触.png", "TBD", true)
                        }, {
                                name: "-"
                        }, {
                                name: "变形图跟踪器",
                                icon: "追踪器1",
                                id: 1165112,
                                tip: getTipTemplete("变形图跟踪器", "追踪器1.png", "TBD", true)
                        }, {
                                name: "应力图追踪器",
                                icon: "追踪器2",
                                id: 1165113,
                                tip: getTipTemplete("应力图追踪器", "追踪器2.png", "TBD", true)
                        }, {
                                name: "应变图追踪器",
                                icon: "追踪器3",
                                id: 1165114,
                                tip: getTipTemplete("应力图追踪器", "追踪器3.png", "TBD", true)
                        }]
                }];
                break;
        default:
                return;
                break;
        }
        ui.tree.content_menu = _content_menu;
}

function OnShowComputerMenu(idx) {
        var _content_menu = [{
                name: "My Computer",
                icon: "check1",
                id: 1
        }, {
                name: "My Computer,Background",
                icon: "",
                id: 2
        }];
        if (idx == 1) {
                ui.pb_show_computer.content_menu = _content_menu;
        } else {
                ui.pb_show_computer2.content_menu = _content_menu;
        }
}

function OnHideTopMenu() {
        ui.main_menu_idx.visible = false;
        ui.stack_show_hide.index = 1;

        ui.mp_btn.valid = ui.env_pb.valid = ui.seclect_pb.valid = ui.show_pb.valid = ui.auto_pb.valid = false;
}

function OnMenu() {
        ui.pb_file.content_menu = [{
                name: "文件\tCtrl+F  ",
                icon: "file",
                id: 1,
                children: [{
                        name: "",
                        id: 11
                }]
        },
        {
                name: "-"
        },
        {
                name: "主页",
                icon: "file",
                id: 2,
                children: [{
                        name: "轮廓",
                        id: 22
                }]
        },
        {
                name: "环境",
                icon: "",
                id: 3
        },

        {
                name: "选择",
                icon: "",
                id: 4
        },
        {
                name: "自动化",
                icon: "",
                id: 5
        }
        ];

}

function OnFile() {
        ui.pb_file.content_menu = [{
                name: "新建",
                icon: "new",
                id: 1
        },
        {
                name: "打开",
                icon: "open",
                id: 2
        },
        {
                name: "存盘",
                icon: "save",
                id: 3
        },
        {
                name: "-"
        },
        {
                name: "退出\tCtrl+Q",
                icon: "outdoor1",
                id: 4
        }
        ];
}

function OnShowHidePostTable() {
        ui.post_table.visible = ui.pb_show_post_table.valid;
}

function OnShowHideCurve() {
        ui.canvas2d.visible = ui.pb_show_curve.valid;
}

function OnTopMenu(idx) {
        ui.main_menu_idx.visible = true;
        ui.main_menu_idx.index = idx - 1;
        ui.stack_show_hide.index = 0;
        ui.mp_btn.valid = ui.env_pb.valid = ui.seclect_pb.valid = ui.show_pb.valid = ui.auto_pb.valid = false;

        //model.ide_info(idx);

        if (idx == 1) {
                ui.mp_btn.valid = true;
        }

        if (idx == 2) {
                ui.env_pb.valid = true;
        }

        if (idx == 3) {
                ui.seclect_pb.valid = true;
        }

        if (idx == 4) {
                ui.auto_pb.valid = true;
        }

        if (idx == 5) {
                ui.show_pb.valid = true;
        }
}

function OnChangeTopMenu() {
        ui.top_sub.index = 0;
        ui.top_insert_box.index = 0;
        ui.top_insert_box.visible = true;
        switchBottom(false);
        switch (ui.tree.position) {
        case 1:
                ui.env_pb.value = "项目";
                ui.prop.table = [
                        ["属性", "值"],
                        ["作者", ""],
                        ["主题", ""],
                        ["准备做", ""],
                        ["第一次保存的", "2021年11月18日"],
                        ["最后一次保存", "2021年11月19日"],
                        ["产品版本：", "2020 R2"],
                        ["在求解之前保存项目", ""],
                        ["在求解之后保存项目", ""]
                ];
                setReadOnly([3, 4]);
                ui.prop.filter = [6, 1, ["是", "否"]];
                ui.prop.filter = [7, 1, ["是", "否"]];
                break;
        case 11:
                ui.env_pb.value = "模型";
                ui.prop.table = [
                        ["属性", "值"],
                        ["环境", "0.1"],
                        ["扩散", "0.6"],
                        ["镜面", "1"],
                        ["颜色", ""],
                        ["控制", "启用的"]
                ];
                setReadOnly([4]);
                ui.top_sub.index = 1;
                break;
        case 111:
                ui.env_pb.value = "几何结构";
                ui.prop.table = [
                        ["属性", "值"],
                        ["源", "C:/Program Files/"],
                        ["类型", "DesignModeler"],
                        ["长度单位", "米"],
                        ["单元控制", "程序控制"],
                        ["显示风格", "几何体颜色"],
                        ["长度X", "8.5897e-002 m"],
                        ["长度Y", "0.105 m"],
                        ["长度Z", "4.e-002 m"],
                        ["体积", "7.4049e-005 m³"],
                        ["质量", "0.58916 kg"]
                ];
                ui.prop.filter = [3, 1, ["程序控制", "手动"]];
                ui.prop.filter = [4, 1, ["几何体颜色", "部件颜色", "材料", "非线性材料效应", "几何体类型"]];

                setReadOnly([0, 1, 2, 5, 6, 7, 8, 9]);
                ui.top_sub.index = 2;
                break;
        case 1111:
        case 1112:
        case 1113:
                ui.env_pb.value = "几何结构";
                ui.prop.table = [
                        ["属性", "值"],
                        ["可见", "是"],
                        ["辉光", "0"],
                        ["反光度", "1"],
                        ["透明度", "1"],
                        ["颜色", "blue"],
                        ["镜面反射", "1"],
                        ["抑制的", "否"],
                        ["ID(Beta)", "1"],
                        ["刚度行为", "刚性"],
                        ["参考温度", "根据环境"],
                        ["处理", "无"]
                ];
                ui.prop.filter = [0, 1, ["是", "否"]];
                ui.prop.filter = [6, 1, ["是", "否"]];
                ui.prop.filter = [8, 1, ["柔性", "刚性", "垫圈", "柔性梁（Beta）", "刚性梁（Beta）"]];
                ui.prop.filter = [9, 1, ["根据环境", "按几何体"]];
                ui.prop.filter = [10, 1, ["无", "构造几何体"]];
                setReadOnly([7]);
                break;
        case 11111:
        case 11121:
                ui.env_pb.value = "几何结构";
                ui.prop.table = [
                        ["属性", "值"],
                        ["类型", "笛卡尔"],
                        ["原点X", "-8.1353e-019 m"],
                        ["原点Y", "-9.826e-019 m"],
                        ["原点Z", "1.8819e-018 m"],
                        ["X轴数据", "[  1.  0.  0.  ]"],
                        ["Y轴数据", "[  0.  1.  0.  ]"],
                        ["Z轴数据", "[  0.  0.  1.  ]"],
                        ["基本配置", "绝对"],
                        ["转换配置", "[  -8.1353e-019  -9.826e-019  1.8819e-018  ]"]
                ];
                setReadOnly([0, 1, 2, 3, 4, 5, 6, 7, 8]);
                break;
        case 112:
                ui.prop.table = [
                        ["属性", "值"],
                        ["材料", "2"],
                        ["材料分配", "0"]
                ];
                ui.env_pb.value = "材料";
                setReadOnly([0, 1]);
                break;
        case 1121:
        case 1122:
                ui.prop.table = [
                        ["属性", "值"],
                        ["Density", "8300 kg/m³"],
                        ["Young's Modulus", "1.1e+11 Pa"],
                        ["Thermal Conductivity", ""],
                        ["Specific Heat", "385 J/kg·°C"],
                        ["Tensile Yield Strength", ""],
                        ["Tensile Ultimate Strength", ""],
                        ["Nonlinear Behavior", "True"],
                        ["Full Details", "button(TD)"],
                        ["分配几何体", "1"]
                ];
                ui.env_pb.value = "材料";
                setReadOnly([0, 1, 2, 3, 4, 5, 6, 8]);
                break;
        case 113:
        case 1131:
                ui.env_pb.value = "坐标系";
                ui.prop.table = [
                        ["属性", "值"],
                        ["类型", "笛卡尔"],
                        ["原点X", "-8.1353e-019 m"],
                        ["原点Y", "-9.826e-019 m"],
                        ["原点Z", "1.8819e-018 m"],
                        ["X轴数据", "[  1.  0.  0.  ]"],
                        ["Y轴数据", "[  0.  1.  0.  ]"],
                        ["Z轴数据", "[  0.  0.  1.  ]"],
                        ["基本配置", "绝对"],
                        ["转换配置", "[  -8.1353e-019  -9.826e-019  1.8819e-018  ]"]
                ];
                setReadOnly([0, 1, 2, 3, 4, 5, 6, 7, 8]);
                break;
        case 114:
                ui.env_pb.value = "连接";
                ui.prop.table = [
                        ["属性", "值"],
                        ["刷新时生成自动连接", "是"],
                        ["启用的", "是"]
                ];
                ui.prop.filter = [0, 1, ["是", "否"]];
                ui.prop.filter = [1, 1, ["是", "否"]];
                break;
        case 115:
                ui.env_pb.value = "网格";
                ui.prop.table = [
                        ["属性", "值"],
                        ["显示风格", "使用几何结构设置"],
                        ["物理偏好", "机械"],
                        ["单元的阶", "程序控制"],
                        ["单元尺寸", "默认"],
                        ["使用自适应尺寸调整", "是"],
                        ["分辨率", "4"],
                        ["网格特征清除", "是"],
                        ["特征清除尺寸", "默认"],
                        ["过度", "快速"],
                        ["跨度角中心", "精细"],
                        ["初始尺寸种子", "装配体"],
                        ["边界框对角线", "0.14143 m"],
                        ["平均表面积", "2.186e-003 m²"],
                        ["最小边缘长度", "1.e-002 m"],
                        ["检查网络质量", "是，错误"],
                        ["误差限值", "强力机械"],
                        ["目标质量", "0"],
                        ["平滑", "中等"],
                        ["网络度量标准", "无"]
                ];
                ui.prop.filter = [0, 1, ["使用几何结构设置", "单元质量", "纵横比", "雅可比比率（MAPDL）", "雅可比比率（角节点）", "雅可比比率（高斯点）", "翘曲系数", "平行偏差", "最大拐角角度", "偏度"]];
                ui.prop.filter = [1, 1, ["机械", "非线性机械", "电磁", "CFD", "显式", "自定义（Beta）", "流体动力学"]];
                ui.prop.filter = [2, 1, ["程序控制", "线性的", "二次项"]];
                ui.prop.filter = [4, 1, ["是", "否"]];
                ui.prop.filter = [6, 1, ["是", "否"]];
                ui.prop.filter = [8, 1, ["快速", "缓慢"]];
                ui.prop.filter = [9, 1, ["大尺度", "中等", "精细"]];
                ui.prop.filter = [10, 1, ["装配体", "部件"]];
                ui.prop.filter = [14, 1, ["否", "是，错误和警告", "是，错误"]];
                ui.prop.filter = [16, 1, ["低", "中等", "高"]];
                ui.prop.filter = [17, 1, ["无", "单元质量", "纵横比", "雅可比比率（MAPDL）", "雅可比比率（角节点）", "雅可比比率（高斯点）", "翘曲系数", "平行偏差", "最大拐角角度"]];
                setReadOnly([11, 12, 13]);

                ui.top_sub.index = 3;
                ui.top_insert_box.index = 1;
                ui.top_insert_box.visible = false;
                break;
        case 116:
                ui.prop.table = [
                        ["属性", "值"],
                        ["物理类型", "结构"],
                        ["分析类型", "静态结构"],
                        ["求解器目标", "Mechanical APDL"],
                        ["环境温度", "22 ℃"],
                        ["只生成输入文件", "否"]
                ];
                ui.env_pb.value = "环境";
                setReadOnly([0, 1, 2, 4]);
                ui.top_sub.index = 4;
                break;
        case 1161:
                ui.prop.table = obj2table(step);
                ui.prop.filter = [3, 1, ["程序控制", "开启", "关闭"]];
                ui.prop.filter = [4, 1, ["子步", "时间"]];
                ui.prop.filter = [8, 1, ["程序控制", "直接", "迭代的"]];
                ui.prop.filter = [9, 1, ["程序控制", "开启", "关闭"]];
                ui.prop.filter = [10, 1, ["程序控制", "因数", "手动"]];
                ui.prop.filter = [11, 1, ["程序控制", "警告", "错误", "关闭"]];
                ui.prop.filter = [12, 1, ["开启", "关闭"]];
                ui.prop.filter = [13, 1, ["开启", "关闭"]];
                ui.prop.filter = [14, 1, ["开启", "关闭"]];
                ui.env_pb.value = "环境";
                switchBottom(true);
                refleshTable("设定");
                break;
        case 1162:
        case 1163:
        case 1164:
                ui.prop.table = [
                        ["属性", "值"],
                        ["连接副", "旋转1"],
                        ["DOF", "旋转Z"],
                        ["类型", "旋转"],
                        ["大小", "-180°"],
                        ["在载荷处锁定", "从不"],
                        ["抑制的", "否"]
                ];
                ui.prop.filter = [0, 1, ["旋转1", "旋转2", "位移"]];
                ui.prop.filter = [2, 1, ["旋转", "旋转速度", "旋转加速度", "力矩"]];
                ui.prop.filter = [5, 1, ["是", "否"]];
                ui.env_pb.value = "环境";
                setReadOnly([1]);
                break;
        case 1165:
                ui.prop.table = [
                        ["属性", "值"],
                        ["要使用的内核数量(Beta)", "0"],
                        ["最大加密循环", "1"],
                        ["加密深度", "2"],
                        ["状态", "需要求解"],
                        ["MAPDL计算时间", ""],
                        ["使用的MAPDL内存", ""],
                        ["MAPDL结果文件大小", ""],
                        ["分布式后处理(Beta)", "程序控制"],
                        ["网格源(Beta)", "程序控制"],
                        ["梁截面结果", "否"],
                        ["按需应力/应变", "否"]
                ];
                ui.prop.filter = [7, 1, ["程序控制", "是", "否"]];
                ui.prop.filter = [8, 1, ["程序控制", "机械", "结果文件"]];
                ui.prop.filter = [9, 1, ["是", "否"]];
                ui.prop.filter = [10, 1, ["是", "否"]];
                setReadOnly([3, 4, 5, 6]);
                ui.env_pb.value = "求解方案";
                break;
        case 11651:
                ui.prop.table = [
                        ["属性", "值"],
                        ["求解方案输出", "位移收敛"],
                        ["Newton-Raphson残余", "0"],
                        ["确定单元违规", "0"],
                        ["更新间隔", "2.5 S"],
                        ["显示点", "全部"],
                        ["激活可见性", "是"],
                        ["显示", "所有FE连接"],
                        ["绘制附加到...的连接", "所有节点"],
                        ["线颜色", "连接类型"],
                        ["结果可见", "否"],
                        ["线粗细", "单个"],
                        ["显示类型", "线"]
                ];
                ui.prop.filter = [0, 1, ["求解器输出", "力收敛", "位移收敛", "力矩收敛", "旋转收敛", "最大DOF数量", "线搜索", "时间", "时间增量", "最大残余量"]];
                ui.prop.filter = [5, 1, ["是", "否"]];
                ui.prop.filter = [6, 1, ["所有FE连接", "基于CE", "基于梁", "弱弹簧", "无", "循环"]];
                ui.prop.filter = [7, 1, ["所有节点", "可见节点"]];
                ui.prop.filter = [8, 1, ["连接类型", "手动", "对象(Beta)"]];
                ui.prop.filter = [9, 1, ["是", "否"]];
                ui.prop.filter = [10, 1, ["单个", "双倍", "三个"]];
                ui.prop.filter = [11, 1, ["线", "点", "线和点(Beta)"]];
                ui.env_pb.value = "求解方案信息";
                break;
        case 11652:
        case 11653:
        case 11654:
        case 11655:
        case 11656:
                ui.prop.table = [
                        ["属性", "值"],
                        ["范围限定方法", "几何结构选择"],
                        ["几何结构", "1面"],
                        ["类型", "总变形"],
                        ["通过", "时间"],
                        ["显示时间", "最后的"],
                        ["计算时间历史", "是"],
                        ["标识符", ""],
                        ["抑制的", "否"],
                        ["最小", ""],
                        ["最大", ""],
                        ["平均", ""],
                        ["最小值位置", ""],
                        ["最大值位置", ""],
                        ["时间", ""],
                        ["载荷步", "0"],
                        ["子步", "0"],
                        ["迭代号", ""]
                ];
                ui.prop.filter = [0, 1, ["几何结构选择", "命名选择", "路径", "表面", "结果文件项", "表面涂层"]];
                ui.prop.filter = [2, 1, ["总变形", "定向变形"]];
                ui.prop.filter = [3, 1, ["时间", "结果集", "时间最大值", "最长时间", "最短时间"]];
                ui.prop.filter = [5, 1, ["是", "否"]];
                ui.prop.filter = [7, 1, ["是", "否"]];
                setReadOnly([8, 9, 10, 11, 12, 13, 14, 15, 16]);
                ui.env_pb.value = "求解方案";
                break;
        case 998:
                ui.prop.table = obj2table(aSpeedObj);
                ui.prop.filter = [1, 1, ["矢量", "分量"]];
                ui.prop.filter = [3, 1, ["未设置", "左", "右", "上", "下", "内", "外"]];
                ui.prop.filter = [4, 1, ["是", "否"]];
                if (aSpeedObj["大小"] == "0") {
                        ui.prop.color = [2, 0, "#FFF000"];
                }
                if (aSpeedObj["方向"] == "未设置") {
                        ui.prop.color = [3, 0, "#FFF000"];
                }
                setReadOnly([0]);
                ui.env_pb.value = "环境";
                switchBottom(true);
                refleshTable("加速度");
                break;
        case 999:
                ui.prop.table = obj2table(gravityObj);
                ui.prop.filter = [1, 1, ["Global Coordinate System"]];
                ui.prop.filter = [5, 1, ["是", "否"]];
                ui.prop.filter = [6, 1, ["+X方向", "-X方向", "+Y方向", "-Y方向", "+Z方向", "-Z方向"]];
                setReadOnly([0, 2, 3, 4]);
                ui.env_pb.value = "环境";
                switchBottom(true);
                refleshTable("重力");
                break;
        }
        if (ui.tree.node.name.startsWith("自动方法")) {
                ui.prop.table = obj2table(meshs.children[ui.tree.node.name]);
                ui.prop.filter = [0, 1, ["几何结构选择", "命名选择"]];
                ui.prop.filter = [1, 1, ["未选择", "1几何体", "2几何体", "3几何体"]];
                ui.prop.filter = [2, 1, ["是", "否"]];
                ui.prop.filter = [3, 1, ["Quadrilateral Dominant", "三角形"]];
                ui.prop.filter = [4, 1, ["使用全局设置", "线性的", "二次项"]];
                ui.prop.filter = [5, 1, ["四边形/三角形", "全部四边形"]];
                if (meshs.children[ui.tree.node.name]["几何结构"] == "未选择") {
                        ui.prop.color = [1, 0, "#FFF000"];
                }
        }
        if (ui.tree.node.name.startsWith("尺寸调整")) {
                ui.prop.table = obj2table(meshs.children[ui.tree.node.name]);
                ui.prop.filter = [0, 1, ["几何结构选择", "命名选择"]];
                ui.prop.filter = [1, 1, ["未选择", "1几何体", "2几何体", "3几何体"]];
                ui.prop.filter = [2, 1, ["是", "否"]];
                ui.prop.filter = [3, 1, ["单元尺寸", "分区数量", "影响范围", "受影响的几何体", "全局尺寸因素"]];
                ui.prop.filter = [6, 1, ["柔软", "硬"]];
                if (meshs.children[ui.tree.node.name]["几何结构"] == "未选择") {
                        ui.prop.color = [1, 0, "#FFF000"];
                }
        }
        ui.prop.head_size = [0, 0];
}

//设置按钮悬浮提示文
function setTips() {
        ui.pb_solve.tip = ui.pb_solve2.tip = getTipTemplete("求解", "闪电.png", "使用选定的求解处理程序对方针进行处理。", true);
        ui.pb_show_computer.tip = ui.pb_show_computer2.tip = getTipTemplete("求解", "闪电.png", "使用选定的求解处理程序对方针进行处理。", true);
        ui.pb_top_copy.tip = ui.pb_top_copy2.tip = getTipTemplete("复制", "复制2.png", "复制选定对象并自动将其插入到当前轮廓位置。", true);
        ui.pb_top_copy_down.tip = ui.pb_top_copy_down2.tip = getTipTemplete("复制", "复制2.png", "复制选定对象并自动将其插入到当前轮廓位置。", true);
        ui.pb_top_cut.tip = getTipTemplete("剪切", "剪切.png", "从大纲中删除对象并将其储存在剪贴板中。", true);
        ui.pb_top_pause.tip = getTipTemplete("粘贴", "粘贴.png", "将剪贴板中包含的对象添加到轮廓中。", true);
        ui.pb_top_search.tip = ui.pb_top_search2.tip = getTipTemplete("找出(F3)", "找出.png", "突出显示模型树中名称与搜索标准必配的对象。", true);
        ui.pb_top_copylite.tip = getTipTemplete("复制", "复制.png", "复制选定对象并将其储存在剪贴板中。", true);
        ui.pb_top_delete.tip = ui.pb_top_delete2.tip = getTipTemplete("删除", "删除.png", "该选项将删除选定的Outline对象。", true);
        ui.pb_show_model.tip = getTipTemplete("模型树", "模型树.png", "选择该选项，将显示一个下拉菜单，其中包含展开或折叠大纲中分析环境(仅限)的选项。", true);
        ui.pb_show_model_down.tip = getTipTemplete("模型树", "模型树.png", "选择该选项，将显示一个下拉菜单，其中包含展开或折叠大纲中分析环境(仅限)的选项。", true);
        ui.combo_comp.tip = getTipTemplete("模型树", "模型树.png", "选择该选项，将显示一个下拉菜单，其中包含展开或折叠大纲中分析环境(仅限)的选项。", true);

        ui.pb_analysis.tip = ui.pb_analysis2.tip =
                getTipTemplete("分析", "分析.png", "打开菜单并选择要添加到方针的分析，该应用能自动开展所有适当的\"Workbench项目\"页面配置", true);
        ui.pb_show_analysis.tip = ui.pb_show_analysis2.tip =
                getTipTemplete("分析", "分析.png", "打开菜单并选择要添加到方针的分析，该应用能自动开展所有适当的\"Workbench项目\"页面配置", true);
        ui.pb_top_name.tip = ui.pb_top_name2.tip =
                getTipTemplete("命名选择", "命名选项.png", '插入"命名选项"对象，一边对几何结构或网格剖分实体的分组进行定义。', true);
        ui.pb_top_remote.tip = ui.pb_top_remote2.tip =
                getTipTemplete("远程点", "远程点.png", '插入"远程点"对象，并将其定义为远程边界条件的范围选项', true);
        ui.pb_top_talk.tip = ui.pb_top_talk2.tip =
                getTipTemplete("评论", "评论.png", '在受支持的对象下插入"评论"对象。使用评论编辑器，在“报告预览”功能中输入该应用能够显示的所需评论', true);
        ui.pb_top_img.tip = ui.pb_top_img2.tip =
                getTipTemplete("图像", "图像.png", '显示选项的下拉菜单，以插入或保存几何结构的静态图像以及上传现有的图像。插入的图像成为当前选定对象的子对象。图像显示在“报告预览”功能中。', true);
        ui.pb_top_notes.tip = ui.pb_top_notes2.tip =
                getTipTemplete("注释", "注释.png", '向模型添加注释。注释时显示在模型上的标签，可以是选定坐标位置的备注或特定结果值。', true);
        ui.pb_top_coordinate.tip = ui.pb_top_coordinate2.tip =
                getTipTemplete("坐标系", "坐标系.png", '插入"坐标系"对象，以创建独特的局部坐标系，用于弹簧、连接副、载荷和结果等特性', true);
        ui.pb_top_cmd.tip = ui.pb_top_cmd2.tip =
                getTipTemplete("命令", "命令.png", '插入"命令"对象，以便在Mechanical应用中执行Mechanical APDL、刚体动力学或显式动力学求解器命令。', true);
        ui.pb_top_chart.tip = ui.pb_top_chart2.tip =
                getTipTemplete("图表", "图表.png", '插入"图表"对象，以创建载荷和结果数据（相对于事件、彼此等等）图。选择对象，在此选择之前进行绘图，以自动限定图标的范围', true);
        ui.pb_top_section.tip = ui.pb_top_section2.tip =
                getTipTemplete("截面", "截面.png", '启动"截面"工具和窗口。该工具可用于对模型进行切片，已查看其内部几何结构、网格和/或结果显示。', true);

        ui.pb_show_0.tip = getTipTemplete("等距", "等距.png", "选择该选项。可将几何模型窗口中的模型重新定向到应用默认的等距视图中。", true);
        ui.pb_show_1.tip = getTipTemplete("查看", "查看.png", "将模型置于当前选定面或平面的中心。", true);
        ui.pb_show_2.tip = getTipTemplete("浏览", "浏览.png", "重新定位模型视图", true);
        ui.pb_show_3.tip = getTipTemplete("上一个", "上一个.png", "滚动所提供的视图。", true);
        ui.pb_show_4.tip = getTipTemplete("下一个", "下一个.png", "滚动所提供的视图。", true);
        ui.pb_show_5.tip = getTipTemplete("角度", "", "TBD", true);
        ui.pb_show_6.tip = getTipTemplete("旋转 +Sx", "旋转X+.png", "围绕屏幕X轴逆时针旋转模型（向右）", true);
        ui.pb_show_7.tip = getTipTemplete("旋转 +Sy", "旋转Y+.png", "围绕屏幕Y轴逆时针旋转模型（向上）", true);
        ui.pb_show_8.tip = getTipTemplete("旋转 +Sz", "旋转Z+.png", "围绕屏幕Z轴逆时针旋转模型（向外）", true);
        ui.pb_show_9.tip = getTipTemplete("旋转 -Sx", "旋转X-.png", "围绕屏幕X轴顺时针旋转模型（向左）", true);
        ui.pb_show_10.tip = getTipTemplete("旋转 -Sy", "旋转Y-.png", "围绕屏幕Y轴逆时针旋转模型（向下）", true);
        ui.pb_show_11.tip = getTipTemplete("旋转 -Sz", "旋转Z-.png", "围绕屏幕Z轴逆时针旋转模型（向内）", true);
        ui.pb_show_12.tip = getTipTemplete("向上平移", "向上平移.png", "上移模型位置", true);
        ui.pb_show_13.tip = getTipTemplete("向左平移", "向左平移.png", "左移模型位置", true);
        ui.pb_show_14.tip = getTipTemplete("放大", "放大.png", "放大模型", true);
        ui.pb_show_15.tip = getTipTemplete("向下平移", "向下平移.png", "下移模型位置", true);
        ui.pb_show_16.tip = getTipTemplete("向右平移", "向右平移.png", "右移模型位置", true);
        ui.pb_show_17.tip = getTipTemplete("缩小", "缩小.png", "缩小模型", true);
        ui.pb_show_18.tip = getTipTemplete("随机", "随机.png", "选择该选项，可更改所选负载、支撑、命名选择和触电的颜色。选择属性名称，以从其范围将当前选择删除。应用随机为每个选项选择一种新的颜色。", true);
        ui.pb_show_19.tip = getTipTemplete("重新调整", "重新调整.png", "在放大或缩小模型后，重新调整注释符号的大小，如载荷方向箭头。", true);
        ui.pb_show_20.tip = getTipTemplete("偏好", "偏好.png", "显示\"注释首选项\"对话框。该对话框能提供多种选择，以自定义显示哪些注释。", true);
        ui.pb_show_21.tip = getTipTemplete("显示", "涂色面边.png", "在模型显示选项之间切换", true);
        ui.pb_show_22.tip = getTipTemplete("显示", "涂色面边.png", "在模型显示选项之间切换", true);
        ui.pb_show_23.tip = getTipTemplete("显示网格", "显示网格.png", "显示模型的网格。如果出现颜色不规则，请尝试使用线框显示。", true);
        ui.pb_show_24.tip = getTipTemplete("厚壳和梁", "梁.png", "选择旺哥或结果对象时，会显示壳和梁的厚度。", true);
        ui.pb_show_25.tip = getTipTemplete("横截面", "横截面.png", "显示具有固体横截面的梁几何结构。", true);
        ui.pb_show_26.tip = getTipTemplete("显示风格", "方块.png", "打开集合结构着色选项的下拉菜单。", true);
        ui.pb_show_27.tip = getTipTemplete("显示风格", "方块.png", "打开集合结构着色选项的下拉菜单。", true);
}

//////////////////////////////////////////////////////////////////////////
// Utils Functions.
// 6c165ad6-ef3e-11ea-987c-b761a131c2fe

//按钮提示文的模板
function getTipTemplete(title, icon, detail, help = true) {
        var res = "<div style='padding:5px'><div style='font-weight:900;margin:5px 0;font-size:14px'>" + title + "</div><table><tbody><tr><td>";
        if (icon != "") {
                res += "<img src='" + PICTURE_PATH + icon + "'/>";
        }
        res += "</td><td></td><td><span>" + detail + "</span></td></tr></tbody></table>";
        if (help) {
                res += "<hr/>";
                res += "<table><tbody><tr><td><img src='" + PICTURE_PATH + "info.png'/></td><td></td><td>";
                res += "<span style='font-weight:900'>按下F1，获取帮助<span></td></tr></tbody></table>";
        }
        return res;
}

//批量设置只读属性
function setReadOnly(cols) {
        cols.forEach((col) => {
                ui.prop.readOnly = [col, 1, true];
                ui.prop.color = [col, 1, "#E6E6E6"];
        });
}

//根据行的index获取对象的key
function objIndexKey(obj, index) {
        var now = 0;
        for (var i in obj) {
                if (index == now) {return i;}
                now++;
        }
}

//将对象的属性转换为表格的键值对数组
function obj2table(obj) {
        var out = [
                ["属性", "值"]
        ];
        for (var i in obj) {
                out.push([i, obj[i]]);
        }
        return out;
}

/*Usage of BLOCK_EVENT
        BLOCK_EVENT(()=>{
                ui.[name].[var] = ...;
        });
*/

function BLOCK_EVENT(cb) {
        ui.block_event = true;

        cb();

        ui.block_event = false;
}
