Пример #1
0
        /***************************************************/

        private bool CreateObject(LinkConstraint bhLinkConstraint)
        {
            string name = bhLinkConstraint.DescriptionOrName();

            bool[] dof = new bool[6];

            for (int i = 0; i < 6; i++)
            {
                dof[i] = true;
            }

            bool[] fix = new bool[6];

            fix[0] = bhLinkConstraint.XtoX;
            fix[1] = bhLinkConstraint.ZtoZ;
            fix[2] = bhLinkConstraint.YtoY;
            fix[3] = bhLinkConstraint.XXtoXX;
            fix[4] = bhLinkConstraint.ZZtoZZ;
            fix[5] = bhLinkConstraint.YYtoYY;

            double[] stiff = new double[6];
            double[] damp  = new double[6];

            int ret = m_model.PropLink.SetLinear(name, ref dof, ref fix, ref stiff, ref damp, 0, 0);

            if (ret != 0)
            {
                CreateElementError("Link Constraint", name);
            }

            return(ret == 0);
        }
Пример #2
0
        /***************************************************/
        /**** Private Methods                            ****/
        /***************************************************/

        private bool CreateObject(LinkConstraint bhLinkConstraint)
        {
            string name = bhLinkConstraint.DescriptionOrName();

            bool[]   dof;
            bool[]   fix;
            double[] stiff;
            double[] damp;
            double   dj2;
            double   dj3;

            bhLinkConstraint.ToSAP2000(out dof, out fix, out stiff, out damp, out dj2, out dj3);

            if (m_model.PropLink.SetLinear(name, ref dof, ref fix, ref stiff, ref damp, dj2, dj3) != 0)
            {
                Engine.Base.Compute.RecordWarning($"SAP returned an error pushing LinkConstraint {name}. Check results.");
            }

            SetAdapterId(bhLinkConstraint, name);

            return(true);
        }
Пример #3
0
        /***************************************************/

        private bool CreateObject(RigidLink bhLink)
        {
            bool success = true;

            List <string> linkIds = new List <string>();
            List <object> guids   = new List <object>();

            LinkConstraint constraint     = bhLink.Constraint;//not used yet
            Node           primaryNode    = bhLink.PrimaryNode;
            List <Node>    secondaryNodes = bhLink.SecondaryNodes;

            ETABSId multiId = new ETABSId();

            for (int i = 0; i < secondaryNodes.Count(); i++)
            {
                string name = "";
                string guid = null;

                m_model.LinkObj.AddByPoint(GetAdapterId <string>(primaryNode), GetAdapterId <string>(secondaryNodes[i]), ref name, false, constraint.DescriptionOrName());
                m_model.LinkObj.GetGUID(name, ref guid);

                linkIds.Add(name);
            }

            multiId.Id = linkIds;
            bhLink.SetAdapterId(multiId);

            return(success);
        }