Beispiel #1
0
        public static bool SetISection(HndzISectionProfile Isection, HndzStructuralMaterial material)
        {
            SAPISection sapISection = default(SAPISection);

            sapISection.ConvertFromHndzIProfile(Isection, material);
            return(SAP2000API.SetISection(sapISection));
        }
Beispiel #2
0
        public static HndzISectionProfile GetISection(HndzISectionProfile profile, ref HndzStructuralMaterial material)
        {
            SAPISection section = new SAPISection();

            section.ConvertFromHndzIProfile(profile, material);
            section = SAP2000API.GetISection(section);
            HndzISectionProfile hndzProfile = new HndzISectionProfile();

            hndzProfile = section.ConvertToHndzIProfile(ref material);
            return(hndzProfile);
        }
Beispiel #3
0
        private static IfcBeam CreateBeam(XbimModel model, HndzStructuralElement genericProducthndz)
        {
            using (XbimReadWriteTransaction txn = model.BeginTransaction("Create" + genericProducthndz.ToString()))
            {
                IfcBeam genericProductIfc        = model.Instances.New <IfcBeam>();
                IfcExtrudedAreaSolid body        = model.Instances.New <IfcExtrudedAreaSolid>();
                IfcBeamType          elementType = model.Instances.New <IfcBeamType>();
                elementType.PredefinedType = IfcBeamTypeEnum.BEAM;


                if (genericProducthndz.Profile is HndzRectangularProfile)
                {
                    HndzRectangularProfile genericProfilehndz = genericProducthndz.Profile as HndzRectangularProfile;

                    IfcRectangleProfileDef ifcGenericProfile = AssignRectangularProfile(model, genericProducthndz, genericProductIfc, elementType, genericProfilehndz);

                    //model as a swept area solid
                    body.SweptArea = ifcGenericProfile;
                }

                if (genericProducthndz.Profile is HndzISectionProfile)
                {
                    HndzISectionProfile genericProfilehndz = genericProducthndz.Profile as HndzISectionProfile;

                    IfcIShapeProfileDef ifcGenericProfile = AssignIProfile(model, genericProducthndz, genericProductIfc, elementType, genericProfilehndz);


                    //model as a swept area solid
                    body.SweptArea = ifcGenericProfile;
                }
                if (genericProducthndz.Profile is HndzCSectionProfile)
                {
                    HndzCSectionProfile genericProfilehndz = genericProducthndz.Profile as HndzCSectionProfile;
                    IfcCShapeProfileDef ifcGenericProfile  = AssignCsectionProfile(model, genericProducthndz, genericProductIfc, elementType, genericProfilehndz);


                    //model as a swept area solid
                    body.SweptArea = ifcGenericProfile;
                }

                AdjustExtrusion(model, body, genericProducthndz, genericProductIfc);

                if (model.Validate(txn.Modified(), Console.Out) == 0)
                {
                    txn.Commit();
                    return(genericProductIfc);
                }

                return(null);
            }
        }
Beispiel #4
0
        public HndzISectionProfile ConvertToHndzIProfile(ref HndzStructuralMaterial material)
        {
            HndzISectionProfile profile = new HndzISectionProfile();

            profile.Name      = Name;
            profile.I_Section = new SectionI(Name, Height, TopFlangeWidth, BotFlangeWidth, TopFlangeThickness, BotFlangeThickness, WebThickness);


            material = WebMaterial.ConvertToHndzMaterial();
            //material = TopFlangeMaterial.ConvertToHndzMaterial();
            //material = BotFlangeMaterial.ConvertToHndzMaterial();

            return(profile);
        }
Beispiel #5
0
        public SAPISection ConvertFromHndzIProfile(HndzISectionProfile Isection, HndzStructuralMaterial material)
        {
            SAPISection sapISection = new SAPISection();

            sapISection.Name               = Isection.Name;
            sapISection.BotFlangeWidth     = Isection.I_Section.b_fBot;
            sapISection.BotFlangeThickness = Isection.I_Section.t_fBot;
            sapISection.TopFlangeWidth     = Isection.I_Section.b_fTop;
            sapISection.TopFlangeThickness = Isection.I_Section.t_fTop;
            sapISection.WebThickness       = Isection.I_Section.t_w;

            sapISection.Height = Isection.I_Section.d;


            sapISection.BotFlangeMaterial.ConvertFromHndzMaterial(material);
            sapISection.WebMaterial.ConvertFromHndzMaterial(material);
            sapISection.TopFlangeMaterial.ConvertFromHndzMaterial(material);
            return(sapISection);
        }
        public static void initDesigner(SteelGrade Grade, LoadingType LoadingType, HndzISectionProfile _ColumnSection, HndzISectionProfile _BeamSection, HndzColumnStandardCase _columnTapered,
                                        HndzBeamStandrdCase _beamTapered)
        {
            switch (LoadingType)
            {
            case LoadingType.Case1:
                CaseStress = 1.0;
                break;

            case LoadingType.Case2:
                CaseStress = 1.2;
                break;
            }
            BuiltUpSection       = _ColumnSection;
            BuiltUpSectionRafter = _BeamSection;
            columnTapered        = _columnTapered;
            beamTapered          = _beamTapered;
            switch (Grade)
            {
            case SteelGrade.st37:
                Fy   = 2.4;
                Fu   = 3.6;
                FYX  = 1.4;
                FYXZ = 0.000065;
                break;

            case SteelGrade.st44:
                Fy   = 2.8;
                Fu   = 4.4;
                FYX  = 1.6;
                FYXZ = 0.000085;
                break;

            case SteelGrade.st52:
                Fy   = 3.6;
                Fu   = 5.2;
                FYX  = 2.1;
                FYXZ = 0.000135;
                break;
            }
        }
