예제 #1
0
        private void Set_Auto_Serial()
        {
            double dd = 0.0;

            try
            {
                if (dgv_loads.RowCount > 1)
                {
                    for (int i = 0; i < dgv_loads.RowCount - 1; i++)
                    {
                        if (i == 0)
                        {
                            dgv_loads[2, 0].ReadOnly        = true;
                            dgv_loads[2, 0].Style.BackColor = Color.DarkKhaki;
                            dgv_loads[2, 0].Value           = "";
                        }
                        else
                        {
                            dgv_loads[2, i].ReadOnly        = false;
                            dgv_loads[2, i].Style.BackColor = Color.White;
                            //dgv_loads[2, i].Value = "";
                        }
                        dgv_loads[0, i].Value = (i + 1);
                        dd += MyStrings.StringToDouble(dgv_loads[2, i].Value.ToString(), 0.0);
                    }
                    txt_load_distance.Text = dd.ToString("f3");
                }
            }
            catch (Exception ex) { }
        }
예제 #2
0
        private void SetValues()
        {
            try
            {
                slb02.D1        = MyStrings.StringToDouble(txt_d1.Text, 0);
                slb02.D2        = MyStrings.StringToDouble(txt_d2.Text, 0);
                slb02.Ads       = MyStrings.StringToDouble(txt_Ads.Text, 0);
                slb02.Alpha     = MyStrings.StringToDouble(txt_alpha.Text, 0);
                slb02.B         = MyStrings.StringToDouble(txt_B.Text, 0);
                slb02.Beta      = MyStrings.StringToDouble(txt_beta.Text, 0);
                slb02.Delta     = MyStrings.StringToDouble(txt_delta.Text, 0);
                slb02.Gamma     = MyStrings.StringToDouble(txt_gamma.Text, 0);
                slb02.H1        = MyStrings.StringToDouble(txt_h1.Text, 0);
                slb02.H2        = MyStrings.StringToDouble(txt_h2.Text, 0);
                slb02.L         = MyStrings.StringToDouble(txt_L.Text, 0);
                slb02.Lamda     = MyStrings.StringToDouble(txt_lamda.Text, 0);
                slb02.LL        = MyStrings.StringToDouble(txt_LL.Text, 0);
                slb02.Sigma_ck  = MyStrings.StringToDouble(txt_sigma_ck.Text, 0);
                slb02.Sigma_y   = MyStrings.StringToDouble(txt_sigma_y.Text, 0);
                slb02.Tc        = MyStrings.StringToDouble(txt_Tc.Text, 0);
                slb02.Slab_Load = MyStrings.StringToDouble(txt_slab_load.Text, 0);

                slb02.CalculateMethod();
            }
            catch (Exception ex) { }
        }
예제 #3
0
        private void btn_get_beams_Click(object sender, EventArgs e)
        {
            double d = MyStrings.StringToDouble(cmb_flr_lvl.Text, 0.0);

            Draw_Floor_Layout(d);
            //Get_Beams();
            panel1.Visible = true;
        }
예제 #4
0
        private void btn_mload_add_Click(object sender, EventArgs e)
        {
            string kStr = "";

            kStr = txt_mnos_uni.Text.Replace(',', ' ');


            kStr = kStr + " " + cmb_mload_type.Text;
            kStr = kStr + " " + cmb_mload_dir.Text;

            double dval = 0.0;

            dval = MyStrings.StringToDouble(txt_mload_val.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " " + dval.ToString("f3");
            }
            dval = MyStrings.StringToDouble(txt_mload_d1.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " " + dval.ToString("f3");
            }
            dval = MyStrings.StringToDouble(txt_mload_d2.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " " + dval.ToString("f3");
            }


            ASTRA_Data.Add(kStr);


            if (Node != null)
            {
                if (btn_mload_add.Text == "Change")
                {
                    Node.Text = kStr;
                    this.Close();
                }
                else
                {
                    Node.Nodes.Add(kStr);
                    //Node.Expand();
                    Node.ExpandAll();
                }
            }
            else
            {
                this.Close();
            }
        }
예제 #5
0
        public void InitializeData()
        {
            #region USER DATA INPUT
            try
            {
                HFL = MyStrings.StringToDouble(txt_HFL.Text, 0.0);
                LWL = MyStrings.StringToDouble(txt_LWL.Text, 0.0);
                LBL = MyStrings.StringToDouble(txt_LBL.Text, 0.0);
                SDO = MyStrings.StringToDouble(txt_SDO.Text, 0.0);
                V1  = MyStrings.StringToDouble(txt_V1.Text, 0.0);
                S   = MyStrings.StringToDouble(txt_S.Text, 0.0);
                n   = MyStrings.StringToDouble(txt_n.Text, 0.0);
                F1  = MyStrings.StringToDouble(txt_F1.Text, 0.0);
                L   = MyStrings.StringToDouble(txt_L.Text, 0.0);
                Ksb = MyStrings.StringToDouble(txt_Ksb.Text, 0.0);
                F2  = MyStrings.StringToDouble(txt_F2.Text, 0.0);
                lst_dist.Clear();
                lst_reduce_lvl.Clear();

                double d = 0d;
                for (int i = 0; i < dgvRiver.RowCount - 1; i++)
                {
                    if (dgvRiver[1, i].Value != null &&
                        double.TryParse(dgvRiver[1, i].Value.ToString(), out d))
                    {
                        lst_dist.Add(d);
                    }

                    if (dgvRiver[2, i].Value != null &&
                        double.TryParse(dgvRiver[2, i].Value.ToString(), out d))
                    {
                        lst_reduce_lvl.Add(d);
                    }
                }

                HR_COL = new HR_Table_Collection(HFL, lst_dist[0], lst_reduce_lvl[0]);

                for (int i = 1; i < lst_dist.Count; i++)
                {
                    HR_COL.Add(lst_dist[i], lst_reduce_lvl[i]);
                }
                A = HR_COL.A;
                P = HR_COL.P;
            }
            catch (Exception ex)
            {
                MessageBox.Show("ERROR! Read from user input. \n" + ex.ToString());
            }

            #endregion
        }
예제 #6
0
        private void btn_lload_add_Click(object sender, EventArgs e)
        {
            string kStr = "";

            kStr = txt_mnos_lin.Text.Replace(',', ' ');


            kStr = kStr + " LIN ";
            kStr = kStr + " " + cmb_lload_dir.Text;

            double dval = 0.0;

            dval = MyStrings.StringToDouble(txt_lload_start.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " " + dval.ToString("f3");
            }
            dval = MyStrings.StringToDouble(txt_lload_end.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " " + dval.ToString("f3");
            }

            if (ASTRA_Data.Contains(kStr))
            {
                ASTRA_Data.Remove(kStr);
            }


            ASTRA_Data.Add(kStr);

            if (btn_lload_add.Text == "Change")
            {
                Node.Text = kStr;
                this.Close();
            }
            else
            {
                if (Node != null)
                {
                    Node.Nodes.Add(kStr);
                    //Node.Expand();
                    Node.ExpandAll();
                }
                else
                {
                    this.Close();
                }
            }
        }
예제 #7
0
 private void btn_add_Click(object sender, EventArgs e)
 {
     LDC.LoadNo = MyStrings.StringToInt(txt_load_no.Text, 0);
     LDC.Name   = txt_load_name.Text;
     LDC.LoadCases.Clear();
     LDC.Factors.Clear();
     for (int i = 0; i < dgv_combinations.RowCount; i++)
     {
         LDC.LoadCases.Add(MyStrings.StringToInt(dgv_combinations[0, i].Value.ToString().ToUpper().Replace("LOAD CASE ", ""), 0));
         LDC.Factors.Add(MyStrings.StringToDouble(dgv_combinations[1, i].Value.ToString(), 0));
     }
     LDC.Set_Combination();
     this.Close();
 }
예제 #8
0
        private void btn_add_Click(object sender, EventArgs e)
        {
            LLD = new LiveLoad();

            MyStrings mlist = new MyStrings(cmb_Ana_load_type.Text, ':');

            LLD.Type          = MyStrings.StringToInt(mlist.StringList[0].Replace("TYPE ", ""), 0);
            LLD.X_Distance    = MyStrings.StringToDouble(txt_Ana_X.Text, 0.0);
            LLD.Y_Distance    = MyStrings.StringToDouble(txt_Ana_DL_Y.Text, 0.0);
            LLD.Z_Distance    = MyStrings.StringToDouble(txt_Ana_DL_Z.Text, 0.0);
            LLD.X_Increment   = MyStrings.StringToDouble(txt_XINCR.Text, 0.0);
            LLD.Impact_Factor = MyStrings.StringToDouble(txt_Load_Impact.Text, 1.0);

            this.Close();
        }
예제 #9
0
        public void Draw_Joints()
        {
            //Clear_All();
            ASTRADoc astdoc;

            //astdoc = new ASTRADoc(iACad.AstraDocument);
            astdoc = (iACad.AstraDocument);


            astdoc.Joints.Clear();

            for (int i = 0; i < DGV.Rows.Count; i++)
            {
                JointCoordinate jn = new JointCoordinate();
                DGV[0, i].Value = i + 1;

                //jn.NodeNo = MyList.StringToInt(DGV[0, i].Value.ToString(), 0);
                jn.NodeNo  = MyStrings.StringToInt(DGV[0, i].Value.ToString(), 0);
                jn.Point.x = MyStrings.StringToDouble(DGV[1, i].Value.ToString(), 0.0);
                jn.Point.y = MyStrings.StringToDouble(DGV[2, i].Value.ToString(), 0.0);
                jn.Point.z = MyStrings.StringToDouble(DGV[3, i].Value.ToString(), 0.0);
                astdoc.Joints.Add(jn);
            }
            //iACad.Document.ActiveLayOut.Entities.EraseAll();

            foreach (var item in iACad.Document.ActionLayout.Entities)
            {
                if (item is vdFigure)
                {
                    vdFigure vf = item as vdFigure;
                    if (vf.Layer.Name == "Nodes")
                    {
                        vf.Deleted = true;
                    }
                }
            }
            iACad.Document.Redraw(true);

            astdoc.Joints.DrawJointsText(iACad.Document, 0.3);

            //iACad.AstraDocument = astdoc;

            //AST_DOC.Members.DrawMember(VDoc);
            //AST_DOC.Elements.DrawElements(VDoc);
            //AST_DOC.Supports.DrawSupport(VDoc);
        }
