コード例 #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);
        }
コード例 #2
0
 public void GetNameInPropertyFile(string name,
                                   ref string nameInFile,
                                   ref string fileName,
                                   ref string nameMaterial,
                                   ref eFrameSectionType frameSectionType)
 {
 }
コード例 #3
0
 protected RectangleSection(
     ApiCSiApplication app,
     Materials.Materials material,
     string name,
     eFrameSectionType type = eFrameSectionType.BuiltUpUHybrid) : base(app, material, name, type)
 {
 }
コード例 #4
0
        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);
        }
コード例 #5
0
 protected ColdHatSection(
     ApiCSiApplication app,
     Materials.Materials material,
     string name,
     eFrameSectionType type = eFrameSectionType.ColdHat) : base(app, material, name, type)
 {
 }
コード例 #6
0
 protected RectangleSection(
     ApiCSiApplication app,
     Materials.Materials material,
     string name,
     eFrameSectionType type = eFrameSectionType.PreCastConcreteGirderU) : base(app, material, name, type)
 {
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FrameSection" /> class.
 /// </summary>
 /// <param name="app">The application.</param>
 /// <param name="material">The material.</param>
 /// <param name="name">The name.</param>
 /// <param name="type">The type.</param>
 protected FrameSection(ApiCSiApplication app,
                        Materials.Materials material,
                        string name,
                        eFrameSectionType type = eFrameSectionType.All)
     : base(app, material, name, type)
 {
     _sectionProperties = new T();
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FrameSection" /> class.
 /// </summary>
 /// <param name="material">The material.</param>
 /// <param name="name">The name.</param>
 /// <param name="type">The type.</param>
 protected FrameSection(
     Materials.Materials material,
     string name,
     eFrameSectionType type = eFrameSectionType.All)
     : base(material, name, type)
 {
     _sectionProperties = new T();
 }
コード例 #9
0
        public void GetNameList_By_Type_ISection()
        {
            eFrameSectionType frameType = eFrameSectionType.ISection;

            string[] names = _app.Model.Definitions.Properties.FrameSection.GetNameList(frameType);

            Assert.That(names.Length, Is.EqualTo(CSiDataLine.NumberOfSectionFramesExpected));
            Assert.That(names.Contains(CSiDataLine.NameSectionFrame));
            Assert.That(names.Contains(CSiDataLine.NameSectionFrameCol));
        }
コード例 #10
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);
        }
コード例 #11
0
 /// <summary>
 /// Returns the names of all defined frame section properties of a specified type in a specified frame section property file.
 /// </summary>
 /// <param name="fileName">The name of the frame section property file from which to get the name list.
 /// In most cases, inputting only the name of the property file (e.g.Sections8.pro) is required, and the program will be able to find it.
 /// In some cases, inputting the full path to the property file may be necessary.</param>
 /// <param name="frameSectionType">Type of frame section to filter the list by.
 /// If no value is input for <paramref name="frameSectionType" />, names are returned for all frame section properties in the specified file regardless of type.</param>
 /// <exception cref="NotImplementedException"></exception>
 /// <exception cref="CSiException"></exception>
 internal void GetPropertyFileNameList(string fileName,
                                       eFrameSectionType frameSectionType = 0)
 {
     _apiFrameSection.GetPropertyFileNameList(fileName,
                                              out var sectionNames,
                                              out var frameSectionTypes,
                                              frameSectionType);
     throw new NotImplementedException();
     //for (int i = 0; i < sectionNames.Length; i++)
     //{
     //    // TODO: Finish GetPropertyFileNameList & then make public
     //    //// The property names obtained from the frame section property file.
     //    //sectionNames[i];
     //    //// The frame section property type for each property obtained from the frame section property file.
     //    //frameSectionTypes[i];
     //}
 }
コード例 #12
0
        /// <summary>
        /// Gets all defined frame sections of a specified frame type.
        /// </summary>
        /// <param name="frameType">Type of the frame.</param>
        /// <returns>List&lt;LoadPattern&gt;.</returns>
        public List <FrameSection> FillAllItems(eFrameSectionType frameType)
        {
            List <FrameSection> items     = new List <FrameSection>();
            List <string>       itemNames = GetNameList(frameType);

            foreach (var itemName in itemNames)
            {
                FrameSection item = FillItem(itemName);
                if (item == null)
                {
                    continue;
                }
                items.Add(item);
            }

            return(items);
        }
