Exemplo n.º 1
0
        /***************************************************/
        /**** Private methods                           ****/
        /***************************************************/

        private List <NodeReaction> ReadNodeReaction(List <string> ids = null)
        {
            //Implement code for reading Node Reactions
            List <NodeReaction> bhomNodeReactions = new List <NodeReaction>();

            IModel ramModel = m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IModel_INT);

            ILoadCases ramLoadCases = ramModel.GetLoadCases(EAnalysisResultType.RAMFrameResultType);
            //Get IWalls
            List <IWall> allRamWalls = ReadRamWalls(ramModel);

            // Adding node reactions per wall per loadcase, this is node reactions at btm of wall
            foreach (IWall wall in allRamWalls)
            {
                for (int i = 0; i < ramLoadCases.GetCount(); i++)
                {
                    //Get Loadcases
                    ILoadCase   ramLoadCase    = ramLoadCases.GetAt(i);
                    IPointLoads wallNodeForces = wall.GetNodeForcesAtEdge(EAnalysisResultType.RAMGravityResultType, ramLoadCase.lUID, EEdge.eBottomEdge);
                    for (int j = 0; j < wallNodeForces.GetCount(); j++)
                    {
                        //Get Node Forces
                        IPointLoad   wallNodeForce    = wallNodeForces.GetAt(j);
                        NodeReaction bhomNodeReaction = wallNodeForce.ToBHoMObject(ramLoadCase);
                        bhomNodeReactions.Add(bhomNodeReaction);
                    }
                }
            }

            return(bhomNodeReactions);
        }
Exemplo n.º 2
0
        /***************************************************/

        public static NodeReaction ToBHoMObject(this IPointLoad ramPointLoad, ILoadCase ramLoadCase)
        {
            SCoordinate ramPoint;

            ramPointLoad.GetCoordinate(out ramPoint);
            Point  bhomPoint  = ramPoint.PointFromRAM();
            string ramPointID = bhomPoint.X.ToString() + ", " + bhomPoint.Y.ToString() + ", " + bhomPoint.Z.ToString() + ", "; // no object id option for RAM nodes, id by coordinates instead

            //TODO: resolve below identifiers extractable through the API
            int    mode     = -1;
            double timeStep = 0;

            NodeReaction bhomNodeReaction = new NodeReaction(
                ramPointID,
                ramLoadCase.strLoadCaseGroupLabel + ramLoadCase.strTypeLabel,
                mode,
                timeStep,
                Basis.XY,
                ramPointLoad.dFx,
                ramPointLoad.dFy,
                ramPointLoad.dFz,
                ramPointLoad.dMxx,
                ramPointLoad.dMyy,
                ramPointLoad.dMzz
                );

            return(bhomNodeReaction);
        }