public DoubleAngleMember(ISectionDoubleAngle Section, ISteelMaterial Material, AngleOrientation AngleOrientation)
                : base(Section.Angle, Material, AngleOrientation)
            {



            }
Пример #2
0
        public static double Angle(Ray pRay1, Ray pRay2, AngleOrientation pOrientation)
        {
            Plane p = null;

            if (pOrientation == AngleOrientation.XPlane)
            {
                p = Plane.CreateZPlane();
            }
            else if (pOrientation == AngleOrientation.YPlane)
            {
                p = Plane.CreateXPlane();
            }
            else if (pOrientation == AngleOrientation.ZPlane)
            {
                p = Plane.CreateYPlane();
            }
            else
            {
                throw new Exception();
            }

            if (pOrientation == AngleOrientation.YPlane)
            {
                Debugger.Break();
            }

            Double a1 = Angle(pRay1, p, pOrientation);
            Double a2 = Angle(pRay2, p, pOrientation);

            return(a2 - a1);
        }
Пример #3
0
        internal CatalogSection(string ShapeId, string AngleOrientation="LongLegVertical", string AngleRotation="FlatLegTop")
        {
            AiscShapeFactory factory = new AiscShapeFactory();
            AngleOrientation ori = new AngleOrientation();
            AngleRotation  rot = new Wosad.Common.AngleRotation();

              AngleOrientation _AngleOrientation;
              bool IsValidInputString = Enum.TryParse(AngleOrientation, true, out _AngleOrientation);
                if (IsValidInputString == false)
                {
                        throw new Exception("Failed to convert string. Specifuy AngleOrientation. Please check input");
                }

                
                AngleRotation _AngleRotation;
                bool IsValidInputRotation = Enum.TryParse(AngleRotation, true, out _AngleRotation);
                if (IsValidInputRotation == false)
                {
                    throw new Exception("Failed to convert string. Errormessage. Please check input");
                }


             ISection section = factory.GetShape(ShapeId, _AngleOrientation, _AngleRotation);
            //PredefinedSectionI catI = section as PredefinedSectionI;
            //ISliceableSection secI = new shapes.SectionIRolled("", catI.d, catI.b_fTop, catI.t_f, catI.t_w, catI.k);
            //Section = secI;
            Section = section;
        }
Пример #4
0
            protected virtual void SetCompactness(ISectionAngle ang, ISteelMaterial Material, AngleOrientation AngleOrientation)
           {

  
                   double shortLeg;
                   double longLeg;

                   if (ang.d >= ang.b)
                   {
                       longLeg = ang.d;
                       shortLeg = ang.b;
                   }
                   else
                   {
                       longLeg = ang.b;
                       shortLeg = ang.d;
                   }

                   //make differentiation based on angle orientation

                   if (AngleOrientation == AngleOrientation.LongLegVertical)
                   {
                       FlangeCompactness = new LegOfSingleAngle(Material, shortLeg, ang.t);
                       WebCompactness = new LegOfSingleAngle(Material, longLeg, ang.t);
                   }
                   else
                   {
                       FlangeCompactness = new LegOfSingleAngle(Material, longLeg, ang.t);
                       WebCompactness = new LegOfSingleAngle(Material, shortLeg, ang.t);
                   }

               }
        internal CatalogSection(string ShapeId, string AngleOrientation = "LongLegVertical", string AngleRotation = "FlatLegTop")
        {
            AiscShapeFactory factory = new AiscShapeFactory();
            AngleOrientation ori     = new AngleOrientation();
            AngleRotation    rot     = new Kodestruct.Common.AngleRotation();

            ShapeId = ShapeId.ToUpper();

            AngleOrientation _AngleOrientation;
            bool             IsValidInputString = Enum.TryParse(AngleOrientation, true, out _AngleOrientation);

            if (IsValidInputString == false)
            {
                throw new Exception("Failed to convert string. Specifuy AngleOrientation. Please check input");
            }


            AngleRotation _AngleRotation;
            bool          IsValidInputRotation = Enum.TryParse(AngleRotation, true, out _AngleRotation);

            if (IsValidInputRotation == false)
            {
                throw new Exception("Failed to convert string. Errormessage. Please check input");
            }


            ISection section = factory.GetShape(ShapeId, _AngleOrientation, _AngleRotation);

            //PredefinedSectionI catI = section as PredefinedSectionI;
            //ISliceableSection secI = new shapes.SectionIRolled("", catI.d, catI.b_fTop, catI.t_f, catI.t_w, catI.k);
            //Section = secI;
            Section = section;
        }