コード例 #13
0
 public void GetPropertyFileNameList(string fileName,
                                     ref string[] sectionNames,
                                     ref eFrameSectionType[] frameSectionTypes,
                                     eFrameSectionType frameSectionType)
 {
 }
コード例 #14
0
        public eFrameSectionType GetType(string name)
        {
            eFrameSectionType frameSectionType = _app.Model.Definitions.Properties.FrameSection.GetType(CSiDataLine.NameSectionFrame);

            return(frameSectionType);
        }
コード例 #15
0
 /// <summary>
 /// Returns the names of all defined frame sections of the specified type.
 /// </summary>
 /// <param name="frameType">Type of the frame.</param>
 /// <returns>List&lt;System.String&gt;.</returns>
 /// <exception cref="T:MPT.CSI.API.Core.Support.CSiException">API_DEFAULT_ERROR_CODE</exception>
 public List <string> GetNameList(eFrameSectionType frameType)
 {
     return(FrameSection.GetNameList(_apiFrameSection, frameType));
 }
コード例 #16
0
 protected ColdZSection(
     Materials.Materials material,
     string name,
     eFrameSectionType type = eFrameSectionType.ColdZ) : base(material, name, type)
 {
 }
コード例 #17
0
 public NonPrismaticSection(Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.Variable) : base(material, name, type)
 {
 }
コード例 #18
0
        /// <summary>
        /// Converts the type of to frame section.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns>eFrameSectionType.</returns>
        private static string convertFromFrameSectionType(eFrameSectionType value)
        {
            switch (value)
            {
            case eFrameSectionType.ISection:
                return("I/Wide Flange");

            case eFrameSectionType.BuiltUpICoverPlate:
                return("Built Up I");

            case eFrameSectionType.SectionDesigner:
                return("SD Section");

            case eFrameSectionType.Rectangular:
                return("Rectangular");

            case eFrameSectionType.TSection:
                return("Tee");

            case eFrameSectionType.Angle:
                return("Angle");

            case eFrameSectionType.DoubleAngle:
                return("Double Angle");

            case eFrameSectionType.DoubleChannel:
                return("Double Channel");

            case eFrameSectionType.Circle:
                return("Circle");

            case eFrameSectionType.Trapezoidal:
                return("Trapezoidal");

            case eFrameSectionType.ColdC:
                return("Cold Formed C");

            case eFrameSectionType.ColdZ:
                return("Cold Formed Z");

            case eFrameSectionType.ColdHat:
                return("Cold Formed Hat");

            case eFrameSectionType.Channel:
                return("Channel");

            case eFrameSectionType.Pipe:
                return("Pipe");

            case eFrameSectionType.Box:
                return("Box/Tube");

            case eFrameSectionType.Joist:
                return("Joist");

            case eFrameSectionType.Variable:
                return("Nonprismatic");

            case eFrameSectionType.Auto:
                return("Auto Select");

            default:
                return("All");
            }
        }
コード例 #19
0
 public RectangleSection(string name, eFrameSectionType type = eFrameSectionType.Rectangular) : base(name, type)
 {
 }
コード例 #20
0
 public AutoSelectSection(Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.Auto) : base(material, name, type)
 {
 }
コード例 #21
0
 protected PrecastUSection(
     Materials.Materials material,
     string name,
     eFrameSectionType type = eFrameSectionType.PreCastConcreteGirderU) : base(material, name, type)
 {
 }
コード例 #22
0
 public TrapezoidalSection(Materials.Materials material, string name, eFrameSectionType type = eFrameSectionType.Trapezoidal) : base(material, name, type)
 {
 }
コード例 #23
0
 /// <summary>
 /// Returns the names of all defined frame properties of the specified type.
 /// </summary>
 /// <exception cref="T:MPT.CSI.API.Core.Support.CSiException">API_DEFAULT_ERROR_CODE</exception>
 public static List <string> GetNameList(eFrameSectionType frameType)
 {
     return(new List <string>(_frameSection.GetNameList(frameType)));
 }
コード例 #24
0
 protected FrameSection(string name, eFrameSectionType type = eFrameSectionType.All)
     : base(name)
 {
     Type = type;
 }
コード例 #25
0
 protected HybridUSection(
     Materials.Materials material,
     string name,
     eFrameSectionType type = eFrameSectionType.BuiltUpUHybrid) : base(material, name, type)
 {
 }
コード例 #26
0
 // eFrameType
 internal static CSiProgram.eFramePropType ToCSi(eFrameSectionType enumValue)
 {
     return((CSiProgram.eFramePropType)enumValue);
 }