예제 #10
0
        private void btn_new_Click(object sender, EventArgs e)
        {
            string txt_loads     = "";
            string txt_distances = "";

            for (int i = 0; i < dgv_loads.RowCount - 1; i++)
            {
                txt_loads     += dgv_loads[1, i].Value + " ";
                txt_distances += dgv_loads[2, i].Value + " ";
            }

            MLD           = new MovingLoadData();
            MLD.Type      = MyStrings.StringToInt(txt_type.Text, 0);
            MLD.Name      = txt_lm.Text;
            MLD.Loads     = txt_loads;
            MLD.Distances = txt_distances;
            MLD.LoadWidth = MyStrings.StringToDouble(txt_load_width.Text, 0);
            //Load
            this.Close();
        }
예제 #11
0
        private void btn_aload_Click(object sender, EventArgs e)
        {
            string kStr = "";

            kStr = txt_mnos.Text.Replace(',', ' ');


            kStr = kStr + " PRESSURE ";

            double dval = 0.0;

            dval = MyStrings.StringToDouble(txt_aload_val.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " " + dval.ToString("f3");
            }
            else
            {
                return;
            }

            ASTRA_Data.Add(kStr);

            if (Node != null)
            {
                if (btn_aload_add.Text == "Change")
                {
                    Node.Text = kStr;
                    this.Close();
                }
                else
                {
                    Node.Nodes.Add(kStr);
                    Node.ExpandAll();
                }
            }
            else
            {
                this.Close();
            }
        }
예제 #12
0
        private void btn_jload_add_Click(object sender, EventArgs e)
        {
            string kStr = "";

            kStr = txt_joint_number.Text.Replace(',', ' ');

            double dval = 0.0;

            dval = MyStrings.StringToDouble(txt_init_temp.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " TEMP " + dval.ToString("f3");
            }
            dval = MyStrings.StringToDouble(txt_final_temp.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " " + dval.ToString("f3");
            }


            ASTRA_Data.Add(kStr);

            if (Node != null)
            {
                if (btn_jload_add.Text == "Change")
                {
                    Node.Text = kStr;
                    this.Close();
                }
                else
                {
                    Node.Nodes.Add(kStr);
                    Node.ExpandAll();
                }
            }
            else
            {
                this.Close();
            }
        }
예제 #13
0
        public void setArea()
        {
            if (rbtn_dimension.Checked)
            {
                double b, d, ix, iy, iz, area, id, od;
                area = b = d = ix = iy = iz = id = od = 0;

                b = MyStrings.StringToDouble(txt_YD.Text, 0.0);
                d = MyStrings.StringToDouble(txt_ZD.Text, 0.0);

                id = 0.0d;
                od = 0.0d;

                if (b != 0.0 && d != 0.0)
                {
                    area = b * d;
                    ix   = (b * d * d * d) / 12;
                    iy   = (d * b * b * b) / 12;
                    iz   = ix + iy;
                }
                else
                {
                    area = (((Math.PI * od * od) / 4) - ((Math.PI * id * id) / 4));
                    ix   = ((Math.PI / 64) * ((od * od * od * od) - (id * id * id * id)));
                    iy   = ix;
                    iz   = ix + iy;
                }
                //txt_AX.Text = area.ToString("0.000");
                //txt_IX.Text = ix.ToString("0.000");
                //txt_IY.Text = iy.ToString("0.000");
                //txt_IZ.Text = iz.ToString("0.000");

                //txt_AX.Text = area.ToString("0.000");
                //txt_IX.Text = ix.ToString("0.000");
                //txt_IY.Text = iy.ToString("0.000");
                //txt_IZ.Text = iz.ToString("0.000");
            }
        }
예제 #14
0
 private void txt_pri_inc_TextChanged(object sender, EventArgs e)
 {
     txt_ele_inc.Text = (MyStrings.StringToDouble(txt_pri_inc.Text, 0.0) * 5).ToString("0.00");
     txt_sec_inc.Text = (MyStrings.StringToDouble(txt_pri_inc.Text, 0.0) * 5).ToString("0.00");
 }
예제 #15
0
        public void Add_Structure_Joint_Load()
        {
            MemberIncidenceCollection all_beams = new MemberIncidenceCollection();
            List <double>             floors    = new List <double>();

            if (iACad.AstraDocument.Members.Count > 0)
            {
                foreach (var item in iACad.AstraDocument.Members)
                {
                    if (item.StartNode.Y == item.EndNode.Y)
                    {
                        all_beams.Add(item);
                        if (!floors.Contains(item.EndNode.Y))
                        {
                            floors.Add(item.EndNode.Y);
                        }
                    }
                }
            }
            List <JointWeight> JointWeights = new List <JointWeight>();

            List <int> joints = new List <int>();

            floors.Sort();
            double wght = 0.0;
            int    indx = 0;

            double factor       = MyStrings.StringToDouble(txt_factor.Text, 0.8);
            double unit_wt_wall = MyStrings.StringToDouble(txt_wall_uwgt.Text, 0.8);

            foreach (var item in all_beams)
            {
                JointWeight jw = new JointWeight();
                jw.JointNo = item.StartNode.NodeNo;
                indx       = floors.IndexOf(item.StartNode.Y);

                wght = 0.0;
                //double unit_wt_wall = 19.2;
                if (indx != -1)
                {
                    if (indx + 1 < floors.Count)
                    {
                        if (item.Property == null)
                        {
                            MessageBox.Show("Member Property is not defined for Member No "
                                            + item.MemberNo, "ASTRA", MessageBoxButtons.OK);
                            return;
                        }
                        else
                        {
                            wght = item.Property.YD * item.Length * (floors[indx + 1] - floors[indx]) * unit_wt_wall;
                        }
                    }
                    //wght = item.Property.ZD * item.Length * (floors[indx + 1] - floors[indx]) * 24.0;
                }



                if (wght != 0.0)
                {
                    wght       = wght * factor;
                    jw         = new JointWeight();
                    jw.JointNo = item.StartNode.NodeNo;
                    jw.Weight  = wght / 2;
                    JointWeights.Add(jw);



                    if (!joints.Contains(jw.JointNo))
                    {
                        joints.Add(jw.JointNo);
                    }

                    jw         = new JointWeight();
                    jw.JointNo = item.EndNode.NodeNo;
                    jw.Weight  = wght / 2;
                    JointWeights.Add(jw);


                    if (!joints.Contains(jw.JointNo))
                    {
                        joints.Add(jw.JointNo);
                    }
                }
            }

            //List<JointWeight> FinalWeights = new List<JointWeight>();
            JointWeight jwt = null;


            jwt = null;

            dgv_str_jnt_wgt.Rows.Clear();
            for (int j = 0; j < joints.Count; j++)
            {
                jwt = new JointWeight(joints[j], 0.0);
                //FinalWeights.Add(jwt);
                for (int i = 0; i < JointWeights.Count; i++)
                {
                    if (jwt.JointNo == JointWeights[i].JointNo)
                    {
                        jwt.Weight += JointWeights[i].Weight;
                    }
                }
                dgv_str_jnt_wgt.Rows.Add(jwt.JointNo, jwt.Weight.ToString("f3"));
                //Node.Nodes.Add(jwt.ToString());
                ASTRA_Data.Add(jwt.ToString());
            }

            txt_joint_number.Text = "";
            //FinalWeights.Add(jwt);

            //Node.Nodes.Add(jwt.ToString());
        }
예제 #16
0
        private void btn_jload_add_Click(object sender, EventArgs e)
        {
            string kStr = "";

            kStr = txt_joint_number.Text.Replace(',', ' ');

            double dval = 0.0;

            dval = MyStrings.StringToDouble(txt_fy.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr.Trim() + " WEIGHT " + dval.ToString("f3").Trim();
            }

            if (kStr != "")
            {
                ASTRA_Data.Add(kStr);
            }

            if (Node != null)
            {
                if (btn_jload_add.Text == "Change")
                {
                    Node.Text = kStr;
                    this.Close();
                }
                else
                {
                    if (kStr == "")
                    {
                        Node.Nodes.Clear();
                        ASTRA_Data.Clear();
                        if (dgv_str_jnt_wgt.Rows.Count > 1)
                        {
                            for (int i = 0; i < dgv_str_jnt_wgt.Rows.Count - 1; i++)
                            {
                                kStr = dgv_str_jnt_wgt[0, i].Value.ToString() +
                                       " WEIGHT " + dgv_str_jnt_wgt[1, i].Value.ToString();

                                ASTRA_Data.Add(kStr);
                            }
                            foreach (var item in ASTRA_Data)
                            {
                                Node.Nodes.Add(item);
                            }
                        }
                    }
                    else
                    {
                        Node.Nodes.Add(kStr);
                    }

                    //Node.Nodes.Add(kStr);
                    Node.ExpandAll();
                }
            }
            else
            {
                this.Close();
            }
        }
