Exemple #1
0
        public void ApplyPointLoadsByCombo(string comboName, ref double deadFactor)
        {
            sLoadCombination combo = GetLoadComboByName(comboName);

            //double Dfactor = 0.0;

            foreach (sNode sn in this.nodes)
            {
                StatNode stn = sn.extraData as StatNode;
                if (stn != null)
                {
                    if (sn.pointLoads != null && sn.pointLoads.Count > 0)
                    {
                        sPointLoad comboLoad = new sPointLoad();
                        if (combo.combinationType == eCombinationType.LinearAdditive)
                        {
                            for (int i = 0; i < combo.patterns.Count; ++i)
                            {
                                string pattern = combo.patterns[i];
                                double factor  = combo.factors[i];

                                if (pattern != "DEAD")
                                {
                                    sn.UpdatePointLoadByPatternFactor_LinearAdditive(pattern, factor, ref comboLoad);
                                }
                                else
                                {
                                    deadFactor = factor;
                                }
                            }
                        }
                        //else what?

                        if (comboLoad.forceVector != null || comboLoad.momentVector != null)
                        {
                            //need to reset node load????????????????
                            comboLoad.location = sn.location;
                            if (comboLoad.forceVector != null)
                            {
                                stn.AddLoad(comboLoad.forceVector.X, comboLoad.forceVector.Y, comboLoad.forceVector.Z);

                                object t = stn;
                            }
                            if (comboLoad.momentVector != null)
                            {
                                stn.AddLoad(comboLoad.momentVector.X, comboLoad.momentVector.Y, comboLoad.momentVector.Z);
                            }
                        }
                    }
                }
            }
        }
Exemple #2
0
 public void ApplyPointLoadsByPattern(string patternName)
 {
     foreach (sNode sn in this.nodes)
     {
         StatNode stn = sn.extraData as StatNode;
         if (stn != null)
         {
             if (sn.pointLoads != null && sn.pointLoads.Count > 0)
             {
                 sXYZ load = sXYZ.Zero();
                 //sXYZ moment = sXYZ.Zero();
                 foreach (sPointLoad pl in sn.pointLoads)
                 {
                     if (pl.loadPatternName == patternName)
                     {
                         load += pl.forceVector;
                         //moment += pl.momentVector;
                         //currently StatSystem cannot do moment load
                     }
                 }
                 if (load.GetLength() > 0.0)
                 {
                     stn.AddLoad(load.X, load.Y, load.Z);
                 }
             }
         }
     }
 }