示例#1
0
        public ISection GetShape(string ShapeId, ShapeTypeSteel shapeType, AngleOrientation AngleOrientation = AngleOrientation.LongLegVertical, AngleRotation AngleRotation = AngleRotation.FlatLegBottom)
        {
            string           DEFAULT_EXCEPTION_STRING = "Selected shape is not supported. Specify a different shape.";
            AiscCatalogShape cs  = new AiscCatalogShape(ShapeId, null);
            CalcLog          log = new CalcLog();
            ISection         sec = null;

            switch (shapeType)
            {
            case ShapeTypeSteel.IShapeRolled:
                sec = new PredefinedSectionI(cs);
                break;

            case ShapeTypeSteel.IShapeBuiltUp:
                throw new Exception(DEFAULT_EXCEPTION_STRING);
                break;

            case ShapeTypeSteel.Channel:
                sec = new PredefinedSectionChannel(cs);
                break;

            case ShapeTypeSteel.Angle:
                sec = new PredefinedSectionAngle(cs, AngleOrientation, AngleRotation);
                break;

            case ShapeTypeSteel.TeeRolled:
                throw new Exception(DEFAULT_EXCEPTION_STRING);
                break;

            case ShapeTypeSteel.TeeBuiltUp:
                throw new Exception(DEFAULT_EXCEPTION_STRING);
                break;

            case ShapeTypeSteel.DoubleAngle:
                throw new Exception(DEFAULT_EXCEPTION_STRING);
                break;

            case ShapeTypeSteel.CircularHSS:
                sec = new PredefinedSectionCHS(cs);
                break;

            case ShapeTypeSteel.RectangularHSS:
                sec = new PredefinedSectionRHS(cs);
                break;

            case ShapeTypeSteel.Box:
                throw new Exception(DEFAULT_EXCEPTION_STRING);
                break;

            case ShapeTypeSteel.Rectangular:
                throw new Exception(DEFAULT_EXCEPTION_STRING);
                break;

            case ShapeTypeSteel.Circular:
                throw new Exception(DEFAULT_EXCEPTION_STRING);
                break;

            case ShapeTypeSteel.IShapeAsym:
                throw new Exception(DEFAULT_EXCEPTION_STRING);
                break;

            default:
                break;
            }

            return(sec);
        }
示例#2
0
        public ISection GetShape(string ShapeId, ShapeTypeSteel shapeType, AngleOrientation AngleOrientation = AngleOrientation.LongLegVertical, AngleRotation AngleRotation = AngleRotation.FlatLegBottom)
        { 

            string DEFAULT_EXCEPTION_STRING = "Selected shape is not supported. Specify a different shape.";
            AiscCatalogShape cs = new AiscCatalogShape(ShapeId,null);
            CalcLog log = new CalcLog();
            ISection sec = null;

            switch (shapeType)
            {
                case ShapeTypeSteel.IShapeRolled:
                    sec = new PredefinedSectionI(cs);
                    break;
                case ShapeTypeSteel.IShapeBuiltUp:
                    throw new Exception(DEFAULT_EXCEPTION_STRING);
                    break;
                case ShapeTypeSteel.Channel:
                    sec = new PredefinedSectionChannel(cs);
                    break;
                case ShapeTypeSteel.Angle:
                    sec = new PredefinedSectionAngle(cs, AngleOrientation,AngleRotation);
                    break;
                case ShapeTypeSteel.TeeRolled:
                    throw new Exception(DEFAULT_EXCEPTION_STRING);
                    break;
                case ShapeTypeSteel.TeeBuiltUp:
                    throw new Exception(DEFAULT_EXCEPTION_STRING);
                    break;
                case ShapeTypeSteel.DoubleAngle:
                    throw new Exception(DEFAULT_EXCEPTION_STRING);
                    break;
                case ShapeTypeSteel.CircularHSS:
                    sec = new PredefinedSectionCHS(cs);
                    break;
                case ShapeTypeSteel.RectangularHSS:
                    sec = new PredefinedSectionRHS(cs);
                    break;
                case ShapeTypeSteel.Box:
                    throw new Exception(DEFAULT_EXCEPTION_STRING);
                    break;
                case ShapeTypeSteel.Rectangular:
                    throw new Exception(DEFAULT_EXCEPTION_STRING);
                    break;
                case ShapeTypeSteel.Circular:
                    throw new Exception(DEFAULT_EXCEPTION_STRING);
                    break;
                case ShapeTypeSteel.IShapeAsym:
                    throw new Exception(DEFAULT_EXCEPTION_STRING);
                    break;
                default:
                    break;
            }

            return sec;
        }