예제 #17
0
        public void RunThread()
        {
            Design_Summary = new List <string>();
            List <string> BOQ_Summary = new List <string>();

            List <string> list = new List <string>();

            #region TechSOFT Banner
            list.Add("");
            list.Add("");
            list.Add("\t\t**********************************************");
            list.Add("\t\t*          ASTRA Pro Release 18.0            *");
            list.Add("\t\t*      TechSOFT Engineering Services         *");
            list.Add("\t\t*                                            *");
            list.Add("\t\t*       DESIGN OF RCC FLANGED BEAM           *");
            list.Add("\t\t*                                            *");
            list.Add("\t\t**********************************************");
            list.Add("\t\t----------------------------------------------");
            list.Add("\t\tTHIS RESULT CREATED ON " + System.DateTime.Now.ToString("dd.MM.yyyy  AT HH:mm:ss") + " ");
            list.Add("\t\t----------------------------------------------");
            list.Add("");
            list.Add("");

            #endregion


            list.Add(string.Format(""));
            list.Add(string.Format(""));
            list.Add(string.Format("(Design Standard : BS 8110 / IS 456)"));
            list.Add(string.Format(""));

            int c    = 0;
            int step = 1;

            MovingLoadAnalysis.frm_ProgressBar.ON("Member Analysis....");
            for (int i = 0; i < dgv_beams.RowCount; i++)
            {
                MovingLoadAnalysis.frm_ProgressBar.SetValue(i, dgv_beams.RowCount);
                try
                {
                    c = 1;
                    BeamData bd = new BeamData();
                    bd.IsSelect = (bool)dgv_beams[c++, i].Value;
                    if (bd.IsSelect)
                    {
                        Set_Grid_Color(i);
                        c++;
                        bd.BeamNos = dgv_beams[c++, i].Value.ToString();
                        bd.Continuous_BeamMembers = dgv_beams[c++, i].Value.ToString();
                        bd.Breadth = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        bd.Depth   = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        bd.d1      = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        bd.d2      = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        bd.d3      = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        bd.d4      = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        //bd.d5 = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        //bd.d6 = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        beamDes.Shear_Bar_dia = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);


                        bd.AM1 = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        bd.AM2 = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        bd.AM3 = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        bd.AM4 = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        bd.AV1 = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        bd.AV2 = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);
                        bd.AV3 = MyStrings.StringToDouble(dgv_beams[c++, i].Value.ToString(), 0.0);

                        //All_Beam_Data.Add(bd);



                        beamDes.Beam_Title = bd.BeamNos;
                        beamDes.Beam_Nos   = bd.Continuous_BeamMembers;
                        beamDes.Bar_dia1   = bd.d1;
                        beamDes.Bar_dia2   = bd.d2;
                        beamDes.Bar_dia3   = bd.d3;
                        beamDes.Bar_dia4   = bd.d4;
                        //beamDes.Bar_dia5 = bd.d5;
                        //beamDes.Bar_dia6 = bd.d6;

                        beamDes.AM1 = bd.AM1;
                        beamDes.AM2 = bd.AM2;
                        beamDes.AM3 = bd.AM3;
                        beamDes.AM4 = bd.AM4;

                        beamDes.AV1 = bd.AV1;
                        beamDes.AV2 = bd.AV2;
                        beamDes.AV3 = bd.AV3;


                        beamDes.D  = bd.Depth * 1000;
                        beamDes.bw = bd.Breadth * 1000;


                        if (beamDes.BOQ == null)
                        {
                            beamDes.BOQ = new Beam_BOQ();
                        }

                        beamDes.BOQ.Section_B = bd.Breadth;
                        beamDes.BOQ.Section_D = bd.Depth;
                        beamDes.BOQ.Area      = bd.Depth * bd.Breadth;


                        //list.AddRange(beamDes.Design_Program_Loop(step++).ToArray());
                        list.AddRange(beamDes.Design_Program_Loop(i + 1).ToArray());


                        Design_Summary.Add(string.Format("-------------------------------------"));
                        Design_Summary.Add(string.Format("BEAM = {0}, FLOOR LEVEL = {1:f3} M", beamDes.Beam_Title, beamDes.BOQ.Floor_ELevation));
                        Design_Summary.Add(string.Format("CONTINUOUS MEMBERS = {0}", beamDes.Beam_Nos));
                        Design_Summary.AddRange(beamDes.Design_Summary.ToArray());
                        Design_Summary.Add(string.Format("-------------------------------------"));



                        BOQ_Summary.Add(string.Format("-------------------------------------"));
                        BOQ_Summary.Add(string.Format("BEAM = {0}, FLOOR LEVEL = {1:f3} M", beamDes.Beam_Title, beamDes.BOQ.Floor_ELevation));
                        BOQ_Summary.Add(string.Format("CONTINUOUS MEMBERS = {0}", beamDes.Beam_Nos));
                        BOQ_Summary.AddRange(beamDes.BOQ_Summary.ToArray());
                        BOQ_Summary.Add(string.Format("-------------------------------------"));



                        //beamDes.Calculate_Program_Loop();


                        dgv_beams[c++, i].Value = beamDes.IS_DESIGN_OK ? "OK" : "NOT OK";
                        Set_Grid_Color(i, true, beamDes.IS_DESIGN_OK);

                        Add_Beam_BOQ(beamDes.BOQ);
                    }
                    //else
                    //    Set_Grid_Color(i);
                }
                catch (Exception exx) { }
            }
            MovingLoadAnalysis.frm_ProgressBar.OFF();


            list.Add(string.Format(""));
            list.Add(string.Format("-------------------------------------"));
            list.Add(string.Format("TABLE 1 : PERMISSIBLE_SHEAR_STRESS"));
            list.Add(string.Format("-------------------------------------"));
            list.Add(string.Format(""));

            list.AddRange(Tables.Get_File_Permissible_Shear_Stress().ToArray());


            #region End of Report
            list.Add("");
            list.Add("---------------------------------------------------------------------------");
            list.Add("---------------------       END OF REPORT        --------------------------");
            list.Add("---------------------------------------------------------------------------");
            #endregion End of Report


            File.WriteAllLines(beamDes.Report_File, list.ToArray());

            string des_sum = Path.Combine(Path.GetDirectoryName(beamDes.Get_Report_File(1)), "BEAM_DESIGN_SUMMARY.TXT");
            File.WriteAllLines(des_sum, Design_Summary.ToArray());

            des_sum = Path.Combine(Path.GetDirectoryName(beamDes.Get_Report_File(1)), "BEAM_BOQ_SUMMARY.TXT");
            File.WriteAllLines(des_sum, BOQ_Summary.ToArray());
        }
예제 #18
0
        private void Select_Members()
        {
            double d = MyStrings.StringToDouble(cmb_flr_lvl.Text, 0.0);

            dgv_beams.Rows.Clear();
            cmb_sele_all.Checked = true;

            //for (int i = 0; i < AST_DOC.Members.Count; i++)
            //{
            //    var item = AST_DOC.Members[i];

            //    if (item.EndNode.Y == d && item.StartNode.Y == d)
            //    {
            //        dgv_beams.Rows.Add(true, item.MemberNo, "", item.Property.YD, item.Property.ZD);
            //    }
            //}

            List <MemberIncidence> list_mem   = new List <MemberIncidence>();
            List <int>             list_mem1  = new List <int>();
            List <List <int> >     list_conts = new List <List <int> >();

            for (int c = 0; c < cmb_flr_lvl.Items.Count; c++)
            {
                d = MyStrings.StringToDouble(cmb_flr_lvl.Items[c].ToString(), 0.0);

                for (int i = 0; i < AST_DOC.Members.Count; i++)
                {
                    var item = AST_DOC.Members[i];

                    if (item.EndNode.Y == d && item.StartNode.Y == d)
                    //if (item.EndNode.Y == item.StartNode.Y)
                    {
                        list_mem.Add(item);
                    }
                }
            }
            bool flag = false;

            MovingLoadAnalysis.frm_ProgressBar.On = false;
            MovingLoadAnalysis.frm_ProgressBar.ON("Reading continuous Beam Nos........");


            MemberIncidence mi     = null;
            int             count  = 1;
            double          last_Y = 0.0;

            double am1, am2, am3, am4, av1, av2, av3;

            am1 = am2 = am3 = am4 = av1 = av2 = av3 = 0.0;

            JointCoordinateCollection cont_jcc = new JointCoordinateCollection();
            int cnt = 1;

            for (int i = 0; i < list_mem.Count; i++)
            {
                MovingLoadAnalysis.frm_ProgressBar.SetValue(i, list_mem.Count);
                flag = false;
                foreach (var item in list_conts)
                {
                    if (item.Contains(list_mem[i].MemberNo))
                    {
                        flag = true;
                        break;
                    }
                }
                if (!flag)
                {
                    cont_jcc  = new JointCoordinateCollection();
                    list_mem1 = Get_Continuous_Beams(list_mem[i], ref cont_jcc);
                    list_conts.Add(list_mem1);


                    #region

                    var item = list_mem1;

                    mi = AST_DOC.Members.Get_Member(item[0]);
                    if (last_Y != mi.EndNode.Y)
                    {
                        count = 1;
                    }

                    beamDes.Get_All_Forces(cont_jcc, ref am1, ref am2, ref am3, ref am4, ref av1, ref av2, ref av3);

                    dgv_beams.Rows.Add(cnt++, true, mi.EndNode.Y.ToString("f4"), "B" + (count++),
                                       MyStrings.Get_Array_Text(item),
                                       mi.Property.YD, mi.Property.ZD,
                                       d1, d2, d3, d4,
                                       //d5, d6,
                                       beamDes.Shear_Bar_dia,
                                       am1.ToString("f3"),
                                       am2.ToString("f3"),
                                       am3.ToString("f3"),
                                       am4.ToString("f3"),
                                       av1.ToString("f3"),
                                       av2.ToString("f3"),
                                       av3.ToString("f3"),
                                       "");
                    last_Y = mi.EndNode.Y;
                    #endregion
                }
            }
            MovingLoadAnalysis.frm_ProgressBar.OFF();


            //MemberIncidence mi = null;
            //int count = 1;
            //double last_Y = 0.0;

            //double am1, am2, am3, am4, av1, av2, av3;

            //am1 = am2 = am3 = am4 = av1 = av2 = av3 = 0.0;


            //for (int i = 0; i < list_conts.Count; i++)
            //{
            //    var item = list_conts[i];

            //    mi = AST_DOC.Members.Get_Member(item[0]);
            //    if (last_Y != mi.EndNode.Y)
            //    {
            //        count = 1;
            //    }


            //    dgv_beams.Rows.Add(i+1, true, mi.EndNode.Y.ToString("f3"), "B" + (count++),
            //        MyStrings.Get_Array_Text(item),
            //        mi.Property.YD, mi.Property.ZD,
            //        d1, d2, d3, d4, d5, d6,
            //        beamDes.Shear_Bar_dia,
            //        am1.ToString("f3"),
            //        am2.ToString("f3"),
            //        am3.ToString("f3"),
            //        am4.ToString("f3"),
            //        av1.ToString("f3"),
            //        av2.ToString("f3"),
            //        av3.ToString("f3"),
            //         "");
            //    last_Y = mi.EndNode.Y;
            //}
        }
