예제 #1
0
 public SAPFrameElement(string name)
 {
     Name            = name;
     Label           = Name;
     StartPoint      = new SAPPoint(name + "p1");
     EndPoint        = new SAPPoint(name + "p2");
     Section         = null;
     AnalysisResults = null;
 }
예제 #2
0
        public static bool AddPointLoad(SAPPoint point, SAPPointLoad load)
        {
            double[] forces = { load.Value };
            int      flag   = mySapModel.PointObj.SetLoadForce(point.Name, load.LoadType.Name, ref forces);

            if (flag != 0)
            {
                load.IsDefinedInSAP = false;
                return(false);
            }
            load.IsDefinedInSAP = true;
            return(true);
        }
예제 #3
0
        public static bool SetRestraint(SAPPoint point, SAPRestraint restraint)
        {
            int flag = mySapModel.PointObj.SetRestraint(point.name, ref restraint.values);

            if (flag != 0)
            {
                restraint.IsDefinedInSAP = false;
                return(false);
            }
            restraint.IsDefinedInSAP = true;
            point.Restraint          = restraint;
            return(true);
        }
예제 #4
0
        public static bool SetPoint(SAPPoint point)
        {
            int flag = mySapModel.PointObj.AddCartesian(point.X, point.Y, point.Z, ref point.name);

            if (flag != 0)
            {
                point.IsDefinedInSAP = false;
                return(false);
            }
            point.IsDefinedInSAP = true;

            if (point.Restraint != null)
            {
                if (point.Restraint.IsDefinedInSAP == false)
                {
                    SetRestraint(point, point.Restraint);
                }
            }
            return(true);
        }
예제 #5
0
        private static SAPPoint GetPointCoordinates(string pointName)
        {
            SAPPoint point = new SAPPoint();

            point.name = pointName;
            double x = 0;
            double y = 0;
            double z = 0;

            int flag = mySapModel.PointObj.GetCoordCartesian(pointName, ref x, ref y, ref z);

            if (flag != 0)
            {
                return(null);
            }
            else
            {
                point.X = x;
                point.Y = y;
                point.Z = z;
                return(point);
            }
        }
예제 #6
0
 public SAPFrameElement()
 {
     StartPoint = new SAPPoint();
     EndPoint   = new SAPPoint();
     Section    = new SAPISection(); //TODO : This is temporary to prevent null exceptions
 }
예제 #7
0
 public SAPFrameElement(string name, SAPPoint startPoint, SAPPoint endPoint, SAPSection section) : this(name)
 {
     StartPoint = startPoint;
     EndPoint   = endPoint;
     Section    = section;
 }
예제 #8
0
 /// <summary>
 /// This constructor will copy the coordinates of another point but with a different name
 /// </summary>
 /// <param name="name"></param>
 /// <param name="copiedPoint"></param>
 public SAPPoint(string name, SAPPoint copiedPoint) : this(name, copiedPoint.X, copiedPoint.Y, copiedPoint.Z)
 {
 }
예제 #9
0
        public static SAPJointElementResults GetJointAnalysisResults(IEnumerable <SAPLoadCombination> combos, SAPPoint elem)
        {
            int flag = mySapModel.Results.Setup.DeselectAllCasesAndCombosForOutput();

            foreach (SAPLoadCombination combo in combos)
            {
                flag = mySapModel.Results.Setup.SetComboSelectedForOutput(combo.Name, true);
                if (flag != 0)
                {
                    return(null);
                }
            }
            SAPJointElementResults res = elem.AnalysisResults = new SAPJointElementResults();

            flag = mySapModel.Results.JointReact(elem.Name, eItemTypeElm.ObjectElm, ref res.numberResults, ref res.obj, ref res.elment, ref res.loadCase, ref res.stepType,
                                                 ref res.stepNum, ref res.f1, ref res.f2, ref res.f3, ref res.m1, ref res.m2, ref res.m3);
            if (flag != 0)
            {
                return(null);
            }
            return(res);
        }