Example #1
0
        public static bool  SetEarthQuakeLoad()
        {
            robotApp.Interactive = 0;
            IRobotSimpleCase earthQuake = caseServer.CreateSimple(caseServer.FreeNumber, "EarthQuake", IRobotCaseNature.I_CN_SEISMIC, IRobotCaseAnalizeType.I_CAT_DYNAMIC_SEISMIC);

            robotApp.Interactive = 1;
            return(true);
        }
Example #2
0
        public static bool SetCoverLoad(Structure Structure)
        {
            robotApp.Interactive = 0;
            IRobotSimpleCase  CoverLoad       = caseServer.CreateSimple(caseServer.FreeNumber, "CoverLoad", IRobotCaseNature.I_CN_PERMANENT, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            IRobotLoadRecord2 CoverLoadRecord = CoverLoad.Records.Create(IRobotLoadRecordType.I_LRT_BAR_UNIFORM) as IRobotLoadRecord2;

            CoverLoadRecord.SetValue((short)IRobotUniformRecordValues.I_URV_RELATIVE, 1);
            CoverLoadRecord.SetValue((short)IRobotUniformRecordValues.I_URV_LOCAL_SYSTEM, 1);
            CoverLoadRecord.SetValue((short)IRobotUniformRecordValues.I_URV_PROJECTED, 1);
            CoverLoadRecord.SetValue((short)IRobotUniformRecordValues.I_URV_PX, 0);
            CoverLoadRecord.SetValue((short)IRobotUniformRecordValues.I_URV_PY, 0);
            CoverLoadRecord.SetValue((short)IRobotUniformRecordValues.I_URV_PZ, -1000 * 10);
            CoverLoadRecord.Objects.AddOne(Structure.Frames[0].Beams[0].Id);
            CoverLoadRecord.Objects.AddOne(Structure.Frames[0].Beams[1].Id);

            #region A9ba 7aga 3amltha fi 7yaty

            //        CoverLoadRecord.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_X, Structure.Purlins[i].PurlinStart.X / Math.Cos(Structure.Frames[0].Angle));


            //for (int i = 0; i < Structure.Purlins.Count; i++)
            //{
            //    IRobotLoadRecord2 CoverLoadRecord = CoverLoad.Records.Create(IRobotLoadRecordType.I_LRT_BAR_FORCE_CONCENTRATED) as IRobotLoadRecord2;
            //    CoverLoadRecord.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_REL, 0);
            //    CoverLoadRecord.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_FX, 0);
            //    CoverLoadRecord.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_FY, 0);
            //    CoverLoadRecord.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_FZ, -1000 * 10);
            //    CoverLoadRecord.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_CY, 0);

            //    if (Structure.Purlins[0].PurlinStart.X <= Structure.Frames[0].Beams[0].Beamline.Length)
            //    {
            //        CoverLoadRecord.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_LOC, 1);
            //        CoverLoadRecord.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_X, Structure.Purlins[i].PurlinStart.X / Math.Cos(Structure.Frames[0].Angle));
            //        CoverLoadRecord.Objects.AddOne(Structure.Frames[0].Beams[0].BeamId);
            //    }
            //    else if (Structure.Purlins[0].PurlinStart.X == Structure.Frames[0].Beams[0].Beamline.Length)
            //    {
            //        CoverLoadRecord.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_LOC, 0);
            //        CoverLoadRecord.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_X,Structure.Purlins[i].PurlinStart.X / Math.Cos(Structure.Frames[0].Angle));
            //        CoverLoadRecord.Objects.AddOne(Structure.Frames[0].Beams[0].BeamId);
            //    }
            //    else
            //    {
            //        CoverLoadRecord.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_LOC, 1);
            //        CoverLoadRecord.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_X, Structure.Purlins[i].PurlinStart.X / Math.Cos(Structure.Frames[0].Angle));
            //        CoverLoadRecord.Objects.AddOne(Structure.Frames[0].Beams[1].BeamId);
            //    }

            //}

            //for (int i = 0; i < Structure.Frames[0].Beams.Count; i++)
            //{
            //    CoverLoadRecord.Objects.AddOne(Structure.Frames[0].Beams[i].BeamId);
            //}
            #endregion
            robotApp.Interactive = 1;
            return(true);
        }
Example #3
0
        public static bool SetTempretureload()
        {
            robotApp.Interactive = 0;
            IRobotSimpleCase tempretureNegative = caseServer.CreateSimple(caseServer.FreeNumber, "Temprature +VE", IRobotCaseNature.I_CN_TEMPERATURE, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            IRobotSimpleCase tempreturePostive  = caseServer.CreateSimple(caseServer.FreeNumber, "Temprature -VE", IRobotCaseNature.I_CN_TEMPERATURE, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);

            robotApp.Interactive = 1;
            return(true);
        }
Example #4
0
        //This method generates all structure loads in the system
        public void generateStructureLoads(double concentratedLoad, double c, double e)
        {
            //check if the loads have already been created. In case they were created delete all cases
            if (loadsGenerated)
            {
                RobotSelection iAllCases = iRobotApp.Project.Structure.Selections.CreateFull(IRobotObjectType.I_OT_CASE);
                iRobotApp.Project.Structure.Cases.DeleteMany(iAllCases);
            }

            //Get reference to load cases server
            IRobotCaseServer iCases = (IRobotCaseServer)iRobotApp.Project.Structure.Cases;

            //Get first available (free) user number for load
            int caseNumber = iCases.FreeNumber;

            //Create DeadLoad case
            IRobotSimpleCase deadLoadCase = (IRobotSimpleCase)iCases.CreateSimple(caseNumber, "Peso Proprio", IRobotCaseNature.I_CN_PERMANENT, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);

            IRobotLoadRecord2 deadLoadRecord = (IRobotLoadRecord2)deadLoadCase.Records.Create(IRobotLoadRecordType.I_LRT_DEAD);

            deadLoadRecord.SetValue((short)IRobotDeadRecordValues.I_DRV_ENTIRE_STRUCTURE, (double)1);

            //Create First lifiting load case
            IRobotSimpleCase lifitingCase1 = (IRobotSimpleCase)iCases.CreateSimple(caseNumber + 1, "Talha 1", IRobotCaseNature.I_CN_ACCIDENTAL, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            //Calculate the relative position of the load
            double relativePosition1 = ((c - e) / 2) / c;

            createConcentratedLoad(lifitingCase1, relativePosition1, concentratedLoad, bars[5]);

            //Create second lifting load case
            IRobotSimpleCase liftingCase2 = (IRobotSimpleCase)iCases.CreateSimple(caseNumber + 2, "Talha 2", IRobotCaseNature.I_CN_ACCIDENTAL, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);

            createConcentratedLoad(liftingCase2, 0.5, concentratedLoad, bars[5]);

            //Create load combinations
            IRobotCaseCombination uls1 = (IRobotCaseCombination)iCases.CreateCombination(caseNumber + 3, "ULS-1", IRobotCombinationType.I_CBT_ULS, IRobotCaseNature.I_CN_ACCIDENTAL, IRobotCaseAnalizeType.I_CAT_COMB);

            uls1.CaseFactors.New(caseNumber, (double)1.0);
            uls1.CaseFactors.New(caseNumber + 1, (double)1.0);

            IRobotCaseCombination uls2 = (IRobotCaseCombination)iCases.CreateCombination(caseNumber + 4, "ULS-2", IRobotCombinationType.I_CBT_ULS, IRobotCaseNature.I_CN_ACCIDENTAL, IRobotCaseAnalizeType.I_CAT_COMB);

            uls2.CaseFactors.New(caseNumber, (double)1.0);
            uls2.CaseFactors.New(caseNumber + 2, 1.0);

            IRobotCaseCombination sls1 = (IRobotCaseCombination)iCases.CreateCombination(caseNumber + 5, "SLS-1", IRobotCombinationType.I_CBT_SLS, IRobotCaseNature.I_CN_ACCIDENTAL, IRobotCaseAnalizeType.I_CAT_COMB);

            sls1.CaseFactors.New(caseNumber, 1.0);
            sls1.CaseFactors.New(caseNumber + 1, 1.0);

            IRobotCaseCombination sls2 = (IRobotCaseCombination)iCases.CreateCombination(caseNumber + 6, "SLS-2", IRobotCombinationType.I_CBT_SLS, IRobotCaseNature.I_CN_ACCIDENTAL, IRobotCaseAnalizeType.I_CAT_COMB);

            sls2.CaseFactors.New(caseNumber, 1.0);
            sls2.CaseFactors.New(caseNumber + 2, 1.0);

            loadsGenerated = true;
        }//createConcentratedLoad
Example #5
0
        }//unitSettings

        //This method creates a concentrated load in a determined position of a beam
        private void createConcentratedLoad(IRobotSimpleCase simpleCase, double position, double value, Bar bar)
        {
            IRobotLoadRecord2 irl = (IRobotLoadRecord2)simpleCase.Records.Create(IRobotLoadRecordType.I_LRT_BAR_FORCE_CONCENTRATED);

            irl.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_REL, 1.0);
            irl.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_X, position);
            irl.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_FZ, value);

            irl.Objects.AddOne(bar.id);
        }