예제 #19
0
        public void RunThread()
        {
            List <string> list = new List <string>();

            #region TechSOFT Banner
            list.Add("");
            list.Add("");
            list.Add("\t\t**********************************************");
            list.Add("\t\t*          ASTRA Pro Release 18.0            *");
            list.Add("\t\t*      TechSOFT Engineering Services         *");
            list.Add("\t\t*                                            *");
            list.Add("\t\t*           DESIGN OF RCC COLUMN             *");
            list.Add("\t\t*                                            *");
            list.Add("\t\t**********************************************");
            list.Add("\t\t----------------------------------------------");
            list.Add("\t\tTHIS RESULT CREATED ON " + System.DateTime.Now.ToString("dd.MM.yyyy  AT HH:mm:ss") + " ");
            list.Add("\t\t----------------------------------------------");
            list.Add("");

            #endregion



            int c    = 0;
            int step = 1;


            string ColumnNos = "";

            Design_Summary = new List <string>();
            //int c = 0;
            for (int i = 0; i < dgv_columns.RowCount; i++)
            {
                try
                {
                    c = 0;
                    ColumnData cd = new ColumnData();
                    cd.IsSelect = (bool)dgv_columns[c++, i].Value;
                    if (cd.IsSelect)
                    {
                        Set_Grid_Color(i);

                        cd.ColumnNos = dgv_columns[c++, i].Value.ToString();
                        if (MessageBox.Show("Process Design Column " + cd.ColumnNos + " \n\nDo you want to continue ?", "ASTRA", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
                        {
                            break;
                        }
                        cd.Continuous_ColumnMembers = dgv_columns[c, i].Value.ToString(); c++;
                        cd.Breadth      = MyStrings.StringToDouble(dgv_columns[c, i].Value.ToString(), 0.0); c++;
                        cd.Depth        = MyStrings.StringToDouble(dgv_columns[c, i].Value.ToString(), 0.0); c++;
                        cd.Main_Bar_dia = MyStrings.StringToDouble(dgv_columns[c, i].Value.ToString(), 0.0); c++;
                        cd.Bar_Nos      = MyStrings.StringToDouble(dgv_columns[c, i].Value.ToString(), 0.0); c++;
                        cd.Tie_Bar_Dia  = MyStrings.StringToDouble(dgv_columns[c, i].Value.ToString(), 0.0); c++;
                        cd.Pu           = MyStrings.StringToDouble(dgv_columns[c, i].Value.ToString(), 0.0); c++;
                        cd.Mux          = MyStrings.StringToDouble(dgv_columns[c, i].Value.ToString(), 0.0); c++;
                        cd.Muy          = MyStrings.StringToDouble(dgv_columns[c, i].Value.ToString(), 0.0); c++;



                        //col_design.ColumnNos = All_Column_Data[i].Continuous_ColumnMembers;

                        col_design.Beam_Nos = cd.Continuous_ColumnMembers;
                        col_design.D        = cd.Depth * 1000;
                        col_design.b        = cd.Breadth * 1000;
                        col_design.bar_dia  = cd.Main_Bar_dia;
                        col_design.bar_nos  = cd.Bar_Nos;
                        col_design.tie_dia  = cd.Tie_Bar_Dia;
                        col_design.Pu       = cd.Pu;
                        col_design.Mux      = cd.Mux;
                        col_design.Muy      = cd.Muy;

                        //col_design.All_Column_Data.Clear();
                        col_design.Col_Data = cd;

                        if (Design_Summary == null)
                        {
                            Design_Summary = new List <string>();
                        }

                        Design_Summary.Add(string.Format(""));
                        list.AddRange(col_design.Design_Program_Loop(i + 1).ToArray());

                        Design_Summary.Add(string.Format("------------------------------------------------"));
                        Design_Summary.Add(string.Format("COLUMN = {0}", cd.ColumnNos));
                        Design_Summary.Add(string.Format("CONTINUOUS MEMBERS = {0}", cd.Continuous_ColumnMembers));
                        Design_Summary.AddRange(col_design.Design_Summary.ToArray());
                        Design_Summary.Add(string.Format("------------------------------------------------"));



                        Set_Grid_Color(i, true, col_design.IS_DESIGN_OK);

                        dgv_columns[c, i].Value = col_design.IS_DESIGN_OK ? " OK " : "NOT OK";

                        Add_Column_BOQ(col_design.BOQ);
                    }
                }
                catch (Exception exx) { }
            }



            #region End of Report
            list.Add("");
            list.Add("---------------------------------------------------------------------------");
            list.Add("---------------------       END OF REPORT        --------------------------");
            list.Add("---------------------------------------------------------------------------");
            #endregion End of Report

            Save_Data();

            File.WriteAllLines(col_design.Report_File, list.ToArray());


            string des_sum = Path.Combine(Path.GetDirectoryName(col_design.Get_Report_File(1)), "COLUMN_DESIGN_SUMMARY.TXT");
            File.WriteAllLines(des_sum, Design_Summary.ToArray());



            MessageBox.Show(this, "Report file created in file " + col_design.Report_File);

            frmASTRAReport fap = new frmASTRAReport(col_design.Report_File);
            fap.Owner = this;
            fap.ShowDialog();
        }
예제 #20
0
        public void Load_Floor_Levels()
        {
            if (DGV_Joints == null)
            {
                return;
            }

            BeamTable        = new Hashtable();
            AllColumn        = new List <int>();
            selected_beams   = new List <int>();
            selected_columns = new List <int>();


            List <double> flvls = new List <double>();

            double d = 0.0;
            //JointCoordinateCollection
            //MemberIncidenceCollection
            MemberIncidence mi = new MemberIncidence();
            //MemberIncidenceCollection mic = new MemberIncidenceCollection();
            JointCoordinate jc = new JointCoordinate();
            //JointCoordinateCollection jcc = new JointCoordinateCollection();


            List <int> selected_mems = MyStrings.Get_Array_Intiger(kStr);

            for (int i = 0; i < DGV_Joints.RowCount; i++)
            {
                jc = new JointCoordinate();

                jc.NodeNo = MyStrings.StringToInt(DGV_Joints[0, i].Value.ToString(), 0);
                jc.X      = MyStrings.StringToDouble(DGV_Joints[1, i].Value.ToString(), 0.0);
                jc.Y      = MyStrings.StringToDouble(DGV_Joints[2, i].Value.ToString(), 0.0);
                jc.Z      = MyStrings.StringToDouble(DGV_Joints[3, i].Value.ToString(), 0.0);
                jcc.Add(jc);
            }

            for (int i = 0; i < DGV_Members.RowCount; i++)
            {
                mi = new MemberIncidence();

                mi.MemberNo = MyStrings.StringToInt(DGV_Members[0, i].Value.ToString(), 0);
                //jc.X = MyStrings.StringToDouble(DGV_Members[1, i].Value.ToString(), 0.0);
                mi.StartNode.NodeNo = MyStrings.StringToInt(DGV_Members[2, i].Value.ToString(), 0);
                mi.EndNode.NodeNo   = MyStrings.StringToInt(DGV_Members[3, i].Value.ToString(), 0);
                mic.Add(mi);
            }

            mic.CopyJointCoordinates(jcc);
            foreach (var item in mic)
            {
                if (item.StartNode.Y == item.EndNode.Y)
                {
                    if (selected_mems.Contains(item.MemberNo))
                    {
                        selected_beams.Add(item.MemberNo);
                    }

                    d = item.StartNode.Y;
                    if (!flvls.Contains(d))
                    {
                        flvls.Add(d);
                        //cmb_floor_levels.Items.Add(d.ToString("f3"));
                    }
                }
                else if (item.StartNode.X == item.EndNode.X &&
                         item.StartNode.Z == item.EndNode.Z)
                {
                    if (selected_mems.Contains(item.MemberNo))
                    {
                        selected_columns.Add(item.MemberNo);
                    }

                    AllColumn.Add(item.MemberNo);
                }
            }


            flvls.Sort();
            List <int> mems      = new List <int>();
            List <int> all_beams = new List <int>();

            foreach (var lvl in flvls)
            {
                cmb_floor_levels.Items.Add(lvl.ToString("f3"));
                mems = new List <int>();
                foreach (var item in mic)
                {
                    if (item.StartNode.Y == item.EndNode.Y)
                    {
                        d = item.StartNode.Y;
                        if (lvl == d)
                        {
                            mems.Add(item.MemberNo);
                        }
                    }
                }
                BeamTable.Add(lvl.ToString("f3"), mems);

                all_beams.AddRange(mems.ToArray());
            }
            BeamTable.Add("all", all_beams);
        }
예제 #21
0
        public void RunThread()
        {
            List <string> list = new List <string>();

            #region TechSOFT Banner
            list.Add("");
            list.Add("");
            list.Add("\t\t**********************************************");
            list.Add("\t\t*          ASTRA Pro Release 18.0            *");
            list.Add("\t\t*      TechSOFT Engineering Services         *");
            list.Add("\t\t*                                            *");
            list.Add("\t\t*      DESIGN OF ISOLATED FOUNDATION         *");
            list.Add("\t\t*                                            *");
            list.Add("\t\t**********************************************");
            list.Add("\t\t----------------------------------------------");
            list.Add("\t\tTHIS RESULT CREATED ON " + System.DateTime.Now.ToString("dd.MM.yyyy  AT HH:mm:ss") + " ");
            list.Add("\t\t----------------------------------------------");
            list.Add("");

            #endregion



            int c    = 0;
            int step = 1;


            string ColumnNos = "";

            Design_Summary = new List <string>();
            //int c = 0;
            for (int i = 0; i < dgv_columns.RowCount; i++)
            {
                try
                {
                    c = 1;
                    ColumnData cd = new ColumnData();
                    cd.IsSelect = (bool)dgv_columns[c++, i].Value;
                    if (cd.IsSelect)
                    {
                        Set_Grid_Color(i, false, Foot_Des.IS_DESIGN_OK);

                        Foot_Des.ColumnNo = dgv_columns[c++, i].Value.ToString(); c++;
                        //Foot_Des.Continuous_ColumnMembers = dgv_columns[c++, i].Value.ToString();
                        Foot_Des.C1 = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Foot_Des.C2 = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);

                        Foot_Des.l = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Foot_Des.b = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);

                        Foot_Des.P1 = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Foot_Des.P2 = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Foot_Des.ph = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);

                        Foot_Des.bar_dia = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Foot_Des.P       = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Foot_Des.Mx      = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);

                        //Foot_Des.Mx = MyStrings.StringToDouble(dgv_columns[c, i].Value.ToString(), 0.0);

                        list.AddRange(Foot_Des.Design_Program_Loop(i + 1).ToArray());
                        Design_Summary.Add(string.Format("------------------------------------------------"));
                        //Design_Summary.Add(string.Format("FOUNDATION = {0}, ELEVATION = {1} M", Foot_Des.F));
                        Design_Summary.Add(string.Format("FOUNDATION = {0}", Foot_Des.ColumnNo));
                        //Design_Summary.Add(string.Format("CONTINUOUS MEMBERS = {0}", cd.Continuous_ColumnMembers));
                        Design_Summary.AddRange(Foot_Des.Design_Summary.ToArray());
                        Design_Summary.Add(string.Format("------------------------------------------------"));


                        #region End of Report
                        list.Add("");
                        #endregion End of Report

                        dgv_columns[c, i].Value = Foot_Des.IS_DESIGN_OK ? " OK" : "NOT OK";
                        Set_Grid_Color(i, true, Foot_Des.IS_DESIGN_OK);

                        Add_Foundation_BOQ(Foot_Des.BOQ);
                    }
                }
                catch (Exception exx) { }
            }



            #region End of Report
            list.Add("");
            list.Add("---------------------------------------------------------------------------");
            list.Add("---------------------       END OF REPORT        --------------------------");
            list.Add("---------------------------------------------------------------------------");
            #endregion End of Report



            File.WriteAllLines(Foot_Des.Report_File, list.ToArray());

            string des_sum = Path.Combine(Path.GetDirectoryName(Foot_Des.Get_Report_File(1)), "FOUNDATION_DESIGN_SUMMARY.TXT");
            File.WriteAllLines(des_sum, Design_Summary.ToArray());
        }
