Пример #1
0
        private void btn_gen_mesh_Click(object sender, EventArgs e)
        {
            Materials.Materials materials = new Materials.Materials();

            double c = ReadDataFromWND.readDoubleFromTB(tb_c);
            double lambda = ReadDataFromWND.readDoubleFromTB(tb_lambda);
            double ro = ReadDataFromWND.readDoubleFromTB(tb_ro);
            double E = ReadDataFromWND.readDoubleFromTB(tb_e);
            double my = ReadDataFromWND.readDoubleFromTB(tb_my);

            Material material1 = new Material(E, my, ro, lambda, c);
            materials.Add(0, material1);

            c = ReadDataFromWND.readDoubleFromTB(tb_c2);
            lambda = ReadDataFromWND.readDoubleFromTB(tb_lambda2);
            ro = ReadDataFromWND.readDoubleFromTB(tb_ro2);
            E = ReadDataFromWND.readDoubleFromTB(tb_e2);
            my = ReadDataFromWND.readDoubleFromTB(tb_my2);

            Material material2 = new Material(E, my, ro, lambda, c);
            materials.Add(1, material2);

            mesh = new Mesh(materials);
            //mesh.MeshRectangle(shaft, readIntFromTB(tb_nodesOX), readIntFromTB(tb_nodesOY));
            //mesh.MeshPlate(box, ReadDataFromWND.readIntFromTB(tb_nodesOX), ReadDataFromWND.readIntFromTB(tb_nodesOY), ReadDataFromWND.readIntFromTB(tb_nodesOZ));
            mesh.MeshPlate(box, ReadDataFromWND.readIntFromTB(tb_nodesOX), ReadDataFromWND.readIntFromTB(tb_nodesOY), ReadDataFromWND.readIntFromTB(tb_nodesOZ), ReadDataFromWND.readDoubleFromTB(tb_sHeightOwner));

            meshOK = true;
            Render();
        }
Пример #2
0
 public Mesh(Materials.Materials materials)
 {
     this.materials = materials;
 }