Ejemplo n.º 1
0
        private void Select_Members()
        {
            dgv_columns.Rows.Clear();

            chk_sele_all.Checked = true;

            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 i = 0; i < AST_DOC.Members.Count; i++)
            {
                var item = AST_DOC.Members[i];

                if (item.EndNode.X == item.StartNode.X &&
                    item.EndNode.Y != item.StartNode.Y &&
                    item.EndNode.Z == item.StartNode.Z)
                {
                    list_mem.Add(item);
                }
            }

            bool flag = false;


            List <int>         lst_jnt = new List <int>();
            List <List <int> > all_jnt = new List <List <int> >();

            MovingLoadAnalysis.frm_ProgressBar.ON("Reading Members......");
            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)
                {
                    JointCoordinateCollection cont_jcc = new JointCoordinateCollection();


                    list_mem1 = Get_Continuous_Members(list_mem[i], ref cont_jcc);
                    list_conts.Add(list_mem1);

                    lst_jnt = new List <int>();
                    foreach (var item in cont_jcc)
                    {
                        lst_jnt.Add(item.NodeNo);
                    }
                    all_jnt.Add(lst_jnt);
                }
            }
            MovingLoadAnalysis.frm_ProgressBar.OFF();


            MemberIncidence mi = null;


            double Pu  = 0.0;
            double Mux = 0.0;
            double Muy = 0.0;

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

                //Pu = StructureAnalysis.GetJoint_R1_Axial(all_jnt[i]);
                //Mux = StructureAnalysis.GetJoint_M2_Bending(all_jnt[i]);
                //Muy = StructureAnalysis.GetJoint_M3_Bending(all_jnt[i]);


                Pu = StructureAnalysis.GetJoint_R1_Axial(all_jnt[i]);
                //Mux = StructureAnalysis.GetJoint_M2_Bending(all_jnt[i]);
                Mux = StructureAnalysis.GetJoint_ShearForce(all_jnt[i]);
                Muy = StructureAnalysis.GetJoint_M3_Bending(all_jnt[i]);


                dgv_columns.Rows.Add(true, "C" + (i + 1), MyStrings.Get_Array_Text(item), col_design.Section_Name, col_design.h, Main_Bar_Dia, col_design.bar_nos, Tie_Bar_Dia, Pu, Mux, Muy, "");
            }
        }
Ejemplo n.º 2
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;


                    var lst_jnt = new List <int>();
                    mi = AST_DOC.Members.Get_Member(item[0]);


                    foreach (var mbr in list_mem1)
                    {
                        mi = AST_DOC.Members.Get_Member(mbr);

                        if (!lst_jnt.Contains(mi.EndNode.NodeNo))
                        {
                            lst_jnt.Add(mi.EndNode.NodeNo);
                        }
                        if (!lst_jnt.Contains(mi.StartNode.NodeNo))
                        {
                            lst_jnt.Add(mi.StartNode.NodeNo);
                        }
                    }

                    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);


                    am1 = StructureAnalysis.GetJoint_MomentForce(lst_jnt);
                    am2 = StructureAnalysis.GetJoint_ShearForce(lst_jnt);
                    dgv_beams.Rows.Add(cnt++, true, mi.EndNode.Y.ToString("f4"), "B" + (count++),
                                       MyStrings.Get_Array_Text(item),
                                       //mi.Property.YD, mi.Property.ZD,
                                       beamDes.sectionName,

                                       beamDes.h,
                                       am1, am2,

                                       "");
                    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;
            //}
        }