Beispiel #7
0
        public static HndzFrameSingleBay3D AssembleSections(HndzFrameSingleBay3D Frame3d)
        {
            foreach (HndzFrameSingleBay2D Frame in Frame3d.Frames2D)
            {
                double Fy             = 2.4;
                double LUSupportedSap = 4.11;
                //Kfactor Needs to Be calculated from InterActrion Diagrams - 2 For worst Case
                double Kfactor          = 2;
                double KfactorBeamEnd   = 0.7;
                double KfactorBeamStart = 0.65;
                double Lbin             = 8.5;
                double Lbout            = 5;
                double BeamLength       = 12;
                double PurlinSpacing    = 2;
                double ColumnHeight     = Frame.LeftBeam.ExtrusionLine.RhinoLine.Length;
                double LUnsupported     = ColumnHeight / 2;
                //What i want
                // Analysis Result at start and and end

                //Whats my Name ? Gecko
                HndzAnalysisResults RColStartMax = Frame.LeftBeam.AnalysisResults[0];
                HndzAnalysisResults RColMidMax   = Frame.LeftBeam.AnalysisResults[1];
                HndzAnalysisResults RColEndMax   = Frame.LeftBeam.AnalysisResults[2];

                HndzAnalysisResults RColStartMin = Frame.LeftBeam.AnalysisResults[3];
                HndzAnalysisResults RColMidMin   = Frame.LeftBeam.AnalysisResults[4];
                HndzAnalysisResults RColEndMin   = Frame.LeftBeam.AnalysisResults[5];
                //=============================================
                //HndzAnalysisResults RBeamEnd = Frame.LeftBeam.AnalysisResults[1];
                //HndzAnalysisResults RBeamStart = Frame.LeftBeam.AnalysisResults[0];
                //==================================
                //station 0 = 0 ,3
                //station 1 = 2 , 5
                //============================

                //foreach (HndzAnalysisResults RColEnd in Frame.LeftBeam.AnalysisResults)
                //{
                SectionI ColEstimated = CrossSectionCalulator.CalculateColumnSection(CrossSectionCalulator.SteelGrade.st37, ColumnHeight, RColStartMax.Axial, RColStartMax.Moment3);

                SectionI ColEnd = BeamColumnDesign.DesignEnd(ColEstimated.d, ColEstimated.t_w, ColEstimated.b_fTop, ColEstimated.t_fTop,
                                                             ColEstimated.b_fBot, ColEstimated.t_fBot, RColEndMax.Axial, RColStartMax.Moment3, RColEndMax.Moment3, Fy,
                                                             LUnsupported, Kfactor, Lbin, Lbout, BeamColumnDesign.SwayCondtion.PermitedToSway,
                                                             BeamColumnDesign.SteelGrade.st37, BeamColumnDesign.LoadingType.Case2);
                SectionI ColStart = CrossSectionCalulator.SectionTaperedColumn(ColEnd);


                ColStart = BeamColumnDesign.DesignStart(ColStart.d, ColStart.t_w, ColStart.b_fTop, ColStart.t_fTop, ColStart.b_fBot,
                                                        ColStart.t_fBot, RColStartMax.Axial, RColEndMax.Moment3, RColEndMax.Moment3, Fy, LUnsupported, Kfactor,
                                                        Lbin, Lbout, BeamColumnDesign.SwayCondtion.PermitedToSway, BeamColumnDesign.SteelGrade.st37,
                                                        BeamColumnDesign.LoadingType.Case2);

                HndzISectionProfile Start   = new HndzISectionProfile(ColStart);
                HndzISectionProfile End     = new HndzISectionProfile(ColEnd);
                HndzITaperedProfile Section = new HndzITaperedProfile(Start, End);

                Frame.LeftBeam.Profile  = Section;
                Frame.RightBeam.Profile = Section;
                // }

                //foreach (HndzAnalysisResults RBeamStart in Frame.LeftBeam.AnalysisResults)
                //{
                //    SectionI BeamEstimated = CrossSectionCalulator.CalculateBeamSection(CrossSectionCalulator.SteelGrade.st37, BeamLength, RBeamStart.Axial, RBeamStart.Moment3);

                //    SectionI BeamStart = BeamDesign.DesignStart(BeamEstimated.d, BeamEstimated.t_w, BeamEstimated.b_fTop, BeamEstimated.t_fTop,
                //      BeamEstimated.b_fBot, BeamEstimated.t_fBot, RBeamStart.Axial, RBeamStart.Shear2, RBeamStart.Moment3, RBeamEnd.Moment3, Fy, LUSupportedSap, KfactorBeamStart, BeamLength, PurlinSpacing, BeamDesign.SwayCondtion.PermitedToSway, BeamDesign.SteelGrade.st37, BeamDesign.LoadingType.Case2);

                //    SectionI BeamEnd = CrossSectionCalulator.SectionTaperedBeam(BeamStart);

                //    BeamEnd = BeamDesign.DesignEnd(BeamEnd.d, BeamEnd.t_w, BeamEnd.b_fTop, BeamEnd.t_fTop,
                //            BeamEnd.b_fBot, BeamEnd.t_fBot,
                //            RBeamEnd.Axial, RBeamEnd.Shear2, RBeamStart.Moment3, RBeamEnd.Moment3, Fy, PurlinSpacing, KfactorBeamEnd, BeamLength, PurlinSpacing, BeamDesign.SwayCondtion.PermitedToSway, BeamDesign.SteelGrade.st37, BeamDesign.LoadingType.Case2);


                //    HndzISectionProfile Start = new HndzISectionProfile(BeamStart);
                //    HndzISectionProfile End = new HndzISectionProfile(BeamEnd);

                //    HndzITaperedProfile Section = new HndzITaperedProfile(Start, End);



                //}
                // double AppliedLoads =
            }
            return(null);
        }