예제 #22
0
        private void btn_aload_Click(object sender, EventArgs e)
        {
            string kStr = "";

            kStr = txt_mnos.Text.Replace(',', ' ');


            kStr = kStr + " TH ";

            double dval = 0.0;

            dval = MyStrings.StringToDouble(txt_thk_val.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " " + dval.ToString("f3");
            }
            //else
            //    return;
            //1 TO 234 TH 0.07 DEN 0.0 EXX 3.00934E6  EXY 531061  EXG 0.0  EYY 3.00934E6  EYG 0.0  GXY 1.23913E6

            //dval = MyList.StringToDouble(txt_DEN_val.Text, 0.0);
            if (txt_DEN_val.Text != "")
            {
                kStr = kStr + " DEN " + txt_DEN_val.Text;
            }
            if (txt_EXX_val.Text != "")
            {
                kStr = kStr + " EXX " + txt_EXX_val.Text;
            }
            if (txt_EXY_val.Text != "")
            {
                kStr = kStr + " EXY " + txt_EXY_val.Text;
            }
            if (txt_EXG_val.Text != "")
            {
                kStr = kStr + " EXG " + txt_EXG_val.Text;
            }
            if (txt_EYY_val.Text != "")
            {
                kStr = kStr + " EYY " + txt_EYY_val.Text;
            }
            dval = MyStrings.StringToDouble(txt_EYG_val.Text, 0.0);
            if (txt_EYG_val.Text != "")
            {
                kStr = kStr + " EYG " + txt_EYG_val.Text;
            }
            if (txt_GXY_val.Text != "")
            {
                kStr = kStr + " GXY " + txt_GXY_val.Text;
            }



            if (TRV != null)
            {
                if (ASTRA_Data.Count > 0)
                {
                    TRV.SelectedNode.Text = kStr;
                    this.Close();
                }
                else
                {
                    ASTRA_Data.Add(kStr);
                    TRV.Nodes.Add(kStr);
                }
            }
            else
            {
                this.Close();
            }
        }