Example #6
0
        private static void CreateLoads(IRobotSimpleCase ll, IRobotSimpleCase wl, IRobotSimpleCase dl, IRobotSimpleCase bl)
        {
            //define planar loads to be applied to the panels and slabs
            ll.Records.New(IRobotLoadRecordType.I_LRT_UNIFORM);    //record 1 - slab loads
            ll.Records.New(IRobotLoadRecordType.I_LRT_NODE_FORCE); //record 2 - Fat man load
            wl.Records.New(IRobotLoadRecordType.I_LRT_UNIFORM);    //record 3 - plate loads
//			wl_uplift.Records.New(IRobotLoadRecordType.I_LRT_UNIFORM);	//record 1
            dl.Records.New(IRobotLoadRecordType.I_LRT_DEAD);       //record 4 see pg. 150, 160 Robot API docs
            //sl.Records.New(IRobotLoadRecordType.I_LRT_UNIFORM);	//snow load for panels and slabs
            bl.Records.New(IRobotLoadRecordType.I_LRT_UNIFORM);    //record 5 - building load
        }
Example #7
0
        public static bool SetOwnWeight()
        {
            robotApp.Interactive = 0;
            IRobotSimpleCase  OwnWeight       = caseServer.CreateSimple(caseServer.FreeNumber, "OwnWeight", IRobotCaseNature.I_CN_PERMANENT, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            IRobotLoadRecord2 OwnWeightRecord = OwnWeight.Records.Create(IRobotLoadRecordType.I_LRT_DEAD) as IRobotLoadRecord2;

            OwnWeightRecord.SetValue((short)IRobotDeadRecordValues.I_DRV_ENTIRE_STRUCTURE, 1);
            OwnWeightRecord.SetValue((short)IRobotDeadRecordValues.I_DRV_COEFF, 1);
            OwnWeightRecord.SetValue((short)IRobotDeadRecordValues.I_DRV_Z, -1);
            robotApp.Interactive = 1;
            return(true);
        }
Example #8
0
        public static bool SetLiveLoad(Structure Structure)
        {
            robotApp.Interactive = 0;
            IRobotSimpleCase  liveLoad       = caseServer.CreateSimple(caseServer.FreeNumber, "Live", IRobotCaseNature.I_CN_EXPLOATATION, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            IRobotLoadRecord2 liveLoadRecord = liveLoad.Records.Create(IRobotLoadRecordType.I_LRT_BAR_UNIFORM) as IRobotLoadRecord2;

            liveLoadRecord.SetValue((short)IRobotUniformRecordValues.I_URV_RELATIVE, 1);
            liveLoadRecord.SetValue((short)IRobotUniformRecordValues.I_URV_LOCAL_SYSTEM, 1);
            liveLoadRecord.SetValue((short)IRobotUniformRecordValues.I_URV_PROJECTED, 1);
            liveLoadRecord.SetValue((short)IRobotUniformRecordValues.I_URV_PX, 0);
            liveLoadRecord.SetValue((short)IRobotUniformRecordValues.I_URV_PY, 0);
            liveLoadRecord.SetValue((short)IRobotUniformRecordValues.I_URV_PZ, -1000 * 10);
            liveLoadRecord.Objects.AddOne(Structure.Frames[0].Beams[0].Id);
            liveLoadRecord.Objects.AddOne(Structure.Frames[0].Beams[1].Id);
            robotApp.Interactive = 1;
            return(true);
        }
Example #9
0
        // helper method that creates a new load record in given load case
        //根据工况设置荷载
        private void create_concentrated_load(IRobotSimpleCase isc, double pos, double val)
        {
            // create a new force concentrated load record
            //添加一个集中荷载记录,类型为集中荷载
            IRobotLoadRecord2 ilr = (IRobotLoadRecord2)isc.Records.Create(IRobotLoadRecordType.I_LRT_BAR_FORCE_CONCENTRATED);


            // define the values of load record
            //给荷载记录赋值
            ilr.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_REL, 1.0);
            ilr.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_X, pos);
            ilr.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_FZ, val);

            // apply load record to both beams of the structure
            ilr.Objects.AddOne(beam1); //将ilr荷载作用到编号为beam1的单元上
            ilr.Objects.AddOne(beam2); //将ilr荷载作用到编号为beam2的单元上
        }
Example #10
0
        //施加集中荷载
        public static void create_concentrated_load(IRobotSimpleCase isc, int elementNO, double pos, double val)
        {
            // create a new force concentrated load record
            //添加一个集中荷载记录,类型为集中荷载I_LRT_BAR_UNIFORM
            //IRobotLoadRecord2 ilr = (IRobotLoadRecord2)isc.Records.Create(IRobotLoadRecordType.I_LRT_BAR_FORCE_CONCENTRATED);
            IRobotLoadRecord2 ilr = (IRobotLoadRecord2)isc.Records.Create(IRobotLoadRecordType.I_LRT_BAR_UNIFORM);

            // define the values of load record
            //给荷载记录赋值
            //ilr.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_REL, 1.0);
            //ilr.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_X, pos);
            //ilr.SetValue((short)IRobotBarForceConcentrateRecordValues.I_BFCRV_FZ, val);
            ilr.SetValue(System.Convert.ToInt16(IRobotUniformRecordValues.I_URV_PZ), val);

            // apply load record to both beams of the structure
            ilr.Objects.AddOne(elementNO);//将ilr荷载作用到编号为beam1的单元上
            //ilr.Objects.AddOne(elementNO);//将ilr荷载作用到编号为beam2的单元上
        }
