Exemplo n.º 1
0
        /***************************************************/
        /**** Public Methods                            ****/
        /***************************************************/

        public static MeshSettings1D ToMeshSettings1D(this IFAttribute lusasAttrbute)
        {
            string attributeName = GetName(lusasAttrbute);

            IFMeshLine lusasMeshLine = (IFMeshLine)lusasAttrbute;

            double  value       = 0;
            Split1D splitMethod = Split1D.Automatic;
            int     meshType    = 0;

            lusasMeshLine.getMeshDivisions(ref meshType);

            if (meshType == 0)
            {
                value = 0;
            }
            else if (meshType == 1)
            {
                splitMethod = Split1D.Divisions;
                object[] ratios = lusasMeshLine.getValue("ratio");
                value = ratios.Count();
                if (value == 0)
                {
                    value = 4;
                }
            }
            else if (meshType == 2)
            {
                splitMethod = Split1D.Length;
                value       = lusasMeshLine.getValue("size");
            }

            MeshSettings1D meshSettings1D = new MeshSettings1D
            {
                Name           = attributeName,
                SplitMethod    = splitMethod,
                SplitParameter = value
            };

            int adapterNameId = GetAdapterID(lusasMeshLine, 'e');

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

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

        private static BarRelease GetBarRelease(IFMeshLine lusasLineMesh)
        {
            object[]       startReleases    = lusasLineMesh.getValue("start");
            object[]       endReleases      = lusasLineMesh.getValue("end");
            List <DOFType> startReleaseType = GetConstraints(startReleases);
            List <DOFType> endReleaseType   = GetConstraints(endReleases);

            Constraint6DOF startConstraint = SetConstraint(startReleaseType);
            Constraint6DOF endConstraint   = SetConstraint(endReleaseType);

            BarRelease barRelease = new BarRelease
            {
                StartRelease = startConstraint,
                EndRelease   = endConstraint
            };

            return(barRelease);
        }