예제 #23
0
        public void RunThread()
        {
            List <string> list = new List <string>();

            #region TechSOFT Banner


            //list.Add("");
            //list.Add("");
            //list.Add("\t\t**********************************************");
            //list.Add("\t\t*          ASTRA Pro Release 18.0            *");
            //list.Add("\t\t*      TechSOFT Engineering Services         *");
            //list.Add("\t\t*                                            *");
            //list.Add("\t\t*      DESIGN OF RCC PILE FOUNDATION         *");
            //list.Add("\t\t*                                            *");
            //list.Add("\t\t**********************************************");
            //list.Add("\t\t----------------------------------------------");
            //list.Add("\t\tTHIS RESULT CREATED ON " + System.DateTime.Now.ToString("dd.MM.yyyy  AT HH:mm:ss") + " ");
            //list.Add("\t\t----------------------------------------------");
            //list.Add("");

            #endregion



            int c    = 0;
            int step = 1;


            string ColumnNos = "";

            //int c = 0;
            for (int i = 0; i < dgv_columns.RowCount; i++)
            {
                try
                {
                    c = 1;
                    ColumnData cd = new ColumnData();
                    cd.IsSelect = (bool)dgv_columns[c++, i].Value;
                    if (cd.IsSelect)
                    {
                        Set_Grid_Color(i, false, false);
                        Pile_Design.ColumnNo = dgv_columns[c++, i].Value.ToString(); c++;

                        if (MessageBox.Show("Process Design Pile Foundation " + Pile_Design.ColumnNo + " \n\nDou you want to continue ?", "ASTRA", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
                        {
                            break;
                        }
                        //Pile_Design.Continuous_ColumnMembers = dgv_columns[c++, i].Value.ToString();
                        Pile_Design.D = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        //Pile_Design.PL = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Pile_Design.LPC = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Pile_Design.BPC = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Pile_Design.DPC = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Pile_Design.d1  = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Pile_Design.d2  = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Pile_Design.d3  = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Pile_Design.P   = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        Pile_Design.AM  = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);

                        //Pile_Design.Mx = MyStrings.StringToDouble(dgv_columns[c, i].Value.ToString(), 0.0);


                        list.AddRange(Pile_Design.Design_Program_Loop(i + 1).ToArray());

                        dgv_columns[c, i].Value = Pile_Design.IS_DESIGN_OK ? " OK" : "NOT OK";
                        Set_Grid_Color(i, true, Pile_Design.IS_DESIGN_OK);
                        Add_Foundation_BOQ(Pile_Design.BOQ);
                    }
                }
                catch (Exception exx) { }
            }



            #region End of Report
            list.Add("");
            list.Add("---------------------------------------------------------------------------");
            list.Add("---------------------       END OF REPORT        --------------------------");
            list.Add("---------------------------------------------------------------------------");
            #endregion End of Report



            File.WriteAllLines(Pile_Design.Report_File, list.ToArray());
            //MessageBox.Show(this, "Report file created in file " + Pile_Design.Report_File);
            ////frmASTRAReport fap = new frmASTRAReport(Pile_Design.Report_File);
            ////fap.Owner = this;
            ////fap.Show();

            //frmASTRAReport.OpenReport(Pile_Design.Report_File, this);

            Save_Data();
        }
예제 #24
0
        private void btn_jload_add_Click(object sender, EventArgs e)
        {
            string kStr = "";

            kStr = txt_joint_number.Text.Replace(',', ' ');

            double dval = 0.0;

            dval = MyStrings.StringToDouble(txt_fx.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " FX " + dval.ToString("f3");
            }
            dval = MyStrings.StringToDouble(txt_fy.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " FY " + dval.ToString("f3");
            }
            dval = MyStrings.StringToDouble(txt_fz.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " FZ " + dval.ToString("f3");
            }
            dval = MyStrings.StringToDouble(txt_mx.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " MX " + dval.ToString("f3");
            }
            dval = MyStrings.StringToDouble(txt_my.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " MY " + dval.ToString("f3");
            }
            dval = MyStrings.StringToDouble(txt_mz.Text, 0.0);
            if (dval != 0.0)
            {
                kStr = kStr + " MZ " + dval.ToString("f3");
            }

            if (textBox1.Text != "")
            {
                kStr = kStr + " *" + textBox1.Text;
            }

            ASTRA_Data.Add(kStr);

            if (Node != null)
            {
                if (btn_jload_add.Text == "Change")
                {
                    Node.Text = kStr;
                    this.Close();
                }
                else
                {
                    Node.Nodes.Add(kStr);
                    //Node.Expand();
                    Node.ExpandAll();
                }
            }
            else
            {
                this.Close();
            }
        }
예제 #25
0
        private void btn_create_Click(object sender, EventArgs e)
        {
            if (dgv_combinations.RowCount == 0)
            {
                MessageBox.Show("Add a Load Definition.", "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            //iACad.AstraDocument
            if (Str_Analysis == null)
            {
                Str_Analysis = new StructureMemberAnalysis(iACad.AstraDocument.AnalysisFileName);
            }

            List <JointForce> jn_Force = Str_Analysis.list_joints;

            int loadno = ALL_Loads.Count + 1;

            List <string> jloads = new List <string>();
            int           i      = 0;


            int load_eqx = loadno;
            int load_eqz = loadno;


            #region Chiranjit [2015 05 27]
            #endregion Chiranjit [2015 05 27]


            int sign_x = 1, sign_z = 1;


            switch (Direction)
            {
            case 1:     //+X/+Z

                #region //+X/+Z
                sign_x = 1;
                sign_z = 1;

                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD +EQX", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}", jn_Force[i].NodeNo,
                                             "FX",
                                             sign_x * Math.Abs(jn_Force[i].FY) * SC));
                }


                loadno++;
                load_eqz = loadno;

                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD +EQZ", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}",
                                             jn_Force[i].NodeNo,
                                             "FZ",
                                             sign_z * Math.Abs(jn_Force[i].FY) * SC));
                }
                #endregion     //+X/+Z

                break;

            case 2:     //-X/-Z

                #region -X/-Z
                sign_x = -1;
                sign_z = -1;

                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD -EQX", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}", jn_Force[i].NodeNo,
                                             "FX",
                                             sign_x * Math.Abs(jn_Force[i].FY) * SC));
                }


                loadno++;
                load_eqz = loadno;

                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD -EQZ", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}",
                                             jn_Force[i].NodeNo,
                                             "FZ",
                                             sign_z * Math.Abs(jn_Force[i].FY) * SC));
                }
                #endregion     //+X/+Z

                break;


            case 3:     //  +X/-Z

                #region +X/-Z
                sign_x = 1;
                sign_z = -1;

                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD +EQX", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}", jn_Force[i].NodeNo,
                                             "FX",
                                             sign_x * Math.Abs(jn_Force[i].FY) * SC));
                }


                loadno++;
                load_eqz = loadno;

                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD -EQZ", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}",
                                             jn_Force[i].NodeNo,
                                             "FZ",
                                             sign_z * Math.Abs(jn_Force[i].FY) * SC));
                }
                #endregion     //+X/+Z

                break;

            case 4:     //  -X/+Z

                #region -X/+Z
                sign_x = -1;
                sign_z = 1;

                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD -EQX", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}", jn_Force[i].NodeNo,
                                             "FX",
                                             sign_x * Math.Abs(jn_Force[i].FY) * SC));
                }


                loadno++;
                load_eqz = loadno;

                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD +EQZ", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}",
                                             jn_Force[i].NodeNo,
                                             "FZ",
                                             sign_z * Math.Abs(jn_Force[i].FY) * SC));
                }
                #endregion     //+X/+Z

                break;


            case 5:     //  +X/-X

                #region +X/-X
                sign_x = 1;
                sign_z = -1;

                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD +EQX", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}", jn_Force[i].NodeNo,
                                             "FX",
                                             sign_x * Math.Abs(jn_Force[i].FY) * SC));
                }


                loadno++;
                load_eqz = loadno;

                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD -EQX", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}",
                                             jn_Force[i].NodeNo,
                                             "FX",
                                             sign_z * Math.Abs(jn_Force[i].FY) * SC));
                }
                #endregion     //+X/+Z

                break;


            case 6:     //  +Z/-Z

                #region   +Z/-Z
                sign_x = 1;
                sign_z = -1;

                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD +EQZ", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}", jn_Force[i].NodeNo,
                                             "FZ",
                                             sign_x * Math.Abs(jn_Force[i].FY) * SC));
                }


                loadno++;
                load_eqz = loadno;

                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD -EQZ", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}",
                                             jn_Force[i].NodeNo,
                                             "FZ",
                                             sign_z * Math.Abs(jn_Force[i].FY) * SC));
                }
                #endregion     //+X/+Z

                break;
            }

            //switch (Direction)
            //{
            //    case 1: //+X/+Z
            //        jloads.Add(string.Format("LOAD {0} SEISMIC LOAD EQX", loadno));
            //        jloads.Add(string.Format("JOINT LOAD"));
            //        for (i = 0; i < jn_Force.Count; i++)
            //        {
            //            jloads.Add(string.Format("{0} {1} {2:f3}", jn_Force[i].NodeNo,
            //                "FX",
            //               Math.Abs(jn_Force[i].FY) * SC));
            //        }


            //        loadno++;
            //        load_eqz = loadno;

            //        jloads.Add(string.Format("LOAD {0} SEISMIC LOAD EQZ", loadno));
            //        jloads.Add(string.Format("JOINT LOAD"));
            //        for (i = 0; i < jn_Force.Count; i++)
            //        {
            //            jloads.Add(string.Format("{0} {1} {2:f3}",
            //                jn_Force[i].NodeNo,
            //                "FZ",
            //                Math.Abs(jn_Force[i].FY) * SC));
            //        }
            //        break;
            //}



            //if (Direction != 6)
            //{
            //    jloads.Add(string.Format("LOAD {0} SEISMIC LOAD EQX", loadno));
            //    jloads.Add(string.Format("JOINT LOAD"));
            //    for (i = 0; i < jn_Force.Count; i++)
            //    {
            //        jloads.Add(string.Format("{0} {1} {2:f3}", jn_Force[i].NodeNo,
            //            "FX",
            //            jn_Force[i].FY * SC));
            //    }
            //}


            //if (Direction != 5)
            //{
            //    loadno++;
            //    load_eqz = loadno;

            //    jloads.Add(string.Format("LOAD {0} SEISMIC LOAD EQZ", loadno));
            //    jloads.Add(string.Format("JOINT LOAD"));
            //    for (i = 0; i < jn_Force.Count; i++)
            //    {
            //        jloads.Add(string.Format("{0} {1} {2:f3}",
            //            jn_Force[i].NodeNo,
            //            "FZ",
            //            jn_Force[i].FY * SC));
            //    }
            //}
            //jloads.Add(string.Format("{0} {1} {2:f3}", jn_Force[i].NodeNo, dir, jn_Force[i].FY * sc));

            //LDC.LoadNo = MyStrings.StringToInt(txt_load_no.Text, 0);
            //loadno++;
            LDC.LoadNo = loadno;
            LDC.Name   = txt_load_name.Text;
            LDC.LoadCases.Clear();
            LDC.Factors.Clear();
            for (i = 0; i < dgv_combinations.RowCount; i++)
            {
                LDC.LoadCases.Add(MyStrings.StringToInt(dgv_combinations[0, i].Value.ToString().ToUpper().Replace("LOAD CASE ", ""), 0));
                LDC.Factors.Add(MyStrings.StringToDouble(dgv_combinations[1, i].Value.ToString(), 0));
            }

            //LDC.LoadCases.Add(LDC.LoadNo);
            //LDC.Factors.Add(MyStrings.StringToDouble(textBox1.Text, 0));

            LDC.Set_Combination();


            List <string> load_combs = new List <string>();

            //load_combs.Add(string.Format("LOAD COMB {0} SEISMIC COMB", loadno));
            if (Direction == 1 || Direction == 3 || Direction == 5)
            {
                loadno++;
                load_combs.Add(string.Format("LOAD COMB {0} {1} (DL+EQX)", loadno, textBox1.Text));
                load_combs.Add(string.Format("{0} {1} {2}", LDC.Data, load_eqx, textBox1.Text));
                //load_combs.Add(LDC.Data);
            }

            if (Direction == 2 || Direction == 4)
            {
                loadno++;
                //load_combs.Add(string.Format("LOAD COMB {0} SEISMIC COMB", loadno));
                load_combs.Add(string.Format("LOAD COMB {0} {1} (DL-EQX)", loadno, textBox1.Text));
                //load_combs.Add(string.Format("{0} {1} -{2}", LDC.Data, load_eqx, textBox1.Text));
                load_combs.Add(string.Format("{0} {1} {2}", LDC.Data, load_eqx, textBox1.Text));
            }


            if (Direction == 5)
            {
                loadno++;
                //load_combs.Add(string.Format("LOAD COMB {0} SEISMIC COMB", loadno));
                load_combs.Add(string.Format("LOAD COMB {0} {1} (DL-EQX)", loadno, textBox1.Text));
                load_combs.Add(string.Format("{0} {1} {2}", LDC.Data, load_eqz, textBox1.Text));
            }


            if (Direction == 1 || Direction == 4)
            {
                loadno++;
                //load_combs.Add(string.Format("LOAD COMB {0} SEISMIC COMB", loadno));
                load_combs.Add(string.Format("LOAD COMB {0} {1} (DL+EQZ)", loadno, textBox1.Text));
                load_combs.Add(string.Format("{0} {1} {2}", LDC.Data, load_eqz, textBox1.Text));
                //load_combs.Add(LDC.Data);
            }

            if (Direction == 2 || Direction == 3)
            {
                loadno++;
                //load_combs.Add(string.Format("LOAD COMB {0} SEISMIC COMB", loadno));
                load_combs.Add(string.Format("LOAD COMB {0} {1} (DL-EQZ)", loadno, textBox1.Text));
                //load_combs.Add(string.Format("{0} {1} -{2}", LDC.Data, load_eqz, textBox1.Text));
                load_combs.Add(string.Format("{0} {1} {2}", LDC.Data, load_eqz, textBox1.Text));
                //load_combs.Add(LDC.Data);
            }
            if (Direction == 6)
            {
                loadno++;
                //load_combs.Add(string.Format("LOAD COMB {0} SEISMIC COMB", loadno));
                load_combs.Add(string.Format("LOAD COMB {0} {1} (DL+EQZ)", loadno, textBox1.Text));
                load_combs.Add(string.Format("{0} {1} {2}", LDC.Data, load_eqx, textBox1.Text));

                loadno++;
                //load_combs.Add(string.Format("LOAD COMB {0} SEISMIC COMB", loadno));
                load_combs.Add(string.Format("LOAD COMB {0} {1} (DL-EQZ)", loadno, textBox1.Text));
                load_combs.Add(string.Format("{0} {1} {2}", LDC.Data, load_eqz, textBox1.Text));
                //load_combs.Add(LDC.Data);
            }

            string file_name         = File_Seismic_Load;


            if (file_name == "")
            {
                file_name = Path.Combine(Path.GetDirectoryName(Str_Analysis.Analysis_File), "Seismic_Analysis");
                if (!Directory.Exists(file_name))
                {
                    Directory.CreateDirectory(file_name);
                }
                file_name = Path.Combine(file_name, "Seismic_Analysis.TXT");
            }
            File.WriteAllText(file_name, "Write Data");

            if (Write_Seismic_Data != null)
            {
                Write_Seismic_Data(jloads, load_combs, file_name);
            }


            btn_process.Enabled = true;
            btn_view.Enabled    = true;
        }