Example #11
0
        public static bool SetWindloadLeft(Structure Structure)
        {
            //there is a known issue with setting the windload to left or right due to the local axis of frame drawing
            //if you draw from bottom to top it will be fine
            // if you draw from top to bottom , voila , error
            ////===============
            //For beams
            robotApp.Interactive = 0;
            IRobotSimpleCase windLoadLeft = caseServer.CreateSimple(caseServer.FreeNumber, "Wind_left", IRobotCaseNature.I_CN_WIND, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            //================= For Compression
            IRobotLoadRecord2 windLoadLeftRecordLeft = windLoadLeft.Records.Create(IRobotLoadRecordType.I_LRT_BAR_UNIFORM) as IRobotLoadRecord2;

            windLoadLeftRecordLeft.SetValue((short)IRobotUniformRecordValues.I_URV_RELATIVE, 1);
            windLoadLeftRecordLeft.SetValue((short)IRobotUniformRecordValues.I_URV_LOCAL_SYSTEM, 1);
            windLoadLeftRecordLeft.SetValue((short)IRobotUniformRecordValues.I_URV_PROJECTED, 1);
            windLoadLeftRecordLeft.SetValue((short)IRobotUniformRecordValues.I_URV_PX, 0);
            windLoadLeftRecordLeft.SetValue((short)IRobotUniformRecordValues.I_URV_PY, 0);
            windLoadLeftRecordLeft.SetValue((short)IRobotUniformRecordValues.I_URV_PZ, -1000 * 10);
            //================= For Suction
            IRobotLoadRecord2 windLoadLeftRecordRight = windLoadLeft.Records.Create(IRobotLoadRecordType.I_LRT_BAR_UNIFORM) as IRobotLoadRecord2;

            windLoadLeftRecordRight.SetValue((short)IRobotUniformRecordValues.I_URV_RELATIVE, 1);
            windLoadLeftRecordRight.SetValue((short)IRobotUniformRecordValues.I_URV_LOCAL_SYSTEM, 1);
            windLoadLeftRecordRight.SetValue((short)IRobotUniformRecordValues.I_URV_PROJECTED, 1);
            windLoadLeftRecordRight.SetValue((short)IRobotUniformRecordValues.I_URV_PX, 0);
            windLoadLeftRecordRight.SetValue((short)IRobotUniformRecordValues.I_URV_PY, 0);
            windLoadLeftRecordRight.SetValue((short)IRobotUniformRecordValues.I_URV_PZ, 1000 * 10);
            //=================
            //left
            windLoadLeftRecordLeft.Objects.AddOne(Structure.Frames[0].Columns[0].Id);
            windLoadLeftRecordLeft.Objects.AddOne(Structure.Frames[0].Beams[0].Id);
            windLoadLeftRecordLeft.Objects.AddOne(Structure.Frames[0].Columns[1].Id);

            //=============== Suction
            //right
            windLoadLeftRecordRight.Objects.AddOne(Structure.Frames[0].Beams[1].Id);

            robotApp.Interactive = 1;
            return(true);
        }
Example #12
0
        public static bool SetWindLoadRight(Structure Structure)
        {
            robotApp.Interactive = 0;
            IRobotSimpleCase windLoadRight = caseServer.CreateSimple(caseServer.FreeNumber, "Wind_Right", IRobotCaseNature.I_CN_WIND, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            //================= For Compression
            IRobotLoadRecord2 windLoadRightRecordLeft = windLoadRight.Records.Create(IRobotLoadRecordType.I_LRT_BAR_UNIFORM) as IRobotLoadRecord2;

            windLoadRightRecordLeft.SetValue((short)IRobotUniformRecordValues.I_URV_RELATIVE, 1);
            windLoadRightRecordLeft.SetValue((short)IRobotUniformRecordValues.I_URV_LOCAL_SYSTEM, 1);
            windLoadRightRecordLeft.SetValue((short)IRobotUniformRecordValues.I_URV_PROJECTED, 1);
            windLoadRightRecordLeft.SetValue((short)IRobotUniformRecordValues.I_URV_PX, 0);
            windLoadRightRecordLeft.SetValue((short)IRobotUniformRecordValues.I_URV_PY, 0);
            windLoadRightRecordLeft.SetValue((short)IRobotUniformRecordValues.I_URV_PZ, -1000 * 10);
            //================= For Suction
            IRobotLoadRecord2 windLoadRightRecordRight = windLoadRight.Records.Create(IRobotLoadRecordType.I_LRT_BAR_UNIFORM) as IRobotLoadRecord2;

            windLoadRightRecordRight.SetValue((short)IRobotUniformRecordValues.I_URV_RELATIVE, 1);
            windLoadRightRecordRight.SetValue((short)IRobotUniformRecordValues.I_URV_LOCAL_SYSTEM, 1);
            windLoadRightRecordRight.SetValue((short)IRobotUniformRecordValues.I_URV_PROJECTED, 1);
            windLoadRightRecordRight.SetValue((short)IRobotUniformRecordValues.I_URV_PX, 0);
            windLoadRightRecordRight.SetValue((short)IRobotUniformRecordValues.I_URV_PY, 0);
            windLoadRightRecordRight.SetValue((short)IRobotUniformRecordValues.I_URV_PZ, 1000 * 10);
            //=================
            //left

            windLoadRightRecordLeft.Objects.AddOne(Structure.Frames[0].Beams[1].Id);

            //=============== Compression
            //=============== Suction
            //right
            windLoadRightRecordRight.Objects.AddOne(Structure.Frames[0].Beams[0].Id);
            windLoadRightRecordRight.Objects.AddOne(Structure.Frames[0].Columns[0].Id);
            windLoadRightRecordRight.Objects.AddOne(Structure.Frames[0].Columns[1].Id);



            robotApp.Interactive = 1;
            return(true);
        }
Example #13
0
        private IRobotSimpleCase CreateLoadCases(out IRobotSimpleCase dl, out IRobotSimpleCase ll, out IRobotSimpleCase wl, out IRobotSimpleCase bl)
        {
            //create load cases
            dl = _structure.Cases.CreateSimple(_structure.Cases.FreeNumber, "Catia_DL",
                                               IRobotCaseNature.I_CN_PERMANENT,
                                               IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            ll = _structure.Cases.CreateSimple(_structure.Cases.FreeNumber, "Catia_LL", IRobotCaseNature.I_CN_EXPLOATATION,
                                               IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            wl = _structure.Cases.CreateSimple(_structure.Cases.FreeNumber, "Catia_WL", IRobotCaseNature.I_CN_WIND,
                                               IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            bl = _structure.Cases.CreateSimple(_structure.Cases.FreeNumber, "Catia_BL", IRobotCaseNature.I_CN_EXPLOATATION,
                                               IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);

//			IRobotSimpleCase sl = _structure.Cases.CreateSimple(_structure.Cases.FreeNumber, "Catia_SL", IRobotCaseNature.I_CN_SNOW, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
//			IRobotSimpleCase wl_uplift = _structure.Cases.CreateSimple(_structure.Cases.FreeNumber, "Catia_WL_Uplift", IRobotCaseNature.I_CN_WIND, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            IRobotCaseCombination comb1 = _structure.Cases.CreateCombination(_structure.Cases.FreeNumber, "Catia_DL+LL+WL+BL",
                                                                             IRobotCombinationType.I_CBT_ACC,
                                                                             IRobotCaseNature.I_CN_PERMANENT,
                                                                             IRobotCaseAnalizeType.I_CAT_COMB);
            IRobotCaseCombination comb2 = _structure.Cases.CreateCombination(_structure.Cases.FreeNumber, "Catia_DL_60+WL",
                                                                             IRobotCombinationType.I_CBT_ACC,
                                                                             IRobotCaseNature.I_CN_PERMANENT,
                                                                             IRobotCaseAnalizeType.I_CAT_COMB);

            RobotCaseFactorMngr caseManage1 = comb1.CaseFactors;

            caseManage1.New(1, 1.0);
            caseManage1.New(2, 1.0);
            caseManage1.New(3, 1.0);
            caseManage1.New(4, 1.0); //add the building load

            RobotCaseFactorMngr caseManage2 = comb2.CaseFactors;

            caseManage2.New(1, 0.6);
            caseManage2.New(2, 1.0);
            caseManage2.New(3, 1.0);
            return(dl);
        }
Example #14
0
        private void CreatePlates(double liveLoad, List <int> forLiveLoads, double windLoad, List <int> forWindLoads, double buildingLoad,
                                  List <int> forBuildingLoads, List <int> forDeadLoadsSlabs, IRobotSimpleCase ll, IRobotSimpleCase wl,
                                  IRobotSimpleCase bl, double fatManLoad, IRobotSimpleCase dl, List <int> forDeadLoadsBars)
        {
            #region material info

            //create the slab material
//			string materialName = "Catia_material_slab";
//			IRobotLabel Label = _structure.Labels.Create(IRobotLabelType.I_LT_MATERIAL, materialName);
//			RobotMaterialData Material = Label.Data as RobotMaterialData;
//			Material.Type = IRobotMaterialType.I_MT_CONCRETE;
//			Material.E = 30000000000;
//			Material.NU = 0.16;
//			Material.RO = 25000;
//			Material.Kirchoff = Material.E / (2*(1 + Material.NU));
//			_project.Structure.Labels.Store(Label);

            //create the panel type
            string             catSlabSectionName = "Catia_Slab";
            IRobotLabel        Label     = _structure.Labels.Create(IRobotLabelType.I_LT_PANEL_THICKNESS, catSlabSectionName);
            RobotThicknessData thickness = Label.Data as RobotThicknessData;
//			thickness.MaterialName = materialName;
            thickness.MaterialName  = "CONCR";
            thickness.ThicknessType = IRobotThicknessType.I_TT_HOMOGENEOUS;
            RobotThicknessHomoData thicknessData = thickness.Data as RobotThicknessHomoData;
            if (_plateInfo.Count != 0)
            {
                thicknessData.ThickConst = _plateInfo[0].Thickness / 1000; //test one panel for thickness
            }
            else
            {
                thicknessData.ThickConst = .02;
            }

            _project.Structure.Labels.Store(Label);

            //create the panel material
//			string materialName = "Catia_material_panel";
//			Label = _structure.Labels.Create(IRobotLabelType.I_LT_MATERIAL, materialName);
//			Material = Label.Data as RobotMaterialData;
//			Material.Type = IRobotMaterialType.I_MT_CONCRETE;
//			Material.Type = IRobotMaterialType.I_MT_ALUMINIUM;
//			Material.E = 69000000000;
//			Material.NU = 0.16;		//the poisson ratio
//			Material.RO = 25000;	//the mass
//			Material.Kirchoff = Material.E / (2*(1 + Material.NU));
//			_project.Structure.Labels.Store(Label);

            string catPanelSectionName = "Catia_Panel";
            Label     = _structure.Labels.Create(IRobotLabelType.I_LT_PANEL_THICKNESS, catPanelSectionName);
            thickness = Label.Data as RobotThicknessData;
//			thickness.MaterialName = materialName;
            thickness.MaterialName   = "ALUM";
            thickness.ThicknessType  = IRobotThicknessType.I_TT_HOMOGENEOUS;
            thicknessData            = thickness.Data as RobotThicknessHomoData;
            thicknessData.ThickConst = 0.003175; //a 1/8" thick aluminum panel, we'll need to use a single finite element
            _project.Structure.Labels.Store(Label);

            string catShearPanelName = "Catia_Shear";
            Label     = _structure.Labels.Create(IRobotLabelType.I_LT_PANEL_THICKNESS, catShearPanelName);
            thickness = Label.Data as RobotThicknessData;
            thickness.MaterialName   = "CONCR";
            thickness.ThicknessType  = IRobotThicknessType.I_TT_HOMOGENEOUS;
            thicknessData            = thickness.Data as RobotThicknessHomoData;
            thicknessData.ThickConst = 0.3; //a 1/8" thick aluminum panel, we'll need to use a single finite element
            _project.Structure.Labels.Store(Label);

            #endregion

            int plateId = 10000;

            for (int i = 0; i < _plateInfo.Count; i++)
            {
                Console.WriteLine("Now creating plate " + plateId.ToString() + "...");
                List <int> robotNodes = new List <int>();

                var p = (AnalyticalPlate)_plateInfo[i];  //the plate to create

                //at this point we know the CATIA nodes and the robot nodes
                //but the robot node list for each plate is empty
                //find the robot node that corresponds to each catia node in the list
                //fill up the corresponding robot id list

                //foreach (string catIndex in p.CatiaPoints)
                //{
                //    foreach (Node n in _nodeInfo)
                //    {
                //        //if the node id equals that in the catia points list
                //        if (n.catiaID.Equals(catIndex))
                //        {
                //            robotNodes.Add(n.robotID);	//add the int robot id to the other list
                //        }
                //        else
                //        {
                //            continue;	//continue;
                //        }
                //    }
                //}

                p.Nodes = robotNodes; //change out the robotNodes list on the object

                //the robot point array to hold all the pts
                RobotPointsArray pts = new RobotPointsArrayClass();
                pts.SetSize(p.Nodes.Count);

                int ptIndex = 1;

                //fill up the points array
                foreach (int rId in p.Nodes)
                {
                    IRobotNode robNode = _structure.Nodes.Get(rId) as IRobotNode;
                    pts.Set(ptIndex, robNode.X, robNode.Y, robNode.Z);
                    //MessageBox.Show(robNode.X.ToString());
                    ptIndex++;
                }

                //int plateId = _structure.Objects.FreeNumber;

                _project.Structure.Objects.CreateContour(plateId, pts);
                IRobotObjObject obj = _structure.Objects.Get(plateId) as IRobotObjObject;
                obj.Main.Attribs.Meshed = 1;

                if (p.PlateType == PlateType.Slab)
                {
                    obj.SetLabel(IRobotLabelType.I_LT_PANEL_THICKNESS, catSlabSectionName);
                    obj.SetLabel(IRobotLabelType.I_LT_PANEL_REINFORCEMENT, "Panel");
                }
                else if (p.PlateType == PlateType.Panel)
                {
                    obj.SetLabel(IRobotLabelType.I_LT_PANEL_THICKNESS, catPanelSectionName);
                }
                else if (p.PlateType == PlateType.Shear)
                {
                    obj.SetLabel(IRobotLabelType.I_LT_PANEL_THICKNESS, catShearPanelName);
                    obj.SetLabel(IRobotLabelType.I_LT_PANEL_REINFORCEMENT, "Wall");
                }
                else
                {
                    obj.SetLabel(IRobotLabelType.I_LT_PANEL_THICKNESS, catPanelSectionName);
                }


                obj.Initialize();
                obj.Update();


                //create some loads
                //if the live load has a value
//				if(p.PlateType == PlateType.slab)
                if (p.LiveLoad > 0.0)
                {
                    Console.WriteLine("Now creating live load on slab " + plateId.ToString() + "...");

                    liveLoad = p.LiveLoad;
                    forLiveLoads.Add(plateId);
                }
                //if the wind load has a value
//				else if (p.PlateType == PlateType.panel)
                if (p.WindLoad > 0.0)
                {
                    Console.WriteLine("Now creating wind load on panel " + plateId.ToString() + "...");

                    windLoad = p.WindLoad;
                    forWindLoads.Add(plateId);
                }

                if (p.BuildingLoad > 0.0)
                {
                    Console.WriteLine("Now creating building load on panel " + plateId.ToString() + "...");
                    buildingLoad = p.BuildingLoad;
                    forBuildingLoads.Add(plateId);
                }
                forDeadLoadsSlabs.Add(plateId); //all

                p.Id = plateId;                 //set the plateId on the object
                plateId++;
            }

            IRobotLoadRecord rec = null;

            if (forLiveLoads.Count > 0)
            {
                //add the live loads on all panels
                rec = ll.Records.Get(1);
                rec.Objects.FromText(forLiveLoads[0].ToString() + "to" + forLiveLoads[forLiveLoads.Count - 1].ToString());
                rec.SetValue(2, -liveLoad);
                rec.SetValue(11, 0);
            }

            if (forWindLoads.Count > 0)
            {
                //add the forces on the wind panels
                rec = wl.Records.Get(1);
                rec.Objects.FromText(forWindLoads[0].ToString() + "to" + forWindLoads[forWindLoads.Count - 1].ToString());

                rec.SetValue(0, _windx * windLoad); //the X value
                rec.SetValue(1, _windy * windLoad); //the Y value
                rec.SetValue(2, _windz * windLoad); // the Z value
//				rec.SetValue(11, 1);	//this sets it use the "local" normal for the wind direction
                rec.SetValue(11, 0);                //this is the default - loads act in the global direction

                //add the uplift on the wind panels
//				rec = wl_uplift.Records.Get(1);
//				rec.Objects.FromText(forWindLoads[0].ToString() +"to"+forWindLoads[forWindLoads.Count-1].ToString());
//				rec.SetValue(2, -windLoad);
//				rec.SetValue(11,1);
            }

            if (forBuildingLoads.Count > 0)
            {
                rec = bl.Records.Get(1);
                rec.Objects.FromText(forBuildingLoads[0].ToString() + "to" +
                                     forBuildingLoads[forBuildingLoads.Count - 1].ToString());
                rec.SetValue(2, -buildingLoad);
                rec.SetValue(11, 0);
            }

            //create a randomly placed live load on the structure
            //the fat man load
            IRobotCollection nodes = _nodes.GetAll();
            Random           r     = new Random();
            int randPoint          = r.Next((nodes.Get(1) as IRobotNode).Number, (nodes.Get(nodes.Count) as IRobotNode).Number);
//			Debug.WriteLine(randPoint);
            rec = ll.Records.Get(2);
            rec.SetValue(2, -fatManLoad);
            rec.Objects.FromText(randPoint.ToString());

            //set the dead loads for the structure
            rec = dl.Records.Get(1);

            //add dead loads to bars
            if (forDeadLoadsBars.Count > 0 && forDeadLoadsSlabs.Count == 0)
            {
                rec.Objects.FromText(forDeadLoadsBars[0].ToString() + "to" +
                                     forDeadLoadsBars[forDeadLoadsBars.Count - 1].ToString());
            }
            //add dead loads to bars and slabs
            else if (forDeadLoadsBars.Count > 0 && forDeadLoadsSlabs.Count > 0)
            {
                rec.Objects.FromText(forDeadLoadsBars[0].ToString() + "to" +
                                     forDeadLoadsBars[forDeadLoadsBars.Count - 1].ToString() + " " +
                                     forDeadLoadsSlabs[0].ToString() + "to" +
                                     forDeadLoadsSlabs[forDeadLoadsSlabs.Count - 1].ToString());
            }
            //add dead loads to slabs only
            else if (forDeadLoadsBars.Count == 0 && forDeadLoadsSlabs.Count > 0)
            {
                rec.Objects.FromText(forDeadLoadsSlabs[0].ToString() + "to" +
                                     forDeadLoadsSlabs[forDeadLoadsSlabs.Count - 1].ToString());
            }
            rec.SetValue(2, -1); //set the z value

//			Console.WriteLine("Waiting for load application...");
//			System.Threading.Thread.Sleep(10000);
        }
Example #15
0
        // generate loads
        private void generateLoads(object sender, EventArgs e)
        {
            if (!geometryCreated)//如果没有创建几何
            {
                // geometry must be created first
                //创建几何
                createGeometry(sender, e);
            }

            // switch Interactive flag off to avoid any questions that need user interaction in Robot
            //关闭robot的交互
            iapp.Interactive = 0;

            if (loadsGenerated)//如果几何已经创建好
            {
                // remove all existing load cases
                //将现有工况全部清除
                RobotSelection iallCases = iapp.Project.Structure.Selections.CreateFull(IRobotObjectType.I_OT_CASE);
                iapp.Project.Structure.Cases.DeleteMany(iallCases);
            }

            // get reference to load cases server
            //获取本项目的工况集合
            IRobotCaseServer icases = (IRobotCaseServer)iapp.Project.Structure.Cases;

            // get first available (free) user number for load case
            //获取可用工况编号
            int c1 = icases.FreeNumber;

            if (checkDeadLoad.Checked)//如果选中了自重荷载
            {
                // create dead load case
                //创建自重工况
                IRobotSimpleCase isc1 = (IRobotSimpleCase)icases.CreateSimple(c1, "Dead load", IRobotCaseNature.I_CN_PERMANENT, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);

                // define dead load record for the entire structure
                //定义自重荷载,添加到自重工况里面取
                IRobotLoadRecord2 ilr1 = (IRobotLoadRecord2)isc1.Records.Create(IRobotLoadRecordType.I_LRT_DEAD);
                ilr1.SetValue((short)IRobotDeadRecordValues.I_DRV_ENTIRE_STRUCTURE, (double)1);
                ++c1;
            }

            // create live load case
            //创建活荷载工况
            IRobotSimpleCase isc = (IRobotSimpleCase)icases.CreateSimple(c1, "Live load", IRobotCaseNature.I_CN_ACCIDENTAL, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            // convert force value from kN to N and change the direction
            //荷载格式转换
            double val = -1000 * System.Convert.ToDouble(editIntensity1.Text);

            // add force concentrated load records in 5 points on the beams
            //给活荷载工况添加荷载
            create_concentrated_load(isc, 0.0, 0.5 * val);
            create_concentrated_load(isc, 0.25, val);
            create_concentrated_load(isc, 0.5, val);
            create_concentrated_load(isc, 0.75, val);
            create_concentrated_load(isc, 1.0, 0.5 * val);

            // create live load case
            //创建另外一个荷载工况
            isc = (IRobotSimpleCase)icases.CreateSimple(c1 + 1, "Exploitation load", IRobotCaseNature.I_CN_EXPLOATATION, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            // convert force value from kN to N and change the direction
            //把荷载值从KN转换成N
            val = -1000 * System.Convert.ToDouble(editIntensity2.Text);
            // add force concentrated load records in 5 points on the beams
            //将荷载作用到梁上面
            create_concentrated_load(isc, 0.0, 0.5 * val);
            create_concentrated_load(isc, 0.25, val);
            create_concentrated_load(isc, 0.5, val);
            create_concentrated_load(isc, 0.75, val);
            create_concentrated_load(isc, 1.0, 0.5 * val);

            // create wind load applied to columns
            //添加荷载工况,风荷载
            isc = (IRobotSimpleCase)icases.CreateSimple(c1 + 2, "Wind load", IRobotCaseNature.I_CN_WIND, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            IRobotLoadRecord2 ilr = (IRobotLoadRecord2)isc.Records.Create(IRobotLoadRecordType.I_LRT_BAR_UNIFORM);

            ilr.SetValue((short)IRobotBarUniformRecordValues.I_BURV_PZ, 1000 * System.Convert.ToDouble(editIntensity3.Text));
            ilr.SetValue((short)IRobotBarUniformRecordValues.I_BURV_LOCAL, 1.0);
            ilr.Objects.AddOne(beam1 - 1);
            ilr.Objects.AddOne(beam2 + 1);

            // create combinations
            //添加荷载组合
            IRobotCaseCombination icc = (IRobotCaseCombination)icases.CreateCombination(c1 + 3, "Comb ULS", IRobotCombinationType.I_CBT_ULS, IRobotCaseNature.I_CN_EXPLOATATION, IRobotCaseAnalizeType.I_CAT_COMB);

            icc.CaseFactors.New(c1, System.Convert.ToDouble(editUls1.Text));
            icc.CaseFactors.New(c1 + 1, System.Convert.ToDouble(editUls2.Text));
            icc.CaseFactors.New(c1 + 2, System.Convert.ToDouble(editUls3.Text));

            icc = (IRobotCaseCombination)icases.CreateCombination(c1 + 4, "Comb SLS", IRobotCombinationType.I_CBT_SLS, IRobotCaseNature.I_CN_EXPLOATATION, IRobotCaseAnalizeType.I_CAT_COMB);
            icc.CaseFactors.New(c1, System.Convert.ToDouble(editSls1.Text));
            icc.CaseFactors.New(c1 + 1, System.Convert.ToDouble(editSls2.Text));
            icc.CaseFactors.New(c1 + 2, System.Convert.ToDouble(editSls3.Text));

            loadsGenerated = true;

            // switch Interactive flag on to allow user to work with Robot GUI
            //允许ROBOT界面交互
            iapp.Interactive = 1;

            // get the focus back
            //获取焦点
            this.Activate();
        }
Example #16
0
        private void CreatePlates(double liveLoad, List<int> forLiveLoads, double windLoad, List<int> forWindLoads, double buildingLoad,
                                  List<int> forBuildingLoads, List<int> forDeadLoadsSlabs, IRobotSimpleCase ll, IRobotSimpleCase wl,
                                  IRobotSimpleCase bl, double fatManLoad, IRobotSimpleCase dl, List<int> forDeadLoadsBars)
        {
            #region material info

            //create the slab material
            //			string materialName = "Catia_material_slab";
            //			IRobotLabel Label = _structure.Labels.Create(IRobotLabelType.I_LT_MATERIAL, materialName);
            //			RobotMaterialData Material = Label.Data as RobotMaterialData;
            //			Material.Type = IRobotMaterialType.I_MT_CONCRETE;
            //			Material.E = 30000000000;
            //			Material.NU = 0.16;
            //			Material.RO = 25000;
            //			Material.Kirchoff = Material.E / (2*(1 + Material.NU));
            //			_project.Structure.Labels.Store(Label);

            //create the panel type
            string catSlabSectionName = "Catia_Slab";
            IRobotLabel Label = _structure.Labels.Create(IRobotLabelType.I_LT_PANEL_THICKNESS, catSlabSectionName);
            RobotThicknessData thickness = Label.Data as RobotThicknessData;
            //			thickness.MaterialName = materialName;
            thickness.MaterialName = "CONCR";
            thickness.ThicknessType = IRobotThicknessType.I_TT_HOMOGENEOUS;
            RobotThicknessHomoData thicknessData = thickness.Data as RobotThicknessHomoData;
            if (_plateInfo.Count != 0)
            {
                thicknessData.ThickConst = _plateInfo[0].Thickness/1000; //test one panel for thickness
            }
            else
            {
                thicknessData.ThickConst = .02;
            }

            _project.Structure.Labels.Store(Label);

            //create the panel material
            //			string materialName = "Catia_material_panel";
            //			Label = _structure.Labels.Create(IRobotLabelType.I_LT_MATERIAL, materialName);
            //			Material = Label.Data as RobotMaterialData;
            //			Material.Type = IRobotMaterialType.I_MT_CONCRETE;
            //			Material.Type = IRobotMaterialType.I_MT_ALUMINIUM;
            //			Material.E = 69000000000;
            //			Material.NU = 0.16;		//the poisson ratio
            //			Material.RO = 25000;	//the mass
            //			Material.Kirchoff = Material.E / (2*(1 + Material.NU));
            //			_project.Structure.Labels.Store(Label);

            string catPanelSectionName = "Catia_Panel";
            Label = _structure.Labels.Create(IRobotLabelType.I_LT_PANEL_THICKNESS, catPanelSectionName);
            thickness = Label.Data as RobotThicknessData;
            //			thickness.MaterialName = materialName;
            thickness.MaterialName = "ALUM";
            thickness.ThicknessType = IRobotThicknessType.I_TT_HOMOGENEOUS;
            thicknessData = thickness.Data as RobotThicknessHomoData;
            thicknessData.ThickConst = 0.003175; //a 1/8" thick aluminum panel, we'll need to use a single finite element
            _project.Structure.Labels.Store(Label);

            string catShearPanelName = "Catia_Shear";
            Label = _structure.Labels.Create(IRobotLabelType.I_LT_PANEL_THICKNESS, catShearPanelName);
            thickness = Label.Data as RobotThicknessData;
            thickness.MaterialName = "CONCR";
            thickness.ThicknessType = IRobotThicknessType.I_TT_HOMOGENEOUS;
            thicknessData = thickness.Data as RobotThicknessHomoData;
            thicknessData.ThickConst = 0.3; //a 1/8" thick aluminum panel, we'll need to use a single finite element
            _project.Structure.Labels.Store(Label);

            #endregion

            int plateId = 10000;

            for (int i = 0; i < _plateInfo.Count; i++)
            {
                Console.WriteLine("Now creating plate " + plateId.ToString() + "...");
                List<int> robotNodes = new List<int>();

                var p = (AnalyticalPlate) _plateInfo[i]; //the plate to create

                //at this point we know the CATIA nodes and the robot nodes
                //but the robot node list for each plate is empty
                //find the robot node that corresponds to each catia node in the list
                //fill up the corresponding robot id list

                //foreach (string catIndex in p.CatiaPoints)
                //{
                //    foreach (Node n in _nodeInfo)
                //    {
                //        //if the node id equals that in the catia points list
                //        if (n.catiaID.Equals(catIndex))
                //        {
                //            robotNodes.Add(n.robotID);	//add the int robot id to the other list
                //        }
                //        else
                //        {
                //            continue;	//continue;
                //        }
                //    }
                //}

                p.Nodes = robotNodes; //change out the robotNodes list on the object

                //the robot point array to hold all the pts
                RobotPointsArray pts = new RobotPointsArrayClass();
                pts.SetSize(p.Nodes.Count);

                int ptIndex = 1;

                //fill up the points array
                foreach (int rId in p.Nodes)
                {
                    IRobotNode robNode = _structure.Nodes.Get(rId) as IRobotNode;
                    pts.Set(ptIndex, robNode.X, robNode.Y, robNode.Z);
                    //MessageBox.Show(robNode.X.ToString());
                    ptIndex++;
                }

                //int plateId = _structure.Objects.FreeNumber;

                _project.Structure.Objects.CreateContour(plateId, pts);
                IRobotObjObject obj = _structure.Objects.Get(plateId) as IRobotObjObject;
                obj.Main.Attribs.Meshed = 1;

                if (p.PlateType == PlateType.Slab)
                {
                    obj.SetLabel(IRobotLabelType.I_LT_PANEL_THICKNESS, catSlabSectionName);
                    obj.SetLabel(IRobotLabelType.I_LT_PANEL_REINFORCEMENT, "Panel");
                }
                else if (p.PlateType == PlateType.Panel)
                    obj.SetLabel(IRobotLabelType.I_LT_PANEL_THICKNESS, catPanelSectionName);
                else if (p.PlateType == PlateType.Shear)
                {
                    obj.SetLabel(IRobotLabelType.I_LT_PANEL_THICKNESS, catShearPanelName);
                    obj.SetLabel(IRobotLabelType.I_LT_PANEL_REINFORCEMENT, "Wall");
                }
                else
                    obj.SetLabel(IRobotLabelType.I_LT_PANEL_THICKNESS, catPanelSectionName);

                obj.Initialize();
                obj.Update();

                //create some loads
                //if the live load has a value
            //				if(p.PlateType == PlateType.slab)
                if (p.LiveLoad > 0.0)
                {
                    Console.WriteLine("Now creating live load on slab " + plateId.ToString() + "...");

                    liveLoad = p.LiveLoad;
                    forLiveLoads.Add(plateId);
                }
                //if the wind load has a value
            //				else if (p.PlateType == PlateType.panel)
                if (p.WindLoad > 0.0)
                {
                    Console.WriteLine("Now creating wind load on panel " + plateId.ToString() + "...");

                    windLoad = p.WindLoad;
                    forWindLoads.Add(plateId);
                }

                if (p.BuildingLoad > 0.0)
                {
                    Console.WriteLine("Now creating building load on panel " + plateId.ToString() + "...");
                    buildingLoad = p.BuildingLoad;
                    forBuildingLoads.Add(plateId);
                }
                forDeadLoadsSlabs.Add(plateId); //all

                p.Id = plateId; //set the plateId on the object
                plateId++;
            }

            IRobotLoadRecord rec = null;

            if (forLiveLoads.Count > 0)
            {
                //add the live loads on all panels
                rec = ll.Records.Get(1);
                rec.Objects.FromText(forLiveLoads[0].ToString() + "to" + forLiveLoads[forLiveLoads.Count - 1].ToString());
                rec.SetValue(2, -liveLoad);
                rec.SetValue(11, 0);
            }

            if (forWindLoads.Count > 0)
            {
                //add the forces on the wind panels
                rec = wl.Records.Get(1);
                rec.Objects.FromText(forWindLoads[0].ToString() + "to" + forWindLoads[forWindLoads.Count - 1].ToString());

                rec.SetValue(0, _windx*windLoad); //the X value
                rec.SetValue(1, _windy*windLoad); //the Y value
                rec.SetValue(2, _windz*windLoad); // the Z value
            //				rec.SetValue(11, 1);	//this sets it use the "local" normal for the wind direction
                rec.SetValue(11, 0); //this is the default - loads act in the global direction

                //add the uplift on the wind panels
            //				rec = wl_uplift.Records.Get(1);
            //				rec.Objects.FromText(forWindLoads[0].ToString() +"to"+forWindLoads[forWindLoads.Count-1].ToString());
            //				rec.SetValue(2, -windLoad);
            //				rec.SetValue(11,1);
            }

            if (forBuildingLoads.Count > 0)
            {
                rec = bl.Records.Get(1);
                rec.Objects.FromText(forBuildingLoads[0].ToString() + "to" +
                                     forBuildingLoads[forBuildingLoads.Count - 1].ToString());
                rec.SetValue(2, -buildingLoad);
                rec.SetValue(11, 0);
            }

            //create a randomly placed live load on the structure
            //the fat man load
            IRobotCollection nodes = _nodes.GetAll();
            Random r = new Random();
            int randPoint = r.Next((nodes.Get(1) as IRobotNode).Number, (nodes.Get(nodes.Count) as IRobotNode).Number);
            //			Debug.WriteLine(randPoint);
            rec = ll.Records.Get(2);
            rec.SetValue(2, -fatManLoad);
            rec.Objects.FromText(randPoint.ToString());

            //set the dead loads for the structure
            rec = dl.Records.Get(1);

            //add dead loads to bars
            if (forDeadLoadsBars.Count > 0 && forDeadLoadsSlabs.Count == 0)
            {
                rec.Objects.FromText(forDeadLoadsBars[0].ToString() + "to" +
                                     forDeadLoadsBars[forDeadLoadsBars.Count - 1].ToString());
            }
                //add dead loads to bars and slabs
            else if (forDeadLoadsBars.Count > 0 && forDeadLoadsSlabs.Count > 0)
            {
                rec.Objects.FromText(forDeadLoadsBars[0].ToString() + "to" +
                                     forDeadLoadsBars[forDeadLoadsBars.Count - 1].ToString() + " " +
                                     forDeadLoadsSlabs[0].ToString() + "to" +
                                     forDeadLoadsSlabs[forDeadLoadsSlabs.Count - 1].ToString());
            }
                //add dead loads to slabs only
            else if (forDeadLoadsBars.Count == 0 && forDeadLoadsSlabs.Count > 0)
            {
                rec.Objects.FromText(forDeadLoadsSlabs[0].ToString() + "to" +
                                     forDeadLoadsSlabs[forDeadLoadsSlabs.Count - 1].ToString());
            }
            rec.SetValue(2, -1); //set the z value

            //			Console.WriteLine("Waiting for load application...");
            //			System.Threading.Thread.Sleep(10000);
        }
Example #17
0
        private IRobotSimpleCase CreateLoadCases(out IRobotSimpleCase dl, out IRobotSimpleCase ll, out IRobotSimpleCase wl, out IRobotSimpleCase bl)
        {
            //create load cases
            dl = _structure.Cases.CreateSimple(_structure.Cases.FreeNumber, "Catia_DL",
                                                                IRobotCaseNature.I_CN_PERMANENT,
                                                                IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            ll = _structure.Cases.CreateSimple(_structure.Cases.FreeNumber, "Catia_LL", IRobotCaseNature.I_CN_EXPLOATATION,
                                               IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            wl = _structure.Cases.CreateSimple(_structure.Cases.FreeNumber, "Catia_WL", IRobotCaseNature.I_CN_WIND,
                                               IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            bl = _structure.Cases.CreateSimple(_structure.Cases.FreeNumber, "Catia_BL", IRobotCaseNature.I_CN_EXPLOATATION,
                                               IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);

            //			IRobotSimpleCase sl = _structure.Cases.CreateSimple(_structure.Cases.FreeNumber, "Catia_SL", IRobotCaseNature.I_CN_SNOW, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            //			IRobotSimpleCase wl_uplift = _structure.Cases.CreateSimple(_structure.Cases.FreeNumber, "Catia_WL_Uplift", IRobotCaseNature.I_CN_WIND, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
            IRobotCaseCombination comb1 = _structure.Cases.CreateCombination(_structure.Cases.FreeNumber, "Catia_DL+LL+WL+BL",
                                                                             IRobotCombinationType.I_CBT_ACC,
                                                                             IRobotCaseNature.I_CN_PERMANENT,
                                                                             IRobotCaseAnalizeType.I_CAT_COMB);
            IRobotCaseCombination comb2 = _structure.Cases.CreateCombination(_structure.Cases.FreeNumber, "Catia_DL_60+WL",
                                                                             IRobotCombinationType.I_CBT_ACC,
                                                                             IRobotCaseNature.I_CN_PERMANENT,
                                                                             IRobotCaseAnalizeType.I_CAT_COMB);

            RobotCaseFactorMngr caseManage1 = comb1.CaseFactors;
            caseManage1.New(1, 1.0);
            caseManage1.New(2, 1.0);
            caseManage1.New(3, 1.0);
            caseManage1.New(4, 1.0); //add the building load

            RobotCaseFactorMngr caseManage2 = comb2.CaseFactors;
            caseManage2.New(1, 0.6);
            caseManage2.New(2, 1.0);
            caseManage2.New(3, 1.0);
            return dl;
        }
Example #18
0
 private static void CreateLoads(IRobotSimpleCase ll, IRobotSimpleCase wl, IRobotSimpleCase dl, IRobotSimpleCase bl)
 {
     //define planar loads to be applied to the panels and slabs
     ll.Records.New(IRobotLoadRecordType.I_LRT_UNIFORM); //record 1 - slab loads
     ll.Records.New(IRobotLoadRecordType.I_LRT_NODE_FORCE); //record 2 - Fat man load
     wl.Records.New(IRobotLoadRecordType.I_LRT_UNIFORM); //record 3 - plate loads
     //			wl_uplift.Records.New(IRobotLoadRecordType.I_LRT_UNIFORM);	//record 1
     dl.Records.New(IRobotLoadRecordType.I_LRT_DEAD); //record 4 see pg. 150, 160 Robot API docs
     //sl.Records.New(IRobotLoadRecordType.I_LRT_UNIFORM);	//snow load for panels and slabs
     bl.Records.New(IRobotLoadRecordType.I_LRT_UNIFORM); //record 5 - building load
 }
Example #19
0
        /// <summary>
        /// 进行荷载组合,考虑冲突荷载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click_1(object sender, EventArgs e)
        {
            //第一步,从元素表格里面获取所有元素,组成数组
            string[] elementArr = GetCaseInput(); //数组
            string[] elementArrWithNotNullElement = RemoveNullElement(elementArr);
            for (int i = 0; i < elementArrWithNotNullElement.Length; i++)
            {
                //求元素数组的所有组合
                List <string[]> ListCombination = PermutationAndCombination <string> .GetCombination(elementArrWithNotNullElement, i + 1); //第一个参数是数据源,第二个参数是从中选取的元素数量

                //将结果输出到结果表格中去
                foreach (var arr in ListCombination)
                {
                    if (InvalidLoadCombine(arr))
                    {
                        string result = string.Empty;
                        result = string.Join("+", arr);//数组转成字符串
                        int index = dataGridViewOutPut.Rows.Add();
                        dataGridViewOutPut.Rows[index].Cells[0].Value = result;
                    }
                }
            }
            //获取本项目的荷载容器
            IRobotCaseServer icases = (IRobotCaseServer)iapp.Project.Structure.Cases;
            //获取可用荷载编号
            int             c1       = icases.FreeNumber;
            List <LoadInfo> loadList = new List <LoadInfo>();

            loadList = GetLoadInfo();
            List <caseInfo> caseList = new List <caseInfo>();

            for (int i = 0; i < loadList.Count; i++)
            {
                //创建一个荷载(I_LRT_BAR_UNIFORM)
                //IRobotSimpleCase isc1 = (IRobotSimpleCase)icases.CreateSimple(c1+i, loadList[i].LoadName, IRobotCaseNature.I_CN_ACCIDENTAL, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
                IRobotSimpleCase isc1 = (IRobotSimpleCase)icases.CreateSimple(c1 + i, loadList[i].LoadName, IRobotCaseNature.I_CN_ACCIDENTAL, IRobotCaseAnalizeType.I_CAT_STATIC_LINEAR);
                //给荷载赋值
                BeamTools.create_concentrated_load(isc1, loadList[i].ElementNumber, 0.5, loadList[i].LoadValue);
                caseInfo temp = new caseInfo();
                temp.CaseName   = loadList[i].LoadName;
                temp.CaseNumber = c1 + i;
                caseList.Add(temp);
            }

            string[] allCombines = GetAllLoadCombines();
            for (int i = 0; i < allCombines.Length; i++)
            {
                //添加荷载组合
                if (!string.IsNullOrEmpty(allCombines[i]))
                {
                    IRobotCaseCombination icc = (IRobotCaseCombination)icases.CreateCombination(i + c1 + loadList.Count + 1, allCombines[i], IRobotCombinationType.I_CBT_ULS, IRobotCaseNature.I_CN_EXPLOATATION, IRobotCaseAnalizeType.I_CAT_COMB);
                    string[] loadsArray       = allCombines[i].Split('+');
                    for (int j = 0; j < loadsArray.Length; j++)
                    {
                        int caseNumber = getCaseNumber(caseList, loadsArray[j]);
                        icc.CaseFactors.New(caseNumber, 1);
                    }
                }
            }
            //
            loadsGenerated = true;
        }