Ejemplo n.º 1
0
        public static FrameSection Factory(string uniqueName)
        {
            if (Registry.FrameSections.Keys.Contains(uniqueName))
            {
                return(Registry.FrameSections[uniqueName]);
            }

            eFrameSectionType frameSectionType = GetType(uniqueName);
            FrameSection      frameSection     = null;

            switch (frameSectionType)
            {
            case eFrameSectionType.Rectangular:
            case eFrameSectionType.BucklingRestrainedBrace:
                frameSection = RectangleSection.Factory(uniqueName);
                break;

            default:
                return(null);
            }

            if (_frameSection != null)
            {
                frameSection.GetFrameType();
                frameSection.GetSectionProperties();
            }
            Registry.FrameSections.Add(uniqueName, frameSection);
            return(frameSection);
        }
Ejemplo n.º 2
0
        public static FrameSection Factory(
            string uniqueName,
            double t3,
            double t2,
            double tf,
            double tw,
            double t2b,
            double tfb)
        {
            if (Registry.FrameSections.Keys.Contains(uniqueName))
            {
                return(Registry.FrameSections[uniqueName]);
            }

            FrameSection frameSection = Factory(uniqueName);

            frameSection.t3  = t3;
            frameSection.t2  = t2;
            frameSection.tf  = tf;
            frameSection.tw  = tw;
            frameSection.t2b = t2b;
            frameSection.tfb = tfb;

            Registry.FrameSections.Add(uniqueName, frameSection);
            return(frameSection);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets all defined frame sections.
        /// </summary>
        /// <returns>List&lt;LoadPattern&gt;.</returns>
        public static List <FrameSection> GetAll()
        {
            List <FrameSection> objects = new List <FrameSection>();

#if BUILD_ETABS2015 || BUILD_ETABS2016 || BUILD_ETABS2017
            _frameSection.GetAllFrameProperties(
                out var names,
                out var frameType,
                out var t3,
                out var t2,
                out var tf,
                out var tw,
                out var t2b,
                out var tfb);
            for (int i = 0; i < names.Length; i++)
            {
                FrameSection frameSection = Factory(names[i], t3[i], t2[i], tf[i], tw[i], t2b[i], tfb[i]);
                objects.Add(frameSection);
            }
#else
            List <string> names = GetNameList();
            foreach (var name in names)
            {
                FrameSection frameSection = Factory(name);

                objects.Add(frameSection);
            }
#endif

            return(objects);
        }
        public static RectangleSection Factory(
            string uniqueName,
            eFrameSectionType frameType,
            double t3,
            double t2,
            double tf,
            double tw,
            double t2b,
            double tfb,
            CSiApplication app = null)
        {
            if (Registry.FrameSections.Keys.Contains(uniqueName))
            {
                return((RectangleSection)Registry.FrameSections[uniqueName]);
            }

            RectangleSection frameSection = (RectangleSection)FrameSection.Factory(uniqueName, t3, t2, tf, tw, t2b, tfb);

            if (app != null)
            {
                frameSection.GetRectangle(app);
            }
            Registry.FrameSections.Add(uniqueName, frameSection);
            return(frameSection);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Gets all defined frame sections of a specified frame type.
        /// </summary>
        /// <returns>List&lt;LoadPattern&gt;.</returns>
        public static List <FrameSection> GetAll(eFrameSectionType frameType)
        {
            List <FrameSection> objects = new List <FrameSection>();
            List <string>       names   = GetNameList(frameType);

            foreach (var name in names)
            {
                FrameSection frameSection = Factory(name);

                objects.Add(frameSection);
            }

            return(objects);
        }
        public static RectangleSection Factory(
            string uniqueName,
            CSiApplication app = null)
        {
            if (Registry.FrameSections.Keys.Contains(uniqueName))
            {
                return((RectangleSection)Registry.FrameSections[uniqueName]);
            }

            RectangleSection frameSection = (RectangleSection)FrameSection.Factory(uniqueName);

            if (app != null)
            {
                frameSection.GetRectangle(app);
            }
            Registry.FrameSections.Add(uniqueName, frameSection);
            return(frameSection);
        }