예제 #26
0
        public static bool ReadLineCoordinates(string fileName, vdDocument doc)
        {
            //vdArray<vdLine> line_arr = new vdArray<vdLine>();
            List <string> lstStr = new List <string>(File.ReadAllLines(fileName));
            string        kStr = "";
            string        option = "";
            string        SP, EP, TEXT, IP, Height;

            SP = EP = IP = TEXT = Height = "";

            MyStrings mList = null;

            for (int i = 0; i < lstStr.Count; i++)
            {
                kStr = lstStr[i].Trim().TrimEnd().TrimStart();
                if (kStr == "VD_LINE")
                {
                    option = "VD_LINE"; i++;
                    SP     = lstStr[i].Replace("SP=", ""); i++;
                    EP     = lstStr[i].Replace("EP=", "");
                }
                else if (kStr == "VD_TEXT")
                {
                    option = "VD_TEXT"; i++;
                    IP     = lstStr[i].Replace("IP=", ""); i++;
                    TEXT   = lstStr[i].Replace("TEXT=", ""); i++;
                    Height = lstStr[i].Replace("HEIGHT=", "");
                }
                switch (option)
                {
                case "VD_LINE":
                    mList = new MyStrings(MyStrings.RemoveAllSpaces(SP), ',');
                    vdLine ln = new vdLine();
                    ln.SetUnRegisterDocument(doc);
                    ln.setDocumentDefaults();
                    ln.StartPoint.x = mList.GetDouble(0);
                    ln.StartPoint.y = mList.GetDouble(1);
                    ln.StartPoint.z = mList.GetDouble(2);
                    mList           = new MyStrings(MyStrings.RemoveAllSpaces(EP), ',');
                    ln.EndPoint.x   = mList.GetDouble(0);
                    ln.EndPoint.y   = mList.GetDouble(1);
                    ln.EndPoint.z   = mList.GetDouble(2);
                    doc.ActiveLayOut.Entities.AddItem(ln);

                    break;

                case "VD_TEXT":

                    mList = new MyStrings(MyStrings.RemoveAllSpaces(IP), ',');
                    vdText txt = new vdText();
                    txt.SetUnRegisterDocument(doc);
                    txt.setDocumentDefaults();
                    txt.InsertionPoint.x = mList.GetDouble(0);
                    txt.InsertionPoint.y = mList.GetDouble(1);
                    txt.InsertionPoint.z = mList.GetDouble(2);
                    txt.TextString       = TEXT;
                    txt.Height           = MyStrings.StringToDouble(Height, 0.01);
                    doc.ActiveLayOut.Entities.AddItem(txt);
                    break;
                }
            }
            lstStr.Clear();
            //doc.ShowUCSAxis = false;
            //VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_VTop(doc);
            //doc.Redraw(true);
            return(true);
        }
예제 #27
0
        public void RunThread()
        {
            List <string> list = new List <string>();

            #region TechSOFT Banner
            list.Add("");

            //list.Add("");
            //list.Add("\t\t**********************************************");
            //list.Add("\t\t*          ASTRA Pro Release 18.0            *");
            //list.Add("\t\t*      TechSOFT Engineering Services         *");
            //list.Add("\t\t*                                            *");
            //list.Add("\t\t*           DESIGN OF RCC COLUMN             *");
            //list.Add("\t\t*                                            *");
            //list.Add("\t\t**********************************************");
            //list.Add("\t\t----------------------------------------------");
            //list.Add("\t\tTHIS RESULT CREATED ON " + System.DateTime.Now.ToString("dd.MM.yyyy  AT HH:mm:ss") + " ");
            //list.Add("\t\t----------------------------------------------");
            //list.Add("");

            #endregion



            int c    = 0;
            int step = 1;


            string ColumnNos = "";

            bool flag = false;
            //int c = 0;
            for (int i = 0; i < dgv_columns.RowCount; i++)
            {
                try
                {
                    c    = 0;
                    flag = (bool)dgv_columns[c++, i].Value;

                    if (flag)
                    {
                        Set_Grid_Color(i);

                        ////cd.ColumnNos = dgv_columns[c++, i].Value.ToString();
                        //if (MessageBox.Show("Process Design Column " + cd.ColumnNos + " \n\nDou you want to continue ?",
                        //    "ASTRA", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
                        //{
                        //    break;
                        //}
                        //col_design.hf = (Floors[i + 1] - Floors[i]) * 1000;
                        col_design.floor_level = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0.0);
                        col_design.FlightNos   = MyStrings.StringToInt(dgv_columns[c++, i].Value.ToString(), 0);
                        col_design.hf          = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0);
                        col_design.wf          = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0);
                        col_design.wl          = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0);
                        col_design.tw          = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0);
                        col_design.bar_dia1    = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0);
                        col_design.bar_dia2    = MyStrings.StringToDouble(dgv_columns[c++, i].Value.ToString(), 0);


                        list.AddRange(col_design.Design_Program_Loop(i + 1).ToArray());
                        Set_Grid_Color(i, true, col_design.IS_DESIGN_OK);

                        dgv_columns[9, i].Value = col_design.IS_DESIGN_OK ? " OK " : "NOT OK";

                        Add_Staircase_BOQ(col_design.BOQ);
                    }
                }
                catch (Exception exx) { }
            }



            #region End of Report
            list.Add("");
            list.Add("---------------------------------------------------------------------------");
            list.Add("---------------------       END OF REPORT        --------------------------");
            list.Add("---------------------------------------------------------------------------");
            #endregion End of Report

            Save_Data();

            File.WriteAllLines(col_design.Report_File, list.ToArray());

            MessageBox.Show(this, "Report file created in file " + col_design.Report_File);

            frmASTRAReport fap = new frmASTRAReport(col_design.Report_File);
            fap.Owner = this;
            fap.ShowDialog();
        }
예제 #28
0
        private void btn_fload_Click(object sender, EventArgs e)
        {
            string kStr = "";
            //XRANGE 4 18 FLOAD -0.15 YRANGE 0 10.43  ZRANGE -1 5.4  GY
            //YRANGE 4 18 FLOAD -0.15 XRANGE 0 10.43  ZRANGE -1 5.4  GY
            //ZRANGE 4 18 FLOAD -0.15 XRANGE 0 10.43  YRANGE -1 5.4  GY


            double dval = 0.0;

            dval = MyStrings.StringToDouble(txt_pressure.Text, 0.0);



            if (rbtn_XLimit.Checked)
            {
                if (chk_One.Checked)
                {
                    kStr = string.Format("XRANGE {0} {1} ONE {2} YRANGE {3} {4}  ZRANGE {5} {6}",
                                         txt_X_min.Text, txt_X_max.Text, txt_pressure.Text,
                                         txt_Y_min.Text, txt_Y_max.Text,
                                         txt_Z_min.Text, txt_Z_max.Text);
                }
                else
                {
                    kStr = string.Format("XRANGE {0} {1} FLOAD {2} YRANGE {3} {4}  ZRANGE {5} {6}",
                                         txt_X_min.Text, txt_X_max.Text, txt_pressure.Text,
                                         txt_Y_min.Text, txt_Y_max.Text,
                                         txt_Z_min.Text, txt_Z_max.Text);
                }
            }
            else if (rbtn_YLimit.Checked)
            {
                if (chk_One.Checked)
                {
                    kStr = string.Format("YRANGE {0} {1} ONE {2} XRANGE {3} {4}  ZRANGE {5} {6}",
                                         txt_Y_min.Text, txt_Y_max.Text, txt_pressure.Text,
                                         txt_X_min.Text, txt_X_max.Text,
                                         txt_Z_min.Text, txt_Z_max.Text);
                }
                else
                {
                    kStr = string.Format("YRANGE {0} {1} FLOAD {2} XRANGE {3} {4}  ZRANGE {5} {6}",
                                         txt_Y_min.Text, txt_Y_max.Text, txt_pressure.Text,
                                         txt_X_min.Text, txt_X_max.Text,
                                         txt_Z_min.Text, txt_Z_max.Text);
                }
            }
            else if (rbtn_ZLimit.Checked)
            {
                if (chk_One.Checked)
                {
                    kStr = string.Format("ZRANGE {0} {1} ONE {2} XRANGE {3} {4}  YRANGE {5} {6}",
                                         txt_Z_min.Text, txt_Z_max.Text, txt_pressure.Text,
                                         txt_X_min.Text, txt_X_max.Text,
                                         txt_Y_min.Text, txt_Y_max.Text);
                }
                else
                {
                    kStr = string.Format("ZRANGE {0} {1} FLOAD {2} XRANGE {3} {4}  YRANGE {5} {6}",
                                         txt_Z_min.Text, txt_Z_max.Text, txt_pressure.Text,
                                         txt_X_min.Text, txt_X_max.Text,
                                         txt_Y_min.Text, txt_Y_max.Text);
                }
            }



            if (rbtn_GX.Checked)
            {
                kStr = kStr + " GX";
            }
            else if (rbtn_GY.Checked)
            {
                kStr = kStr + " GY";
            }
            else if (rbtn_GZ.Checked)
            {
                kStr = kStr + " GZ";
            }

            ASTRA_Data.Add(kStr);

            if (Node != null)
            {
                if (btn_fload_add.Text == "Change")
                {
                    Node.Text = kStr;
                    this.Close();
                }
                else
                {
                    Node.Nodes.Add(kStr);
                    Node.ExpandAll();
                }
            }
            else
            {
                this.Close();
            }
        }