Пример #6
0
 public PredefinedSectionAngle(AiscCatalogShape section, AngleOrientation AngleOrientation, AngleRotation AngleRotation)
     : base(section)
 {
     //this._d = section.d;
     //this._b = section.b;
     Set_b_and_d(section.d, section.b, AngleOrientation);
     this._t = section.t;
     this.AngleOrientation = AngleOrientation;
     this.AngleRotation    = AngleRotation;
 }
Пример #7
0
 public SectionAngle(string Name, double h, double b, double t, AngleRotation AngleRotation,  AngleOrientation AngleOrientation)
     : base(Name)
 {
     Set_b_and_h(b, h, AngleOrientation);
     //this._d = h;
     //this._b = b;
     this._t = t;
     this.AngleOrientation = AngleOrientation;
     this.AngleRotation = AngleRotation;
 }
Пример #8
0
        public BeamAngle(ISteelSection section, ICalcLog CalcLog, AngleRotation AngleRotation, MomentAxis MomentAxis,
                         AngleOrientation AngleOrientation = AngleOrientation.ShortLegVertical)
            : base(section, CalcLog, AngleOrientation)
        {
            this.AngleRotation    = AngleRotation;
            this.AngleOrientation = AngleOrientation;
            this.MomentAxis       = MomentAxis;

            GetSectionValues();
        }
Пример #9
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;
        }
Пример #10
0
        public PredefinedSectionAngle(AiscCatalogShape section, AngleOrientation AngleOrientation, AngleRotation AngleRotation)
            : base(section)
        {
            //this._d = section.d;
            //this._b = section.b;
            Set_b_and_d(section.d, section.b, AngleOrientation);
            this._t = section.t;
            this.AngleOrientation = AngleOrientation;
            this.AngleRotation = AngleRotation;
 
        }
Пример #11
0
        public BeamAngle(ISteelSection section, ICalcLog CalcLog, AngleRotation AngleRotation,  MomentAxis MomentAxis, 
            AngleOrientation AngleOrientation= AngleOrientation.ShortLegVertical)
            : base(section, CalcLog, AngleOrientation)
        {
            this.AngleRotation = AngleRotation;
            this.AngleOrientation = AngleOrientation;
            this.MomentAxis = MomentAxis;

            GetSectionValues();

        }
Пример #12
0
        private void Set_b_and_d(double d, double b, AngleOrientation AngleOrientation)
        {
            double LongLeg = b >= d ? b : d;
            double ShortLeg = b < d ? b : d;

            if (AngleOrientation == Common.AngleOrientation.LongLegVertical)
            {
                this._d = LongLeg;
                this._b = ShortLeg;
            }
            else
            {
                this._d = ShortLeg;
                this._b = LongLeg;
            }
        }
Пример #13
0
        public FlexuralMemberAngleBase(ISteelSection section, ICalcLog CalcLog, AngleOrientation AngleOrientation)
            : base(section, CalcLog)
        {
            sectionAngle = null;
            ISectionAngle s = Section.Shape as ISectionAngle;

            if (s == null)
            {
                throw new SectionWrongTypeException(typeof(ISectionAngle));
            }
            else
            {
                sectionAngle = s;
                compactness = new ShapeCompactness.AngleMember(s, section.Material, AngleOrientation);
            }
        }
Пример #14
0
        private void Set_b_and_d(double d, double b, AngleOrientation AngleOrientation)
        {
            double LongLeg  = b >= d ? b : d;
            double ShortLeg = b < d ? b : d;

            if (AngleOrientation == Common.AngleOrientation.LongLegVertical)
            {
                this._d = LongLeg;
                this._b = ShortLeg;
            }
            else
            {
                this._d = ShortLeg;
                this._b = LongLeg;
            }
        }
Пример #15
0
        private void Set_b_and_h(double b, double h, AngleOrientation AngleOrientation)
        {
            double LongLeg  = b >= h ? b : h;
            double ShortLeg = b < h ? b : h;

            if (AngleOrientation == Common.AngleOrientation.LongLegVertical)
            {
                this._d = LongLeg;
                this._b = ShortLeg;
            }
            else
            {
                this._d = ShortLeg;
                this._b = LongLeg;
            }
        }
        public FlexuralMemberAngleBase(ISteelSection section, ICalcLog CalcLog, AngleOrientation AngleOrientation)
            : base(section, CalcLog)
        {
            sectionAngle = null;
            ISectionAngle s = Section.Shape as ISectionAngle;

            if (s == null)
            {
                throw new SectionWrongTypeException(typeof(ISectionAngle));
            }
            else
            {
                sectionAngle = s;
                compactness  = new ShapeCompactness.AngleMember(s, section.Material, AngleOrientation);
            }
        }
