public sLineLoad DuplicatesLineLoad()
        {
            sLineLoad newll = new sLineLoad();

            newll.loadPatternName = this.loadPatternName;
            newll.loadType        = this.loadType;
            newll.AsGlobalCorSys  = this.AsGlobalCorSys;

            newll.load_Scalar = this.load_Scalar;
            if (this.load_Force != null)
            {
                newll.load_Force = this.load_Force.DuplicatesXYZ();
            }
            if (this.load_Moment != null)
            {
                newll.load_Moment = this.load_Moment.DuplicatesXYZ();
            }

            if (this.uneven_loads_Force != null)
            {
                newll.uneven_loads_Force = new List <sXYZ>();
                foreach (sXYZ lf in this.uneven_loads_Force)
                {
                    newll.uneven_loads_Force.Add(lf.DuplicatesXYZ());
                }
            }
            if (this.parameters_loads_Force != null)
            {
                newll.parameters_loads_Force = this.parameters_loads_Force.ToList();
            }
            if (this.uneven_loads_Moment != null)
            {
                newll.uneven_loads_Moment = new List <sXYZ>();
                foreach (sXYZ lf in this.uneven_loads_Moment)
                {
                    newll.uneven_loads_Moment.Add(lf.DuplicatesXYZ());
                }
            }
            if (this.parameters_loads_Moment != null)
            {
                newll.parameters_loads_Moment = this.parameters_loads_Moment.ToList();
            }
            return(newll);
        }
        public void ApplyUpdatedLineLoad(sLineLoad lload)
        {
            if (lload.load_Scalar > 0.0)
            {
                this.load_Scalar += lload.load_Scalar;
            }
            if (lload.load_Force != null)
            {
                if (this.load_Force == null)
                {
                    this.load_Force = sXYZ.Zero();
                }
                this.load_Force += lload.load_Force;
            }
            if (lload.load_Moment != null)
            {
                if (this.load_Moment == null)
                {
                    this.load_Moment = sXYZ.Zero();
                }
                this.load_Moment += lload.load_Moment;
            }

            //????
            if (lload.uneven_loads_Force != null && lload.uneven_loads_Force.Count == this.uneven_loads_Force.Count)
            {
                for (int i = 0; i < this.uneven_loads_Force.Count; ++i)
                {
                    this.uneven_loads_Force[i] += lload.uneven_loads_Force[i];
                }
            }

            if (lload.uneven_loads_Moment != null && lload.uneven_loads_Moment.Count == this.uneven_loads_Moment.Count)
            {
                for (int i = 0; i < this.uneven_loads_Moment.Count; ++i)
                {
                    this.uneven_loads_Moment[i] += lload.uneven_loads_Moment[i];
                }
            }
        }
Пример #3
0
 public void UpdateLineLoad(sLineLoad lload)
 {
     if (this.lineLoads != null)
     {
         bool isThere = false;
         foreach (sLineLoad ll in this.lineLoads)
         {
             if (ll.loadPatternName == lload.loadPatternName)
             {
                 ll.ApplyUpdatedLineLoad(lload);
                 isThere = true;
             }
         }
         if (isThere == false)
         {
             this.lineLoads.Add(lload);
         }
     }
     else
     {
         this.lineLoads = new List <sLineLoad>();
         this.lineLoads.Add(lload);
     }
 }
Пример #4
0
 public void UpdateLineLoadByPatternFactor_LinearAdditive(string pattern, double factor, ref sLineLoad comboLoad)
 {
     foreach (sLineLoad ll in this.lineLoads)
     {
         if (ll.loadPatternName == pattern)
         {
             if (ll.load_Force != null && ll.load_Force.GetLength() > 0)
             {
                 if (comboLoad.load_Force == null)
                 {
                     comboLoad.load_Force = sXYZ.Zero();
                 }
                 comboLoad.load_Force += ll.load_Force * factor;
             }
             if (ll.load_Moment != null && ll.load_Moment.GetLength() > 0)
             {
                 if (comboLoad.load_Moment == null)
                 {
                     comboLoad.load_Moment = sXYZ.Zero();
                 }
                 comboLoad.load_Moment += ll.load_Moment * factor;
             }
             if (ll.load_Scalar > 0.0)
             {
                 comboLoad.load_Scalar += ll.load_Scalar * factor;
             }
         }
     }
 }