示例#1
0
        /***************************************************/
        /**** Private Methods                           ****/
        /***************************************************/

        private IFLoadingConcentrated CreateConcentratedLoad(PointLoad pointLoad, object[] lusasPoints)
        {
            IFLoadingConcentrated lusasPointLoad;
            IFLoadcase            assignedLoadcase = (IFLoadcase)d_LusasData.getLoadset(pointLoad.Loadcase.AdapterId <int>(typeof(LusasId)));

            if (d_LusasData.existsAttribute("Loading", pointLoad.Name))
            {
                lusasPointLoad = (IFLoadingConcentrated)d_LusasData.getAttribute("Loading", pointLoad.Name);
            }
            else
            {
                lusasPointLoad = d_LusasData.createLoadingConcentrated(pointLoad.Name);
                lusasPointLoad.setConcentrated(
                    pointLoad.Force.X, pointLoad.Force.Y, pointLoad.Force.Z,
                    pointLoad.Moment.X, pointLoad.Moment.Y, pointLoad.Moment.Z);
            }

            IFAssignment lusasAssignment = m_LusasApplication.assignment();

            lusasAssignment.setLoadset(assignedLoadcase);
            lusasPointLoad.assignTo(lusasPoints, lusasAssignment);

            int adapterIdName = lusasPointLoad.getID();

            pointLoad.SetAdapterId(typeof(LusasId), adapterIdName);

            return(lusasPointLoad);
        }
示例#2
0
        /***************************************************/
        /**** Public Methods                            ****/
        /***************************************************/

        public static PointLoad ToPointLoad(
            IFLoading lusasPointLoad, IEnumerable <IFAssignment> lusasAssignments,
            Dictionary <string, Node> nodes)
        {
            IFLoadcase assignedLoadcase = (IFLoadcase)lusasAssignments.First().getAssignmentLoadset();
            Loadcase   loadcase         = ToLoadcase(assignedLoadcase);

            IEnumerable <Node> assignedNodes = GetPointAssignments(lusasAssignments, nodes);

            Vector forceVector = new Vector
            {
                X = lusasPointLoad.getValue("px"),
                Y = lusasPointLoad.getValue("py"),
                Z = lusasPointLoad.getValue("pz")
            };

            Vector momentVector = new Vector
            {
                X = lusasPointLoad.getValue("mx"),
                Y = lusasPointLoad.getValue("my"),
                Z = lusasPointLoad.getValue("mz")
            };

            PointLoad pointLoad = Engine.Structure.Create.PointLoad(
                loadcase,
                assignedNodes,
                forceVector,
                momentVector,
                LoadAxis.Global,
                GetName(lusasPointLoad));

            int adapterNameId = lusasPointLoad.getID();

            pointLoad.SetAdapterId(typeof(LusasId), adapterNameId);

            return(pointLoad);
        }