예제 #29
0
        private void btn_create_Click_1(object sender, EventArgs e)
        {
            //iACad.AstraDocument
            StructureMemberAnalysis Str_Analysis = new StructureMemberAnalysis(iACad.AstraDocument.AnalysisFileName);

            List <JointForce> jn_Force = Str_Analysis.list_joints;

            int loadno = ALL_Loads.Count + 1;

            List <string> jloads = new List <string>();
            int           i      = 0;


            int load_eqx = loadno;
            int load_eqz = loadno;

            if (Direction != 6)
            {
                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD EQX", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}", jn_Force[i].NodeNo,
                                             "FX",
                                             jn_Force[i].FY * SC));
                }
            }


            if (Direction != 5)
            {
                loadno++;
                load_eqz = loadno;

                jloads.Add(string.Format("LOAD {0} SEISMIC LOAD EQZ", loadno));
                jloads.Add(string.Format("JOINT LOAD"));
                for (i = 0; i < jn_Force.Count; i++)
                {
                    jloads.Add(string.Format("{0} {1} {2:f3}",
                                             jn_Force[i].NodeNo,
                                             "FZ",
                                             jn_Force[i].FY * SC));
                }
            }
            //jloads.Add(string.Format("{0} {1} {2:f3}", jn_Force[i].NodeNo, dir, jn_Force[i].FY * sc));

            //LDC.LoadNo = MyStrings.StringToInt(txt_load_no.Text, 0);
            //loadno++;
            LDC.LoadNo = loadno;
            LDC.Name   = txt_load_name.Text;
            LDC.LoadCases.Clear();
            LDC.Factors.Clear();
            for (i = 0; i < dgv_combinations.RowCount; i++)
            {
                LDC.LoadCases.Add(MyStrings.StringToInt(dgv_combinations[0, i].Value.ToString().ToUpper().Replace("LOAD CASE ", ""), 0));
                LDC.Factors.Add(MyStrings.StringToDouble(dgv_combinations[1, i].Value.ToString(), 0));
            }

            //LDC.LoadCases.Add(LDC.LoadNo);
            //LDC.Factors.Add(MyStrings.StringToDouble(textBox1.Text, 0));

            LDC.Set_Combination();


            List <string> load_combs = new List <string>();

            //load_combs.Add(string.Format("LOAD COMB {0} SEISMIC COMB", loadno));
            if (Direction == 1 || Direction == 3 || Direction == 5)
            {
                loadno++;
                load_combs.Add(string.Format("LOAD COMB {0} {1} (DL+EQX)", loadno, textBox1.Text));
                load_combs.Add(string.Format("{0} {1} {2}", LDC.Data, load_eqx, textBox1.Text));
                //load_combs.Add(LDC.Data);
            }

            if (Direction == 2 || Direction == 4 || Direction == 5)
            {
                loadno++;
                //load_combs.Add(string.Format("LOAD COMB {0} SEISMIC COMB", loadno));
                load_combs.Add(string.Format("LOAD COMB {0} {1} (DL-EQX)", loadno, textBox1.Text));
                load_combs.Add(string.Format("{0} {1} -{2}", LDC.Data, load_eqx, textBox1.Text));
            }


            if (Direction == 1 || Direction == 4 || Direction == 6)
            {
                loadno++;
                //load_combs.Add(string.Format("LOAD COMB {0} SEISMIC COMB", loadno));
                load_combs.Add(string.Format("LOAD COMB {0} {1} (DL+EQZ)", loadno, textBox1.Text));
                load_combs.Add(string.Format("{0} {1} {2}", LDC.Data, load_eqz, textBox1.Text));
                //load_combs.Add(LDC.Data);
            }

            if (Direction == 2 || Direction == 3 || Direction == 6)
            {
                loadno++;
                //load_combs.Add(string.Format("LOAD COMB {0} SEISMIC COMB", loadno));
                load_combs.Add(string.Format("LOAD COMB {0} {1} (DL-EQZ)", loadno, textBox1.Text));
                load_combs.Add(string.Format("{0} {1} -{2}", LDC.Data, load_eqz, textBox1.Text));
                //load_combs.Add(LDC.Data);
            }



            string file_name = File_Seismic_Load;


            if (file_name == "")
            {
                file_name = Path.Combine(Path.GetDirectoryName(Str_Analysis.Analysis_File), "Seismic_Analysis");
                if (!Directory.Exists(file_name))
                {
                    Directory.CreateDirectory(file_name);
                }
                file_name = Path.Combine(file_name, "Seismic_Analysis.TXT");
            }
            File.WriteAllText(file_name, "Write Data");



            if (Write_Seismic_Data != null)
            {
                Write_Seismic_Data(jloads, load_combs, file_name);
                RunAnalysis(file_name);
            }

            this.DialogResult = DialogResult.OK;

            this.Close();
        }
예제 #30
0
        public void RunThread()
        {
            Design_Summary = new List <string>();
            List <string> BOQ_Summary = new List <string>();

            List <string> list = new List <string>();

            #region TechSOFT Banner
            list.Add("");
            list.Add("");
            list.Add("\t\t**********************************************");
            list.Add("\t\t*          ASTRA Pro Release 18.0            *");
            list.Add("\t\t*      TechSOFT Engineering Services         *");
            list.Add("\t\t*                                            *");
            list.Add("\t\t*       DESIGN OF RCC FLANGED BEAM           *");
            list.Add("\t\t*                                            *");
            list.Add("\t\t**********************************************");
            list.Add("\t\t----------------------------------------------");
            list.Add("\t\tTHIS RESULT CREATED ON " + System.DateTime.Now.ToString("dd.MM.yyyy  AT HH:mm:ss") + " ");
            list.Add("\t\t----------------------------------------------");
            list.Add("");
            list.Add("");

            #endregion


            list.Add(string.Format(""));
            list.Add(string.Format(""));
            list.Add(string.Format("(Design Standard : BS 8110 / IS 456)"));
            list.Add(string.Format(""));

            int c    = 0;
            int step = 1;

            MovingLoadAnalysis.frm_ProgressBar.ON("Member Analysis....");
            for (int i = 0; i < dgv_beams.RowCount; i++)
            {
                MovingLoadAnalysis.frm_ProgressBar.SetValue(i, dgv_beams.RowCount);
                try
                {
                    c = 1;
                    bool IsSelect = (bool)dgv_beams[c++, i].Value;
                    if (IsSelect)
                    {
                        Set_Grid_Color(i);

                        //beamDes.Floor_Level = MyStrings.StringToDouble(dgv_beams[2, i].Value.ToString(), 0.0);
                        beamDes.Floor_Level = MyStrings.StringToDouble(dgv_beams[2, i].Value.ToString(), 0.0);

                        beamDes.Beam_Nos    = dgv_beams[3, i].Value.ToString();
                        beamDes.sectionName = dgv_beams[5, i].Value.ToString();

                        var dta = uC_SteelSections1.Get_BeamSection(beamDes.sectionName);

                        var lst = dta.Data;

                        beamDes.a = (dta.Area * 100);

                        //beamDes.h = dta.Depth.ToString("f3");
                        beamDes.h = dta.Depth;
                        //beamDes.h1 = dta.h.ToString("f3");

                        beamDes.Ixx = (dta.Ixx * 10000);
                        //beamDes.Iyy = (dta.Iyy * 10000).ToString();
                        //beamDes.rxx = (dta.Rxx * 10).ToString();
                        //beamDes.ryy = (dta.Ryy * 10).ToString();

                        beamDes.Z  = (dta.Zxx * 1000);
                        beamDes.tw = dta.WebThickness;
                        //beamDes.tw = dta..ToString("f3");

                        beamDes.w = (dta.Weight / 9.81);
                        //beamDes.Bf = (dta.FlangeWidth).ToString();

                        if (lst.Count > 20)
                        {
                            beamDes.h1 = lst.GetDouble(17);
                            beamDes.h2 = lst.GetDouble(18);
                        }


                        beamDes.M = MyStrings.StringToDouble(dgv_beams[7, i].Value.ToString(), 0.0);
                        beamDes.V = MyStrings.StringToDouble(dgv_beams[8, i].Value.ToString(), 0.0);


                        //All_Beam_Data.Add(bd);

                        //beamDes.Beam_Title = bd.BeamNos;
                        //beamDes.Beam_Nos = bd.Continuous_BeamMembers;
                        //beamDes.Bar_dia1 = bd.d1;
                        //beamDes.Bar_dia2 = bd.d2;
                        //beamDes.Bar_dia3 = bd.d3;
                        //beamDes.Bar_dia4 = bd.d4;
                        //beamDes.Bar_dia5 = bd.d5;
                        //beamDes.Bar_dia6 = bd.d6;

                        //beamDes.AM1 = bd.AM1;
                        //beamDes.AM2 = bd.AM2;
                        //beamDes.AM3 = bd.AM3;
                        //beamDes.AM4 = bd.AM4;

                        //beamDes.AV1 = bd.AV1;
                        //beamDes.AV2 = bd.AV2;
                        //beamDes.AV3 = bd.AV3;


                        //beamDes.D = bd.Depth * 1000;
                        //beamDes.bw = bd.Breadth * 1000;


                        //if (beamDes.BOQ == null)
                        //    beamDes.BOQ = new Beam_BOQ();

                        //beamDes.BOQ.Section_B = bd.Breadth;
                        //beamDes.BOQ.Section_D = bd.Depth;
                        //beamDes.BOQ.Area = bd.Depth * bd.Breadth;


                        //list.AddRange(beamDes.Design_Program_Loop(step++).ToArray());
                        //list.AddRange(beamDes.Design_Program_Loop(i + 1).ToArray());


                        //Design_Summary.Add(string.Format("-------------------------------------"));
                        //Design_Summary.Add(string.Format("BEAM = {0}, FLOOR LEVEL = {1:f3} M", beamDes.Beam_Title, beamDes.BOQ.Floor_ELevation));
                        //Design_Summary.Add(string.Format("CONTINUOUS MEMBERS = {0}", beamDes.Beam_Nos));
                        //Design_Summary.AddRange(beamDes.Design_Summary.ToArray());
                        //Design_Summary.Add(string.Format("-------------------------------------"));



                        //BOQ_Summary.Add(string.Format("-------------------------------------"));
                        //BOQ_Summary.Add(string.Format("BEAM = {0}, FLOOR LEVEL = {1:f3} M", beamDes.Beam_Title, beamDes.BOQ.Floor_ELevation));
                        //BOQ_Summary.Add(string.Format("CONTINUOUS MEMBERS = {0}", beamDes.Beam_Nos));
                        //BOQ_Summary.AddRange(beamDes.BOQ_Summary.ToArray());
                        //BOQ_Summary.Add(string.Format("-------------------------------------"));



                        //beamDes.Calculate_Program_Loop();


                        beamDes.Calculate_Program();


                        dgv_beams[9, i].Value = beamDes.IS_DESIGN_OK ? "OK" : "NOT OK";
                        Set_Grid_Color(i, true, beamDes.IS_DESIGN_OK);

                        //Add_Beam_BOQ(beamDes.BOQ);
                    }
                    //else
                    //    Set_Grid_Color(i);
                }
                catch (Exception exx) { }
            }
            MovingLoadAnalysis.frm_ProgressBar.OFF();


            list.Add(string.Format(""));
            list.Add(string.Format("-------------------------------------"));
            list.Add(string.Format("TABLE 1 : PERMISSIBLE_SHEAR_STRESS"));
            list.Add(string.Format("-------------------------------------"));
            list.Add(string.Format(""));

            list.AddRange(Tables.Get_File_Permissible_Shear_Stress().ToArray());


            #region End of Report
            list.Add("");
            list.Add("---------------------------------------------------------------------------");
            list.Add("---------------------       END OF REPORT        --------------------------");
            list.Add("---------------------------------------------------------------------------");
            #endregion End of Report


            //File.WriteAllLines(beamDes.Report_File, list.ToArray());

            //string des_sum = Path.Combine(Path.GetDirectoryName(beamDes.Get_Report_File(1)), "BEAM_DESIGN_SUMMARY.TXT");
            //File.WriteAllLines(des_sum, Design_Summary.ToArray());

            //des_sum = Path.Combine(Path.GetDirectoryName(beamDes.Get_Report_File(1)), "BEAM_BOQ_SUMMARY.TXT");
            //File.WriteAllLines(des_sum, BOQ_Summary.ToArray());
        }