示例#1
0
 //constructor for PointLoads
 internal Load(LoadPattern loadPat, int myType, int dir, double dist, double val, string cSys, bool relDist)
 {
     lPattern = loadPat;
     FMType   = myType;
     Dir      = dir;
     Dist     = dist;
     Val      = val;
     CSys     = cSys;
     RelDist  = relDist;
 }
示例#2
0
 public static Dictionary <string, object> Decompose(LoadPattern LoadPattern)
 {
     // Return outputs
     return(new Dictionary <string, object>
     {
         { "Name", LoadPattern.name },
         { "Type", LoadPattern.type },
         { "Multiplier", LoadPattern.multiplier }
     });
 }
示例#3
0
        /// <summary>
        /// This function assigns distributed loads to frame objects.
        /// Parameters description below as presented in the SAP CSi OAPI Documentation
        /// </summary>
        /// <param name="LoadPattern">The name of a defined load pattern</param>
        /// <param name="LoadType">Force or moment load. Use the Load Type dropdown</param>
        ///<param name="Direction">This is an integer between 1 and 11, indicating the direction of the load.
        /// 1 = Local 1 axis (only applies when CSys is Local)
        /// 2 = Local 2 axis (only applies when CSys is Local)
        /// 3 = Local 3 axis (only applies when CSys is Local)
        /// 4 = X direction (does not apply when CSys is Local)
        /// 5 = Y direction (does not apply when CSys is Local)
        /// 6 = Z direction (does not apply when CSys is Local)
        /// 7 = Projected X direction (does not apply when CSys is Local)
        /// 8 = Projected Y direction (does not apply when CSys is Local)
        /// 9 = Projected Z direction (does not apply when CSys is Local)
        /// 10 = Gravity direction (only applies when CSys is Global)
        /// 11 = Projected Gravity direction (only applies when CSys is Global)
        /// The positive gravity direction (see Dir = 10 and 11) is in the negative Global Z direction.</param>
        /// <param name="Distance">This is the distance from the I-End of the frame object to the load location.
        /// This may be a relative distance (0 less or equal to Dist less or equal to 1) or an actual distance,
        /// depending on the value of the RelDist item. [L] when RelDist is False</param>
        /// <param name="Distance2">This is the distance from the I-End of the frame object to the load location.
        /// This may be a relative distance (0 less or equal to Dist2 less or equal to 1) or an actual distance,
        /// depending on the value of the RelDist item. [L] when RelDist is False</param>
        /// <param name="Value">This is the load value at the start of the distributed load. [F] when MyType is 1 and [FL] when MyType is 2</param>
        /// <param name="Value2">This is the load value at the end of the distributed load. [F] when MyType is 1 and [FL] when MyType is 2</param>
        /// <param name="CoordSystem">This is Local or the name of a defined coordinate system. It is the coordinate system in which the loads are specified.</param>
        /// <param name="RelativeDistance">If this item is True, the specified Dist item is a relative distance, otherwise it is an actual distance.</param>
        /// <returns></returns>
        public static Load DistributedLoad(LoadPattern LoadPattern, string LoadType, int Direction, double Distance, double Distance2, double Value, double Value2, string CoordSystem = "Global", bool RelativeDistance = true)
        {
            int ltype = 1;

            if (LoadType == "Moment")
            {
                ltype = 2;
            }

            CheckCoordSysAndDir(Direction, CoordSystem);
            Load l = new Load(LoadPattern, ltype, Direction, Distance, Distance2, Value, Value2, CoordSystem, RelativeDistance);

            l.LoadType = "DistributedLoad";
            return(l);
        }