Beispiel #8
0
        private static IfcBeam CreatePurlin(XbimModel model, HndzPurlin genericProducthndz)
        {
            using (XbimReadWriteTransaction txn = model.BeginTransaction("Create Purlin"))
            {
                IfcBeam beam = model.Instances.New <IfcBeam>();
                IfcExtrudedAreaSolid body = model.Instances.New <IfcExtrudedAreaSolid>();
                body.Depth = genericProducthndz.ExtrusionLine.RhinoLine.Length;

                IfcBeamType elementType = model.Instances.New <IfcBeamType>();
                elementType.PredefinedType = IfcBeamTypeEnum.USERDEFINED;

                IfcMaterial material = model.Instances.New <IfcMaterial>();
                material.Name = "STEEL";
                beam.SetMaterial(material);
                IfcCartesianPoint insertPoint = model.Instances.New <IfcCartesianPoint>();

                insertPoint.SetXY(genericProducthndz.ExtrusionLine.baseNode.Point.X, genericProducthndz.ExtrusionLine.baseNode.Point.Y); //insert at arbitrary position//****************Need Revision

                if (genericProducthndz.Profile is HndzRectangularProfile)
                {
                    HndzRectangularProfile recProfile = genericProducthndz.Profile as HndzRectangularProfile;

                    #region Type & Material &Tags

                    string typeText = "HANDAZ-Column-Rectangular " + (int)recProfile.Rectangle.Width + " x "
                                      + (int)recProfile.Rectangle.Height + " mm";

                    elementType.Tag  = typeText;
                    elementType.Name = typeText;
                    IfcLabel columnLabel = new IfcLabel(typeText);
                    elementType.ElementType          = columnLabel;
                    elementType.ApplicableOccurrence = columnLabel;



                    beam.Tag         = typeText;
                    beam.Name        = typeText;
                    beam.Description = typeText;
                    beam.SetDefiningType(elementType, model);

                    #endregion

                    //represent column as a rectangular profile
                    IfcRectangleProfileDef MyPurlinPofile = model.Instances.New <IfcRectangleProfileDef>();
                    MyPurlinPofile.ProfileType           = IfcProfileTypeEnum.AREA;
                    MyPurlinPofile.XDim                  = recProfile.Rectangle.Height;
                    MyPurlinPofile.YDim                  = recProfile.Rectangle.Width;
                    MyPurlinPofile.Position              = model.Instances.New <IfcAxis2Placement2D>();
                    MyPurlinPofile.Position.RefDirection = model.Instances.New <IfcDirection>();
                    MyPurlinPofile.Position.RefDirection.SetXY(recProfile.OrientationInPlane.X, recProfile.OrientationInPlane.Y);
                    //MyColumnPofile.Position.Location = insertPoint;

                    //model as a swept area solid
                    body.SweptArea = MyPurlinPofile;
                }
                if (genericProducthndz.Profile is HndzISectionProfile)
                {
                    HndzISectionProfile Iprofile = genericProducthndz.Profile as HndzISectionProfile;

                    #region Type & Material &Tags

                    string typeText = "HANDAZ-Purlin-I beam (flange " + Iprofile.I_Section.b_f + " x " + Iprofile.I_Section.t_fTop + " and web "
                                      + Iprofile.I_Section.d + " x " + Iprofile.I_Section.t_w + " mm";


                    elementType.Tag  = typeText;
                    elementType.Name = typeText;
                    IfcLabel columnLabel = new IfcLabel(typeText);
                    elementType.ElementType          = columnLabel;
                    elementType.ApplicableOccurrence = columnLabel;



                    beam.Tag         = typeText;
                    beam.Name        = typeText;
                    beam.Description = typeText;
                    beam.SetDefiningType(elementType, model);

                    #endregion
                    // IfcPolyline pl = model.Instances.New<IfcPolyline>();

                    //List<Point3d> tempPoints= Iprofile.ConvertItoPoints();
                    // foreach (Point3d point in tempPoints)
                    // {
                    //     IfcCartesianPoint tempPoint = model.Instances.New<IfcCartesianPoint>();
                    //     tempPoint.SetXYZ(point.X, point.Y, point.Z);
                    //     pl.Points.Add(tempPoint);
                    // }

                    IfcIShapeProfileDef MyPurlinPofile = model.Instances.New <IfcIShapeProfileDef>();
                    MyPurlinPofile.FlangeThickness = Iprofile.I_Section.tf;
                    MyPurlinPofile.WebThickness    = Iprofile.I_Section.t_w;
                    MyPurlinPofile.OverallWidth    = Iprofile.I_Section.b_f;
                    MyPurlinPofile.OverallDepth    = Iprofile.I_Section.d;
                    MyPurlinPofile.FilletRadius    = 10;

                    MyPurlinPofile.Position = model.Instances.New <IfcAxis2Placement2D>();
                    MyPurlinPofile.Position.RefDirection = model.Instances.New <IfcDirection>();
                    MyPurlinPofile.Position.RefDirection.SetXY(Iprofile.OrientationInPlane.X, Iprofile.OrientationInPlane.Y);
                    //MyColumnPofile.Position.Location = insertPoint;

                    //model as a swept area solid
                    body.SweptArea = MyPurlinPofile;
                }
                if (genericProducthndz.Profile is HndzCSectionProfile)
                {
                    HndzCSectionProfile Cprofile = genericProducthndz.Profile as HndzCSectionProfile;

                    #region Type & Material &Tags

                    string typeText = "HANDAZ-Purlin-C-Chanel (flange " + Cprofile.C_Section.b_f + " x " + Cprofile.C_Section.t_f + " and web "
                                      + Cprofile.C_Section.d + " x " + Cprofile.C_Section.t_w + " mm";


                    elementType.Tag  = typeText;
                    elementType.Name = typeText;
                    IfcLabel columnLabel = new IfcLabel(typeText);
                    elementType.ElementType          = columnLabel;
                    elementType.ApplicableOccurrence = columnLabel;


                    beam.Tag         = typeText;
                    beam.Name        = typeText;
                    beam.Description = typeText;
                    beam.SetDefiningType(elementType, model);

                    #endregion

                    IfcCShapeProfileDef MyPurlinPofile = model.Instances.New <IfcCShapeProfileDef>();
                    MyPurlinPofile.WallThickness = Cprofile.C_Section.t_f;
                    //MyColumnPofile.WebThickness = Iprofile.C_Section.t_w; //ToDo:purlin web and flange thickness are the same!!!!
                    MyPurlinPofile.Width = Cprofile.C_Section.b_f;
                    MyPurlinPofile.Depth = Cprofile.C_Section.d;
                    MyPurlinPofile.InternalFilletRadius = 10;

                    MyPurlinPofile.Position = model.Instances.New <IfcAxis2Placement2D>();
                    MyPurlinPofile.Position.RefDirection = model.Instances.New <IfcDirection>();
                    MyPurlinPofile.Position.RefDirection.SetXY(Cprofile.OrientationInPlane.X, Cprofile.OrientationInPlane.Y);


                    //model as a swept area solid
                    body.SweptArea = MyPurlinPofile;
                }
                body.ExtrudedDirection = model.Instances.New <IfcDirection>();
                body.ExtrudedDirection.SetXYZ(0, 0, 1);
                //body.ExtrudedDirection.SetXYZ(Hndzcol.ExtrusionLine.RhinoLine.Direction.X, Hndzcol.ExtrusionLine.RhinoLine.Direction.Y, Hndzcol.ExtrusionLine.RhinoLine.Direction.Z);


                //parameters to insert the geometry in the model
                IfcCartesianPoint origin = model.Instances.New <IfcCartesianPoint>();
                origin.SetXYZ(genericProducthndz.ExtrusionLine.baseNode.Point.X, genericProducthndz.ExtrusionLine.baseNode.Point.Y, genericProducthndz.ExtrusionLine.baseNode.Point.Z);

                body.Position = model.Instances.New <IfcAxis2Placement3D>();
                //body.Position.Location = origin;

                body.Position.RefDirection = model.Instances.New <IfcDirection>();
                body.Position.RefDirection.SetXYZ(1, 0, 0);

                //Create a Definition shape to hold the geometry
                IfcShapeRepresentation shape = model.Instances.New <IfcShapeRepresentation>();
                shape.ContextOfItems           = model.IfcProject.ModelContext();
                shape.RepresentationType       = "SweptSolid";
                shape.RepresentationIdentifier = "Body";
                shape.Items.Add(body);

                //Create a Product Definition and add the model geometry to the column
                IfcProductDefinitionShape rep = model.Instances.New <IfcProductDefinitionShape>();
                rep.Representations.Add(shape);

                beam.Representation = rep;

                //now place the column into the model
                IfcLocalPlacement   lp   = model.Instances.New <IfcLocalPlacement>();
                IfcAxis2Placement3D ax3d = model.Instances.New <IfcAxis2Placement3D>();
                ax3d.Location = origin;

                Vector3d perpendicularVector = new Vector3d(genericProducthndz.Profile.OrientationInPlane.X, genericProducthndz.Profile.OrientationInPlane.Y, 0);

                Plane extrusionPlane;
                bool  aa = genericProducthndz.ExtrusionLine.RhinoLine.TryGetPlane(out extrusionPlane);
                if (aa)
                {
                    perpendicularVector = extrusionPlane.ZAxis;
                }



                ax3d.RefDirection = model.Instances.New <IfcDirection>();
                ax3d.RefDirection.SetXYZ(perpendicularVector.X, perpendicularVector.Y, perpendicularVector.Z);
                ax3d.Axis = model.Instances.New <IfcDirection>();
                ax3d.Axis.SetXYZ(genericProducthndz.ExtrusionLine.RhinoLine.Direction.X, genericProducthndz.ExtrusionLine.RhinoLine.Direction.Y, genericProducthndz.ExtrusionLine.RhinoLine.Direction.Z);

                lp.RelativePlacement = ax3d;
                beam.ObjectPlacement = lp;

                #region Owner Data
                beam.OwnerHistory.OwningUser        = model.DefaultOwningUser;
                beam.OwnerHistory.OwningApplication = model.DefaultOwningApplication;
                #endregion

                //validate write any errors to the console and commit if OK, otherwise abort
                string temp = Path.GetTempPath();
                //if (model.Validate(txn.Modified(), File.CreateText("E:\\Column" + column.GlobalId + "Errors.txt")) == 0)
                // if (model.Validate(txn.Modified(), File.CreateText(temp + "Column" + column.GlobalId + "Errors.txt")) == 0)
                if (model.Validate(txn.Modified(), Console.Out) == 0)
                {
                    txn.Commit();
                    return(beam);
                }

                return(null);
            }
        }