Пример #17
0
        /// <summary>
        /// Angle in B with Ray to A and C
        ///
        /// calc Beta in ABC
        /// </summary>
        /// <param name="pA"></param>
        /// <param name="pB"></param>
        /// <param name="pC"></param>
        /// <param name="v"></param>
        /// <returns></returns>

        public static double Angle(Vector3 pA, Vector3 pB, Vector3 pC, AngleOrientation pOrientation)
        {
            Double  a = 0, c = 0, b = 0;
            Vector2 A, B, C;

            if (pOrientation == AngleOrientation.XPlane)
            {
                A = new Vector2(pA.Z, pA.Y);
                B = new Vector2(pB.Z, pB.Y);
                C = new Vector2(pC.Z, pC.Y);
            }
            else if (pOrientation == AngleOrientation.YPlane)
            {
                A = new Vector2(pA.Z, pA.X);
                B = new Vector2(pB.Z, pB.X);
                C = new Vector2(pC.Z, pC.X);
            }
            else if (pOrientation == AngleOrientation.ZPlane)
            {
                A = new Vector2(pA.Y, pA.X);
                B = new Vector2(pB.Y, pB.X);
                C = new Vector2(pC.Y, pC.X);
            }
            else
            {
                throw new Exception();
            }

            a = Geometry2D.DistanceMethods.Distance(C, B);
            b = Geometry2D.DistanceMethods.Distance(A, C);
            c = Geometry2D.DistanceMethods.Distance(A, B);

            if (a == 0 || c == 0)
            {
                throw new ArgumentOutOfRangeException();
            }

            if (C.Y < A.Y)
            {
                return(-Math.Acos((a * a - b * b + c * c) / (2 * a * c)));
            }
            else
            {
                return(Math.Acos((a * a - b * b + c * c) / (2 * a * c)));
            }
        }
Пример #18
0
        private void Set_b_and_h(double b, double h, AngleOrientation AngleOrientation)
        {
            double LongLeg = b >= h ? b : h;
            double ShortLeg = b < h ? b : h;

            if (AngleOrientation == Common.AngleOrientation.LongLegVertical)
            {
                this._d = LongLeg;
                this._b = ShortLeg;
            }
            else
            {
                this._d = ShortLeg;
                this._b = LongLeg;
            }

        }
Пример #19
0
        public BeamDoubleAngle(ISteelSection section, ICalcLog CalcLog, AngleRotation AngleRotation, AngleOrientation AngleOrientation)
            : base(section, CalcLog, AngleOrientation)
        {

            if (section is ISectionDoubleAngle)
            {

                    SectionDoubleAngle = section as ISectionDoubleAngle;


            }
            else
            {
                throw new SectionWrongTypeException(typeof(ISectionTube));
            }
            this.AngleOrientation = AngleOrientation;
            this.AngleRotation = AngleRotation;

            GetSectionValues();
        }
Пример #20
0
        public static double Angle(Ray pRay, Plane pPlane, AngleOrientation pOrientation)
        {
            Ray senkrechte = Ray.CreateUsingOrginAndDirection(pRay.Origin, pPlane.Normal);

            IntersectionPair schnittEbeneSenkrechte = IntersectionMethods.Intersects(senkrechte, pPlane);
            IntersectionPair schnittEbeneGerade     = IntersectionMethods.Intersects(pRay, pPlane);

            if (schnittEbeneSenkrechte.IntersectionOccurred == false || schnittEbeneGerade.IntersectionOccurred == false)
            {
                throw new NotImplementedException();
            }

            Double  a = 0, c = 0, b = 0;
            Vector2 A, B, C;

            if (pOrientation == AngleOrientation.XPlane)
            {
                A = new Vector2(schnittEbeneGerade.IntersectionPoint.Z, schnittEbeneGerade.IntersectionPoint.Y);
                B = new Vector2(pRay.Origin.Z, pRay.Origin.Y);
                C = new Vector2(schnittEbeneSenkrechte.IntersectionPoint.Z, schnittEbeneSenkrechte.IntersectionPoint.Y);
            }
            else if (pOrientation == AngleOrientation.YPlane)
            {
                A = new Vector2(schnittEbeneGerade.IntersectionPoint.Z, schnittEbeneGerade.IntersectionPoint.X);
                B = new Vector2(pRay.Origin.Z, pRay.Origin.X);
                C = new Vector2(schnittEbeneSenkrechte.IntersectionPoint.Z, schnittEbeneSenkrechte.IntersectionPoint.X);
            }
            else if (pOrientation == AngleOrientation.ZPlane)
            {
                A = new Vector2(schnittEbeneGerade.IntersectionPoint.Y, schnittEbeneGerade.IntersectionPoint.X);
                B = new Vector2(pRay.Origin.Y, pRay.Origin.X);
                C = new Vector2(schnittEbeneSenkrechte.IntersectionPoint.Y, schnittEbeneSenkrechte.IntersectionPoint.X);
            }
            else
            {
                throw new Exception();
            }

            a = Geometry2D.DistanceMethods.Distance(C, B);
            b = Geometry2D.DistanceMethods.Distance(A, C);
            c = Geometry2D.DistanceMethods.Distance(A, B);

            double ret;

            if (A.Y < C.Y && B.X >= C.X) // 0-90
            {
                ret = System.Math.Asin(a / c);
            }
            else if (A.Y >= C.Y && B.X >= C.X) // 90-180
            {
                ret = (System.Math.PI - System.Math.Asin(a / c));
            }
            else if (A.Y >= C.Y && B.X < C.X)                     //180-270
            {
                ret = (System.Math.PI + System.Math.Asin(a / c)); //k
            }
            else if (A.Y < C.Y && B.X < C.X)                      //270-360
            {
                ret = ((2 * System.Math.PI) - System.Math.Asin(a / c));
            }
            else
            {
                throw new Exception();
            }

            return((ret - (Math.PI / 2)) * -1);
        }
