Exemple #1
0
        // === Get/Set ===


        /// <summary>
        /// Retrieves the model global degrees of freedom.
        /// </summary>
        /// <param name="activeDOFs">Boolean indications of which degrees of freedom are active.</param>
        /// <exception cref="MPT.CSI.API.Core.Support.CSiException"></exception>
        public void GetActiveDOF(ref DegreesOfFreedomGlobal activeDOFs)
        {
            bool[] dofArray = new bool[0];

            _callCode = _sapModel.Analyze.GetActiveDOF(ref dofArray);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException();
            }

            activeDOFs.FromArray(dofArray);
        }
        // ===

        /// <summary>
        /// The function returns the definition for the specified Local constraint.
        /// </summary>
        /// <param name="nameConstraint">The name of an existing constraint.</param>
        /// <param name="degreesOfFreedom">Indicates which joint degrees of freedom are included in the constraint.</param>
        /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
        public void GetLocal(string nameConstraint,
                             ref DegreesOfFreedomGlobal degreesOfFreedom)
        {
            bool[] csiDegreesOfFreedom = new bool[0];

            _callCode = _sapModel.ConstraintDef.GetLocal(nameConstraint, ref csiDegreesOfFreedom);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException(API_DEFAULT_ERROR_CODE);
            }

            degreesOfFreedom.FromArray(csiDegreesOfFreedom);
        }
Exemple #3
0
        // ===

        /// <summary>
        /// The function returns the definition for the specified Line constraint.
        /// </summary>
        /// <param name="nameConstraint">The name of an existing constraint.</param>
        /// <param name="degreesOfFreedom">Indicates which joint degrees of freedom are included in the constraint.</param>
        /// <param name="nameCoordinateSystem">The name of the coordinate system in which the constraint is defined.</param>
        /// <exception cref="CSiException"></exception>
        public void GetLine(string nameConstraint,
                            ref DegreesOfFreedomGlobal degreesOfFreedom,
                            ref string nameCoordinateSystem)
        {
            bool[] csiDegreesOfFreedom = new bool[0];

            _callCode = _sapModel.ConstraintDef.GetLine(nameConstraint, ref csiDegreesOfFreedom, ref nameCoordinateSystem);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException();
            }

            degreesOfFreedom.FromArray(csiDegreesOfFreedom);
        }
        // ===

        /// <summary>
        /// The function returns the definition for the specified Weld constraint.
        /// </summary>
        /// <param name="nameConstraint">The name of a constraint.</param>
        /// <param name="degreesOfFreedom">Indicates which joint degrees of freedom are included in the constraint.</param>
        /// <param name="tolerance">Joints within this distance of each other are constrained together.</param>
        /// <param name="nameCoordinateSystem">The name of the coordinate system in which the constraint is defined.</param>
        /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
        public void GetWeld(string nameConstraint,
                            ref DegreesOfFreedomGlobal degreesOfFreedom,
                            ref double tolerance,
                            ref string nameCoordinateSystem)
        {
            bool[] csiDegreesOfFreedom = new bool[0];

            _callCode = _sapModel.ConstraintDef.GetWeld(nameConstraint, ref csiDegreesOfFreedom, ref tolerance, ref nameCoordinateSystem);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException(API_DEFAULT_ERROR_CODE);
            }

            degreesOfFreedom.FromArray(csiDegreesOfFreedom);
        }