Beispiel #9
0
        private static IfcIShapeProfileDef AssignIProfile(XbimModel model, HndzStructuralElement genericProducthndz,
                                                          IfcProduct genericProductIfc, IfcBuildingElementType elementType, HndzISectionProfile gnericProfileHndz)
        {
            #region Type & Material &Tags

            string typeText = genericProducthndz.ToString() + "I beam (flange " + gnericProfileHndz.I_Section.b_f + " x " + gnericProfileHndz.I_Section.t_fTop + " and web "
                              + gnericProfileHndz.I_Section.d + " x " + gnericProfileHndz.I_Section.t_w + " mm";


            elementType.Tag  = typeText;
            elementType.Name = typeText;
            IfcLabel columnLabel = new IfcLabel(typeText);
            elementType.ElementType          = columnLabel;
            elementType.ApplicableOccurrence = columnLabel;



            //genericProductIfc.Tag = typeText;
            genericProductIfc.Name        = typeText;
            genericProductIfc.Description = typeText;
            genericProductIfc.SetDefiningType(elementType, model);

            #endregion

            IfcIShapeProfileDef ifcGenericProfile = model.Instances.New <IfcIShapeProfileDef>();
            ifcGenericProfile.FlangeThickness = gnericProfileHndz.I_Section.tf;
            ifcGenericProfile.WebThickness    = gnericProfileHndz.I_Section.t_w;
            ifcGenericProfile.OverallWidth    = gnericProfileHndz.I_Section.b_f;
            ifcGenericProfile.OverallDepth    = gnericProfileHndz.I_Section.d;
            ifcGenericProfile.FilletRadius    = 10;//ToDo:make it zero after explore ISection

            ifcGenericProfile.ProfileType           = IfcProfileTypeEnum.AREA;
            ifcGenericProfile.Position              = model.Instances.New <IfcAxis2Placement2D>();
            ifcGenericProfile.Position.RefDirection = model.Instances.New <IfcDirection>();
            ifcGenericProfile.Position.RefDirection.SetXY(gnericProfileHndz.OrientationInPlane.X, gnericProfileHndz.OrientationInPlane.Y);
            ifcGenericProfile.Position.Location = model.Instances.New <IfcCartesianPoint>();
            ifcGenericProfile.Position.Location.SetXY(0, 0);
            //ifcGenericProfile.Position.Location.SetXY(genericProducthndz.ExtrusionLine.baseNode.Point.X,
            //     genericProducthndz.ExtrusionLine.baseNode.Point.Y);
            return(ifcGenericProfile);
        }