Пример #21
0
 public DoubleAngleMember(ISectionDoubleAngle Section, ISteelMaterial Material, AngleOrientation AngleOrientation)
     : base(Section.Angle, Material, AngleOrientation)
 {
 }
Пример #22
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);
        }
Пример #23
0
        public ISection GetShape(string ShapeId, AngleOrientation AngleOrientation = AngleOrientation.LongLegVertical, AngleRotation AngleRotation = AngleRotation.FlatLegBottom)
        {
            ShapeTypeSteel shapeType = DetermineShapeType(ShapeId);

            return(GetShape(ShapeId, shapeType, AngleOrientation, AngleRotation));
        }
Пример #24
0
        public BeamDoubleAngle(ISteelSection section, ICalcLog CalcLog, AngleRotation AngleRotation, AngleOrientation AngleOrientation)
            : base(section, CalcLog, AngleOrientation)
        {
            if (section is ISectionDoubleAngle)
            {
                SectionDoubleAngle = section as ISectionDoubleAngle;
            }
            else
            {
                throw new SectionWrongTypeException(typeof(ISectionTube));
            }
            this.AngleOrientation = AngleOrientation;
            this.AngleRotation    = AngleRotation;

            GetSectionValues();
        }
Пример #25
0
            protected virtual void SetCompactness(ISectionAngle ang, ISteelMaterial Material, AngleOrientation AngleOrientation)
            {
                double shortLeg;
                double longLeg;

                if (ang.d >= ang.b)
                {
                    longLeg  = ang.d;
                    shortLeg = ang.b;
                }
                else
                {
                    longLeg  = ang.b;
                    shortLeg = ang.d;
                }

                //make differentiation based on angle orientation

                if (AngleOrientation == AngleOrientation.LongLegVertical)
                {
                    FlangeCompactness = new LegOfSingleAngle(Material, shortLeg, ang.t);
                    WebCompactness    = new LegOfSingleAngle(Material, longLeg, ang.t);
                }
                else
                {
                    FlangeCompactness = new LegOfSingleAngle(Material, longLeg, ang.t);
                    WebCompactness    = new LegOfSingleAngle(Material, shortLeg, ang.t);
                }
            }
Пример #26
0
 public AngleMember(ISectionAngle Section, ISteelMaterial Material, AngleOrientation AngleOrientation)
 {
     SetCompactness(Section, Material, AngleOrientation);
 }
Пример #27
0
 public SectionAngle(string Name, double h, double b, double t, AngleRotation AngleRotation, AngleOrientation AngleOrientation)
     : base(Name)
 {
     Set_b_and_h(b, h, AngleOrientation);
     //this._d = h;
     //this._b = b;
     this._t = t;
     this.AngleOrientation = AngleOrientation;
     this.AngleRotation    = AngleRotation;
 }
Пример #28
0
 public ISection GetShape(string ShapeId, AngleOrientation AngleOrientation = AngleOrientation.LongLegVertical, AngleRotation AngleRotation = AngleRotation.FlatLegBottom)
 {
     ShapeTypeSteel shapeType = DetermineShapeType(ShapeId);
     return  GetShape( ShapeId, shapeType,  AngleOrientation, AngleRotation);
 }
Пример #29
0
            public AngleMember(ISectionAngle Section, ISteelMaterial Material, AngleOrientation AngleOrientation)
            {
                SetCompactness( Section, Material, AngleOrientation);

            }