Beispiel #10
0
        public static HndzFrameSingleBay3D AssembleSections(HndzFrameSingleBay3D Frame3d)
        {
            double Fy             = 2.4;
            double LUSupportedSap = 4.11;
            double Kfactor        = 2;
            //==========================
            double KfactorBeamEnd   = 0.7;
            double KfactorBeamStart = 0.65;
            //=======================

            double PurlinSpacing = Frame3d.PurlinSpacing / 1000;

            //
            foreach (HndzFrameSingleBay2D Frame in Frame3d.Frames2D)
            {
                //===========================
                //=======================
                //Has to Get it form an algorithm in sap
                //Kfactor Needs to Be calculated from InterActrion Diagrams - 2 For worst Case
                //What i want
                // Analysis Result at start and and end
                //Whats my Name ? Gecko

                double BeamLength   = Frame.LeftBeam.ExtrusionLine.RhinoLine.Length / 1000;
                double ColumnHeight = Frame.LeftColumn.ExtrusionLine.RhinoLine.Length / 1000;
                //=================
                double Lbin         = ColumnHeight;
                double Lbout        = ColumnHeight;
                double LUnsupported = ColumnHeight * 100 / 2;

                HndzAnalysisResults RColStartMax = Frame.LeftColumn.AnalysisResults[0];
                HndzAnalysisResults RColMidMax   = Frame.LeftColumn.AnalysisResults[1];
                HndzAnalysisResults RColEndMax   = Frame.LeftColumn.AnalysisResults[2];

                HndzAnalysisResults RColStartMin = Frame.LeftColumn.AnalysisResults[3];
                HndzAnalysisResults RColMidMin   = Frame.LeftColumn.AnalysisResults[4];
                HndzAnalysisResults RColEndMin   = Frame.LeftColumn.AnalysisResults[5];

                HndzAnalysisResults RBeamStartMax = Frame.LeftColumn.AnalysisResults[0];
                HndzAnalysisResults RBeamMidMax   = Frame.LeftColumn.AnalysisResults[1];
                HndzAnalysisResults RBeamEndMax   = Frame.LeftColumn.AnalysisResults[2];

                HndzAnalysisResults RBeamStartMin = Frame.LeftColumn.AnalysisResults[3];
                HndzAnalysisResults RBeamMidMin   = Frame.LeftColumn.AnalysisResults[4];
                HndzAnalysisResults RBeamEndMin   = Frame.LeftColumn.AnalysisResults[5];
                //=============================================
                //HndzAnalysisResults RBeamEnd = Frame.LeftBeam.AnalysisResults[1];
                //HndzAnalysisResults RBeamStart = Frame.LeftBeam.AnalysisResults[0];
                //==================================
                //station 0 = 0 ,3
                //station 1 = 2 , 5
                //============================

                //foreach (HndzAnalysisResults RColEnd in Frame.LeftBeam.AnalysisResults)
                //{
                SectionI ColEstimated = CrossSectionCalulator.CalculateColumnSection(CrossSectionCalulator.SteelGrade.st37, ColumnHeight, RColStartMax.Axial, RColEndMax.Moment3);

                SectionI ColEndMax = BeamColumnDesign.DesignEnd(ColEstimated.d, ColEstimated.t_w, ColEstimated.b_fTop, ColEstimated.t_fTop,
                                                                ColEstimated.b_fBot, ColEstimated.t_fBot, RColEndMax.Axial, RColStartMax.Moment3, RColEndMax.Moment3, Fy,
                                                                LUnsupported, Kfactor, Lbin, Lbout, BeamColumnDesign.SwayCondtion.PermitedToSway,
                                                                BeamColumnDesign.SteelGrade.st37, BeamColumnDesign.LoadingType.Case2);
                SectionI ColStartMax = CrossSectionCalulator.SectionTaperedColumn(ColEndMax);


                ColStartMax = BeamColumnDesign.DesignStart(ColStartMax.d, ColStartMax.t_w, ColStartMax.b_fTop, ColStartMax.t_fTop, ColStartMax.b_fBot,
                                                           ColStartMax.t_fBot, RColStartMax.Axial, RColStartMax.Moment3, RColEndMax.Moment3, Fy, LUnsupported, Kfactor,
                                                           Lbin, Lbout, BeamColumnDesign.SwayCondtion.PermitedToSway, BeamColumnDesign.SteelGrade.st37,
                                                           BeamColumnDesign.LoadingType.Case2);

                ColStartMax = CrossSectionCalulator.PostProcessing(ColStartMax);
                ColEndMax   = CrossSectionCalulator.PostProcessing(ColEndMax);
                //=======================================================



                //HndzISectionProfile Start = new HndzISectionProfile(ColStartMax);
                //HndzISectionProfile End = new HndzISectionProfile(ColEndMax);

                //HndzITaperedProfile ColumnTaperedSectionMax = new HndzITaperedProfile(Start, End);

                //======================================
                SectionI ColEstimatedMin = CrossSectionCalulator.CalculateColumnSection(CrossSectionCalulator.SteelGrade.st37, ColumnHeight, RColStartMax.Axial, RColEndMax.Moment3);

                SectionI ColEndMin = BeamColumnDesign.DesignEnd(ColEstimatedMin.d, ColEstimatedMin.t_w, ColEstimatedMin.b_fTop, ColEstimatedMin.t_fTop,
                                                                ColEstimatedMin.b_fBot, ColEstimatedMin.t_fBot, RColEndMin.Axial, RColStartMin.Moment3, RColEndMin.Moment3, Fy,
                                                                LUnsupported, Kfactor, Lbin, Lbout, BeamColumnDesign.SwayCondtion.PermitedToSway,
                                                                BeamColumnDesign.SteelGrade.st37, BeamColumnDesign.LoadingType.Case2);
                SectionI ColStartMin = CrossSectionCalulator.SectionTaperedColumn(ColEndMin);


                ColStartMin = BeamColumnDesign.DesignStart(ColStartMin.d, ColStartMin.t_w, ColStartMin.b_fTop, ColStartMin.t_fTop, ColStartMin.b_fBot,
                                                           ColStartMin.t_fBot, RColStartMin.Axial, RColStartMin.Moment3, RColEndMin.Moment3, Fy, LUnsupported, Kfactor,
                                                           Lbin, Lbout, BeamColumnDesign.SwayCondtion.PermitedToSway, BeamColumnDesign.SteelGrade.st37,
                                                           BeamColumnDesign.LoadingType.Case2);

                ColStartMin = CrossSectionCalulator.PostProcessing(ColStartMin);
                ColEndMin   = CrossSectionCalulator.PostProcessing(ColEndMin);



                //HndzISectionProfile StartMin = new HndzISectionProfile(ColStartMin);
                //HndzISectionProfile EndMin = new HndzISectionProfile(ColEndMax);

                //HndzITaperedProfile ColumnTaperedSectionMin = new HndzITaperedProfile(Start, End);

                SectionI FinalSectionStartCol = CrossSectionCalulator.SectionCompare(ColStartMax, ColStartMin);
                SectionI FinalSectionEndCol   = CrossSectionCalulator.SectionCompare(ColEndMax, ColEndMin);

                HndzISectionProfile ColStart = new HndzISectionProfile(FinalSectionStartCol);
                HndzISectionProfile ColEnd   = new HndzISectionProfile(FinalSectionEndCol);

                HndzITaperedProfile ColumnTaperedSection = new HndzITaperedProfile(ColEnd, ColStart);
                //==========================================



                // }

                //foreach (HndzAnalysisResults RBeamStart in Frame.LeftBeam.AnalysisResults)
                //{
                SectionI BeamEstimatedMax = CrossSectionCalulator.CalculateBeamSection(CrossSectionCalulator.SteelGrade.st37, BeamLength, RBeamStartMax.Axial, RBeamStartMax.Moment3);

                SectionI BeamStartMax = BeamDesign.DesignStart(BeamEstimatedMax.d, BeamEstimatedMax.t_w, BeamEstimatedMax.b_fTop, BeamEstimatedMax.t_fTop,
                                                               BeamEstimatedMax.b_fBot, BeamEstimatedMax.t_fBot, RBeamStartMax.Axial, RBeamStartMax.Shear2, RBeamStartMax.Moment3, RBeamEndMax.Moment3, Fy, LUSupportedSap, KfactorBeamStart, BeamLength, PurlinSpacing, BeamDesign.SwayCondtion.PermitedToSway, BeamDesign.SteelGrade.st37, BeamDesign.LoadingType.Case2);

                SectionI BeamEndMAX = CrossSectionCalulator.SectionTaperedBeam(BeamStartMax);

                BeamEndMAX = BeamDesign.DesignEnd(BeamEndMAX.d, BeamEndMAX.t_w, BeamEndMAX.b_fTop, BeamEndMAX.t_fTop,
                                                  BeamEndMAX.b_fBot, BeamEndMAX.t_fBot,
                                                  RBeamEndMax.Axial, RBeamEndMax.Shear2, RBeamStartMax.Moment3, RBeamEndMax.Moment3, Fy, PurlinSpacing, KfactorBeamEnd, BeamLength, PurlinSpacing, BeamDesign.SwayCondtion.PermitedToSway, BeamDesign.SteelGrade.st37, BeamDesign.LoadingType.Case2);


                BeamStartMax = CrossSectionCalulator.PostProcessing(BeamStartMax);
                BeamEndMAX   = CrossSectionCalulator.PostProcessing(BeamEndMAX);

                //HndzISectionProfile StartBeamMax = new HndzISectionProfile(BeamStartMax);
                //HndzISectionProfile EndBeamMax = new HndzISectionProfile(BeamEndMAX);
                //HndzITaperedProfile BeamTaperedSectionMax = new HndzITaperedProfile(StartBeamMax, EndBeamMax, new Rhino.Geometry.Vector2d(0, 1));

                SectionI BeamEstimatedMin = CrossSectionCalulator.CalculateColumnSection(CrossSectionCalulator.SteelGrade.st37, ColumnHeight, RColStartMax.Axial, RColEndMax.Moment3);

                SectionI BeamEndMin = BeamColumnDesign.DesignEnd(BeamEstimatedMin.d, BeamEstimatedMin.t_w, BeamEstimatedMin.b_fTop, BeamEstimatedMin.t_fTop,
                                                                 BeamEstimatedMin.b_fBot, BeamEstimatedMin.t_fBot, RColEndMin.Axial, RColStartMin.Moment3, RColEndMin.Moment3, Fy,
                                                                 LUnsupported, Kfactor, Lbin, Lbout, BeamColumnDesign.SwayCondtion.PermitedToSway,
                                                                 BeamColumnDesign.SteelGrade.st37, BeamColumnDesign.LoadingType.Case2);
                SectionI BeamStartMin = CrossSectionCalulator.SectionTaperedColumn(BeamEndMin);


                BeamStartMin = BeamColumnDesign.DesignStart(BeamStartMin.d, BeamStartMin.t_w, BeamStartMin.b_fTop, BeamStartMin.t_fTop, BeamStartMin.b_fBot,
                                                            BeamStartMin.t_fBot, RColStartMin.Axial, RColStartMin.Moment3, RColEndMin.Moment3, Fy, LUnsupported, Kfactor,
                                                            Lbin, Lbout, BeamColumnDesign.SwayCondtion.PermitedToSway, BeamColumnDesign.SteelGrade.st37,
                                                            BeamColumnDesign.LoadingType.Case2);

                BeamStartMin = CrossSectionCalulator.PostProcessing(BeamStartMin);
                BeamEndMin   = CrossSectionCalulator.PostProcessing(BeamEndMin);

                //  HndzISectionProfile StartMinBeam = new HndzISectionProfile(BeamStartMin);
                // HndzISectionProfile EndMinBeam = new HndzISectionProfile(BeamEndMin);



                //HndzISectionProfile StartMinBeam = new HndzISectionProfile(BeamEndMin);

                //HndzISectionProfile EndMinBeam = new HndzISectionProfile(BeamStartMin);

                //HndzITaperedProfile BeamTaperedSectionMin = new HndzITaperedProfile(EndMinBeam,StartMinBeam,new Rhino.Geometry.Vector2d(0, 1));


                SectionI FinalSectionStartBeam = CrossSectionCalulator.SectionCompare(BeamStartMax, BeamStartMin);
                SectionI FinalSectionEndBeam   = CrossSectionCalulator.SectionCompare(BeamEndMAX, BeamEndMin);

                HndzISectionProfile BeamStart = new HndzISectionProfile(FinalSectionStartBeam);
                HndzISectionProfile BeamEnd   = new HndzISectionProfile(FinalSectionEndBeam);

                HndzITaperedProfile BeamTaperedSection = new HndzITaperedProfile(BeamStart, BeamEnd, new Rhino.Geometry.Vector2d(0, 1));


                //==========================================

                //}
                // Sections Assumbtions

                //========================================
                Frame.LeftColumn.Profile  = ColumnTaperedSection;
                Frame.RightColumn.Profile = ColumnTaperedSection;
                Frame.LeftBeam.Profile    = BeamTaperedSection;
                Frame.RightBeam.Profile   = BeamTaperedSection;

                //SectionChannel AssumedCSection = new SectionChannel("Assumed hotRolled C Section", 180, 80, 10, 4);
                //HndzISectionProfile bigProfile = new HndzISectionProfile(new SectionI("big", 1000 * 2, 500 * 2, 100 * 2, 50 * 2));
                //HndzISectionProfile smallProfile = new HndzISectionProfile(new SectionI("small", 1000, 500, 100, 50));
            }
            return(Frame3d);
        }